/* ========================================
   HEADER CSS - TERPISAH
   ======================================== */

/* ================================================================
   DESKTOP (TETAP, GA DIUBAH)
   ================================================================ */

/* ===== HEADER TRANSPARAN ===== */
.header-transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0 10px;
    background: transparent;
}

.header-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 5px;
}

/* ===== HEADER KIRI ===== */
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 0;
    margin-left: 0;
    flex-shrink: 0;
}

.header-logo {
    height: 55px;
    width: auto;
}

.header-brand-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-brand {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'Inter', 'Avenir Next', sans-serif;
}

.header-slogan {
    color: rgba(255,255,255,0.70);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'Inter', 'Avenir Next', sans-serif;
}

/* ===== HEADER KANAN ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 0;
    margin-right: 0;
    flex-shrink: 0;
}

.header-cert-logo {
    height: 35px;
    width: auto;
    max-height: 35px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
    filter: brightness(0) invert(1);
}

/* ===== HEADER TENGAH ===== */
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-menu > li > a {
    color: rgba(255,255,255,0.85);
    padding: 6px 14px;
    border-radius: 5px;
    transition: 0.3s;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
}

.nav-menu > li > a i {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* ===== DROPDOWN ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 130%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    padding: 8px 0;
    z-index: 100;
}

/* ===== DROPDOWN HOVER (DESKTOP) ===== */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
}

/* ===== DROPDOWN KLIK ARROW (DESKTOP) ===== */
.dropdown.dropdown-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
}

/* ===== ARROW ROTASI ===== */
.dropdown:hover .dropdown-arrow,
.dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== DROPDOWN MENU ITEMS ===== */
.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: 400;
    transition: 0.2s;
    text-align: left;
    border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
    background: #f0f4f9;
    border-left-color: #00a3ff;
    color: #0a2a43;
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none !important;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: 0.3s;
}

/* ================================================================
   TABLET (max-width: 992px) - CUMA PERKECIL UKURAN
   ================================================================ */
@media (max-width: 992px) {
    .header-brand {
        font-size: 1rem;
    }
    .header-slogan {
        font-size: 0.5rem;
    }
    .header-logo {
        height: 42px;
    }
    .header-cert-logo {
        height: 28px;
        max-height: 28px;
    }
    .nav-menu > li > a {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    .dropdown-menu {
        min-width: 180px;
    }
    .dropdown-menu li a {
        font-size: 0.75rem;
        padding: 8px 16px;
    }
}

/* ================================================================
   MOBILE (max-width: 768px)
   ================================================================ */
@media (max-width: 768px) {
    /* HEADER TETAP TRANSPARAN */
    .header-transparent {
        position: absolute;
        background: transparent;
        padding: 12px 0 8px;
    }

    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
        padding: 0 8px;
    }

    /* ===== HEADER KIRI ===== */
    .header-left {
        flex: 0 1 auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        text-align: left;
        padding-left: 0;
        gap: 6px;
        min-width: 0;
    }

    .header-logo {
        height: 28px;
        width: auto;
    }

    .header-brand-wrapper {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        min-width: 0;
    }

    .header-brand {
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    .header-slogan {
        font-size: 0.3rem;
        font-weight: 300;
        letter-spacing: 0.03em;
        white-space: nowrap;
        color: rgba(255,255,255,0.6);
    }

    /* ===== HEADER KANAN (LOGO KEMNAKER/LALPK TETAP DI KANAN) ===== */
    .header-right {
        display: flex;
        flex: 0 0 auto;
        gap: 4px;
        padding-right: 0;
    }

    .header-cert-logo {
        height: 20px;
        max-height: 20px;
        width: auto;
        object-fit: contain;
    }

    /* ===== NAVIGASI (TURUN KE BAWAH) ===== */
    .header-nav {
        order: 3;
        flex: 1 1 100%;
        border-top: 1px solid rgba(255,255,255,0.08);
        padding-top: 6px;
        width: 100%;
        justify-content: flex-start;
    }

    .hamburger {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 2px;
        background: transparent;
        padding: 0;
        width: 100%;
    }

    .nav-menu > li > a {
        display: block;
        padding: 3px 6px;
        text-align: center;
        font-size: 0.5rem;
        font-weight: 500;
        color: rgba(255,255,255,0.85);
        border-radius: 4px;
        white-space: nowrap;
    }

    .nav-menu > li > a:hover,
    .nav-menu > li > a.active {
        background: rgba(255,255,255,0.15);
        color: #ffffff;
    }

    .nav-menu > li > a i {
        font-size: 0.35rem;
        margin-left: 2px;
        transition: transform 0.3s ease;
        display: inline-block;
    }

    /* ===== DROPDOWN MOBILE ===== */
    .dropdown-menu {
        position: absolute;
        top: 130%;
        left: 0;
        transform: none;
        background: #ffffff;
        min-width: 160px;
        border-radius: 8px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
        padding: 6px 0;
        z-index: 100;
    }

    /* Mobile: dropdown terbuka pake class active */
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        top: 100%;
    }

    .dropdown-menu li a {
        display: block;
        padding: 5px 12px;
        color: #1a1a1a;
        font-size: 0.55rem;
        font-weight: 400;
        transition: 0.2s;
        text-align: left;
        border-left: 3px solid transparent;
    }

    .dropdown-menu li a:hover {
        background: #f0f4f9;
        border-left-color: #00a3ff;
        color: #0a2a43;
    }

    /* Arrow rotasi di mobile */
    .dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
}

/* ================================================================
   HP KECIL (max-width: 480px)
   ================================================================ */
@media (max-width: 480px) {
    .header-transparent {
        padding: 8px 0 6px;
    }

    .header-logo {
        height: 22px;
    }

    .header-brand {
        font-size: 0.5rem;
    }

    .header-slogan {
        font-size: 0.25rem;
    }

    .header-cert-logo {
        height: 16px;
        max-height: 16px;
    }

    .nav-menu > li > a {
        font-size: 0.4rem;
        padding: 2px 4px;
    }

    .dropdown-menu {
        min-width: 120px;
    }

    .dropdown-menu li a {
        font-size: 0.45rem;
        padding: 4px 8px;
    }
}