/* ==========================================================================
   base.css - fondasi untuk KEEMPAT template (reset, tipografi, utilitas)
   Tema tampilan spesifik ada di assets/css/<template>.css
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #111827;
    background: #ffffff;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: #111827; color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Prose - konten artikel dari JSON (HTML mentah) */
.prose h2, .v-prose h2, .m-prose h2, .d-prose h2, .n-prose h2 { margin-top: 2em; }
.prose h3, .v-prose h3, .m-prose h3, .d-prose h3, .n-prose h3 { margin-top: 1.5em; }
.prose img, .v-prose img, .m-prose img, .d-prose img, .n-prose img { border-radius: 8px; margin: 1.5em 0; }
.prose ul li, .v-prose ul li, .m-prose ul li, .d-prose ul li, .n-prose ul li { margin-bottom: .4em; }
.prose blockquote, .v-prose blockquote {
    margin: 1.5em 0; padding-left: 1rem;
    border-left: 4px solid #e5e7eb; color: #4b5563;
}

/* Utilitas umum */
.is-active { font-weight: 700; }

/* --------------------------------------------------------- tautan keluar --
   Tombol Login / Daftar / Live Chat / WhatsApp.
   Hanya dirender bila URL-nya diisi di admin (partial outbound.php).
   -------------------------------------------------------------------------- */
.outbound {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.outbound__btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
    cursor: pointer;
    white-space: nowrap;
}
.outbound__btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
.outbound__icon {
    font-size: .95rem;
    display: inline-block;
}

/* Default styling untuk tombol */
.outbound__btn--register {
    background: var(--accent, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}
.outbound__btn--login {
    background: rgba(255, 255, 255, .1);
    color: inherit;
    border-color: currentColor;
}
.outbound__btn--whatsapp {
    background: #25d366;
    color: #ffffff;
}
.outbound__btn--livechat {
    background: #0ea5e9;
    color: #ffffff;
}

/* Footer variant: tombol lebih ramping */
.outbound--pos-footer {
    margin-top: .75rem;
}
.outbound--pos-footer .outbound__btn {
    padding: .35rem .75rem;
    font-size: .8rem;
    border-radius: 8px;
}

/* Hero variant: tombol besar mencolok */
.outbound--pos-hero, .outbound--spotify-hero, .outbound--netflix-hero, .outbound--directory-hero {
    gap: .75rem;
}
.outbound--pos-hero .outbound__btn,
.outbound--spotify-hero .outbound__btn,
.outbound--netflix-hero .outbound__btn,
.outbound--directory-hero .outbound__btn {
    padding: .75rem 1.75rem;
    font-size: .95rem;
    border-radius: 999px;
}

@media (max-width: 640px) {
    .outbound {
        display: inline-flex;
        width: auto;
        gap: .35rem;
        justify-content: flex-start;
    }
    .outbound__btn {
        padding: .4rem .75rem;
        font-size: .78rem;
    }
    .outbound__icon {
        display: none;
    }
}

/* --------------------------------------------------- mobile nav burger ---
   Hamburger toggle responsif untuk semua template di layar HP / iPhone
   -------------------------------------------------------------------------- */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: .4rem .5rem;
    font-size: 1.4rem;
    line-height: 1;
    color: inherit;
    border-radius: 6px;
}
.nav-toggle:focus-visible {
    outline: 2px solid currentColor;
}

@media (min-width: 901px) {
    .nav-collapsible {
        display: flex !important;
        align-items: center;
        gap: 1.5rem;
    }
    .nav-toggle {
        display: none !important;
    }
}
.nav-toggle:focus-visible {
    outline: 2px solid currentColor;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Saat menu ditutup di mobile */
    .has-mobile-menu .nav-collapsible {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: .5rem;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }

    /* Saat menu dibuka di mobile */
    .has-mobile-menu.is-open .nav-collapsible {
        display: flex;
    }

    .nf-header__inner, .sp-header__inner, .v-header__inner, .d-header__inner, .n-header__inner {
        justify-content: space-between;
    }
    .nf-header__right, .sp-header__right, .v-header__right, .d-header__right, .n-header__right {
        display: flex;
        align-items: center;
        gap: .5rem;
    }
    .nf-nav, .sp-nav, .v-nav, .d-nav, .n-nav {
        flex-direction: column;
        gap: .75rem;
        padding: .5rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
