/* ============================
   STYLE — Setdakab PPU (Bootstrap 5.3.x)
   Clean + Modern + Responsive
   Single source of truth untuk Navbar/Dropdown/Burger di sini.
   ============================ */

/* ==========================================================
   DESIGN TOKENS
   ========================================================== */
:root {
    --brand-primary: #0d6efd;
    --brand-accent: #F9A31A;

    --text: #1f2937;
    --muted: #6b7280;

    --bg: #ffffff;
    --bg-soft: #f6f8fb;
    --border: rgba(0, 0, 0, .08);

    --radius-md: 14px;
    --radius-lg: 18px;

    --shadow-sm: 0 6px 18px rgba(0, 0, 0, .08);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, .12);

    --dur: .35s;
    --ease: cubic-bezier(.22, .61, .36, 1);

    /* Logo sizing */
    --logo-desktop: 36px;
    --logo-shrink: 30px;
    --logo-mobile: 28px;

    /* Navbar heights (fixed-top offset) */
    --nav-h: 72px;
    --nav-h-md: 64px;
    --nav-h-sm: 60px;

    /* Glass tokens */
    --nav-glass: rgba(255, 255, 255, .70);
    --nav-glass-strong: rgba(255, 255, 255, .92);
    --nav-border: rgba(17, 24, 39, .08);

    /* Shadows */
    --nav-shadow: 0 14px 32px rgba(0, 0, 0, .10);
    --nav-shadow-soft: 0 10px 24px rgba(0, 0, 0, .08);

    /* Focus */
    --focus: 0 0 0 .22rem rgba(13, 110, 253, .18);
}

/* ==========================================================
   BASE
   ========================================================== */
html,
body {
    margin: 0;
    overflow-x: hidden;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: #e9e9e9;
    color: var(--muted);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;

    /* Fixed-top navbar offset */
    padding-top: var(--nav-h);
}

@media (max-width:991.98px) {
    body {
        padding-top: var(--nav-h-md);
    }
}

@media (max-width:575.98px) {
    body {
        padding-top: var(--nav-h-sm);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #111827;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color .2s ease;
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: var(--brand-primary);
}

:where(a, button, input, select, textarea, .btn, .navbar-toggler):focus-visible {
    outline: 0;
    box-shadow: var(--focus);
    border-radius: .6rem;
}

/* Utilities */
.object-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.section-accent {
    height: 4px;
    width: 140px;
    background: var(--brand-primary);
    border-radius: 999px;
}

/* ==========================================================
   NAVBAR — Setda Glass (Bootstrap 5.3.x)
   Hook class dari header.php:
   - nav  : .setda-nav  (#mainNav)
   - inner: .setda-nav__inner
   - brand: .setda-brand + .brand-logo
   - togg : .setda-toggler + .setda-burger
   - coll : .setda-collapse
   - menu : .setda-nav__menu
   ========================================================== */

/* Wrapper navbar */
.setda-nav {
    min-height: var(--nav-h);
    display: flex;
    align-items: center;

    background: var(--nav-glass);
    border-bottom: 1px solid var(--nav-border);

    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);

    transition:
        background-color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
    will-change: background-color, box-shadow;
    z-index: 1065;
}

/* State scroll (JS nambah .navbar-reduce) */
.setda-nav.navbar-reduce {
    background: var(--nav-glass-strong);
    box-shadow: var(--nav-shadow);
    border-bottom-color: rgba(17, 24, 39, .10);
}

.setda-nav__inner {
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
}

/* Brand */
.setda-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: .75rem;
}

/* Logo */
.brand-logo {
    height: var(--logo-desktop);
    width: auto;
    display: block;
    transition: transform .25s ease, opacity .25s ease, height .25s ease;
}

.setda-nav.navbar-reduce .brand-logo {
    height: var(--logo-shrink);
    transform: scale(.96);
    opacity: .95;
}

@media (max-width:991.98px) {
    .brand-logo {
        height: var(--logo-mobile);
    }
}

/* Menu row */
.setda-nav__menu {
    align-items: center;
    gap: .15rem;
}

/* Nav links */
.setda-nav .nav-link {
    color: var(--brand-accent);
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;

    padding: .72rem .95rem;
    line-height: 1;

    position: relative;
    transition: color .18s ease, opacity .18s ease;
}

/* Reduce colors */
.setda-nav.navbar-reduce .nav-link {
    color: var(--brand-primary);
}

/* Desktop underline indicator (single, no double) */
@media (min-width:992px) {
    .setda-nav .nav-link::after {
        content: "";
        position: absolute;
        left: .95rem;
        bottom: -.55rem;
        height: 2px;
        width: 0;
        border-radius: 999px;
        background: currentColor;
        opacity: .9;
        transition: width .22s ease;
        pointer-events: none;
    }

    .setda-nav .nav-link:hover::after,
    .setda-nav .nav-link.active::after,
    .setda-nav .nav-item.show>.nav-link::after {
        width: 34px;
    }
}

/* Navbar focus jangan “ngeblok”, tapi tetap aksesibel */
.setda-nav :where(a, button):focus {
    box-shadow: none;
    outline: 0;
}

.setda-nav :where(a, button):focus-visible {
    box-shadow: var(--focus);
    border-radius: .8rem;
}

/* ==========================================================
   DROPDOWN (Desktop floating)
   ========================================================== */
.setda-nav .dropdown-menu {
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .14);
    padding: .5rem;
    margin-top: .55rem;
}

/* Drop animation yang aman untuk Popper (hanya saat .show) */
.setda-nav .dropdown-menu.show {
    animation: setdaDropIn .14s ease-out both;
}

@keyframes setdaDropIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setda-nav .dropdown-item {
    border-radius: 12px;
    padding: .6rem .9rem;
    font-weight: 800;
    white-space: normal;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.setda-nav .dropdown-item:hover {
    background: rgba(13, 110, 253, .10);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

.setda-nav .dropdown-toggle::after {
    vertical-align: .1em;
}

/* ==========================================================
   TOGGLER (Burger modern) — show < 992
   ========================================================== */
.setda-toggler {
    border: 0;
    padding: .25rem;
    background: transparent;
    line-height: 0;
    box-shadow: none !important;
}

/* Hide toggler on desktop */
@media (min-width:992px) {
    .setda-toggler {
        display: none;
    }
}

/* Mobile/Tablet toggler button */
@media (max-width:991.98px) {
    .setda-nav {
        min-height: var(--nav-h-md);
    }

    .setda-nav__inner {
        min-height: var(--nav-h-md);
    }

    .setda-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 50px;
        height: 50px;
        border-radius: 14px;

        background: rgba(255, 255, 255, .75);
        border: 1px solid rgba(17, 24, 39, .10);

        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        box-shadow: var(--nav-shadow-soft);
        color: #111827;
        -webkit-tap-highlight-color: transparent;
    }

    .setda-nav.navbar-reduce .setda-toggler {
        background: rgba(255, 255, 255, .92);
        color: var(--brand-primary);
    }

    /* Burger lines (tanpa SVG):
     - 2 pseudo (top & bottom)
     - middle pakai inset shadow
  */
    .setda-burger {
        width: 22px;
        height: 16px;
        position: relative;
        display: inline-block;
        color: currentColor;
        background: transparent;
        box-shadow: inset 0 7px 0 0 currentColor;
        /* middle line */
    }

    .setda-burger::before,
    .setda-burger::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform .22s ease, opacity .18s ease;
    }

    .setda-burger::before {
        top: 0;
    }

    .setda-burger::after {
        bottom: 0;
    }

    /* Animasi ke X saat toggler open (class .collapsed hilang) */
    .setda-toggler:not(.collapsed) .setda-burger {
        box-shadow: inset 0 7px 0 0 rgba(0, 0, 0, 0);
        /* hide middle */
    }

    .setda-toggler:not(.collapsed) .setda-burger::before {
        transform: translateY(7px) rotate(45deg);
    }

    .setda-toggler:not(.collapsed) .setda-burger::after {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width:575.98px) {
    .setda-nav {
        min-height: var(--nav-h-sm);
    }

    .setda-nav__inner {
        min-height: var(--nav-h-sm);
    }

    .setda-toggler {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }
}

/* ==========================================================
   COLLAPSE SHEET (Tablet + Mobile)
   - Card/sheet tampil rapi saat collapse terbuka
   - Dropdown mengalir di dalam sheet (position static)
   ========================================================== */
@media (max-width:991.98px) {

    /* collapse container: “sheet” */
    .setda-collapse {
        margin-top: .6rem;
        padding: .75rem .85rem .95rem;

        border-radius: 18px;
        background: rgba(255, 255, 255, .92);
        border: 1px solid rgba(17, 24, 39, .08);

        backdrop-filter: saturate(140%) blur(12px);
        -webkit-backdrop-filter: saturate(140%) blur(12px);

        box-shadow: 0 18px 40px rgba(0, 0, 0, .12);

        max-height: calc(100vh - var(--nav-h-md) - 16px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 1060;
    }

    /* typography mobile: lebih “human” */
    .setda-nav .nav-link {
        text-transform: none;
        letter-spacing: .01em;
        font-size: 1.05rem;
        padding: .95rem .95rem;
        color: var(--brand-primary);
    }

    /* underline dimatikan di mobile */
    .setda-nav .nav-link::after {
        display: none !important;
    }

    /* dropdown flow di sheet */
    .setda-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none !important;

        width: 100%;
        margin: .2rem 0 .75rem;
        padding: .35rem;

        border-radius: 14px;
        box-shadow: none;
        background: rgba(255, 255, 255, .92);
        border: 1px solid rgba(17, 24, 39, .08);
    }

    /* di mobile: matikan anim dropdown agar stabil */
    .setda-nav .dropdown-menu.show {
        animation: none;
    }

    .setda-nav .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
}

/* Tablet landscape micro tune */
@media (min-width:768px) and (max-width:991.98px) {
    .setda-nav .nav-link {
        font-size: 1rem;
        letter-spacing: .015em;
    }
}

/* ==========================================================
   SEARCH HERO
   ========================================================== */
.search-hero .input-group {
    overflow: hidden;
    border-radius: 999px;
}

.search-hero .input-group>.form-control {
    border-radius: 999px 0 0 999px !important;
    -webkit-appearance: none;
}

.search-hero .input-group>.btn {
    border-radius: 0 999px 999px 0 !important;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.hero .hero-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
}

.hero .hero-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-accent);
    transform: translateY(3px);
}

@media (max-width:767.98px) {
    .hero {
        padding-top: 2.25rem !important;
        padding-bottom: 2rem !important;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .lead {
        font-size: 1rem;
    }
}

/* ==========================================================
   CARDS / NEWS GRID
   ========================================================== */
.news-grid .card {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: .9rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    transition: transform .2s ease, box-shadow .2s ease;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
}

.news-grid .card .card-body {
    padding: .95rem .95rem 1rem;
}

.news-grid .card-title {
    font-size: .98rem;
    line-height: 1.35;
    margin-bottom: .35rem;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.news-grid .news-meta {
    font-size: .82rem;
}

@media (hover:hover) {
    .news-grid .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 28px rgba(0, 0, 0, .12);
    }
}

/* ==========================================================
   Sidebar & Latest News
   ========================================================== */
.sidebar-sticky {
    position: sticky;
    top: 88px;
}

.terbaru-item {
    position: relative;
    padding-right: 2rem;
}

.terbaru-item+.terbaru-item {
    border-top: 1px dashed rgba(0, 0, 0, .08);
}

.terbaru-title {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.terbaru-date {
    display: block;
    font-size: .8rem;
    opacity: .75;
}

.terbaru-arrow {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: .28;
}

/* ==========================================================
   Kategori Select
   ========================================================== */
.kategori-select {
    height: 44px;
    border-radius: .8rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.kategori-select:focus {
    box-shadow: var(--focus);
    border-color: rgba(13, 110, 253, .45);
}

/* ==========================================================
   Chip Kategori
   ========================================================== */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.chip-primary {
    background: rgba(13, 110, 253, .08);
    color: var(--brand-primary);
    border-color: rgba(13, 110, 253, .2);
    box-shadow: 0 2px 8px rgba(13, 110, 253, .08) inset;
}

.chip-primary:hover {
    background: rgba(13, 110, 253, .14);
    border-color: rgba(13, 110, 253, .35);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
}

/* ==========================================================
   Article Content
   ========================================================== */
.article-content {
    max-width: 72ch;
    margin-inline: auto;
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    text-justify: inter-word;
    color: #343a40;
}

@supports (text-wrap:pretty) {
    .article-content {
        text-wrap: pretty;
    }
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content a {
    color: var(--brand-primary);
}

.article-content img {
    display: block;
    margin: 1.25rem auto;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: .9rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.article-hero {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
}

/* ==========================================================
   Breadcrumb (mobile wrap)
   ========================================================== */
.breadcrumb {
    margin-bottom: .75rem;
}

@media (max-width:575.98px) {
    .breadcrumb {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb .breadcrumb-item {
        flex: 0 0 auto;
        max-width: none;
    }

    .breadcrumb .breadcrumb-item.active {
        max-width: 60vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .breadcrumb .breadcrumb-item+.breadcrumb-item {
        padding-left: .4rem;
    }

    .breadcrumb .breadcrumb-item+.breadcrumb-item::before {
        padding-right: .4rem;
    }
}

/* ==========================================================
   Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto !important;
    }

    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}