/* Navbar mobile bersama: halaman utama dan halaman artikel memakai aturan yang sama. */
@media (max-width: 768px) {
    body .main-header {
        top: 10px;
        left: 10px;
        width: calc(100% - 20px);
        border-radius: 12px;
        background: rgba(7, 31, 68, .94);
        box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
        transform: none;
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    body .main-header .container {
        width: 100%;
        margin: 0;
        padding-right: 20px;
        padding-left: 20px;
    }

    body .navbar {
        min-height: 64px;
        padding: 10px 0;
        flex-flow: row nowrap;
    }

    body .logo {
        min-width: 0;
        gap: 8px;
        font-size: 1.05rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    body .logo img {
        width: auto;
        height: 34px;
        flex: 0 0 auto;
    }

    body .menu-toggle {
        display: flex;
        flex: 0 0 auto;
        border: 0;
        background: transparent;
        box-shadow: none;
        appearance: none;
    }

    body .nav-links {
        position: fixed;
        top: 8px;
        left: 8px;
        display: flex;
        width: calc(100% - 16px);
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 92px 28px max(22px, env(safe-area-inset-bottom));
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 9px;
        overflow-y: auto;
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 17px;
        background: linear-gradient(160deg, rgba(10, 30, 60, .995), rgba(5, 20, 40, .99));
        box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
        overscroll-behavior: contain;
    }

    body .nav-links::before {
        top: 33px;
        left: 28px;
    }

    body .nav-links > a {
        display: block;
        width: 100%;
        min-height: 42px;
        padding: 7px 0 10px;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
        font-size: 1.05rem;
        font-weight: 700;
    }

    body .nav-links.active a:nth-of-type(6) {
        animation: slideInUp .5s ease forwards .6s;
    }

    body .close-menu-btn {
        top: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        padding-bottom: 4px;
        border: 0;
        background: rgba(255, 255, 255, .1);
        box-shadow: none;
        font-size: 2.25rem;
        font-family: inherit;
        appearance: none;
    }

    body .nav-links .mobile-socials {
        position: static;
        display: grid;
        width: 100%;
        margin-top: 12px;
        padding-top: 16px;
        flex-shrink: 0;
        grid-template-columns: repeat(4, 44px);
        align-items: center;
        gap: 11px;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    body .mobile-socials__label {
        grid-column: 1 / -1;
        color: rgba(255, 255, 255, .58);
        font-size: .72rem;
        font-weight: 700;
        line-height: 1;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    body .nav-links .mobile-social-link {
        display: inline-flex;
        width: 44px;
        height: 44px;
        padding: 0;
        align-items: center;
        justify-content: center;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 12px;
        background: rgba(255, 255, 255, .08);
        box-shadow: none;
        opacity: 1;
        transform: none;
    }

    body .nav-links .mobile-social-link svg {
        width: 19px;
        height: 19px;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .whatsapp-popup,
    body.mobile-menu-open .back-to-top {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@media (max-width: 420px) {
    body .main-header {
        left: 7px;
        width: calc(100% - 14px);
    }

    body .main-header .container {
        padding-right: 17px;
        padding-left: 17px;
    }

    body .logo {
        gap: 8px;
        font-size: .95rem;
    }
}

@media (max-width: 420px), (max-height: 620px) {
    body .nav-links {
        padding-top: 78px;
        gap: 5px;
    }

    body .nav-links::before { top: 28px; }
    body .close-menu-btn { top: 14px; right: 16px; }
    body .nav-links > a { min-height: 37px; padding: 5px 0 8px; }
    body .nav-links .mobile-socials { margin-top: 7px; padding-top: 12px; }
    body .mobile-socials__label { display: none; }
}
