:root {
    --primary: #16324f;
    --primary-dark: #0b1f3a;
    --primary-light: #24476b;
    --primary-soft: #e8eff7;
    --body-bg: #f4f7fb;
    --text: #172b4d;
    --border: #dce5ef;
    --bs-primary-rgb: 22, 50, 79;
    --bs-primary-bg-subtle: #e8eff7;
    --bs-primary-border-subtle: #c8daed;
    --bs-primary-text-emphasis: #0b1f3a;
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-light);
    --bs-link-color-rgb: 22, 50, 79;
    --bs-link-hover-color-rgb: 36, 71, 107;
}

.text-brand { color: var(--primary) !important; }
.text-brand-light { color: #a9d4ff !important; }
.bg-brand-subtle { background-color: var(--primary-soft) !important; }
.border-brand-subtle { border-color: var(--border) !important; }

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-light);
    --bs-btn-hover-border-color: var(--primary-light);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 80, 126, 175;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-color: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 80, 126, 175;
}

.form-control, .form-select {
    border-color: var(--border);
    border-radius: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #507eaf;
    box-shadow: 0 0 0 0.2rem rgb(80 126 175 / 18%);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.table {
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: #f0f5fb;
}

.table-light {
    --bs-table-bg: #e8eff7;
    --bs-table-color: var(--primary);
}

.konten-berita img {
    max-width: 100%;
    height: auto;
}

.konten-berita {
    overflow-wrap: anywhere;
    overflow-x: auto;
}

#filter-buttons .btn {
    border: 1px solid var(--primary);
    color: var(--primary);
}

#filter-buttons .btn.active {
    background: var(--primary);
    color: white;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.gallery-item .overlay {
    position: absolute;
    inset: auto 0 0;
    padding: .75rem;
    background: rgb(0 0 0 / 70%);
    color: white;
}

.skip-link {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
    padding: 0.75rem 1.25rem;
    background: var(--primary-dark);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
    transform: translateY(-120%);
    transition: transform 0.15s ease-in-out;
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.nav-item .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    /* color: var(--text); */
    padding: 0.75rem 2.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    background-color: color-mix(in srgb, var(--primary), black 20%);
    border-color: color-mix(in srgb, var(--primary), black 20%);
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--body-bg);
    color: var(--text);
}

/* =====================
         TOPBAR
      ===================== */
.topbar {
    background: #1f89ec;
    color: #fff;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

/* =====================
   PAGE HEADER (BREADCRUMB)
===================== */
.page-header {
    background: linear-gradient(115deg, var(--primary-dark), var(--primary-light));
    /* Sedikit bayangan di bawah untuk memisahkan dari konten */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Styling khusus untuk ikon rumah */
.home-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    /* Ukuran proporsional, tidak lebih besar dari teks judul */
    transition: all 0.2s ease-in-out;
}

.home-link:hover {
    color: #ffffff;
    transform: scale(1.1);
    /* Sedikit membesar saat di-hover */
}

/* =====================
         NAVBAR
      ===================== */
.navbar-custom {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.navbar-brand {
    color: var(--text) !important;
    text-decoration: none;
}

.logo-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    /* background: linear-gradient(135deg, var(--primary), var(--primary-dark)); */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.navbar-toggler {
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.nav-link {
    color: var(--primary) !important;
    font-weight: 500;
    /* padding: 0.5rem 1rem !important; */
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark) !important;
    background-color: var(--primary-soft);
    border-radius: 8px;
}

/* Dropdown navbar */
.navbar-custom:has(.dropdown-menu.show) {
    z-index: 1030;
}

.navbar-custom .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.navbar-custom .dropdown-item {
    color: var(--primary) !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
    color: var(--primary-dark) !important;
    background-color: var(--body-bg);
}

.navbar-custom .dropdown-item.active {
    color: var(--primary-dark) !important;
    background-color: var(--primary-soft) !important;
    font-weight: 600;
}

/*  */
/* Navbar slider */
/*  */
.nav-scroller {
    overflow-x: auto;
    white-space: nowrap;
}

.nav-scroller .nav {
    flex-wrap: nowrap;
}

/* =====================
   SUB-NAVIGATION (HORIZONTAL SCROLL)
===================== */
/* Menyembunyikan scrollbar horizontal tapi tetap bisa di-scroll */
.custom-subnav {
    scrollbar-width: none; /* Untuk Firefox */
    -ms-overflow-style: none; /* Untuk Internet Explorer 10+ */
    gap: 0.5rem; /* Jarak antar menu */
}

.custom-subnav::-webkit-scrollbar {
    display: none; /* Untuk Safari dan Chrome */
}

/* Memperbesar sedikit ikon di dalam subnav agar proporsional dengan teks */
.custom-subnav .nav-link i {
    font-size: 1.1rem;
}

/* Styling dasar link */
.custom-subnav .nav-link {
    color: #6c757d !important; /* Warna abu-abu redup */
    font-weight: 500;
    padding: 0.5rem 1.25rem !important;
    border-radius: 50px; /* Bentuk kapsul/pil */
    white-space: nowrap; /* Mencegah teks turun ke baris baru */
    transition: all 0.3s ease;
}

/* Saat kursor diarahkan (Hover) */
.custom-subnav .nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--body-bg);
}

/* Saat menu Aktif (Active) */
.custom-subnav .nav-link.active {
    color: var(--primary-dark) !important;
    background-color: var(--primary-soft) !important;
    font-weight: 600;
}

/* =====================
         HERO
      ===================== */
.hero {
    position: relative;
    isolation: isolate;
    background: radial-gradient(ellipse at top right, #315b85 0%, transparent 60%),
        linear-gradient(120deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 110px 0;
    border-bottom: 6px solid #c8daed;
}

.hero-background,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background {
    object-fit: cover;
}

.hero-overlay {
    background: linear-gradient(100deg, rgb(11 31 58 / 95%), rgb(22 50 79 / 70%));
}

.office-map {
    width: 100%;
    height: 220px;
    border: 0;
    border-radius: 12px;
}

.hero h1 {
    font-weight: 700;
    line-height: 1.3;
}

.hero p {
    opacity: 0.9;
    max-width: 42rem;
    line-height: 1.8;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2edf9;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 25%);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.hero-highlight { color: #a9d4ff; }

.hero .btn { padding-block: 0.9rem; }

.stats-strip .col-6 > div {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 0.75rem;
    height: 100%;
    background: linear-gradient(180deg, #fff, var(--body-bg));
}

/* =====================
         SECTION
      ===================== */
.section-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* =====================
         CARDS
      ===================== */
.hover-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 24px rgb(11 31 58 / 5%);
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* =====================
   SIDEBAR KATEGORI (TENTANG KAMI)
===================== */
.sidebar-card {
    background: #ffffff; /* Menggunakan background putih agar terlihat seperti kartu */
    border-radius: 16px;
    border: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.04); /* Efek bayangan lembut */
    padding: 1rem;
}

.sidebar-card h5 {
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 2px dashed var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.sidebar-card .list-group-item {
    background: transparent;
    border: none;
    padding: 0.3rem 0; /* Jarak antar item */
}

/* Styling Link Kategori */
.sidebar-card .list-group-item a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #495057 !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 10px;
    background: var(
        --body-bg
    ); /* Warna abu-abu sangat terang untuk item normal */
    transition: all 0.3s ease;
}

/* Efek saat di-hover */
.sidebar-card .list-group-item a:hover {
    background: var(--primary-light);
    color: #ffffff !important;
    transform: translateX(5px); /* Bergeser sedikit ke kanan */
}

/* Efek saat kategori sedang Aktif */
.sidebar-card .list-group-item a.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(22, 50, 79, 0.3);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary), transparent 70%);
}

/* Layanan */
.service-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover,
.service-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border-color: color-mix(in srgb, var(--primary), transparent 55%);
}

.service-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: color-mix(in srgb, var(--primary), transparent 88%);
    color: var(--primary);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.service-card:hover .service-icon-wrapper,
.service-card:focus-within .service-icon-wrapper {
    background-color: var(--primary);
    color: #fff;
}

.service-icon {
    font-size: 1.6rem;
    color: inherit;
}

.service-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-action {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.service-action-muted {
    color: #6c757d;
    font-weight: 500;
}

/* Berita */
.news-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-card:hover,
.news-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border-color: color-mix(in srgb, var(--primary), transparent 55%);
}

.news-thumb {
    overflow: hidden;
    background-color: #f1f3f5;
}

.news-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumb img,
.news-card:focus-within .news-thumb img {
    transform: scale(1.05);
}

.news-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--primary), transparent 88%),
            color-mix(in srgb, var(--primary), transparent 94%));
    color: color-mix(in srgb, var(--primary), transparent 45%);
    font-size: 2rem;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.news-author {
    display: inline-flex;
    align-items: center;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.35rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--primary), transparent 78%);
    border-radius: 50px;
    background-color: color-mix(in srgb, var(--primary), transparent 88%);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
}

.news-date {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #6c757d;
    font-size: 0.75rem;
}

.news-title {
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: var(--text);
    text-decoration: none;
}

.news-card:hover .news-title a,
.news-card:focus-within .news-title a {
    color: var(--primary);
}

.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.news-read {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.news-views {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.8rem;
}

.service-card:focus-within,
.news-card:focus-within {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

/* =====================
         FOOTER
      ===================== */
footer {
    background: #1a1d20;
    color: #adb5bd;
}

footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: 0.3s;
}

footer a:hover {
    color: #fff;
    padding-left: 5px;
}

/* =====================
         MOBILE
      ===================== */
@media (max-width: 991px) {
    .navbar-brand {
        max-width: calc(100% - 3rem);
        white-space: normal;
    }
    .logo-box {
        flex-shrink: 0;
    }
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }
    .hero {
        padding: 60px 0;
        text-align: center;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Loading css */
/*  */
/*  */
/*  */
.dot {
    height: 10px;
    width: 10px;
    margin: 0 3px;
    background-color: #333;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}
.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
/* batas loading css */

/* Card (untuk Sidebar Filter) */
.card-header-custom {
    background-color: var(--primary-dark);
    color: white;
    border-bottom: none;
}

/*  */
/* List Group (untuk Daftar Informasi) */
/*  */
.custom-list-group-item {
    transition:
        transform 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
}

.custom-list-group-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.custom-list-group-item i.icon-document {
    color: var(--primary-light);
    transition: transform 0.2s ease-in-out;
}

.custom-list-group-item:hover i.bi {
    transform: scale(1.1);
}

/*  */
/* halaman pagination */
/*  */
.page-link {
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Dashboard keuangan publik */
.finance-stat,
.finance-panel {
    font-variant-numeric: tabular-nums;
}

.finance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.finance-header p {
    max-width: 40rem;
    color: #576980;
    line-height: 1.7;
}

.finance-filter {
    flex: 0 0 190px;
}

.finance-loading {
    min-height: 1.6rem;
    padding-top: 0.25rem;
    color: #576980;
}

.finance-stat,
.finance-panel {
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgb(11 31 58 / 4%);
}

.finance-stat {
    color: var(--primary);
}

.finance-stat-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    color: #576980;
}

.finance-stat-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    margin-left: 0.5rem;
    border-radius: 12px;
    background: var(--primary-soft);
}

.finance-stat-value {
    margin: 1rem 0 0.4rem;
    font-size: clamp(1.65rem, 2.5vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

.finance-stat-detail {
    margin: 0;
    color: #576980;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

.finance-stat-featured {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.finance-stat-featured .finance-stat-label,
.finance-stat-featured .finance-stat-detail {
    color: #d1dfef;
}

.finance-stat-featured .finance-stat-icon {
    background: rgb(255 255 255 / 12%);
}

.finance-progress {
    height: 7px;
    border-radius: 8px;
    background: var(--primary-soft);
}

.finance-progress .progress-bar {
    background: #426f9c;
    border-radius: inherit;
}

.finance-donut {
    position: relative;
    height: 240px;
}

.finance-bar-chart {
    position: relative;
}

.finance-chart-scroll {
    max-height: 440px;
    overflow-y: auto;
}

.finance-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 1.5rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--body-bg);
    color: #576980;
    text-align: center;
}

.finance-empty > i {
    font-size: 2rem;
    color: #426f9c;
    margin-bottom: 1rem;
}

.finance-table-scroll {
    border-radius: 0 0 18px 18px;
}

.finance-chart-scroll:focus-visible,
.finance-table-scroll:focus-visible {
    outline: 3px solid #507eaf;
    outline-offset: 3px;
}

.finance-table {
    min-width: 740px;
}

.finance-table > :not(caption) > * > * {
    padding: 1.1rem 1.5rem;
}

.finance-table thead th {
    background: var(--body-bg);
    color: #576980;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.finance-table tbody th {
    min-width: 220px;
}

.finance-table tfoot > tr > * {
    background: var(--primary-soft);
    color: var(--primary);
    border-bottom: 0;
}

.finance-achievement {
    min-width: 160px;
}

@media (max-width: 767px) {
    .finance-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .finance-filter {
        flex-basis: auto;
    }

    .finance-table > :not(caption) > * > * {
        padding: 1rem;
    }
}
