/* ==========================================================================
   Website Satker Peradilan Agama — diturunkan dari template resmi Badilag
   (SK Dirjen Badilag No. 2722/DJA/SK.TI1/X/2026). Aset di-host lokal.
   ========================================================================== */
/* ==========================================================================
   1. IDENTITAS VISUAL & PALET WARNA RESMI (BAB III HURUF B SK 2722/2026)
   - Warna Utama (Primary): #056e4f
   - Warna Sekunder (Secondary): #ff9900
   ========================================================================== */
:root {
    --pa-primary: #056e4f;
    --pa-primary-dark: #034d37;
    --pa-primary-light: #e6f3ef;
    --pa-secondary: #ff9900;
    --pa-secondary-hover: #e68a00;
    --bs-font-sans-serif: 'Inter', sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-bg: #f8f9fa;
    --base-font-size: 16px;
}

html {
    font-size: var(--base-font-size);
}

/* Utilitas Warna Kustom */
.bg-pa-primary { background-color: var(--pa-primary) !important; }
.text-pa-primary { color: var(--pa-primary) !important; }
.border-pa-primary { border-color: var(--pa-primary) !important; }

.bg-pa-secondary { background-color: var(--pa-secondary) !important; }
.text-pa-secondary { color: var(--pa-secondary) !important; }
.border-pa-secondary { border-color: var(--pa-secondary) !important; }

/* Tombol Standar */
.btn-pa-secondary {
    background-color: var(--pa-secondary);
    color: #111827;
    border-color: var(--pa-secondary);
    font-weight: 700;
    transition: all 0.2s ease;
}
.btn-pa-secondary:hover, .btn-pa-secondary:focus {
    background-color: var(--pa-secondary-hover);
    border-color: var(--pa-secondary-hover);
    color: #000000;
    transform: translateY(-1px);
}

.btn-pa-primary {
    background-color: var(--pa-primary);
    color: #ffffff;
    border-color: var(--pa-primary);
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-pa-primary:hover, .btn-pa-primary:focus {
    background-color: var(--pa-primary-dark);
    border-color: var(--pa-primary-dark);
    color: #ffffff;
}

/* Tipografi */
.font-display { font-family: 'Montserrat', sans-serif; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--pa-primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--pa-primary-dark); }

/* ==========================================================================
   2. NAVIGASI 6 MENU UTAMA (BAB III HURUF F SK 2722/2026)
   ========================================================================== */
.navbar-nav .nav-link {
    color: #374151;
    font-weight: 600;
    font-size: 0.925rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}
.navbar-nav .nav-link:hover {
    color: var(--pa-primary);
}
.navbar-nav .nav-link.active {
    color: var(--pa-primary) !important;
    font-weight: 700;
    border-bottom: 3px solid var(--pa-secondary);
}
.dropdown-menu {
    border-top: 3px solid var(--pa-secondary);
}
.dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--pa-primary-light);
    color: var(--pa-primary);
}

/* Sidebar Sub-Navigasi */
.sidebar-nav-link {
    color: #374151;
    border-left: 4px solid transparent;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}
.sidebar-nav-link:hover {
    background-color: var(--pa-primary-light);
    color: var(--pa-primary);
}
.sidebar-nav-link.active {
    background-color: var(--pa-primary);
    color: #ffffff !important;
    border-left: 4px solid var(--pa-secondary);
}
.sidebar-nav-link.active i {
    color: var(--pa-secondary) !important;
}

/* ==========================================================================
   3. HERO SLIDER EKONOMIS (MAKSIMAL 3-5 SLIDE - BAB III HURUF C)
   ========================================================================== */
#hero-carousel .carousel-item {
    min-height: 55vh;
    position: relative;
    background-color: var(--pa-primary);
}
/* Gambar slider sebagai <img> (alt text + prioritas muat), bukan background-image */
#hero-carousel .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#hero-carousel .carousel-item::before {
    content: '';
    z-index: 1;
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 110, 79, 0.92) 0%, rgba(5, 110, 79, 0.75) 60%, rgba(3, 77, 55, 0.6) 100%);
}
/* Slide bergambar: tanpa lapisan hijau transparan, gambar tampil apa adanya */
#hero-carousel .carousel-item.has-img::before { content: none; }
/* Tulisan putih bergaris tepi hitam → tetap terbaca di gambar terang maupun gelap */
#hero-carousel .has-img .hero-title {
    color: #fff;
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .55);
}
#hero-carousel .has-img .hero-sub {
    color: #fff;
    font-weight: 600;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 2px #000, 0 2px 6px rgba(0, 0, 0, .7);
}
#hero-carousel .has-img .btn-outline-light {
    background: rgba(0, 0, 0, .45);
    border-width: 2px;
    text-shadow: 0 1px 2px #000;
}
#hero-carousel .has-img .btn-outline-light:hover, #hero-carousel .has-img .btn-outline-light:focus-visible { background: #fff; color: #000; text-shadow: none; }
#hero-carousel .carousel-control-prev-icon, #hero-carousel .carousel-control-next-icon { filter: drop-shadow(0 0 2px #000) drop-shadow(0 0 4px rgba(0,0,0,.6)); }
#hero-carousel .carousel-indicators [data-bs-target] { filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 2px rgba(0,0,0,.6)); }
#hero-carousel .hero-content {
    position: relative;
    z-index: 10;
}

/* Kartu Pintasan Layanan (Akses <= 2 Klik) */
.card-shortcut {
    transition: all 0.25s ease-in-out;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}
.card-shortcut:hover, .card-shortcut:focus-visible {
    background-color: var(--pa-primary) !important;
    border-color: var(--pa-primary);
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(5, 110, 79, 0.15) !important;
}
.card-shortcut .bi {
    color: var(--pa-primary);
    transition: color 0.25s ease;
}
.card-shortcut:hover .bi, .card-shortcut:focus-visible .bi {
    color: var(--pa-secondary);
}
/* judul & keterangan jadi putih saat kartu disorot (latar hijau) */
.card-shortcut :is(h3, .text-pa-primary),
.card-shortcut :is(p, .text-secondary) { transition: color 0.25s ease; }
.card-shortcut:is(:hover, :focus-visible) :is(h3, .text-pa-primary) {
    color: #ffffff !important;
}
.card-shortcut:is(:hover, :focus-visible) :is(p, .text-secondary) {
    color: rgba(255, 255, 255, .9) !important;
}

/* ==========================================================================
   4. FITUR AKSESIBILITAS RAMAH DISABILITAS / WCAG (LAMPIRAN II HURUF B)
   - Pembaca Layar (Screen Reader / Text-to-Speech)
   - Mode Kontras Tinggi (High Contrast)
   - Perbesar / Perkecil Teks (Zoom-in / Zoom-out)
   ========================================================================== */
.a11y-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1055;
}
.a11y-panel {
    width: 280px;
    display: none;
}
.a11y-panel.show {
    display: block;
}

/* Mode Kontras Tinggi (High Contrast Mode) */
body.high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}
body.high-contrast header,
body.high-contrast nav,
body.high-contrast section,
body.high-contrast .card,
body.high-contrast .bg-white,
body.high-contrast .bg-light,
body.high-contrast .modal-content,
body.high-contrast footer {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border: 1px solid #ffff00 !important;
}
body.high-contrast a,
body.high-contrast button,
body.high-contrast h1, body.high-contrast h2, body.high-contrast h3, body.high-contrast h4,
body.high-contrast p, body.high-contrast span, body.high-contrast td, body.high-contrast th {
    color: #ffff00 !important;
}
body.high-contrast .btn-pa-secondary,
body.high-contrast .btn-pa-primary {
    background-color: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
}

/* Line Clamp */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* ==========================================================================
   5. TAMBAHAN IMPLEMENTASI CI4
   ========================================================================== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}
:focus-visible {
    outline: 3px solid var(--pa-secondary);
    outline-offset: 2px;
}
.navbar-brand img.brand-logo { height: 3.2rem; width: auto; }
.header-container { max-width: 1400px; padding-inline: 1rem; }
.brand-name { font-size: 1.15rem; }
.navbar-nav .nav-link { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-nav .nav-link { font-size: .84rem; padding: .5rem .45rem; }
    .brand-name { font-size: 1rem; }
    .navbar-brand img.brand-logo { height: 2.75rem; }
    .navbar-brand { gap: .6rem !important; margin-right: .5rem; }
}
@media (min-width: 1200px) and (max-width: 1299.98px) {
    .navbar-brand .text-secondary.small { display: none !important; }
    .navbar-nav .nav-link { font-size: .8rem; padding: .5rem .32rem; }
    .navbar-nav.gap-1 { gap: 0 !important; }
    .brand-name { font-size: .92rem; }
}
.dropdown-menu { max-height: 75vh; overflow-y: auto; }
.text-white-75 { color: rgba(255,255,255,.85) !important; }

/* Konten halaman dari editor */
.prose { color: #374151; line-height: 1.8; }
.prose h2, .prose h3, .prose h4 { font-family: 'Montserrat', sans-serif; color: var(--pa-primary); font-weight: 700; margin-top: 1.5rem; }
.prose h3 { font-size: 1.15rem; }
.prose h4 { font-size: 1rem; }
.prose blockquote { background: var(--bs-light); border-left: 4px solid var(--pa-secondary); border-radius: .375rem; padding: 1rem 1.25rem; font-weight: 600; color: var(--pa-primary); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { max-width: 100%; height: auto; }
.prose a { color: var(--pa-primary); font-weight: 600; }
.prose table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid #dee2e6; padding: .5rem; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }

.page-title { border-bottom: 2px solid var(--pa-secondary); padding-bottom: .5rem; }
.table thead.table-success th { background-color: var(--pa-primary-light); color: var(--pa-primary-dark); }
.doc-year summary { cursor: pointer; font-weight: 700; color: var(--pa-primary); padding: .5rem 0; }
.employee-photo { width: 110px; height: 110px; object-fit: cover; }
.alert-serta-merta { border-radius: 0; margin: 0; }

/* Dialog pencarian (native <dialog>) */
dialog.search-dialog {
    border: 0;
    border-radius: .75rem;
    padding: 0;
    width: min(36rem, calc(100vw - 2rem));
    box-shadow: 0 1rem 3rem rgba(0,0,0,.25);
}
dialog.search-dialog::backdrop { background: rgba(3, 77, 55, .55); overflow: hidden; overscroll-behavior: contain; }
dialog.search-dialog:modal { overscroll-behavior: contain; }

/* Panel aksesibilitas */
.a11y-panel { width: 280px; }

/* Kontras tinggi — elemen tambahan */
body.high-contrast .prose,
body.high-contrast .prose blockquote,
body.high-contrast .list-group-item,
body.high-contrast .table,
body.high-contrast .table > :not(caption) > * > *,
body.high-contrast dialog,
body.high-contrast .dropdown-menu,
body.high-contrast .dropdown-item,
body.high-contrast .text-secondary,
body.high-contrast .text-dark,
body.high-contrast .text-pa-primary,
body.high-contrast li, body.high-contrast small, body.high-contrast label, body.high-contrast strong, body.high-contrast summary {
    background-color: #000000 !important;
    color: #ffff00 !important;
    --bs-table-bg: #000;
    --bs-table-color: #ff0;
}
body.high-contrast .card-shortcut .bi, body.high-contrast .bi { color: #ffff00 !important; }
body.high-contrast #hero-carousel .carousel-item::before { background: #000 !important; opacity: .85; }
body.high-contrast img { filter: grayscale(1) contrast(1.2); }
body.high-contrast .form-control { background: #000 !important; color: #ff0 !important; border-color: #ff0 !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
    header, footer, .a11y-widget, aside, #hero-carousel { display: none !important; }
}

/* Beranda: grid bebas 12 kolom (posisi diatur di Panel Admin → Tampilan Beranda) */
.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.home-cell { min-width: 0; }
@media (max-width: 991.98px) {
    /* layar kecil: semua kotak bertumpuk sesuai urutan (atas→bawah, kiri→kanan) */
    .home-grid { grid-template-columns: minmax(0, 1fr); }
    .home-grid > .home-cell { grid-column: 1 / -1 !important; grid-row: auto !important; }
}

/* ---------- Isi halaman berbasis blok ---------- */
.page-table-wrap { border: 1px solid #dfe7e3; border-radius: .75rem; }
.page-table thead th { background: var(--pa-primary); color: #fff; font-weight: 600; border-bottom: 3px solid var(--pa-secondary); white-space: nowrap; }
.page-table tbody tr:nth-child(even) td { background: #f6faf8; }
.page-table td, .page-table th { padding: .7rem .9rem; }
.page-table__no { width: 3.5rem; }
.page-link-btn { min-width: 5.5rem; }
.page-figure { margin-left: auto; margin-right: auto; }
.page-figure--start { margin-left: 0; }
.page-figure--end { margin-right: 0; text-align: right; }
.page-figure--center { text-align: center; }
.page-figure--large { max-width: 75%; }
.page-figure--medium { max-width: 50%; }
.page-figure--small { max-width: 33%; }
@media (max-width: 575.98px) { .page-figure--large, .page-figure--medium, .page-figure--small { max-width: 100%; } }
.page-embed__frame { height: min(var(--embed-h, 640px), 85vh); border: 1px solid #dfe7e3; border-radius: .75rem; overflow: hidden; background: #f3f6f5; }
.page-embed__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-dialog { width: min(1100px, 96vw); height: 92vh; max-height: 92vh; padding: 0; border: 0; border-radius: .75rem; box-shadow: 0 1rem 3rem rgba(0,0,0,.35); }
.preview-dialog[open] { display: flex; flex-direction: column; }
.preview-dialog::backdrop { background: rgba(3, 30, 22, .6); }
.preview-dialog__head { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-bottom: 3px solid var(--pa-secondary); background: #fff; }
.preview-dialog iframe { flex: 1; width: 100%; border: 0; background: #f3f6f5; }
@media (max-width: 575.98px) { .preview-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; max-width: 100vw; border-radius: 0; } }

/* ---------- Profil pegawai ---------- */
.emp-card { transition: transform .15s ease, box-shadow .15s ease; }
.emp-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1.25rem rgba(5,110,79,.15); }
.emp-group-row th { background: var(--pa-primary-light) !important; color: var(--pa-primary); font-weight: 700; }
.emp-profile { background: linear-gradient(160deg, #fff 0%, #f4faf7 60%, #fff8ec 100%); border: 1px solid #e3ece8; }
.emp-profile__bar { background: linear-gradient(90deg, var(--pa-primary-dark), var(--pa-primary)); color: #fff; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1rem 1.5rem; border-bottom: 4px solid var(--pa-secondary); font-size: 1.1rem; }
.emp-profile__photo { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; object-position: top; border: 6px solid #fff; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.15); flex-shrink: 0; }
.emp-profile__photo--empty { display: grid; place-items: center; background: var(--pa-primary); color: #fff; font-size: 4rem; }
.emp-profile__badge { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .85rem; border-radius: 2rem; background: #eaf2ff; color: #1d4ed8; border: 1px solid #bfd3fb; font-size: .82rem; font-weight: 600; }
.emp-fact { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid #e6ece9; border-radius: .75rem; padding: 1rem 1.25rem; height: 100%; }
.emp-fact__icon { width: 2.75rem; height: 2.75rem; border-radius: .6rem; display: inline-grid; place-items: center; background: var(--pa-primary-light); color: var(--pa-primary); font-size: 1.25rem; flex-shrink: 0; }
.emp-fact__icon--alt { background: #fff3dc; color: #b36b00; }
.emp-fact__icon--sm { width: 2rem; height: 2rem; font-size: 1rem; margin-right: .35rem; }
.emp-fact__label { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; }
.emp-bio { background: #fff; border-left: 4px solid var(--pa-secondary); border-radius: .5rem; padding: 1rem 1.25rem; color: #374151; }
.emp-history { background: #fff; border: 1px solid #e6ece9; border-radius: .75rem; padding: 1.25rem 1.25rem 1rem; }
.emp-history ol { padding-left: 1.2rem; }
.emp-rich > :last-child { margin-bottom: 0; }
.emp-rich ol, .emp-rich ul { padding-left: 1.2rem; margin-bottom: .5rem; }
.emp-rich table { width: 100%; }

/* ---------- Kepala halaman di layar kecil: nama satker panjang boleh turun baris ---------- */
@media (max-width: 1199.98px) {
    .navbar-brand { white-space: normal; min-width: 0; flex: 1 1 0; margin-right: .5rem; gap: .65rem !important; }
    .navbar-brand > div { min-width: 0; }
    .brand-name { font-size: clamp(.82rem, 3.4vw, 1.15rem); line-height: 1.2; overflow-wrap: anywhere; }
    .navbar-brand .text-secondary.small { font-size: clamp(.7rem, 2.6vw, .875rem); }
    .navbar-brand img.brand-logo { height: clamp(2.4rem, 9vw, 3.2rem); flex-shrink: 0; }
    .navbar-toggler { flex-shrink: 0; padding: .25rem .4rem; }
    .navbar-collapse { flex-basis: 100%; }
}
/* pengaman: tidak ada isi yang membuat halaman melebar ke samping di HP */
@media (max-width: 767.98px) {
    html, body { overflow-x: clip; }
    .prose img, .prose iframe, .prose video { max-width: 100%; height: auto; }
    .prose table { display: block; max-width: 100%; overflow-x: auto; }
    .prose pre { white-space: pre-wrap; overflow-wrap: anywhere; }
    .prose a { overflow-wrap: anywhere; }
}

/* label tersembunyi (visually-hidden) di dalam tabel tidak boleh melebarkan halaman */
.table-responsive { position: relative; }

/* Tombol Disabilitas di HP: bundar berikon agar tidak menutupi isi (label tetap dibaca pembaca layar via aria-label) */
@media (max-width: 575.98px) {
    .a11y-widget { bottom: 1rem; right: .85rem; }
    #a11yToggle { width: 3.1rem; height: 3.1rem; padding: 0 !important; border-radius: 50% !important; display: inline-grid; place-items: center; }
    #a11yToggle .bi { margin: 0 !important; font-size: 1.45rem !important; }
    #a11yToggle .a11y-label { display: none; }
}

/* Sub-menu bertingkat di dropdown (tingkat 2–4) */
.dropdown-menu .menu-lv2.has-sub { font-weight: 700; color: var(--pa-primary); }
.dropdown-menu li:not(:first-child) > .menu-lv2.has-sub { border-top: 1px solid #e5e7eb; margin-top: .25rem; }
.dropdown-menu .menu-lv3 { padding-left: 2.25rem; font-size: .85rem; }
.dropdown-menu .menu-lv3.has-sub { font-weight: 600; }
.dropdown-menu .menu-lv4 { padding-left: 3.25rem; font-size: .82rem; }
.dropdown-menu .menu-lv3::before, .dropdown-menu .menu-lv4::before { content: "›"; margin-right: .4rem; color: var(--pa-secondary); }
.dropdown-menu .dropdown-header { font-weight: 700; color: var(--pa-primary); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding-top: .6rem; }
.dropdown-menu .dropdown-header.menu-lv3 { padding-left: 2.25rem; }
/* Sidebar halaman: sub-menu bertingkat */
.sidebar-sub { padding-left: .9rem; border-left: 2px solid #e5e7eb; margin-left: .9rem; }
.sidebar-sub .sidebar-nav-link { font-weight: 500 !important; font-size: .9rem; padding-top: .35rem !important; padding-bottom: .35rem !important; }
.sidebar-group { font-size: .8rem; font-weight: 700; color: var(--pa-primary); text-transform: uppercase; letter-spacing: .03em; padding: .5rem .75rem .2rem; }

/* Warna menu aktif/terpilih: hijau satker (bukan biru bawaan Bootstrap) */
.dropdown-menu { --bs-dropdown-link-active-bg: var(--pa-primary, #056e4f); --bs-dropdown-link-active-color: #fff; }
.dropdown-item.active, .dropdown-item:active { background-color: var(--pa-primary, #056e4f) !important; color: #fff !important; }
.dropdown-item.active::before, .dropdown-item:active::before { color: var(--pa-secondary, #ff9900); }

/* Warna utama Bootstrap → hijau satker (menggantikan biru bawaan) */
:root {
    --bs-primary: #056e4f; --bs-primary-rgb: 5, 110, 79;
    --bs-link-color: #056e4f; --bs-link-color-rgb: 5, 110, 79;
    --bs-link-hover-color: #034d37; --bs-link-hover-color-rgb: 3, 77, 55;
    --bs-focus-ring-color: rgba(5, 110, 79, .25);
    --bs-primary-bg-subtle: #e6f3ef; --bs-primary-border-subtle: #9fd0c0; --bs-primary-text-emphasis: #034d37;
}
.form-check-input:checked { background-color: #056e4f; border-color: #056e4f; }
.form-check-input:focus, .form-control:focus, .form-select:focus { border-color: #5fae94; box-shadow: 0 0 0 .25rem rgba(5, 110, 79, .25); }
.form-switch .form-check-input:focus:not(:checked) { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%235fae94'/%3e%3c/svg%3e"); }
.form-range::-webkit-slider-thumb { background-color: #056e4f; }
.form-range::-moz-range-thumb { background-color: #056e4f; }
.btn-primary { --bs-btn-bg: #056e4f; --bs-btn-border-color: #056e4f; --bs-btn-hover-bg: #034d37; --bs-btn-hover-border-color: #034d37; --bs-btn-active-bg: #034d37; --bs-btn-active-border-color: #034d37; --bs-btn-disabled-bg: #056e4f; --bs-btn-disabled-border-color: #056e4f; }
.btn-outline-primary { --bs-btn-color: #056e4f; --bs-btn-border-color: #056e4f; --bs-btn-hover-bg: #056e4f; --bs-btn-hover-border-color: #056e4f; --bs-btn-active-bg: #034d37; --bs-btn-active-border-color: #034d37; }
.pagination { --bs-pagination-color: #056e4f; --bs-pagination-hover-color: #034d37; --bs-pagination-focus-color: #034d37; --bs-pagination-active-bg: #056e4f; --bs-pagination-active-border-color: #056e4f; --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(5, 110, 79, .25); }
.nav-pills { --bs-nav-pills-link-active-bg: #056e4f; }
.nav { --bs-nav-link-color: #056e4f; --bs-nav-link-hover-color: #034d37; }
.list-group { --bs-list-group-active-bg: #056e4f; --bs-list-group-active-border-color: #056e4f; }
.dropdown-menu { --bs-dropdown-link-active-bg: #056e4f; }
.text-primary { color: #056e4f !important; }
.bg-primary { background-color: #056e4f !important; }
.border-primary { border-color: #056e4f !important; }
.accordion { --bs-accordion-active-bg: #e6f3ef; --bs-accordion-active-color: #034d37; --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(5, 110, 79, .25); }
.progress, .progress-stacked { --bs-progress-bar-bg: #056e4f; }

/* Label kategori nilai survei (Sangat Baik / Baik / …) */
.survey-badge { background: var(--pa-secondary, #ff9900); color: #1f2937; font-weight: 700; font-size: .72rem; padding: .3em .6em; border-radius: .25rem; }

/* Pintasan: gambar pada kartu, gaya banner (tile) & tombol kotak */
.card-shortcut .shortcut-img { display: block; max-height: 72px; max-width: 100%; margin: 0 auto; object-fit: contain; }
.shortcut-tile { border-radius: .5rem; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s; background: #fff; }
.shortcut-tile img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 1; }
.shortcut-tile:hover, .shortcut-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(5,110,79,.2); }
.shortcut-tile-fallback { display: flex; align-items: center; gap: .75rem; padding: 1.25rem; min-height: 100%; aspect-ratio: 3 / 1; background: var(--pa-primary, #056e4f); color: #fff; font-weight: 700; font-family: Montserrat, sans-serif; }
.shortcut-tile-fallback .bi { font-size: 2rem; color: var(--pa-secondary, #ff9900); }
.shortcut-button { min-height: 7.5rem; padding: 1rem .5rem; border: 2px solid #1f2937; border-radius: .35rem; background: #fff; color: #1f2937; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.shortcut-button .bi { font-size: 2.6rem; line-height: 1; color: #1f2937; transition: color .2s; }
.shortcut-button img { max-height: 3rem; max-width: 80%; object-fit: contain; }
.shortcut-button-label { margin-top: .5rem; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.shortcut-button:hover, .shortcut-button:focus-visible { background: var(--pa-primary, #056e4f); border-color: var(--pa-primary, #056e4f); color: #fff; transform: translateY(-3px); }
.shortcut-button:hover .bi, .shortcut-button:focus-visible .bi { color: var(--pa-secondary, #ff9900); }

/* Galeri video */
.video-thumb { aspect-ratio: 16 / 9; background: #0f172a; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video-thumb:hover img, .video-thumb:focus-visible img { transform: scale(1.05); }
.video-thumb-empty { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #94a3b8; font-size: 2.5rem; }
.video-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 3.4rem; height: 2.4rem; border-radius: .6rem; background: #dc2626; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 4px 12px rgba(0,0,0,.35); transition: transform .2s; }
.video-thumb:hover .video-play, .video-thumb:focus-visible .video-play { transform: translate(-50%, -50%) scale(1.12); }
.video-title { color: #1f2937; line-height: 1.35; }
.video-on-dark .video-title { color: #fff; }
.video-on-dark small { color: rgba(255,255,255,.75) !important; }

/* Blok Jam Pelayanan & Sidang */
.hours-block { display: grid; gap: .75rem; }
.hours-group { border: 1px solid #d7e6df; border-radius: .5rem; overflow: hidden; background: #fff; color: #1f2937; }
.hours-head { margin: 0; padding: .45rem .75rem; background: var(--pa-primary, #056e4f); color: #fff; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.hours-head .bi { color: var(--pa-secondary, #ff9900); }
.hours-group ul { padding: 0 .75rem; }
.hours-group li + li { border-top: 1px dashed #e5e7eb; }
.hours-group li .text-end { color: #1f2937 !important; font-weight: 600; }

/* Popup pembuka — ukuran terbatas, tidak memenuhi layar */
dialog.site-popup { padding: 0; border: 0; border-radius: .75rem; overflow: visible; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.35); width: 92vw; max-height: 90vh; }
dialog.site-popup-sm { max-width: 480px; }
dialog.site-popup-md { max-width: 720px; }
dialog.site-popup-lg { max-width: 960px; }
dialog.site-popup::backdrop { background: rgba(15, 23, 42, .6); }
dialog.site-popup[open] { animation: popupIn .25s ease-out; }
@keyframes popupIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.site-popup-img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; background: #f1f5f9; border-radius: .75rem; }
.site-popup-img.has-body { border-radius: .75rem .75rem 0 0; }
.site-popup-body { padding: .9rem 1.1rem 1rem; max-height: 30vh; overflow-y: auto; }
.site-popup-close { position: absolute; top: -.9rem; right: -.9rem; z-index: 2; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid #fff; background: #dc2626; color: #fff; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,.35); cursor: pointer; }
.site-popup-close:hover, .site-popup-close:focus-visible { background: #b91c1c; outline: 3px solid var(--pa-secondary, #ff9900); outline-offset: 2px; }
@media (max-width: 576px) { .site-popup-close { top: .4rem; right: .4rem; } }
@media (prefers-reduced-motion: reduce) { dialog.site-popup[open] { animation: none; } }

/* Tombol melayang: CCTV (kiri atas) & WhatsApp (kiri bawah) */
.float-cctv, .float-wa { position: fixed; left: 1rem; z-index: 1040; display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .2s, box-shadow .2s; }
.float-cctv { top: 8.5rem; padding: .35rem .9rem .35rem .35rem; background: #fff; color: #1f2937; border: 2px solid var(--pa-primary, #056e4f); }
.float-cctv-icon { position: relative; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--pa-primary, #056e4f); color: #fff; display: grid; place-items: center; font-size: 1.25rem; }
.float-cctv-rec { position: absolute; top: .25rem; right: .25rem; width: .6rem; height: .6rem; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px #fff; animation: recBlink 1.2s infinite; }
.float-cctv-img { width: 2.8rem; height: 2.8rem; object-fit: contain; border-radius: 50%; }
.float-cctv-text { font-size: .85rem; line-height: 1.05; display: flex; flex-direction: column; }
.float-cctv-text strong { color: var(--pa-primary, #056e4f); font-family: Montserrat, sans-serif; letter-spacing: .03em; }
.float-wa { bottom: 1.5rem; padding: .7rem 1.1rem .7rem .8rem; background: #25d366; color: #fff; font-weight: 700; border: 2px solid #fff; }
.float-wa .bi { font-size: 1.6rem; line-height: 1; }
.float-wa::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); animation: waPulse 2s infinite; pointer-events: none; }
.float-cctv:hover, .float-cctv:focus-visible, .float-wa:hover, .float-wa:focus-visible { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,.3); color: inherit; }
.float-wa:hover, .float-wa:focus-visible { color: #fff; background: #1ebe5b; }
.float-cctv:focus-visible, .float-wa:focus-visible { outline: 3px solid var(--pa-secondary, #ff9900); outline-offset: 3px; }
@keyframes recBlink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); } 70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
@media (prefers-reduced-motion: reduce) { .float-cctv-rec, .float-wa::after { animation: none; } }
/* layar kecil: jadi tombol bundar ringkas agar tidak menutupi isi */
@media (max-width: 991.98px) {
    .float-cctv { top: auto; bottom: 5.2rem; padding: .25rem; border-width: 2px; }
    .float-cctv-text, .float-wa-text { display: none; }
    .float-wa { bottom: 1rem; left: .85rem; width: 3.1rem; height: 3.1rem; padding: 0; justify-content: center; }
    .float-cctv { left: .85rem; }
    .float-cctv-icon, .float-cctv-img { width: 2.45rem; height: 2.45rem; }
}
@media print { .float-cctv, .float-wa { display: none !important; } }
body.high-contrast .float-cctv, body.high-contrast .float-wa { background: #000 !important; color: #ffff00 !important; border-color: #ffff00 !important; }
/* layar sedang (isi halaman sampai ke tepi): tampilkan ikon saja */
@media (min-width: 992px) and (max-width: 1499.98px) {
    .float-cctv { padding: .3rem; }
    .float-cctv-text, .float-wa-text { display: none; }
    .float-wa { width: 3.4rem; height: 3.4rem; padding: 0; justify-content: center; }
}

/* Layar 1200–1499 px: rapatkan menu utama agar tombol Cari tidak terdorong keluar layar */
@media (min-width: 1200px) and (max-width: 1499.98px) {
    .navbar-nav .nav-link { padding-left: .45rem !important; padding-right: .45rem !important; font-size: .9rem; }
    .navbar-nav.gap-1 { gap: .1rem !important; }
    .navbar-brand .brand-name { font-size: 1.02rem; }
    .navbar-brand .small { font-size: .8rem; }
    [data-open-search] .d-xxl-inline { display: none !important; }
}
@media (min-width: 1200px) and (max-width: 1349.98px) {
    .navbar-brand { white-space: normal; max-width: 15.5rem; flex: 0 1 auto; min-width: 0; }
    .navbar-brand .brand-name { font-size: .92rem; line-height: 1.15; }
    .navbar-brand .small { font-size: .74rem; }
    .navbar-brand .brand-logo { width: 44px; height: 44px; }
    .navbar-nav .nav-link { padding-left: .35rem !important; padding-right: .35rem !important; font-size: .86rem; }
}
