/* =====================================================================
   header-nav.css — nav + dropdown (hover) maroon/gold + animasi
   Fix transparan sudah TERGABUNG (li dipaksa block, panel solid).
   ===================================================================== */

/* ===== BAR NAVIGASI ===== */
.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: linear-gradient(180deg, #0e4054, #082c3a);
    border-bottom: 3px solid #38b6e8;
    font-family: "Segoe UI", Arial, sans-serif;
    position: relative;
    z-index: 100;
}

.main-nav > li { position: relative; }

.main-nav > li > a {
    position: relative;
    display: block;
    padding: 14px 20px;
    color: #eaf6fc;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease, text-shadow 0.25s ease;
}

/* underline merah tumbuh dari tengah saat hover */
.main-nav > li > a::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1a6f9e, #4ec3f0);
    border-radius: 5px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}
.main-nav > li:hover > a::before { width: calc(100% - 40px); }

.main-nav > li:hover > a {
    color: #a8e6ff;
    text-shadow: 0 0 10px rgba(56, 182, 232, 0.45);
}

.main-nav > li.active > a { background: #d8f0fb; color: #062430; }
.main-nav > li.active > a::before { width: 0; }

/* panah submenu muter saat hover */
.main-nav > li.has-dropdown > a::after {
    content: "▾";
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.85;
    transition: transform 0.3s ease;
}
.main-nav > li.has-dropdown:hover > a::after { transform: rotate(180deg); }

/* ===== DROPDOWN (panel solid, anti-transparan) ===== */
.main-nav .dropdown {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 215px;
    background: linear-gradient(180deg, #0c3a4c, #061f2b);
    border: 1px solid rgba(56, 182, 232, 0.45);
    border-top: 2px solid #38b6e8;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
    transform-origin: top center;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.main-nav > li.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* item submenu: WAJIB block + float:none (fix panel kolaps/transparan) */
.main-nav .dropdown li {
    display: block !important;
    float: none !important;
    width: auto !important;
    position: relative;
    margin: 0;
    list-style: none;
    background: transparent;

    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0s;
}
.main-nav > li.has-dropdown:hover .dropdown li {
    opacity: 1;
    transform: translateX(0);
}
/* delay bertingkat — HANYA saat hover (biar staggered pas dibuka) */
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(1)  { transition-delay: 0.04s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(2)  { transition-delay: 0.08s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(3)  { transition-delay: 0.12s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(4)  { transition-delay: 0.16s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(5)  { transition-delay: 0.20s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(6)  { transition-delay: 0.24s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(7)  { transition-delay: 0.28s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(8)  { transition-delay: 0.32s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(9)  { transition-delay: 0.36s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(10) { transition-delay: 0.40s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(11) { transition-delay: 0.44s; }
.main-nav > li.has-dropdown:hover .dropdown li:nth-child(12) { transition-delay: 0.48s; }

.main-nav .dropdown li a {
    display: block !important;
    float: none !important;
    width: auto !important;
    padding: 10px 18px;
    color: #e3f3fa;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    background: transparent;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}
.main-nav .dropdown li a:hover {
    background: rgba(56, 182, 232, 0.15);
    color: #a8e6ff;
    border-left-color: #38b6e8;
    padding-left: 24px;
    text-shadow: 0 0 8px rgba(56, 182, 232, 0.4);
}

/* ===== RESPONSIVE (HP) ===== */
@media (max-width: 780px) {
    .main-nav { flex-direction: column; align-items: stretch; }
    .main-nav > li > a::before { display: none; }
    .main-nav .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.3);
        display: none;
    }
    .main-nav .dropdown li { opacity: 1; transform: none; }
    .main-nav > li.has-dropdown:hover .dropdown,
    .main-nav > li.has-dropdown:focus-within .dropdown {
        display: block;
    }
}

/* hormati user yang matiin animasi */
@media (prefers-reduced-motion: reduce) {
    .main-nav *,
    .main-nav .dropdown,
    .main-nav .dropdown li { transition: none !important; }
}
/* =====================================================================
   FIX konflik #nav (dari base-layout.css lama) vs dropdown baru.
   Taruh di PALING BAWAH header.css (atau file CSS yg load terakhir).
   Pakai prefix #nav + !important biar menang lawan "#nav ul {height:40px}".
   ===================================================================== */

/* Panel dropdown: buang batasan tinggi 40px dari #nav ul, jadikan solid */
#nav .main-nav .dropdown,
.main-nav .dropdown {
    height: auto !important;          /* <-- kunci: batalin height:40px */
    max-height: none !important;
    overflow: visible !important;
    background: linear-gradient(180deg, #0c3a4c, #061f2b) !important;
    margin: 0 !important;
}

/* Item submenu: block penuh, gak float, tinggi natural */
#nav .main-nav .dropdown li,
.main-nav .dropdown li {
    display: block !important;
    float: none !important;
    height: auto !important;
    width: auto !important;
    line-height: normal !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Link submenu: block, padding kita, warna kita (bukan style #nav lama) */
#nav .main-nav .dropdown li a,
.main-nav .dropdown li a {
    display: block !important;
    float: none !important;
    width: auto !important;
    padding: 10px 18px !important;
    color: #e3f3fa !important;
    background: transparent !important;
    line-height: 1.4 !important;
}

/* Hover submenu: pakai gold kita, bukan hover cream ala #nav */
#nav .main-nav .dropdown li a:hover,
.main-nav .dropdown li a:hover {
    background: rgba(56, 182, 232, 0.15) !important;
    color: #a8e6ff !important;
}

/* =====================================================================
   BRAND BAR — logo (kiri) + 2 tombol (kanan)
   Posisi: di antara banner utama dan #nav.
   Tanpa properti "gap" (pakai margin) biar aman di editor/browser lama.
   Blok ini murni TAMBAHAN di paling bawah file.

   >>> 3 ANGKA UNTUK ATUR KERAPATAN:
       1. .brandbar          -> padding    (tinggi kontainer)
       2. .brandbar-logo img -> height     (besar logo)
       3. .bb-btn            -> padding    (besar tombol)
   ===================================================================== */

.brandbar {
    box-sizing: border-box;
    width: 920px;
    max-width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 5px 18px 6px;   /* [1] atas | kiri-kanan | bawah */
    background: linear-gradient(180deg, #0a3244, #062430);
    border-bottom: 1px solid rgba(56, 182, 232, 0.35);
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ===== LOGO (kiri) ===== */
.brandbar .brandbar-logo {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}
.brandbar .brandbar-logo img {
    display: block;
    height: 56px;   /* [2] besar logo */
    width: auto;
    max-width: 100%;
    border: 0;
}

/* ===== TOMBOL (kanan) ===== */
.brandbar .brandbar-actions {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* pengganti "gap": jarak antar tombol pakai margin */
.brandbar .brandbar-actions .bb-btn + .bb-btn {
    margin-left: 10px;
}

.brandbar .bb-btn {
    display: inline-block;
    padding: 9px 22px;   /* [3] besar tombol */
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

/* tombol 1 — garis luar (sekunder) */
.brandbar .bb-btn-ghost {
    color: #cfeeff;
    background: transparent;
    border: 1.5px solid #38b6e8;
    box-shadow: inset 0 0 12px rgba(56, 182, 232, 0.12);
}
/* :hover WAJIB spesifik — kalau cuma .bb-btn, bakal kalah lawan
   "a:hover {color:#CC5E09}" di base-layout.css dan jadi oranye */
.brandbar .bb-btn-ghost:hover {
    color: #04222d;
    background: linear-gradient(180deg, #7fd8ff, #38b6e8);
    border-color: #7fd8ff;
    box-shadow: 0 0 16px rgba(56, 182, 232, 0.45);
    transform: translateY(-2px);
}

/* tombol 2 — isi penuh (CTA utama) */
.brandbar .bb-btn-solid {
    color: #04222d;
    background: linear-gradient(180deg, #4ec3f0, #1a7fb5);
    border: 1.5px solid #11618c;
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.35),
        0 0 12px rgba(56, 182, 232, 0.28);
}
.brandbar .bb-btn-solid:hover {
    color: #04222d;
    background: linear-gradient(180deg, #7fd8ff, #2b9fd4);
    border-color: #38b6e8;
    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(56, 182, 232, 0.5);
    transform: translateY(-2px);
}

.brandbar .bb-btn:active {
    transform: translateY(0);
}

/* ===== HP: logo & tombol numpuk di tengah ===== */
@media (max-width: 780px) {
    .brandbar {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        padding: 10px 14px;
    }
    .brandbar .brandbar-logo {
        margin-bottom: 10px;
    }
    .brandbar .brandbar-logo img {
        height: 46px;
    }
    .brandbar .brandbar-actions {
        width: 100%;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    .brandbar .bb-btn {
        -ms-flex: 1 1 0px;
        flex: 1 1 0;
        text-align: center;
        padding: 10px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brandbar .bb-btn {
        transition: none !important;
    }
    .brandbar .bb-btn-ghost:hover,
    .brandbar .bb-btn-solid:hover {
        transform: none;
    }
}

/* =====================================================================
   BRAND BAR — datetime (tengah)
   Nempel di antara logo dan tombol login/daftar.
   ===================================================================== */

.brandbar .brandbar-datetime {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 6px;
    color: #cfeeff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    opacity: 0.9;
}

.brandbar .brandbar-datetime .hd-sep {
    color: #38b6e8;
    opacity: 0.7;
}

.brandbar .brandbar-datetime #hd-time {
    color: #a8e6ff;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 780px) {
    .brandbar .brandbar-datetime {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        font-size: 11.5px;
    }
}