/* ══════════════════════════════════════════════════════
   HEADER — layout, menu, dropdown, mobile
   ══════════════════════════════════════════════════════ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-mobile-balance-bg);
}

/* ── Top gradient bar ────────────────────────────────── */
.site-header__topbar {
    position: relative;
    width: 100%;
    height: 3rem;
}

@media (min-width: 768px) {
    .site-header__topbar { height: 3.5rem; }
}

.site-header__topbar-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.site-header__topbar-bg > div {
    position: absolute;
}

/* ── Login / mobile top actions ──────────────────────── */
.site-header__actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3rem;
    z-index: 10;
    pointer-events: none;
}

.site-header__actions > * {
    pointer-events: auto;
}

@media (min-width: 768px) {
    .site-header__actions { height: 3.5rem; }
}

.site-header__desktop-login {
    display: none;
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.site-header__desktop-apk {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    max-width: calc(50% - 1rem);
}

.site-header__desktop-auth {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    max-width: calc(50% - 1rem);
}

.site-header__login-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .site-header__desktop-login { display: flex; }
}

.site-header__mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

@media (min-width: 1024px) {
    .site-header__mobile-top { display: none; }
}

.site-header__mobile-top svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    max-width: 1.5rem !important;
    max-height: 1.5rem !important;
    flex-shrink: 0;
}

.site-header__mobile-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.site-header__mobile-logo img {
    height: 2.5rem !important;
    width: auto !important;
    max-width: 160px;
    object-fit: contain;
}

/* ── Desktop header row (logo + menu) ──────────────── */
.header-desktop-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.25rem 1rem;
}

@media (min-width: 1024px) {
    .header-desktop-row {
        display: flex !important;
    }
}

.header-desktop-row .header-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
    padding: 0.375rem;
}

/* ── Main navigation ───────────────────────────────── */
#menu.menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    flex: 1;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

@media (min-width: 1024px) {
    #menu.menu {
        display: flex !important;
    }
}

#menu.menu > li {
    position: static;
}

#menu.menu > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

#menu.menu > li > a:hover {
    opacity: 0.85;
}

#menu.menu .menu-icon,
#menu.menu .menu-home-icon {
    width: 35px !important;
    height: 35px !important;
    max-width: 35px !important;
    max-height: 35px !important;
    flex-shrink: 0;
}

/* ── Dropdown provider menu ────────────────────────── */
#menu .dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 60;
    display: none;
    width: 100%;
    min-width: unset;
    max-width: 100vw;
    overflow-x: auto;
    padding: 1.125rem 0 1rem;
    border-bottom: 3px solid var(--color-2);
    box-shadow: 0 8px 24px rgba(139, 21, 21, 0.35);
    background:
        linear-gradient(275.84deg, #6b1010 3.75%, #0c0505 47.96%),
        linear-gradient(90.04deg, #8b1515 0.03%, #150808 50%, #6b1010 99.97%);
}

#menu li:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu__detail-list {
    display: inline-block;
    vertical-align: top;
    margin: 0.25rem;
    font-size: 0;
}

.dropdown-menu__detail-list .img-thumbnail img {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    object-fit: contain;
    border-radius: 50%;
}

.dropdown-menu__detail-list .title {
    display: block;
    font-size: 0.65rem;
    color: var(--color-4);
    margin-top: 0.25rem;
    text-align: center;
}

/* ── Mobile sidebar ──────────────────────────────────── */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
}

.mobile-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 16rem;
    z-index: 9998;
    overflow-y: auto;
    background: var(--color-1);
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.4);
}

.mobile-sidebar svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    max-width: 1.5rem !important;
    flex-shrink: 0;
}

.mobile-sidebar img.w-6 {
    width: 1.5rem !important;
    height: 1.5rem !important;
    object-fit: contain;
}

.mobile-sidebar .sidebar-logo img {
    height: 2rem !important;
    width: auto !important;
}

/* ── Bottom mobile nav ─────────────────────────────── */
.mobile-bottom-nav svg.w-6 {
    width: 1.5rem !important;
    height: 1.5rem !important;
    max-width: 1.5rem !important;
    max-height: 1.5rem !important;
}

.mobile-bottom-nav .flex.flex-col {
    align-items: center;
    gap: 0.15rem;
    font-size: 0.65rem;
    text-decoration: none;
    color: #fff;
}

.mobile-bottom-nav svg.w-full {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* ══════════════════════════════════════════════════════
   DOWNLOAD APK — desktop (pojok kiri topbar) & sidebar mobile
   ══════════════════════════════════════════════════════ */

/* Desktop: pill kompak di pojok kiri topbar */
.apk-dl-desktop {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 1.75rem;
    max-height: 2rem;
    padding: 0 0.55rem 0 0.4rem;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(90deg, #6b1010, #c9a227, #8b1515);
    background-size: 200% 100%;
    box-shadow:
        0 0 0 1px rgba(240, 192, 64, 0.35),
        0 2px 6px rgba(139, 21, 21, 0.35);
    animation: apk-dl-gradient 3.5s ease-in-out infinite;
    transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

.apk-dl-desktop:hover {
    box-shadow:
        0 0 0 1px rgba(240, 192, 64, 0.5),
        0 3px 10px rgba(139, 21, 21, 0.45);
    opacity: 0.95;
}

.apk-dl-desktop__shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.apk-dl-desktop__shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: apk-dl-shine 2.8s ease-in-out infinite;
}

.apk-dl-desktop__icon {
    position: relative;
    z-index: 1;
    display: flex;
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
    animation: apk-dl-bounce 2s ease-in-out infinite;
}

.apk-dl-desktop__icon svg {
    width: 100%;
    height: 100%;
    color: var(--color-2);
}

.apk-dl-desktop__label {
    position: relative;
    z-index: 1;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.apk-dl-desktop__arrow {
    position: relative;
    z-index: 1;
    width: 0.65rem;
    height: 0.65rem;
    flex-shrink: 0;
    animation: apk-dl-arrow 1.3s ease-in-out infinite;
}

.apk-dl-desktop__arrow svg {
    width: 100%;
    height: 100%;
    color: var(--color-2);
}

/* Mobile sidebar: di bawah Promosi */
.apk-dl-sidebar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.75rem 0.375rem 0;
    padding: 0.8rem 0.9rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #8b1515 0%, #c9a227 50%, #5a0a0a 100%);
    background-size: 200% 200%;
    box-shadow:
        0 0 0 2px rgba(240, 192, 64, 0.28),
        0 5px 18px rgba(139, 21, 21, 0.45);
    animation: apk-dl-sidebar-bg 4.5s ease infinite;
    transition: transform 0.15s ease;
}

.apk-dl-sidebar:active {
    transform: scale(0.98);
}

.apk-dl-sidebar__ring {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(240, 192, 64, 0.5);
    pointer-events: none;
    animation: apk-dl-ring 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.apk-dl-sidebar__ring--delay {
    animation-delay: 1.2s;
    border-color: rgba(232, 185, 35, 0.3);
}

.apk-dl-sidebar__shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.apk-dl-sidebar__shine::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -90%;
    width: 38%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: rotate(20deg);
    animation: apk-dl-shine 3s ease-in-out infinite;
}

.apk-dl-sidebar__icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.28);
    animation: apk-dl-bounce 2.2s ease-in-out infinite;
}

.apk-dl-sidebar__icon svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--color-2);
}

.apk-dl-sidebar__text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.apk-dl-sidebar__text strong {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.apk-dl-sidebar__text small {
    font-size: 0.68rem;
    opacity: 0.88;
}

.apk-dl-sidebar__chip {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #1a0808;
    background: linear-gradient(180deg, #fff8e7, var(--color-2));
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.5);
    animation: apk-dl-chip 1.7s ease-in-out infinite;
}

@keyframes apk-dl-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes apk-dl-sidebar-bg {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes apk-dl-shine {
    0%, 70%, 100% { left: -130%; opacity: 0; }
    12% { opacity: 1; }
    42% { left: 150%; opacity: 1; }
    52% { opacity: 0; }
}

@keyframes apk-dl-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes apk-dl-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

@keyframes apk-dl-ring {
    0% { transform: scale(1); opacity: 0.8; }
    70%, 100% { transform: scale(1.1); opacity: 0; }
}

@keyframes apk-dl-chip {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    .apk-dl-desktop,
    .apk-dl-desktop__shine::after,
    .apk-dl-desktop__icon,
    .apk-dl-desktop__arrow,
    .apk-dl-sidebar,
    .apk-dl-sidebar__ring,
    .apk-dl-sidebar__shine::after,
    .apk-dl-sidebar__icon,
    .apk-dl-sidebar__chip {
        animation: none !important;
    }
}