/* ==========================================================================
   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 ALA PA BUNTOK & EKONOMIS (MAKSIMAL 3-5 SLIDE)
   ========================================================================== */
#hero-carousel .carousel-item {
    height: 70vh;
    min-height: 520px;
    max-height: 680px;
    position: relative;
    overflow: hidden;
    background-color: #064e3b;
}

/* Slide 1 & Slide Seterusnya: Tema Hijau Zamrud PA Tarakan */
#hero-carousel .hero-slide-buntok,
#hero-carousel .hero-slide-transparan {
    background: linear-gradient(135deg, #054836 0%, #064e3b 60%, #075e47 100%);
    position: relative;
    overflow: hidden;
}

#hero-carousel .hero-slide-buntok .hero-buntok-motif,
#hero-carousel .hero-slide-transparan .hero-buntok-motif {
    position: absolute;
    left: -15px;
    top: 0;
    bottom: 0;
    width: 280px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.12;
}

#hero-carousel .hero-slide-buntok .hero-buntok-motif svg,
#hero-carousel .hero-slide-transparan .hero-buntok-motif svg {
    width: 100%;
    height: 100%;
}

/* Sisi kanan: Foto Gedung PA Tarakan berbaur anggun */
#hero-carousel .hero-slide-buntok .hero-buntok-img-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 10%, rgba(0, 0, 0, 0.85) 30%, #000 50%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 10%, rgba(0, 0, 0, 0.85) 30%, #000 50%);
}

#hero-carousel .hero-slide-buntok .hero-buntok-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
    transition: transform 9s cubic-bezier(0.25, 1, 0.5, 1);
}

#hero-carousel .hero-slide-buntok.active .hero-buntok-img {
    transform: scale(1.035);
}

/* Overlay transisi gradien halus untuk memastikan kontras sempurna teks di sisi kiri (Identik di semua slide) */
#hero-carousel .hero-slide-buntok::before,
#hero-carousel .hero-slide-transparan::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #064e3b 0%, #064e3b 35%, rgba(6, 78, 59, 0.85) 46%, rgba(6, 78, 59, 0.2) 62%, transparent 78%);
    z-index: 2;
    pointer-events: none;
}

/* Responsif Mobile & Tablet */
@media (max-width: 991.98px) {
    #hero-carousel .hero-slide-buntok .hero-buntok-img-wrap {
        width: 100%;
        -webkit-mask-image: none;
        mask-image: none;
    }
    #hero-carousel .hero-slide-buntok .hero-buntok-img {
        opacity: 0.35;
        object-position: center center;
    }
    #hero-carousel .hero-slide-buntok::before,
    #hero-carousel .hero-slide-transparan::before {
        background: linear-gradient(180deg, rgba(6, 78, 59, 0.94) 0%, rgba(6, 78, 59, 0.82) 55%, rgba(6, 78, 59, 0.96) 100%);
    }
}

/* ==========================================================================
   Slide 2 & Seterusnya: Gambar Utuh (Tidak Terpotong) & Gradasi Halus Seindah Slide 1
   ========================================================================== */
#hero-carousel .hero-slide-transparan .hero-transparan-img-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.25) 8%, rgba(0, 0, 0, 0.85) 22%, #000 38%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.25) 8%, rgba(0, 0, 0, 0.85) 22%, #000 38%);
}

#hero-carousel .hero-slide-transparan .hero-transparan-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

#hero-carousel .hero-slide-transparan .hero-transparan-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: right center;
    opacity: 1;
    transition: transform 9s cubic-bezier(0.25, 1, 0.5, 1);
}

#hero-carousel .hero-slide-transparan.active .hero-transparan-img {
    transform: scale(1.025);
}

/* Batasi lebar teks di kiri agar tidak menabrak gambar di kanan, tetap sejajar rapi di margin kiri container */
#hero-carousel .hero-slide-transparan .hero-title {
    max-width: 38rem;
}
#hero-carousel .hero-slide-transparan .hero-sub {
    max-width: 32rem;
}

/* Responsif Mobile & Tablet untuk Slide Transparan */
@media (max-width: 991.98px) {
    #hero-carousel .hero-slide-transparan .hero-transparan-img-wrap {
        width: 100%;
        -webkit-mask-image: none;
        mask-image: none;
        justify-content: center;
        z-index: 1;
    }
    #hero-carousel .hero-slide-transparan .hero-transparan-img {
        opacity: 0.35;
        object-position: center center;
    }
}

/* Standar fallback slide selain buntok & transparan */
#hero-carousel .carousel-item:not(.hero-slide-buntok):not(.hero-slide-transparan):not(.hero-slide-contain) .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
#hero-carousel .carousel-item:not(.hero-slide-buntok):not(.hero-slide-transparan):not(.hero-slide-contain)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(4, 40, 26, 0.88) 0%, rgba(4, 40, 26, 0.70) 50%, rgba(4, 40, 26, 0.45) 100%);
    z-index: 1;
}

/* Konten Slide Hero */
#hero-carousel .hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
}

/* Badge Lembaga ala PA Buntok */
#hero-carousel .hero-badge .badge-text {
    display: inline-block;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

/* Judul & Aksen Emas */
#hero-carousel .hero-title {
    color: #ffffff;
    font-size: clamp(2.1rem, 3.8vw, 3.35rem);
    font-weight: 700;
    line-height: 1.18;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
#hero-carousel .hero-title .hero-title-accent {
    color: #fbbf24;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

/* Garis Aksen Emas Pembatas */
#hero-carousel .hero-gold-bar {
    width: 48px;
    height: 3.5px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 3px;
    margin: 1.1rem 0 1.25rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Deskripsi Subtitle */
#hero-carousel .hero-sub {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.08rem;
    line-height: 1.65;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

/* Tombol Aksi Pill */
#hero-carousel .btn-hero-primary {
    background-color: #00a86b;
    border: 1px solid #00a86b;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.02rem;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(0, 168, 107, 0.38);
    transition: all 0.25s ease;
}
#hero-carousel .btn-hero-primary:hover, #hero-carousel .btn-hero-primary:focus {
    background-color: #008f5b;
    border-color: #008f5b;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.55);
}

#hero-carousel .btn-hero-outline {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.02rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}
#hero-carousel .btn-hero-outline:hover, #hero-carousel .btn-hero-outline:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
    color: #ffffff !important;
    transform: translateY(-2px);
}

#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] {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 4px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 2px rgba(0,0,0,.6));
}
#hero-carousel .carousel-indicators [data-bs-target].active {
    background-color: #f59e0b;
    width: 48px;
}

/* 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;
}

/* ==========================================================================
   TAMPILAN PINTASAN LAYANAN MODERN (AKSES INFORMASI & LAYANAN - GAYA BUNTOK)
   ========================================================================== */
.home-block.home-shortcuts {
    padding-top: 1.75rem !important;
    padding-bottom: 2rem !important;
}
.shortcut-cat-badge {
    color: var(--pa-primary, #056e4f);
    font-size: 0.725rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
}
.shortcut-heading {
    color: #0c4331;
    font-size: clamp(1.35rem, 1.6vw, 1.6rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.shortcut-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
    max-width: 25rem;
    margin-bottom: 1.15rem;
}
.btn-shortcut-pill {
    background-color: var(--pa-primary, #056e4f);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.42rem 1.15rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 2px 6px rgba(5, 110, 79, 0.18);
}
.btn-shortcut-pill:hover,
.btn-shortcut-pill:focus-visible {
    background-color: var(--pa-primary-dark, #034d37);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 110, 79, 0.25);
}
.btn-shortcut-pill .bi {
    transition: transform 0.2s ease;
    font-size: 0.85rem;
}
.btn-shortcut-pill:hover .bi {
    transform: translateX(3px);
}
.shortcut-item-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    padding: 0.65rem 0.85rem;
    min-height: 64px;
}
.shortcut-item-card:hover,
.shortcut-item-card:focus-visible {
    border-color: #10b981;
    background-color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 110, 79, 0.08);
    transform: translateY(-2px);
}
.shortcut-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background-color: #e6f4ea;
    color: var(--pa-primary, #056e4f);
    font-size: 1.1rem;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.shortcut-item-card:hover .shortcut-item-icon {
    background-color: #d1fae5;
    color: #047857;
    transform: scale(1.05);
}
.shortcut-item-icon .shortcut-item-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.shortcut-item-content {
    min-width: 0;
    flex: 1;
}
.shortcut-item-title {
    font-family: var(--font-display, Montserrat, sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}
.shortcut-item-card:hover .shortcut-item-title {
    color: var(--pa-primary, #056e4f);
}
.shortcut-item-text {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   HALAMAN LAYANAN LAINNYA (PA BUNTOK STYLE)
   ========================================================================== */
.services-hero-card {
    background: linear-gradient(135deg, #eaf6ef 0%, #f4faf6 50%, #ffffff 100%);
    border-radius: 20px;
    border: 1px solid rgba(5, 110, 79, 0.12);
    box-shadow: 0 4px 20px rgba(5, 110, 79, 0.04);
}
.services-hero-img-wrap {
    max-height: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.services-hero-img {
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: cover;
}
.services-hero-bar {
    width: 48px;
    height: 4px;
    background-color: var(--pa-primary, #056e4f);
    border-radius: 2px;
}
.service-detail-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.service-detail-card:hover,
.service-detail-card:focus-visible {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(5, 110, 79, 0.1);
}
.service-detail-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background-color: #e6f4ea;
    color: var(--pa-primary, #056e4f);
    font-size: 1.35rem;
    border-radius: 50%;
    transition: transform 0.25s ease, background-color 0.25s ease;
}
.service-detail-card:hover .service-detail-icon {
    background-color: #d1fae5;
    color: #047857;
    transform: scale(1.08);
}
.service-detail-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.service-detail-title {
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.35;
    transition: color 0.2s ease;
}
.service-detail-card:hover .service-detail-title {
    color: var(--pa-primary, #056e4f);
}
.service-detail-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}
.service-detail-action {
    color: var(--pa-primary, #056e4f);
    transition: color 0.2s ease;
}
.service-detail-action .bi {
    transition: transform 0.2s ease;
}
.service-detail-card:hover .service-detail-action .bi {
    transform: translateX(4px);
}

/* ==========================================================================
   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.6rem; width: auto; }
.header-container { max-width: 1400px; padding-inline: 1rem; }
.brand-parent {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--pa-primary);
    line-height: 1.25;
    white-space: nowrap;
}
.brand-name {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--pa-primary);
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.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-parent { font-size: 0.65rem; }
    .brand-name { font-size: 0.88rem; }
    .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-nav .nav-link { font-size: .8rem; padding: .5rem .32rem; }
    .navbar-nav.gap-1 { gap: 0 !important; }
    .brand-parent { font-size: 0.60rem; }
    .brand-name { font-size: .82rem; }
}
@media (max-width: 575.98px) {
    .brand-parent { font-size: 0.6rem; }
    .brand-name { font-size: 0.82rem; }
}
.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 .shortcut-cat-badge { color: #ffff00 !important; }
body.high-contrast .shortcut-heading { color: #ffffff !important; }
body.high-contrast .shortcut-desc { color: #ffffff !important; }
body.high-contrast .btn-shortcut-pill { background-color: #ffff00 !important; color: #000000 !important; border-color: #ffff00 !important; }
body.high-contrast .shortcut-item-card { background-color: #000000 !important; border-color: #ffff00 !important; color: #ffffff !important; }
body.high-contrast .shortcut-item-icon { background-color: #000000 !important; color: #ffff00 !important; border: 1px solid #ffff00; }
body.high-contrast .shortcut-item-title { color: #ffff00 !important; }
body.high-contrast .shortcut-item-text { color: #ffffff !important; }
body.high-contrast .services-hero-card { background: #000000 !important; border-color: #ffff00 !important; color: #ffffff !important; }
body.high-contrast .services-hero-bar { background-color: #ffff00 !important; }
body.high-contrast .service-detail-card { background-color: #000000 !important; border-color: #ffff00 !important; color: #ffffff !important; }
body.high-contrast .service-detail-icon { background-color: #000000 !important; color: #ffff00 !important; border: 1px solid #ffff00; }
body.high-contrast .service-detail-title { color: #ffff00 !important; }
body.high-contrast .service-detail-desc { color: #ffffff !important; }
body.high-contrast .service-detail-action { 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; }
.emp-history ol { padding-left: 1.2rem; }
.emp-timeline-list { margin: 0; padding: 0; }
.emp-timeline-item { position: relative; }
.emp-timeline-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--pa-primary-light);
    color: var(--pa-primary);
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .15rem;
}
.emp-timeline-title {
    font-size: .92rem;
    line-height: 1.45;
    color: #1f2937;
}
.emp-timeline-badge {
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
    padding: .2rem .65rem;
    border-radius: .375rem;
    background-color: #f8fafc;
    color: #4b5563;
    border: 1px solid #e2e8f0;
}
.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: tetap 2 baris rapi menyesuaikan layar ---------- */
@media (max-width: 1199.98px) {
    .navbar-brand { white-space: nowrap; min-width: 0; flex: 1 1 auto; margin-right: .5rem; gap: .6rem !important; }
    .navbar-brand > div { min-width: 0; }
    .brand-name { font-size: clamp(.72rem, 3.2vw, 0.95rem); line-height: 1.2; white-space: nowrap !important; }
    .navbar-brand .brand-parent { font-size: clamp(.52rem, 2.2vw, .68rem); white-space: nowrap !important; }
    .navbar-brand img.brand-logo { height: clamp(2.2rem, 7vw, 2.85rem); flex-shrink: 0; width: auto; }
    .navbar-toggler { flex-shrink: 0; padding: .25rem .4rem; }
    .navbar-collapse { flex-basis: 100%; }
}
@media (max-width: 375.98px) {
    .navbar-brand { gap: .35rem !important; margin-right: .2rem; }
    .navbar-brand .brand-parent { font-size: 0.50rem; letter-spacing: 0; }
    .brand-name { font-size: 0.70rem; }
    .navbar-brand img.brand-logo { height: 2rem; }
}
/* 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: .42rem !important; padding-right: .42rem !important; font-size: .88rem; }
    .navbar-nav.gap-1 { gap: .1rem !important; }
    .navbar-brand .brand-name { font-size: 0.90rem; white-space: nowrap !important; }
    .navbar-brand .brand-parent { font-size: 0.65rem; white-space: nowrap !important; }
    [data-open-search] .d-xxl-inline { display: none !important; }
}
@media (min-width: 1200px) and (max-width: 1349.98px) {
    .navbar-brand { white-space: nowrap !important; flex: 0 1 auto; min-width: 0; gap: .5rem !important; }
    .navbar-brand .brand-name { font-size: .80rem; line-height: 1.15; white-space: nowrap !important; }
    .navbar-brand .brand-parent { font-size: .58rem; white-space: nowrap !important; }
    .navbar-brand .brand-logo { width: 40px; height: 40px; }
    .navbar-nav .nav-link { padding-left: .28rem !important; padding-right: .28rem !important; font-size: .82rem; }
}

/* Media Sosial di Top Bar */
.social-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.9;
    padding: 2px 4px;
    border-radius: 4px;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    text-decoration: none;
}
.social-top-link:hover {
    color: #ffd166 !important;
    opacity: 1;
    transform: scale(1.15);
}

/* Teks & Tautan Kontak / Telepon Top Bar (selalu putih murni di HP / Android & iOS) */
a[href^="tel:"] {
    color: inherit;
    text-decoration: none;
}
.phone-text,
.phone-text a,
.top-bar-phone a,
.top-bar-phone a[href^="tel:"],
.top-bar-email a,
.top-bar-email .email-text,
.top-bar-verified,
.top-bar-verified span,
.top-bar-siwas,
.top-bar-siwas span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none !important;
}
.phone-text a:hover,
.top-bar-phone a:hover,
.top-bar-email a:hover,
.top-bar-siwas:hover,
.top-bar-siwas:hover span {
    color: #ffd166 !important;
    -webkit-text-fill-color: #ffd166 !important;
}

/* Ikon Telepon, Email, Verified & SIWAS TETAP ORANYE (#ff9900) */
.top-bar-contact .bi-telephone-fill,
.top-bar-contact .bi-envelope-fill,
.top-bar-contact .bi-shield-fill-check,
.top-bar-contact .bi-megaphone-fill,
.top-bar-contact .text-pa-secondary,
.top-bar-phone .bi,
.top-bar-email .bi,
.top-bar-verified .bi,
.top-bar-siwas .bi {
    color: #ff9900 !important;
    -webkit-text-fill-color: #ff9900 !important;
}

@media (max-width: 575.98px) {
    .top-bar-contact {
        font-size: 0.78rem !important;
    }
}


