/* ==========================================================================
   HEADER STYLE (Desktop Max 1400, Hitam, Text Putih, Accent Hijau)
   ========================================================================== */
.site-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--container-a);
    margin: 0 auto;
    padding: 0 10px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navigasi Utama */
.main-navigation {
    flex-grow: 1;
    margin: 0 40px;
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
}

.nav-menu > .menu-item {
    position: relative;
    padding: 30px 15px;
}

.nav-menu a {
    color: var(--header-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu .menu-item:hover > a {
    color: var(--brand-green);
}

/* SUB MENU LEVEL 2 & 3 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--brand-black);
    min-width: 220px;
    list-style: none;
    border-top: 2px solid var(--brand-green);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.nav-menu .menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu .menu-item {
    position: relative;
    border-bottom: 1px solid #222;
}

.sub-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 0.9rem;
}

/* Menu yang memiliki submenu */
.menu-item.has-children > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Panah desktop */
.menu-item.has-children > a::after {
    content: "";
    width: 4px;
    height: 4px;

    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    
    margin-left: 6px;

    transform: rotate(45deg);
    transition: transform .25s ease;
    
     position: relative;
    top: -0.5px;
}

.menu-item.has-children:hover > a::after {
    content: "";

    width: 10px;
    height: 1px;

    border: 0;
    background: currentColor;

    transform: none;
}

/* Level 3 */
.sub-menu .sub-menu.level-3 {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 2px solid var(--brand-green);
}



/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.action-btn:hover {
    color: var(--brand-green);
}

/* Custom CSS Icon Toggle Sun/Moon */
.theme-icon::before {
    content: "🌙"; /* Default light mode menunjukkan icon bulan */
    font-size: 1rem;
}
body.dark-mode .theme-icon::before {
    content: "☀️"; /* Dark mode menunjukkan icon matahari */
}

.desktop-only { display: inline-block; }
.menu-toggle { display: none; }
.mobile-cta-wrapper { display: none; }


/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 768px) {
    /* Responsive Header Mobile Sesuai Request */
    .menu-toggle {
        display: block; background: none; border: none; cursor: pointer; padding: 10px;
    }
    .hamburger {
        display: block; width: 24px; height: 2px; background: var(--header-text); position: relative;
    }
    .hamburger::before, .hamburger::after {
        content: ''; position: absolute; width: 24px; height: 2px; background: var(--header-text); left: 0;
    }
    .hamburger::before { top: -6px; }
    .hamburger::after { top: 6px; }
    
    /* Animasi hamburger saat aktif */
    .menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
    .menu-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg); top: 0; }
    .menu-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg); top: 0; }

    .header-container { height: 60px; }
    .desktop-only { display: none; }
    
    /* Geser Posisi Logo dan Menu di Mobile */
    .site-branding { position: absolute; left: 50%; transform: translateX(-50%); }
    
    .main-navigation {
        position: fixed; top: 60px; left: -100%; width: 80%; height: calc(100vh - 60px);
        background: var(--brand-black); margin: 0; box-shadow: 5px 0 15px rgba(0,0,0,0.5);
        transition: left 0.3s ease; padding: 20px; overflow-y: auto;
    }
    .main-navigation.active { left: 0; }
    
    .nav-menu { flex-direction: column; justify-content: flex-start; }
    .nav-menu > .menu-item { padding: 15px 0; border-bottom: 1px solid #222; }
    .sub-menu,
.sub-menu.level-3 {

    display: none;

    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;

    margin-top: 10px;
    padding-left: 15px;

    background: #1a1a1a;
    box-shadow: none;

}

.menu-item.active > .sub-menu {
    display: block;
}

.menu-item.active > a::after {
    content: "";

    width: 10px;
    height: 1px;

    border: 0;
    background: currentColor;

    transform: none;
}

}