/* =====================================================
   PA RANTAUPRAPAT - STYLE.CSS (VERSI LENGKAP)
   Urutan: variabel > dasar > topbar (tanggal, sosial, pencarian) >
   header > menu > banner > section > ikon > berita > ZI >
   beranda+sidebar > footer > popup banner > pencarian > responsive
   ===================================================== */

/* ---------- VARIABEL ---------- */
:root {
    --green: #056E4F;
    --deep: #034D37;
    --green-hover: #087A59;
    --green-light: #E6F3EF;
    --orange: #FF9900;
    --orange-hover: #E68A00;
    --orange-soft: #FFD9A0;   /* oranye muda: untuk TEKS kecil di atas hijau (kontras lebih baik dari oranye murni) */
    --ink: #152A30;
    --muted: #59626A;
    --paper: #FBFAF6;
    --white: #FFFFFF;
    --scale: 1;
}

/* ---------- DASAR ---------- */
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--scale)); scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(ellipse at 10% 20%, #eee8dc66, transparent 55%),
        linear-gradient(125deg, var(--paper), #fff 50%, #f3f0e9);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
    outline: 3px solid var(--deep);
    outline-offset: 4px;
}
/* latar hijau tua: cincin fokus putih agar tetap jelas */
.topbar :focus-visible, footer :focus-visible { outline-color: #fff; }
h1 { font: 700 2.65rem/1.15 Georgia, serif; margin: 14px 0 10px; }
svg { width: 25px; height: 25px; flex-shrink: 0; }
iframe { width: 100%; aspect-ratio: 16/9; border: 0; background: #e8eeeb; }
[hidden] { display: none !important; }

.container { max-width: 1220px; width: calc(100% - 48px); margin: 0 auto; padding: 0; }
.page-main img, .page-main iframe { max-width: 100%; }

.skip-link { position: absolute; left: 10px; top: -100px; z-index: 100; background: #fff; padding: 12px; }
.skip-link:focus { top: 10px; }

/* ---------- TOPBAR ---------- */
.topbar { background: var(--deep); color: #fff; font-size: .72rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 34px; }

.utility { display: flex; align-items: center; gap: 8px; }
.utility button { background: transparent; border: 0; color: #fff; padding: 4px; }

/* (aturan lama untuk tombol terakhir; tidak berlaku untuk tombol pencarian) */
.utility button:last-child:not(#search-toggle) {
    background: var(--orange);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 1.1rem;
}

/* ---------- TOMBOL PENCARIAN DI TOPBAR (tampil seperti kolom cari) ---------- */
#search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: auto;
    height: auto;
    min-width: 200px;
    padding: 4px 5px 4px 14px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
#search-toggle .search-ico {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--orange);
    stroke-width: 2.4;
    stroke-linecap: round;
    transition: transform .25s ease, stroke .2s ease;
}
#search-toggle .search-text { flex: 1; text-align: left; opacity: .92; }
#search-toggle .search-key {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font: 700 12px/1 Arial, Helvetica, sans-serif;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

#search-toggle:hover,
#search-toggle:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--deep);
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    transform: translateY(-1px);
}
#search-toggle:hover .search-ico,
#search-toggle:focus-visible .search-ico { stroke: var(--green); transform: scale(1.15) rotate(-8deg); }
#search-toggle:hover .search-key,
#search-toggle:focus-visible .search-key { background: var(--green-light); border-color: #bcd9cf; color: var(--deep); }
#search-toggle:active { transform: translateY(0); box-shadow: none; }

/* layar sentuh: tidak ada papan ketik, sembunyikan lencana "/" */
@media (hover: none) { #search-toggle .search-key { display: none; } #search-toggle { min-width: 0; padding-right: 14px; } }

/* HP: hanya ikon bulat oranye */
@media (max-width: 800px) {
    #search-toggle {
        min-width: 0;
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-color: var(--orange);
        background: var(--orange);
    }
    #search-toggle .search-text,
    #search-toggle .search-key { display: none; }
    #search-toggle .search-ico { width: 18px; height: 18px; stroke: var(--ink); }
    #search-toggle:hover .search-ico,
    #search-toggle:focus-visible .search-ico { stroke: var(--deep); }
}

@media (prefers-reduced-motion: reduce) { #search-toggle, #search-toggle .search-ico { transition: none; } #search-toggle:hover { transform: none; } }

/* ---------- TOPBAR: tanggal di kiri, media sosial di kanan ---------- */
.topbar { position: relative; z-index: 40; }   /* agar tooltip tampil di atas header */

.topbar-social { display: flex; align-items: center; gap: 12px; }
.topbar-social-label { font-size: .72rem; opacity: .9; white-space: nowrap; }
.topbar-social-list { display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; list-style: none; }

.topbar-social-link {
    position: relative;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.topbar-social-link svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.topbar-social-link:hover,
.topbar-social-link:focus-visible {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
    transform: translateY(-2px);
}

/* tooltip di bawah ikon */
.topbar-social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .2s;
    z-index: 100;
}
.topbar-social-link::before {
    content: '';
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--green);
    opacity: 0;
    visibility: hidden;
    transition: .2s;
    z-index: 100;
}
.topbar-social-link:hover::after,
.topbar-social-link:hover::before,
.topbar-social-link:focus-visible::after,
.topbar-social-link:focus-visible::before { opacity: 1; visibility: visible; }
.topbar-social-link:hover::after,
.topbar-social-link:focus-visible::after { transform: translateX(-50%) translateY(0); }

@media (hover: none) { .topbar-social-link::after, .topbar-social-link::before { display: none; } }

/* Tanggal & jam di kiri, media sosial + pencarian di kanan */
.topbar-inner > #clock { margin-right: auto; }
.topbar-social { padding-right: 12px; margin-right: 4px; border-right: 1px solid rgba(255,255,255,.25); }

/* HP */
@media (max-width: 800px) {
    .topbar-inner { justify-content: space-between; gap: 10px; }
    .topbar-social-label { display: none; }
    .topbar-social { padding-right: 8px; margin-right: 0; }
}
@media (max-width: 600px) {
    .topbar-inner { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
    #clock { flex: 1 1 100%; font-size: .7rem; line-height: 1.3; }     /* tanggal satu baris penuh */
    .utility { width: 100%; justify-content: space-between; }          /* WA, sosial, cari di baris bawah */
}

@media (prefers-reduced-motion: reduce) { .topbar-social-link { transition: none; } .topbar-social-link:hover { transform: none; } }

/* ---------- WHATSAPP DI TOPBAR ---------- */
.topbar-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 12px 3px 4px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.topbar-wa-ico {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
}
.topbar-wa-ico svg { width: 15px; height: 15px; }
.topbar-wa:hover,
.topbar-wa:focus-visible {
    background: #25D366;
    border-color: #25D366;
    color: var(--ink);
    transform: translateY(-1px);
}
.topbar-wa:hover .topbar-wa-ico,
.topbar-wa:focus-visible .topbar-wa-ico { background: rgba(255,255,255,.22); }

/* HP kecil: hanya ikon WhatsApp */
@media (max-width: 480px) {
    .topbar-wa { padding: 3px; }
    .topbar-wa-text { display: none; }
}

/* ---------- HEADER / LOGO ---------- */
.masthead { background: linear-gradient(110deg, #f7f5eb, #fff 50%, #f8f5ee); border-bottom: 1px solid #e9e4d9; }
.brand-row { display: flex; align-items: center; gap: 34px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 22px; min-width: 0; margin-right: auto; color: var(--deep); }
.brand img { width: auto; height: 145px; object-fit: contain; object-position: left center; }

/* judul dua baris: PENGADILAN AGAMA / RANTAUPRAPAT KELAS IB */
.brand > div > span,
.brand strong { display: block; font: bold 2.2rem/1.1 Georgia, serif; }
.brand small { display: block; color: var(--muted); font-size: .75rem; letter-spacing: 1px; margin-top: 10px; }

/* BerAKHLAK */
.values { flex-shrink: 0; color: #d71920; }
.values strong { display: block; font: 700 3rem/1 Arial, Helvetica, sans-serif; letter-spacing: -1.5px; }
.values span { display: block; margin-top: 9px; font: 700 .6rem/1.5 Arial, Helvetica, sans-serif; }

/* #bangga melayani bangsa */
.proud { flex-shrink: 0; display: flex; align-items: center; gap: 2px; }
.proud-hash { color: #d71920; font: 700 5.2rem/1 Arial, Helvetica, sans-serif; }
.proud-text { color: #111; font: 700 1.75rem/1.08 Arial, Helvetica, sans-serif; }

/* ---------- MENU UTAMA ---------- */
.main-nav {
    position: sticky;              /* menu ikut menempel di atas saat halaman digulir (hapus 2 baris ini jika tidak mau) */
    top: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--deep), var(--green));
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    color: #fff;
}
.navigation { display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.navigation li { position: relative; }

/* menu tingkat 1  <-- UBAH FONT MENU UTAMA DI SINI (font-family, font-size, font-weight) */
.main-nav #navigation > li > a,
.main-nav #navigation > li > details > summary {
    position: relative;
    display: block;
    padding: 15px clamp(6px, .85vw, 13px);
    font-size: clamp(11.5px, 1.08vw, 13.5px);
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--white);
    list-style: none;
    transition: background-color .2s ease, color .2s ease;
}

/* garis oranye yang "meluncur" saat disorot / menu aktif */
.main-nav #navigation > li > a::before,
.main-nav #navigation > li > details > summary::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 4px;
    background: var(--orange);
    border-radius: 4px 4px 0 0;
    transform: translateX(-50%);
    transition: width .25s ease;
}
.main-nav #navigation > li:hover > a::before,
.main-nav #navigation > li:hover > details > summary::before,
.main-nav #navigation > li:focus-within > a::before,
.main-nav #navigation > li:focus-within > details > summary::before,
.main-nav #navigation > li.active > a::before,
.main-nav #navigation > li.active > details > summary::before { width: calc(100% - 14px); }

.main-nav #navigation > li:hover > a,
.main-nav #navigation > li:hover > details > summary,
.main-nav #navigation > li > details[open] > summary {
    background: rgba(255,255,255,.10);
    color: var(--white);
}

/* Beranda: tombol oranye */
.main-nav #navigation > li:first-child > a { background: var(--orange); color: var(--ink); }
.main-nav #navigation > li:first-child > a::before { display: none; }
.main-nav #navigation > li:first-child:hover > a { background: var(--orange-hover); }

/* panah (chevron) — berputar saat dibuka */
.main-nav #navigation summary::-webkit-details-marker { display: none; }
.main-nav #navigation summary::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);
    transform: translateY(-3px) rotate(45deg);
    transition: transform .2s ease;
}
.main-nav #navigation li:hover > details > summary::after,
.main-nav #navigation details[open] > summary::after { transform: translateY(0) rotate(225deg); }

/* fokus keyboard pada menu */
.main-nav #navigation a:focus-visible,
.main-nav #navigation summary:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }

/* submenu (semua tingkat) */
.main-nav #navigation ul {
    position: static;
    margin: 0;
    padding: 8px;
    min-width: 260px;
    list-style: none;
    background: var(--white);
    border: 1px solid rgba(5,110,79,.25);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 14px 30px rgba(0,40,30,.22);
}
.main-nav #navigation ul ul { min-width: 0; }
.main-nav #navigation > li > details > ul { width: 100%; border-top: 3px solid var(--orange); }

.main-nav #navigation ul a,
.main-nav #navigation ul summary {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--deep);
    list-style: none;
    transition: background-color .15s ease, color .15s ease, padding-left .15s ease, border-color .15s ease;
}
.main-nav #navigation ul a:hover,
.main-nav #navigation ul summary:hover,
.main-nav #navigation ul li:hover > details > summary {
    background: var(--green-light);
    color: var(--green);
    padding-left: 16px;
    border-left-color: var(--orange);
}
.main-nav #navigation ul li.active > a { color: var(--green); font-weight: 700; }

#mobile-toggle { display: none; }

@keyframes navDrop {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* menu desktop: dropdown muncul saat hover / fokus keyboard */
@media (min-width: 801px) {
    .main-nav #navigation { align-items: stretch; position: relative; z-index: 1000; }

    .main-nav #navigation li > details > ul {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        width: 290px;
        max-width: calc(100vw - 24px);
        z-index: 99999;
    }
    .main-nav #navigation li:hover > details > ul,
    .main-nav #navigation li:focus-within > details > ul,
    .main-nav #navigation li > details[open] > ul { display: block; animation: navDrop .18s ease-out; }

    /* dropdown tingkat 1: turun ke bawah */
    .main-nav #navigation > li > details > ul { top: 100%; left: 0; width: 310px; }

    /* menu 6-8 (Layanan Publik, Publikasi, PPID): dropdown menempel kanan */
    .main-nav #navigation > li:nth-child(n+6) > details > ul { left: auto; right: 0; }

    /* submenu bertingkat: default ke kanan */
    .main-nav #navigation li > details > ul li > details > ul { top: -9px; left: 100%; right: auto; border-top: 1px solid rgba(5,110,79,.25); border-radius: 10px; }

    /* menu 5-8 (Kesekretariatan s.d. PPID): bertingkat ke kiri */
    .main-nav #navigation > li:nth-child(n+5) > details > ul li > details > ul { left: auto; right: 100%; }

    /* panah submenu: menunjuk ke kanan */
    .main-nav #navigation ul summary::after,
    .main-nav #navigation ul li:hover > details > summary::after,
    .main-nav #navigation ul details[open] > summary::after {
        float: right;
        margin: 6px 2px 0 12px;
        transform: rotate(-45deg);
    }
}

/* menu HP */
@media (max-width: 800px) {
    .main-nav { position: relative; }   /* tidak menempel di HP: menu panjang + submenu bisa lebih tinggi dari layar */
    #mobile-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 14px 0;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        text-align: left;
    }
    .navigation { display: none; flex-direction: column; padding: 0 0 12px; }
    .navigation.is-open { display: flex; animation: navDrop .2s ease-out; }

    .main-nav #navigation > li { border-top: 1px solid rgba(255,255,255,.14); }
    .main-nav #navigation > li > a,
    .main-nav #navigation > li > details > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 6px;
        font-size: 15px;
    }
    .main-nav #navigation > li > a::before,
    .main-nav #navigation > li > details > summary::before { display: none; }
    .main-nav #navigation > li:first-child > a { border-radius: 6px; padding-left: 12px; }
    .main-nav #navigation summary::after { margin-left: auto; }

    /* submenu HP: terindent, garis oranye di kiri */
    .main-nav #navigation ul {
        margin: 0 0 8px 8px;
        padding: 4px 0 4px 8px;
        min-width: 0;
        background: rgba(0,0,0,.16);
        border: 0;
        border-left: 3px solid var(--orange);
        border-radius: 0 8px 8px 0;
        box-shadow: none;
    }
    .main-nav #navigation > li > details > ul { border-top: 0; }
    .main-nav #navigation ul a,
    .main-nav #navigation ul summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 10px;
        font-size: 14px;
        color: #fff;
        border-left: 0;
    }
    .main-nav #navigation ul a:hover,
    .main-nav #navigation ul summary:hover,
    .main-nav #navigation ul li:hover > details > summary {
        background: rgba(255,255,255,.12);
        color: #fff;
        padding-left: 10px;
    }
    .main-nav #navigation ul li.active > a { color: var(--orange-soft); }
}

@media (prefers-reduced-motion: reduce) {
    .main-nav *, .navigation { animation: none !important; }
}

/* ---------- BANNER UTAMA (DJ Image Slider) ---------- */
.hero-slider {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--deep);
    line-height: 0;
    isolation: isolate;
}
.hero-slider img { display: block; width: 100%; height: auto; }

/* ---------- SECTION & JUDUL ---------- */
.section { margin-top: 15px; margin-bottom: 15px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 {
    position: relative;
    margin: 0;
    padding-left: 17px;
    font: bold 1.45rem Georgia, serif;
    color: var(--deep);
}
.section-heading h2::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: var(--orange);
    border-radius: 5px;
}
.section-heading > a { font-size: .76rem; color: var(--green); white-space: nowrap; }

/* ---------- BARIS IKON (modul pa-icon) ---------- */
.icon-section { width: 100%; margin: 20px 0 30px; overflow: hidden; }
.icon-section table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 auto !important;       /* menimpa margin-top inline modul */
}
.icon-section table td {
    width: auto !important;          /* menimpa width inline modul */
    padding: 10px 6px;
    text-align: center;
    vertical-align: middle;
}
.icon-section table img {
    display: block;
    width: 76px;
    height: 76px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* ---------- BARIS IKON: kartu (modul pa-icon) — hijau utama + aksen oranye ---------- */
.icon-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 8px 8px 16px;          /* ruang agar bayangan, efek terangkat, dan cincin fokus tidak terpotong */
}
.icon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 1 120px;
    max-width: 155px;
    padding: 14px 8px 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe9e4;
    border-radius: 12px;
    color: var(--deep);
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
/* garis oranye di dasar kartu: melebar saat disorot / difokus */
.icon-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--orange);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.icon-card:hover,
.icon-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--green);
    background: var(--green-light);
    box-shadow: 0 8px 18px rgba(0, 60, 40, .14);
    color: var(--deep);
}
.icon-card:hover::after,
.icon-card:focus-visible::after { transform: scaleX(1); }

.icon-card-img {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: var(--green-light);
    transition: background-color .2s ease;
}
.icon-card:hover .icon-card-img,
.icon-card:focus-visible .icon-card-img { background: #fff; }
.icon-card-img img { display: block; width: 60px; height: 60px; max-width: 100%; object-fit: contain; }
.icon-card-label { font-size: 13px; font-weight: 700; line-height: 1.3; }
.icon-card small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

/* teks bantu pembaca layar */
.icon-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 800px) {
    .icon-row { gap: 8px; padding: 6px 6px 14px; }
    .icon-card { flex-basis: 96px; padding: 10px 6px; }
    .icon-card-img { width: 60px; height: 60px; border-radius: 14px; }
    .icon-card-img img { width: 46px; height: 46px; }
    .icon-card-label { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .icon-card, .icon-card::after, .icon-card-img { transition: none; }
    .icon-card:hover, .icon-card:focus-visible { transform: none; }
}

/* ---------- APLIKASI UNGGULAN (modul pa-apps) — hijau utama + aksen oranye ---------- */
.app-wrap { width: 100%; padding: 0 0 8px; }

/* judul bagian: sama seperti judul bagian lain di beranda */
.app-wrap .main-title { margin: 0 0 16px; }
.app-wrap .main-title h2 {
    position: relative;
    margin: 0;
    padding-left: 17px;
    font: bold 1.45rem Georgia, serif;
    color: var(--deep);
}
.app-wrap .main-title h2::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: var(--orange);
    border-radius: 5px;
}

.app-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }   /* eksternal kiri, internal kanan */
.app-section .section-title { margin: 0 0 12px; }

/* lencana: Eksternal = hijau utama, Internal = oranye (teks gelap agar terbaca) */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}
.section-badge.external { background: var(--green); color: #fff; }
.section-badge.internal { background: var(--orange); color: var(--ink); }

/* kartu aplikasi: UKURAN SAMA dengan kartu pada baris ikon (maks. 155px, ikon 76px, label 13px) */
.app-section {
    min-width: 0;
    padding: 14px;
    background: rgba(255, 255, 255, .7);
    border: 1px solid #dfe9e4;
    border-radius: 14px;
}
.app-section .section-title { text-align: center; }
.app-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 8px 4px 10px; }

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 1 110px;          /* 4 kartu muat satu baris di tiap kolom */
    max-width: 155px;
    min-width: 0;
    padding: 14px 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe9e4;
    border-radius: 12px;
    color: var(--deep);
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
/* logo di dalam kotak hijau muda 76px, seperti ikon pada baris ikon */
.app-card img {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
    object-fit: contain;
    background: var(--green-light);
    border-radius: 16px;
    transition: background-color .2s ease;
}
.app-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.app-card small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

/* garis oranye di dasar kartu */
.app-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--orange);
    transform: scaleX(0);
    transition: transform .25s ease;
}
/* efek sorot hanya untuk kartu yang berupa tautan (<a class="app-card" href="...">) */
a.app-card:hover,
a.app-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--green);
    background: var(--green-light);
    box-shadow: 0 8px 18px rgba(0, 60, 40, .14);
}
a.app-card:hover::after,
a.app-card:focus-visible::after { transform: scaleX(1); }
a.app-card:hover img,
a.app-card:focus-visible img { background: #fff; }

@media (max-width: 1100px) {
    .app-sections { grid-template-columns: minmax(0, 1fr); }   /* layar sempit: eksternal di atas, internal di bawah */
    .app-card { flex-basis: 120px; }
}
@media (max-width: 800px) {
    .app-section { padding: 10px; }
    .app-grid { gap: 8px; padding: 6px 6px 14px; }
    .app-card { flex-basis: 96px; padding: 10px 6px; }
    .app-card img { width: 60px; height: 60px; padding: 7px; border-radius: 14px; }
    .app-name { font-size: 12px; }
    .app-card small { font-size: 11px; }
}
@media (max-width: 560px) {
    .app-card { flex: 1 1 calc(50% - 8px); max-width: calc(50% - 4px); }   /* 2 x 2 */
}
@media (prefers-reduced-motion: reduce) {
    .app-card, .app-card::after { transition: none; }
    a.app-card:hover, a.app-card:focus-visible { transform: none; }
}

/* ---------- BERITA: CAROUSEL (modul JT Content Slider) ---------- */
.jt-cs .jt-inner h6 { margin: 12px 0 8px; padding: 0 15px; }

/* thumbnail slider berita: tampilkan foto utuh (tidak terpotong) */
.news-card .jt-cs img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: 280px;
    object-fit: contain !important;       /* ganti ke: cover  +  object-position: center top  jika ingin penuh tapi kepala tetap terlihat */
    object-position: center;
    background: #eef3f0;
}
/* bila thumbnail dibuat sebagai latar (background-image), bukan <img> */
.news-card .jt-cs [style*="background-image"] {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: #eef3f0;
}

/* Berita: huruf sama dengan Pengumuman (Segoe UI); judul, tanggal, dan teks lain sejajar di sisi kiri yang sama (16px) */
.news-card .news-body { font-family: 'Segoe UI', Arial, sans-serif; }
.news-card .jt-cs .jt-inner { text-align: left; }

.news-card .jt-cs .jt-inner :is(h1, h2, h3, h4, h5, h6),
.news-card .jt-cs .jt-inner :is(h1, h2, h3, h4, h5, h6) a {
    color: var(--deep);
    font: 600 14px/1.45 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
}
.news-card .jt-cs .jt-inner :is(h1, h2, h3, h4, h5, h6) { margin: 12px 0 4px; padding: 0 16px; }
.news-card .jt-cs .jt-inner :is(h1, h2, h3, h4, h5, h6) a:hover { color: var(--green); text-decoration: none; }

.news-card .jt-cs .jt-inner time,
.news-card .jt-cs .jt-inner small,
.news-card .jt-cs .jt-inner [class*="date"] {
    display: block;
    margin: 0 0 12px;
    padding: 0 16px;
    color: #888;
    font: 400 12px/1.4 'Segoe UI', Arial, sans-serif;
    text-align: left;
}
/* ikon tanggal pada slider berita (emoji atau SVG): ukuran & jarak seragam */
.news-card .jt-cs [class*="date"] svg,
.news-card .jt-cs time svg {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    vertical-align: -2px;
}
.news-card .jt-cs .jt-inner p {
    margin: 0 0 10px;
    padding: 0 16px;
    color: var(--muted);
    font: 400 13px/1.45 'Segoe UI', Arial, sans-serif;
    text-align: left;
}

/* ---------- BERITA + PENGUMUMAN BERDAMPINGAN ---------- */
.news-announce {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 16px;
}
.news-announce.no-announce { grid-template-columns: minmax(0, 1fr); }
.news-main { min-width: 0; overflow: hidden; border-radius: 10px; }

.announce-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-top: 4px solid var(--orange);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.announce-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(90deg, var(--deep), var(--green));
    color: #fff;
}
.announce-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.14);
    color: var(--orange);
}
.announce-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.announce-head h2,
.announce-head h3 { flex: 1; min-width: 0; margin: 0; color: #fff; font: 700 16px/1.3 Arial, Helvetica, sans-serif; }
.announce-head .announce-all { color: var(--orange-soft); font-size: 12px; font-weight: 600; white-space: nowrap; }
.announce-head .announce-all:hover { color: #fff; text-decoration: underline; }

/* kartu berita: isi slider tetap bergeser, hanya dibungkus kartu */
.news-card .news-body { flex: 1; min-width: 0; min-height: 0; padding: 12px; overflow: hidden; }
.news-card .news-body > * { max-width: 100%; }

.announce-body { flex: 1; min-height: 0; max-height: 420px; overflow-y: auto; padding: 4px 14px 10px; }
.announce-body ul { margin: 0; padding: 0; list-style: none; }
.announce-body li {
    position: relative;
    padding: 11px 0 11px 18px;
    border-bottom: 1px solid #edf1ee;
    line-height: 1.45;
}
.announce-body li:last-child { border-bottom: 0; }
.announce-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
}
.announce-body a { display: block; color: var(--deep); font-size: 14px; font-weight: 700; }
.announce-body a:hover { color: var(--green); text-decoration: underline; }
.announce-body span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.announce-body p { margin: 0; padding: 8px 0; color: var(--muted); font-size: 13px; }

/* Pengumuman PA Rantauprapat: tampilan mengikuti Pengumuman Badilag */
.announce-badilag { font-family: 'Segoe UI', Arial, sans-serif; }
.announce-badilag .announce-head { gap: 12px; padding: 12px 18px; justify-content: space-between; }
.announce-badilag .announce-head h2 { font-size: 17px; font-weight: 600; }
.announce-badilag .announce-head .announce-all { color: var(--orange-soft); font-size: 13px; font-weight: 600; }
.announce-badilag .announce-head .announce-all:hover { color: #fff; text-decoration: underline; }

.announce-badilag .announce-body { padding: 0; max-height: none; overflow: visible; }
.announce-badilag .announce-body li {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    transition: .25s;
}
.announce-badilag .announce-body li::before { display: none; }          /* hapus titik oranye */
.announce-badilag .announce-body li:last-child { border-bottom: 1px solid #eee; }
.announce-badilag .announce-body li:hover { background: var(--green-light); padding-left: 22px; }

.announce-badilag .announce-body a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--deep);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.announce-badilag .announce-body a:hover { color: var(--green); text-decoration: none; }
.announce-badilag .announce-body span { margin-top: 6px; color: #888; font-size: 12px; }
.announce-badilag .announce-body [class*="date"]::before { content: "\1F4C5\00a0"; }   /* ikon kalender sebelum tanggal */

/* ---------- BERITA: KARTU GESER (layout "berita" - modul Articles - Category) ---------- */
.pa-news { position: relative; }
.pa-news-track {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 4px 2px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pa-news-track::-webkit-scrollbar { display: none; }

.pa-news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc((100% - 28px) / 3);
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #dfe9e4;
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pa-news-card::after {                      /* garis oranye di dasar kartu */
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: var(--orange);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.pa-news-card:hover,
.pa-news-card:focus-within {
    transform: translateY(-3px);
    border-color: var(--green);
    box-shadow: 0 8px 18px rgba(0, 60, 40, .14);
}
.pa-news-card:hover::after,
.pa-news-card:focus-within::after { transform: scaleX(1); }

/* foto: tampil utuh (tidak terpotong); sisa ruang diisi versi buram dari foto yang sama */
.pa-news-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--green-light);
}
.pa-news-img::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: var(--bg) center / cover no-repeat;
    filter: blur(18px) saturate(1.1);
    opacity: .85;
}
.pa-news-img img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pa-news-img.is-empty img { padding: 22px; opacity: .9; }       /* tanpa foto: tampilkan lambang */

.pa-news-date {
    position: absolute;
    z-index: 2;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 10px;
    background: var(--orange);
    color: var(--ink);
    text-align: center;
    line-height: 1.05;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
    pointer-events: none;
}
.pa-news-date strong { display: block; font-size: 18px; font-weight: 800; }
.pa-news-date span { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.pa-news-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 14px 16px; }
.pa-news-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.pa-news-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--deep);
}
.pa-news-title a::after { content: ''; position: absolute; inset: 0; z-index: 3; }   /* seluruh kartu bisa diklik */
.pa-news-card:hover .pa-news-title a { color: var(--green); }
.pa-news-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.pa-news-more { margin-top: auto; padding-top: 4px; color: var(--green); font-size: 13px; font-weight: 700; }
.pa-news-card:hover .pa-news-more { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }

/* panah, titik, tombol jeda */
.pa-news-nav {
    position: absolute;
    top: 78px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
}
.pa-news-nav.prev { left: -6px; }
.pa-news-nav.next { right: -6px; }
.pa-news-nav:hover { background: var(--orange); color: var(--ink); }
.pa-news:not(.is-ready) .pa-news-nav,
.pa-news:not(.is-ready) .pa-news-bar,
.pa-news.is-static .pa-news-nav,
.pa-news.is-static .pa-news-bar { display: none; }

.pa-news-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.pa-news-dots { display: flex; gap: 6px; }
.pa-news-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cfdcd6;
    transition: width .2s ease, background-color .2s ease;
}
.pa-news-dot[aria-current="true"] { width: 22px; background: var(--orange); }
.pa-news-toggle {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #cfdcd6;
    border-radius: 50%;
    background: #fff;
    color: var(--deep);
}
.pa-news-toggle:hover { border-color: var(--green); background: var(--green-light); }
.pa-news-toggle svg { width: 13px; height: 13px; }

@media (max-width: 992px) { .pa-news-card { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 600px) {
    .pa-news-card { flex-basis: 86%; }
    .pa-news-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pa-news-track { scroll-behavior: auto; }
    .pa-news-card, .pa-news-card::after, .pa-news-dot { transition: none; }
    .pa-news-card:hover, .pa-news-card:focus-within { transform: none; }
}

/* ---------- BERITA: 3 PANEL IFRAME (modul mod-custom115) ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin: 20px auto;
    align-items: start;
}
.news-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-top: 4px solid var(--orange);      /* sama seperti kartu Berita & Pengumuman */
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}
.news-panel:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,60,40,.16); }
.news-panel iframe { display: block; flex: none; width: 100%; height: 320px; border: 0; margin: 0; padding: 0; transition: height .2s ease; }   /* tinggi awal; diatur otomatis oleh berita-iframe.js */
@media (prefers-reduced-motion: reduce) { .news-panel { transition: none; } .news-panel:hover { transform: none; } }

/* ---------- ZONA INTEGRITAS (ikon) ---------- */
.legacy-news + .section { width: 100%; max-width: 100%; margin-top: 0; overflow: hidden; }
.legacy-news + .section table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}
.legacy-news + .section table td {
    width: auto !important;          /* menimpa width inline modul */
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}
.legacy-news + .section table img {
    display: block;
    width: 150px;
    height: 150px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* ---------- BERANDA: KONTEN 80% + SIDEBAR 20% ---------- */
.home-content-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(200px, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
}
.home-main-content, .home-sidebar { min-width: 0; }

/* ---------- FOOTER ---------- */
footer {
    margin-top: 24px;
    background: linear-gradient(135deg, var(--green), var(--deep));
    color: #fff;
    font-size: 14px;
}
footer .footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 35px;
    padding-top: 30px;
    padding-bottom: 30px;
}
footer .footer-grid > div { min-width: 0; }
footer .footer-grid h3 { margin: 0 0 14px; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.4; }

/* kolom 1: kontak */
footer .footer-brand { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
footer .footer-brand h3 { margin: 0 0 4px; font-size: 20px; }
footer .footer-address {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    color: #e5f0eb;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: break-word;
}
footer .footer-contact { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; margin-top: 8px; }
footer .footer-contact-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
footer .footer-contact-row .footer-contact-item { flex: 0 0 auto; max-width: 100%; }

footer .footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255,153,0,.4);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: #fff;
}
footer .footer-contact-item:hover { background: var(--orange); color: var(--deep); }
footer .footer-contact-item:hover small { opacity: 1; }
footer .footer-contact-item small { display: block; font-size: 10px; opacity: .8; }
footer .footer-contact-item strong { display: block; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
footer .footer-contact-icon { flex-shrink: 0; font-size: 19px; }
footer .footer-contact-icon.wa-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
}
footer .footer-contact-icon.wa-icon svg { display: block; width: 16px; height: 16px; }

/* email (sejajar dengan telepon) */
footer .footer-email { gap: 7px; }

/* kolom 2: tautan terkait */
footer .footer-links { display: flex; flex-direction: column; align-items: flex-start; }
footer .footer-links a {
    display: block;
    margin: 0 0 10px;
    color: #f2f7f4;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    transition: color .2s ease;
}
footer .footer-links a:hover { color: var(--orange-soft); }

/* jam pelayanan (di bawah kontak) — versi ringkas/minimalis */
footer .jadwal-card {
    width: 100%;
    max-width: 330px;
    margin: 0;
    padding: 10px 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,153,0,.35);
    border-radius: 10px;
    box-shadow: none;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
}
footer .jadwal-header { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.16); }
footer .jadwal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: transparent;
    border-radius: 0;
    color: var(--orange);
    font-size: 18px;
}
footer .jadwal-card .jadwal-title { margin: 0; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .3px; }
footer .jadwal-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
footer .jadwal-row:last-child { padding-bottom: 0; border-bottom: 0; }
footer .jadwal-hari { color: var(--orange-soft); font-size: 11.5px; font-weight: 700; line-height: 1.4; }
footer .jadwal-detail { min-width: 0; padding-left: 9px; border-left: 2px solid var(--orange); }
footer .jadwal-jam { color: #fff; font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
footer .jadwal-keterangan { display: flex; align-items: flex-start; gap: 5px; margin-top: 2px; color: #d9e8e1; font-size: 10.5px; line-height: 1.4; }
footer .jadwal-keterangan .simbol { flex-shrink: 0; color: var(--orange); font-size: 8px; line-height: 1.9; }

footer .footer-grid-2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
footer .footer-brand .jadwal-card { margin-top: 6px; }

/* kolom 3: statistik pengunjung */
footer .footer-stat { width: 100%; }
footer .stat-card {
    width: 100%;
    padding: 15px;
    background: linear-gradient(145deg, var(--green), var(--deep));
    border: 1px solid rgba(255,153,0,.45);
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0,0,0,.12);
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
}
footer .stat-header { display: flex; align-items: center; gap: 14px; padding-bottom: 13px; border-bottom: 1px solid rgba(255,255,255,.2); }
footer .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(255,255,255,.12);
    border-radius: 12px;
    color: var(--orange);
}
footer .stat-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
footer .stat-card .stat-title { margin: 0; color: #fff; font-size: 15px; letter-spacing: .6px; }

/* isi modul statistik: gaya umum agar cocok dengan berbagai ekstensi */
footer .stat-body { padding-top: 6px; color: #fff; font-size: 13px; line-height: 1.5; }
footer .stat-body * { color: inherit; }
footer .stat-body ul { margin: 0; padding: 0; list-style: none; }
footer .stat-body li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
footer .stat-body li:last-child { border-bottom: 0; }
footer .stat-body table { width: 100%; border-collapse: collapse; background: transparent; }
footer .stat-body th,
footer .stat-body td { padding: 9px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.18); background: transparent; text-align: left; font-size: 13px; }
footer .stat-body tr:last-child td,
footer .stat-body tr:last-child th { border-bottom: 0; }
footer .stat-body td:last-child { text-align: right; font-weight: 800; color: var(--orange-soft); }
footer .stat-body p { margin: 0; padding: 8px 0; }
footer .stat-body a { color: var(--orange-soft); }
footer .stat-body img { max-width: 100%; height: auto; vertical-align: middle; }
/* tampilan kartu statistik (dibuat oleh statistik.js) */
footer .stat-body .vs { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
footer .stat-body .vs-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #cfe3da; }
footer .stat-body .vs-num { font-variant-numeric: tabular-nums; font-weight: 800; color: #fff; }

footer .stat-body .vs-hero {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid rgba(255,153,0,.55);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,153,0,.24), rgba(255,153,0,.05));
}
footer .stat-body .vs-hero .vs-label { color: var(--orange-soft); }
footer .stat-body .vs-hero .vs-num { font-size: 2.1rem; line-height: 1.1; color: var(--orange-soft); letter-spacing: .5px; }

footer .stat-body .vs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
footer .stat-body .vs-grid li {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    padding: 9px 11px;
    border: 0;
    border-left: 3px solid var(--orange);
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    transition: background-color .2s ease, transform .2s ease;
}
footer .stat-body .vs-grid li:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
footer .stat-body .vs-grid .vs-num { font-size: 1.2rem; line-height: 1.2; }
   /* layout jsvisit berbentuk gambar angka */
footer .stat-body div { max-width: 100%; }

/* copyright */
footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid rgba(255,255,255,.16);
    color: #e0ece6;
    font-size: 12px;
    line-height: 1.6;
}

/* ---------- POPUP BANNER (modul pa-popup) ---------- */
.pa-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: rgba(0,0,0,.75);
    align-items: center;
    justify-content: center;
}
.pa-modal-content { position: relative; width: 100%; max-width: 850px; padding: 10px; background: #fff; border-radius: 8px; }
.pa-modal-content img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.pa-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--deep);
    color: #fff;
    font-size: 27px;
}

/* ---------- WIDGET CCTV (.top-kamera): melayang di kanan bawah, di atas tombol aksesibilitas ---------- */
.top-kamera { position: fixed; right: 16px; bottom: 88px; z-index: 900; width: 84px; }
.top-kamera img { display: block; width: 100%; height: auto; }

/* ---------- PENCARIAN (kotak di tengah layar) ---------- */
html.search-open { overflow: hidden; }

#search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    padding: 0;
    overflow-y: auto;
}
#search-modal.active { display: block; }

/* Latar gelap di belakang kotak (klik = tutup) */
#search-modal .search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 35, 28, .6);
}

#search-modal .search-dialog {
    position: relative;
    width: min(640px, calc(100% - 24px));
    margin: 8vh auto 24px;
    padding: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
    overflow: hidden;
}

#search-modal .search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 16px;
    background: var(--deep);
    border-bottom: 0;
}
#search-modal .search-header h3 { margin: 0; color: #fff; font-size: 20px; font-weight: 700; }
#search-modal .search-header h3 { display: flex; align-items: center; gap: 10px; }
#search-modal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
#search-modal #internalSearchForm button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#search-modal #search-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 3px solid rgba(255, 255, 255, .45);
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
#search-modal #search-close:hover { background: rgba(255, 255, 255, .25); }

#search-modal .search-body { padding: 16px; }
#search-modal #internalSearchForm { display: flex; gap: 8px; }
#search-modal #searchInput {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 8px 14px;
    border: 2px solid var(--green);
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-size: 17px;
    outline: none;
}
#search-modal #searchInput:focus { box-shadow: 0 0 0 3px rgba(5,110,79,.15); }
#search-modal #internalSearchForm button {
    padding: 8px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--orange);
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}
#search-modal #internalSearchForm button:hover { background: var(--orange-hover); }

/* Fokus keyboard yang jelas */
#search-modal #searchInput:focus-visible,
#search-modal button:focus-visible,
#search-modal .search-result-item:focus-visible {
    outline: 3px solid var(--deep);
    outline-offset: 2px;
}

/* Hasil / saran / riwayat */
#searchResults { margin-top: 12px; max-height: 50vh; overflow-y: auto; }

#search-modal .search-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
#search-modal .search-clear {
    padding: 2px 6px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: underline;
    cursor: pointer;
}

.search-result-item {
    display: block;
    padding: 12px 14px;
    margin-bottom: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.search-result-item:hover,
.search-result-item:focus { background: var(--green-light); border-color: var(--green); color: var(--deep); }
.search-no-result { padding: 15px; border-radius: 6px; background: #f8f9fa; color: #6c757d; text-align: center; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1100px) {
    .brand strong, .brand > div > span { font-size: 1.9rem; }
    .values strong { font-size: 2.4rem; }
    .proud-hash { font-size: 4rem; }
    .proud-text { font-size: 1.35rem; }
}

@media (max-width: 1000px) {
    .proud { display: none; }
}

@media (max-width: 1000px) {
    footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
    footer .footer-stat { grid-column: 1 / -1; }
}

@media (max-width: 992px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-announce { grid-template-columns: minmax(0, 1fr); }
    .announce-body { max-height: 340px; }
}

@media (max-width: 800px) {
    .container { width: calc(100% - 32px); }

    .brand-row { padding: 14px 0; }
    .brand { gap: 12px; }
    .brand img { width: auto; height: 67px; }
    .brand strong, .brand > div > span { font-size: 1.6rem; }
    .values { display: none; }
    .brand small { font-size: .62rem; letter-spacing: 0; }

    .section-heading { flex-wrap: wrap; }
    .section-heading h2 { font-size: 1.25rem; }

    .icon-section table img { width: 54px; height: 54px; }
    .icon-section table td { padding: 6px 2px; }

    .legacy-news + .section table img { width: 90px; height: 90px; }
    .legacy-news + .section table td { padding: 5px 2px; }

    .home-content-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-kamera { width: 60px; right: 10px; bottom: 80px; }
}

@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }

    footer { margin-top: 20px; }
    footer .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-top: 25px; padding-bottom: 25px; }
    footer .footer-stat { grid-column: auto; }
    footer .footer-email { padding: 7px; }
    footer .footer-bottom { flex-direction: column; align-items: flex-start; }

    #search-modal .search-dialog { margin-top: 4vh; }
    #search-modal .search-header h3 { font-size: 17px; }
    #search-modal .search-body { padding: 14px; }
    #search-modal #internalSearchForm { flex-direction: column; }
    #search-modal #internalSearchForm button { width: 100%; }
}

@media (max-width: 480px) {
    .container { width: calc(100% - 28px); }
    .brand strong, .brand > div > span { font-size: 1.1rem; }
}

@media (max-width: 380px) {
    footer .jadwal-row { grid-template-columns: 82px minmax(0, 1fr); gap: 6px; }
    footer .jadwal-jam { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}