/*
 * Theme Name: UPA TIK UNTAD
 * File: header.css
 * Description: Mengatur tampilan navigasi Desktop (Standard View).
 * Sections:
 * 01. ROOT VARIABLES - Skema warna dan transisi.
 * 02. TOP HEADER - Informasi kontak dan tombol aksi atas.
 * 03. HEADER BASE - Struktur utama sticky header.
 * 04. BRANDING - Logo dan Identitas Unit.
 * 05. NAVIGATION - Menu utama dan efek hover.
 * 06. DROPDOWN SYSTEM - Logika menu bertingkat (Anti-Cutoff).
 * 07. ACTIONS - Tombol pencarian dan overlay.
 */

/* ======================================================
    01. ROOT VARIABLES
   ====================================================== */:root {
    --primary: #003366;
    --header-dark: #001a33;
    --accent: #f39c12;
    --dark: #1c1c1c;
    --light: #ffffff;
    --bg-soft: #f8fafc; 
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================================================
    02. TOP HEADER (HORIZONTAL ALIGN & GLOSSY)
   ====================================================== */
.top-header {
    background: linear-gradient(180deg, #001f3f 0%, #001529 100%) !important;
    height: 35px;
    display: flex !important;
    align-items: center !important;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.top-header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    flex-direction: row !important; /* Paksa satu baris */
    justify-content: space-between !important;
    align-items: center !important;
}

/* ======================================================
    KOTAK KIRI (Email & Media Center) - EFEK MENYALA
   ====================================================== */
.top-header-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px;
}

.top-info-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    text-decoration: none !important;
    color: #e2e8f0 !important;
    transition: all 0.3s ease; /* Transisi halus */
}

/* EFEK MENYALA HIJAU SAAT HOVER (Teks & Icon) */
.top-info-item:hover {
    color: #2ecc71 !important; /* Berubah Hijau */
    filter: drop-shadow(0 0 5px rgba(46, 204, 113, 0.6)); /* Glow halus */
}

.top-info-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

/* Icon sedikit bergerak saat hover */
.top-info-item:hover .dashicons {
    transform: scale(1.1);
}

.top-txt-info {
    font-size: 11px !important;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* ======================================================
    KOTAK KANAN (Sosmed & SIGA-8)
   ====================================================== */
.top-header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px;
}

.top-social-links {
    display: flex !important;
    gap: 18px !important; /* Jarak antar icon sedikit lebih lega */
    border-right: 1px solid rgba(255,255,255,0.2);
    padding-right: 15px;
    margin-right: 5px;
    align-items: center;
}

.top-social-links a {
    color: #cbd5e0 !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transisi lebih smooth */
    display: flex;
    align-items: center;
    position: relative;
}

/* ======================================================
    EFEK MENYALA HIJAU (HOVER SOSMED)
   ====================================================== */
.top-social-links a:hover {
    color: #2ecc71 !important; /* Warna Hijau SIGA-8 */
    transform: scale(1.25);    /* Sedikit membesar agar tegas */
    filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.9)); /* Efek Neon Hijau */
}

/* Memastikan semua icon dashicons ikut menyala hijau saat di-hover */
.top-social-links a:hover .dashicons {
    color: #2ecc71 !important;
}

.top-social-links .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Transisi lebih mantul */
}

/* Tombol SIGA-8 Glossy */
.btn-siga-8 {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    color: #fff !important;
    padding: 4px 14px !important;
    font-size: 10px !important;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
    white-space: nowrap;
}

/* ======================================================
    03. MAIN HEADER (STURDY & ALIGNED)
   ====================================================== */
.site-header {
    position: fixed;
    top: 35px; 
    width: 100%;
    height: 90px;
    background: #00264d;
    z-index: 10000;
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(243, 156, 18, 0.3); /* Garis aksen tipis orange */
}

.container-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Kunci Logo dan Teks agar SEJAJAR lurus */
.branding-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; 
    gap: 18px !important;
}

.site-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

.site-description {
    font-size: 10px !important;
    color: #94a3b8 !important;
    margin: 4px 0 0 0 !important;
    letter-spacing: 1.2px;
}

/* ======================================================
    04. BRANDING (LOGO & TEKS - KUNCI SEJAJAR)
   ====================================================== */
.site-branding {
    display: flex !important;
    align-items: center !important; /* Rata tengah vertikal */
    height: 100% !important;
}

.branding-link {
    display: flex !important;
    flex-direction: row !important; /* Logo kiri, teks kanan */
    align-items: center !important;  /* KUNCI: Supaya logo tidak naik */
    gap: 15px !important;
    text-decoration: none !important;
    float: none !important;          /* Matikan float tema lama */
}

.custom-logo-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.custom-logo-wrapper img {
    max-height: 60px !important;    /* Ukuran logo desktop */
    width: auto !important;
    display: block !important;
    margin: 0 !important;           /* Hilangkan margin bawaan logo */
}

.brand-text-container {
    display: flex !important;
    flex-direction: column !important; /* Judul atas, Tagline bawah */
    justify-content: center !important;
    margin: 0 !important;
}

.site-title {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    text-transform: uppercase;
}

.site-description {
    font-size: 10px !important;
    color: #cbd5e0 !important;
    margin: 3px 0 0 0 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ======================================================
    05. NAVIGATION (STABILIZER & ALIGNMENT)
   ====================================================== */
.header-navigation-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1; /* Mengambil sisa ruang agar tetap sejajar */
}

.main-navigation {
    display: block !important;
}

.nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 2px; /* Jarak antar menu dipersempit agar search tidak turun */
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-menu li {
    position: relative !important;
    white-space: nowrap;
}

/* Link Utama (Level 1) */
.nav-menu > li > a {
    color: #ffffff !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Indikator Panah Level 1 (Turun) */
.nav-menu > li.menu-item-has-children > a::after {
    content: "\f140";
    font-family: "dashicons";
    font-size: 12px;
    margin-left: 5px;
}

/* ======================================================
    06. SMART DROPDOWN SYSTEM (ALL LEVELS WITH ARROWS)
   ====================================================== */
.nav-menu ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff !important;
    min-width: 230px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px 0 !important;
    margin: 15px 0 0 0 !important; /* Ruang untuk panah Level 1 */
    list-style: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999 !important;
}

/* --- PANAH LEVEL 1 (MENUNJUK KE ATAS) --- */
.nav-menu > li > ul.sub-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 25px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    z-index: -1;
    box-shadow: -3px -3px 5px rgba(0,0,0,0.04);
}

/* --- PANAH LEVEL 2 & 3 (MENUNJUK KE SAMPING) --- */
/* Muncul di samping menu yang membuka ke kanan */
.nav-menu ul.sub-menu li ul.sub-menu::before {
    content: "";
    position: absolute;
    top: 15px; 
    left: -7px; /* Menunjuk ke menu induk di kiri */
    width: 14px;
    height: 14px;
    background: #ffffff;
    transform: rotate(45deg);
    z-index: -1;
    box-shadow: -2px 2px 4px rgba(0,0,0,0.03);
    display: block !important; /* Diaktifkan kembali */
}

/* Tampilkan saat hover */
.nav-menu li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* LEVEL 2: Buka ke Kanan */
.nav-menu ul.sub-menu li ul.sub-menu {
    top: -10px !important;
    left: 100% !important;
    margin: 0 0 0 10px !important; /* Ruang samping untuk panah level 2 */
    transform: translateX(15px);
}

/* Indikator Panah Level 2 (Kanan) */
.nav-menu ul.sub-menu li.menu-item-has-children > a::after {
    content: "\f139";
    font-family: "dashicons";
    font-size: 12px;
    margin-left: auto;
}

/* LEVEL 3: Buka ke Bawah (Sesuai Request Sebelumnya) */
.nav-menu ul.sub-menu ul.sub-menu li ul.sub-menu {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    background: #f1f5f9 !important;
    width: 100% !important;
    margin: 5px 0 !important;
}

/* Sembunyikan segitiga jika Level 3 dipaksa turun ke bawah agar tidak menumpuk */
.nav-menu ul.sub-menu ul.sub-menu li ul.sub-menu::before {
    display: none !important;
}

/* Indikator Panah Level 3 (Turun) */
.nav-menu ul.sub-menu ul.sub-menu li.menu-item-has-children > a::after {
    content: "\f140" !important;
}

/* ======================================================
    ANTI-CUTOFF (UNTUK MENU DEVISI/KANAN)
   ====================================================== */
.nav-menu > li:nth-last-child(-n+3) ul.sub-menu {
    left: auto !important;
    right: 0 !important;
}

/* Panah Level 1 Pindah ke Kanan */
.nav-menu > li:nth-last-child(-n+3) > ul.sub-menu::before {
    left: auto !important;
    right: 25px !important;
}

/* Level 2 & 3 Buka ke KIRI */
.nav-menu > li:nth-last-child(-n+3) ul.sub-menu li ul.sub-menu {
    left: auto !important;
    right: 100% !important;
    margin: 0 10px 0 0 !important;
    transform: translateX(-15px);
}

/* Panah Level 2 & 3 Pindah Menunjuk ke KANAN */
.nav-menu > li:nth-last-child(-n+3) ul.sub-menu li ul.sub-menu::before {
    left: auto !important;
    right: -7px !important;
    box-shadow: 2px -2px 4px rgba(0,0,0,0.03);
}

/* Link Dropdown Styling */
.nav-menu ul.sub-menu li a {
    color: #1e293b !important;
    display: flex !important;
    align-items: center;
    padding: 10px 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s;
}

.nav-menu ul.sub-menu li a:hover {
    background: #f8fafc !important;
    color: #003366 !important;
    padding-left: 25px !important;
}

/* Search Action Fix */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 15px;
    margin-left: 15px;
    flex-shrink: 0;
}

/* ======================================================
    07. ACTIONS & SEARCH (MODERN & ELEGANT VERSION)
   ====================================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px; /* Jarak antar icon lebih lega */
}

/* Elegant Search Trigger */
.search-btn {
    background: transparent !important; /* Hilangkan kotak abu-abu lama */
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: #ffffff !important; /* Warna putih agar kontras dengan header biru */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.search-btn:hover { 
    background: rgba(255, 255, 255, 0.1) !important; 
    color: #f39c12 !important; /* Berubah jadi orange aksen saat hover */
    transform: scale(1.1);
}

/* Elegant Search Overlay (Glassmorphism) */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 26, 77, 0.85); /* Biru gelap transparan */
    backdrop-filter: blur(15px);        /* Efek kaca mewah */
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.search-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.search-field-modern {
    font-size: 32px;
    font-weight: 300;
    border: none !important;
    border-bottom: 2px solid #f39c12 !important; /* Garis bawah orange elegant */
    padding: 15px 0;
    width: 80%;
    max-width: 600px;
    text-align: center;
    background: transparent;
    color: #ffffff;
    outline: none;
}

/* ======================================================
    08. MOBILE TOGGLE (ELEGANT HAMBURGER)
   ====================================================== */
.mobile-menu-toggle {
    display: none; /* Muncul hanya di layar kecil via responsive.css nanti */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px; /* Garis tipis 2px terlihat lebih mahal */
    background-color: #ffffff;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Animasi Menjadi Silang (X) */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Munculkan Toggle saat layar HP */
@media screen and (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
    .header-navigation-wrapper {
        display: none; /* Sembunyikan menu desktop */
    }
}