/* ============================================================
   FILE: assets/css/frontend.css
   Style portal berita desa (index.php)
   Menggunakan CSS variable dari theme.php
   + Diagram struktur dengan SVG connector
   + BPD tabs (Struktur/Laporan/Program)
   + Tombol "Lihat Selengkapnya"
   ============================================================ */

/* ------------------------------------------------------------
   1. HERO GRADIENT
   ------------------------------------------------------------ */
.hero-gradient {
    background: linear-gradient(
        135deg,
        var(--color-primary-dark) 0%,
        var(--color-primary) 50%,
        var(--color-primary-dark) 100%
    );
}

/* ------------------------------------------------------------
   2. HEADER STICKY
   ------------------------------------------------------------ */
.header-sticky {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(var(--color-primary-rgb), 0.97);
}

/* ------------------------------------------------------------
   3. NAV MENU (horizontal dengan scroll + tombol panah)
   ------------------------------------------------------------ */
.nav-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    width: 100%;
}

.nav-scroll-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
    z-index: 2;
}

.nav-scroll-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.nav-scroll-btn:active {
    transform: scale(0.95);
}

.nav-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
    flex: 1;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right,
        transparent 0,
        #000 8px,
        #000 calc(100% - 8px),
        transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
        transparent 0,
        #000 8px,
        #000 calc(100% - 8px),
        transparent 100%);
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: #D4AF37;
}

.nav-link i {
    color: #D4AF37;
    font-size: 0.75rem;
}

/* ------------------------------------------------------------
   4. KATEGORI BADGE
   ------------------------------------------------------------ */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

.category-badge.outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

/* ------------------------------------------------------------
   5. HEADLINE CARD
   ------------------------------------------------------------ */
.headline-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.headline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(var(--color-primary-rgb), 0.4);
}

.headline-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    transition: transform 0.6s ease, opacity 0.3s ease;
}

.headline-card:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.headline-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: #ffffff;
}

.headline-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0.75rem 0 0.5rem;
    color: #ffffff;
}

.headline-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.headline-meta i {
    color: #D4AF37;
    margin-right: 0.25rem;
}

/* ------------------------------------------------------------
   6. BERITA CARD
   ------------------------------------------------------------ */
.news-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
    text-decoration: none;
}

.news-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 30px -10px rgba(var(--color-primary-rgb), 0.25);
}

.news-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: var(--color-primary-dark);
}

.news-card-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    margin-top: 0.75rem;
    padding-top: 0.625rem;
    font-size: 0.6875rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
}

.news-card-meta i {
    color: var(--color-primary);
    margin-right: 0.25rem;
}

/* ------------------------------------------------------------
   7. SIDEBAR WIDGET
   ------------------------------------------------------------ */
.widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

.widget-title {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.625rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title i {
    color: var(--color-primary);
}

.popular-item {
    display: flex;
    gap: 0.625rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: all 0.2s;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover .popular-title {
    color: var(--color-primary);
}

.popular-number {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.popular-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-date {
    font-size: 0.625rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

/* ============================================================
   STATISTIK — BERBEDA DARI MENU
   ============================================================ */
.stat-section {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 0.625rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* Strip warna di kiri sesuai kategori */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--stat-color, #D4AF37);
    transition: width 0.25s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: var(--stat-color, #D4AF37);
    box-shadow: 0 8px 20px -8px var(--stat-color, #D4AF37);
}
.stat-card:hover::before {
    width: 5px;
}

.stat-card .stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--stat-bg, rgba(212, 175, 55, 0.2));
    color: var(--stat-color, #D4AF37);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.stat-card:hover .stat-icon {
    transform: scale(1.1);
    background: var(--stat-color, #D4AF37);
    color: #ffffff;
}

.stat-card .stat-info {
    min-width: 0;
    flex: 1;
}

.stat-card .stat-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-label {
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header statistik dengan aksen berbeda */
.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.stat-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-header-title i {
    color: #D4AF37;
    font-size: 0.875rem;
}

.stat-header-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    background: rgba(212, 175, 55, 0.2);
    color: #fcd34d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ------------------------------------------------------------
   9. AGENDA ITEM (list lama)
   ------------------------------------------------------------ */
.agenda-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.625rem;
    border-left: 3px solid var(--color-primary);
    transition: all 0.2s;
}

.agenda-item:hover {
    background: var(--color-primary-light);
    transform: translateX(2px);
}

.agenda-date {
    text-align: center;
    flex-shrink: 0;
    min-width: 3rem;
}

.agenda-date .day {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    line-height: 1;
}

.agenda-date .month {
    font-size: 0.625rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.agenda-content .title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

.agenda-content .meta {
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.agenda-content .meta i {
    color: var(--color-primary);
    margin-right: 0.25rem;
}

/* ------------------------------------------------------------
   10. GALERI THUMBNAIL
   ------------------------------------------------------------ */
.galeri-item {
    position: relative;
    border-radius: 0.625rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
}

.galeri-item img,
.galeri-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeri-item:hover img {
    transform: scale(1.08);
}

.galeri-caption {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 0.5rem;
    font-size: 0.625rem;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------
   11. UMKM CARD
   ------------------------------------------------------------ */
.umkm-card {
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.625rem;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.umkm-card:hover {
    border-color: var(--color-primary);
    background: #ffffff;
}

.umkm-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
}

.umkm-type {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.umkm-meta {
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 0.375rem;
}

/* ------------------------------------------------------------
   12. LAYANAN SURAT CARD
   ------------------------------------------------------------ */
.surat-card {
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.625rem;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.surat-card:hover {
    background: var(--color-primary-light);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

.surat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.surat-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
}

.surat-meta {
    font-size: 0.625rem;
    color: #64748b;
    margin-top: 0.125rem;
}

/* ------------------------------------------------------------
   13. DOWNLOAD ITEM
   ------------------------------------------------------------ */
.download-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    transition: all 0.2s;
}

.download-item:hover {
    background: var(--color-primary-light);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

.download-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.download-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-meta {
    font-size: 0.625rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   14. KONTAK
   ------------------------------------------------------------ */
.kontak-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    transition: border-color 0.2s;
}

.kontak-item:hover {
    border-color: var(--color-primary);
}

.kontak-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--color-primary);
    flex-shrink: 0;
    font-size: 0.875rem;
}

.kontak-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kontak-value {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
    line-height: 1.5;
    word-break: break-word;
}

/* ------------------------------------------------------------
   15. FORM INPUT (frontend)
   ------------------------------------------------------------ */
.form-frontend {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    color: #1e293b;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-frontend::placeholder {
    color: #94a3b8;
}

.form-frontend:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

textarea.form-frontend {
    resize: vertical;
    min-height: 100px;
}

/* ------------------------------------------------------------
   16. BUTTON THEME
   ------------------------------------------------------------ */
.btn-theme {
    background: var(--color-primary);
    color: #ffffff;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.8125rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.25);
}

.btn-theme:hover:not(:disabled) {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 14px rgba(var(--color-primary-rgb), 0.35);
    transform: translateY(-1px);
}

/* ------------------------------------------------------------
   17. SECTION TITLE (ala koran)
   ------------------------------------------------------------ */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--color-primary);
}

.section-heading h2 {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-heading h2 i {
    color: var(--color-primary);
}

.section-heading a {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-heading a:hover {
    color: var(--color-primary-dark);
}

/* ------------------------------------------------------------
   18. INFO DESA BANNER (topbar)
   ------------------------------------------------------------ */
.topbar-info {
    background: var(--color-primary-dark);
    color: #ffffff;
    font-size: 0.6875rem;
    padding: 0.375rem 0;
}

.topbar-info .marquee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.topbar-info .label {
    background: #D4AF37;
    color: var(--color-primary-dark);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.625rem;
    flex-shrink: 0;
}

/* ------------------------------------------------------------
   19. MENU CARD (grid menu utama)
   ------------------------------------------------------------ */
.menu-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 0.875rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    height: 100%;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px -12px rgba(var(--color-primary-rgb), 0.3);
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    background: var(--color-primary);
    margin-bottom: 0.875rem;
    box-shadow: 0 8px 16px -4px rgba(var(--color-primary-rgb), 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 24px -4px rgba(var(--color-primary-rgb), 0.5);
}

.menu-card-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.menu-card:hover .menu-card-title {
    color: var(--color-primary-dark);
}

.menu-card-desc {
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.4;
    transition: color 0.2s;
}

.menu-card:hover .menu-card-desc {
    color: #64748b;
}

.menu-card-arrow {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s ease;
}

.menu-card:hover .menu-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ------------------------------------------------------------
   20. HERO VIDEO BACKGROUND
   ------------------------------------------------------------ */
.hero-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    filter: brightness(1.1) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(var(--color-primary-rgb), 0.65) 0%,
        rgba(var(--color-primary-rgb), 0.5) 50%,
        rgba(var(--color-primary-rgb), 0.65) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ------------------------------------------------------------
   21. SEARCH MENU (di header)
   ------------------------------------------------------------ */
.nav-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.nav-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    pointer-events: none;
}

.nav-search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 2.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.nav-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.nav-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 0.625rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.nav-search-clear:hover {
    background: rgba(255, 255, 255, 0.4);
}

.nav-search-clear.visible {
    display: flex;
}

.nav-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    padding: 0.375rem;
}

.nav-search-results.visible {
    display: block;
}

.nav-search-result-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-search-result-item:hover,
.nav-search-result-item.active {
    background: var(--color-primary-light);
}

.nav-search-result-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.nav-search-result-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.nav-search-result-desc {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.nav-search-result-label mark {
    background: #fef08a;
    color: #713f12;
    padding: 0 2px;
    border-radius: 2px;
}

.nav-search-empty {
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ------------------------------------------------------------
   22. SEARCH MENU (di atas Profil Desa)
   ------------------------------------------------------------ */
.nav-search-wrapper-front {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.nav-search-input-wrap-front {
    position: relative;
    flex: 1;
    min-width: 0;
}

.nav-search-icon-front {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
    pointer-events: none;
}

.nav-search-input-front {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 2.75rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    color: #1e293b;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-search-input-front::placeholder {
    color: #94a3b8;
}

.nav-search-input-front:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.12);
}

.nav-search-clear-front {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: #e2e8f0;
    border: none;
    color: #475569;
    font-size: 0.75rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.nav-search-clear-front:hover {
    background: #cbd5e1;
}

.nav-search-clear-front.visible {
    display: flex;
}

.nav-search-results-front {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    padding: 0.375rem;
}

.nav-search-results-front.visible {
    display: block;
}

.nav-search-result-item-front {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-search-result-item-front:hover,
.nav-search-result-item-front.active {
    background: var(--color-primary-light);
}

.nav-search-result-icon-front {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.nav-search-result-label-front {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.nav-search-result-desc-front {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.nav-search-result-label-front mark {
    background: #fef08a;
    color: #713f12;
    padding: 0 2px;
    border-radius: 2px;
}

.nav-search-empty-front {
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

.section-highlight {
    animation: sectionPulse 2s ease;
}

@keyframes sectionPulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0.5); }
    50%  { box-shadow: 0 0 0 12px rgba(var(--color-primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0); }
}

/* ------------------------------------------------------------
   23. AGENDA KALENDER
   ------------------------------------------------------------ */
.kalender-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.kalender-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--color-primary);
    color: #ffffff;
}

.kalender-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.kalender-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kalender-nav a,
.kalender-nav span {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.kalender-nav a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.kalender-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
}

.kalender-head {
    background: var(--color-primary-dark);
    color: #ffffff;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kalender-cell {
    background: #ffffff;
    min-height: 4.5rem;
    padding: 0.375rem;
    position: relative;
    transition: background 0.2s;
}

.kalender-cell:hover {
    background: #f8fafc;
}

.kalender-cell.empty {
    background: #f8fafc;
}

.kalender-cell.today {
    background: var(--color-primary-light);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.kalender-cell.has-event {
    cursor: pointer;
    transition: all 0.2s ease;
}

.kalender-cell.has-event:hover {
    background: var(--color-primary-light) !important;
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
}

.kalender-cell.has-event:active {
    transform: scale(0.98);
}

.kalender-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.25rem;
}

.kalender-cell.today .kalender-date {
    color: var(--color-primary-dark);
}

.kalender-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kalender-event {
    font-size: 0.5625rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-primary);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.kalender-event.more {
    background: #94a3b8;
    text-align: center;
}

.kalender-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D4AF37;
    margin-left: 4px;
    vertical-align: middle;
}

/* ------------------------------------------------------------
   24. AGENDA DETAIL (panel saat tanggal diklik)
   ------------------------------------------------------------ */
.agenda-detail-wrapper {
    background: #ffffff;
    border: 2px solid var(--color-primary);
    border-radius: 1rem;
    margin-top: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px -12px rgba(var(--color-primary-rgb), 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.agenda-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg,
        var(--color-primary) 0%,
        var(--color-primary-dark) 100%);
    color: #ffffff;
}

.agenda-detail-date-box {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.agenda-detail-day {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1;
}

.agenda-detail-month {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-top: 2px;
}

.agenda-detail-title {
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.agenda-detail-sub {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 2px;
}

.agenda-detail-close {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.agenda-detail-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.agenda-detail-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    max-height: 400px;
    overflow-y: auto;
}

.agenda-detail-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.agenda-detail-item:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    transform: translateX(4px);
}

.agenda-detail-foto {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agenda-detail-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agenda-detail-foto .placeholder {
    font-size: 1.5rem;
    color: var(--color-primary);
    opacity: 0.5;
}

.agenda-detail-content {
    flex: 1;
    min-width: 0;
}

.agenda-detail-judul {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.agenda-detail-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agenda-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.agenda-detail-meta i {
    color: var(--color-primary);
    margin-right: 0.25rem;
}

.agenda-detail-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.agenda-detail-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ------------------------------------------------------------
   25. STRUKTUR DIAGRAM (dengan SVG connector)
   ------------------------------------------------------------ */
.diagram-wrapper {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.diagram-tree {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: max-content;
    margin: 0 auto;
}

.diagram-level {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
    padding: 1.75rem 0;
    flex-wrap: nowrap;
}

.diagram-level:first-child { padding-top: 0.5rem; }
.diagram-level:last-child  { padding-bottom: 0.5rem; }

.diagram-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    max-width: 180px;
    z-index: 2;
}

.diagram-foto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 2px #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.diagram-node:hover .diagram-foto {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--color-primary);
}

.diagram-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.diagram-foto .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #64748b;
    font-size: 1.75rem;
}

.diagram-node.kepala .diagram-foto {
    width: 100px;
    height: 100px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 3px #D4AF37;
}

.diagram-node.kepala .diagram-foto .placeholder {
    font-size: 2.25rem;
}

.diagram-info {
    margin-top: 0.75rem;
    text-align: center;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border-radius: 0.625rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-width: 140px;
    transition: all 0.2s;
}

.diagram-node:hover .diagram-info {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.diagram-nama {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.diagram-jabatan {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* SVG Connector */
#diagramConnector {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

#diagramConnector path {
    stroke: #94a3b8;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ------------------------------------------------------------
   26. INFO DESA — Kartu berita dengan video
   ------------------------------------------------------------ */
.info-news-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: 100%;
}

.info-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(var(--color-primary-rgb), 0.25);
    border-color: var(--color-primary);
}

.info-news-media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--color-primary-light), #ffffff);
    overflow: hidden;
    position: relative;
}

.info-news-media img,
.info-news-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
    transition: transform 0.5s ease;
}

.info-news-card:hover .info-news-media img,
.info-news-card:hover .info-news-media video {
    transform: scale(1.05);
}

.info-news-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.3;
}

.info-news-video-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(4px);
    z-index: 3;
    pointer-events: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.info-news-video-badge i {
    color: #ef4444;
    font-size: 0.5rem;
    animation: pulseVideo 1.5s ease-in-out infinite;
}

@keyframes pulseVideo {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.info-news-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.info-news-play-overlay i {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    padding-left: 4px;
}

.info-news-card:hover .info-news-play-overlay i {
    background: var(--color-primary);
    transform: scale(1.1);
    border-color: #ffffff;
}

.info-news-body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-news-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
    margin: 0 0 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-news-card:hover .info-news-title {
    color: var(--color-primary-dark);
}

.info-news-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.info-news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: #94a3b8;
    padding-top: 0.625rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.info-news-meta i {
    color: var(--color-primary);
    margin-right: 0.25rem;
}

.info-news-readmore {
    color: var(--color-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s;
}

.info-news-card:hover .info-news-readmore {
    gap: 0.5rem;
}

.badge-kategori {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}

.badge-kategori.pengumuman       { background: #dbeafe; color: #1e40af; }
.badge-kategori.dana_desa        { background: #d1fae5; color: #065f46; }
.badge-kategori.laporan_kegiatan { background: #fed7aa; color: #9a3412; }

/* ------------------------------------------------------------
   27. MODAL DETAIL INFO DESA
   ------------------------------------------------------------ */
.info-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.info-modal.visible {
    display: flex;
}

.info-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.info-modal-content {
    position: relative;
    z-index: 10;
    background: #ffffff;
    border-radius: 1rem;
    max-width: 42rem;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    animation: infoModalIn 0.3s ease;
}

@keyframes infoModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.info-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 20;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.info-modal-close:hover {
    background: #dc2626;
}

.info-modal-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.info-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-modal-body {
    padding: 1.5rem;
}

.info-modal-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    margin: 0.75rem 0;
}

.info-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.info-modal-meta i {
    color: var(--color-primary);
    margin-right: 0.25rem;
}

.info-modal-konten {
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.info-modal-video {
    margin-top: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #000;
}

.info-modal-video video {
    width: 100%;
    display: block;
    background: #000;
    max-height: 70vh;
}

/* ------------------------------------------------------------
   28. TOMBOL LIHAT SELENGKAPNYA
   ------------------------------------------------------------ */
.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-view-more:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.3);
}

.btn-view-more i {
    font-size: 0.6875rem;
    transition: transform 0.2s;
}

.btn-view-more:hover i {
    transform: translateX(3px);
}

/* ------------------------------------------------------------
   29. BPD — TABS (Struktur / Laporan / Program)
   ------------------------------------------------------------ */
.bpd-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0;
    border-bottom: 2px solid #e2e8f0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bpd-tabs::-webkit-scrollbar {
    display: none;
}

.bpd-tab {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bpd-tab i {
    font-size: 0.75rem;
}

.bpd-tab:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.bpd-tab.active {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary);
    background: transparent;
}

.bpd-tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.bpd-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   30. BPD — BADGE STATUS PROGRAM
   ------------------------------------------------------------ */
.badge-status-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    letter-spacing: 0.03em;
}

.badge-status-sm.direncanakan { background: #e0e7ff; color: #3730a3; }
.badge-status-sm.berjalan     { background: #fef3c7; color: #92400e; }
.badge-status-sm.selesai      { background: #d1fae5; color: #065f46; }
.badge-status-sm.batal        { background: #fee2e2; color: #991b1b; }

/* ------------------------------------------------------------
   31. BPD — BADGE JENIS LAPORAN
   ------------------------------------------------------------ */
.badge-jenis-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    letter-spacing: 0.03em;
}

.badge-jenis-sm.bulanan  { background: #dbeafe; color: #1e40af; }
.badge-jenis-sm.triwulan { background: #fef3c7; color: #92400e; }
.badge-jenis-sm.tahunan  { background: #d1fae5; color: #065f46; }
.badge-jenis-sm.khusus   { background: #ede9fe; color: #5b21b6; }

/* ------------------------------------------------------------
   32. BPD — BADGE PEMBUAT / PJ
   ------------------------------------------------------------ */
.badge-pembuat-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
}

.badge-pembuat-sm i {
    color: var(--color-primary);
    font-size: 0.625rem;
}

/* ------------------------------------------------------------
   33. PROGRESS BAR (Program BPD & Absensi)
   ------------------------------------------------------------ */
.prog-bar,
.progress-bar {
    height: 0.4rem;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.prog-fill,
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
    border-radius: 9999px;
    transition: width 0.4s ease;
}

/* ------------------------------------------------------------
   34. BADGE CUSTOM (Absensi persentase)
   ------------------------------------------------------------ */
.badge-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 800;
    padding: 0.1875rem 0.625rem;
    border-radius: 9999px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
}

/* ------------------------------------------------------------
   35. AVATAR CIRCLE (BPD, PKK, dll)
   ------------------------------------------------------------ */
.avatar-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--color-primary-light), #ffffff);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
    border: 2px solid var(--color-primary-light);
}

.avatar-circle.lg {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
}

/* ------------------------------------------------------------
   36. RESPONSIVE — HP (<= 768px)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .header-sticky .header-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .header-sticky .header-top-row .header-logo {
        justify-content: flex-start;
        width: 100%;
    }

    .header-sticky .header-top-row .header-login-btn {
        position: absolute;
        top: 0.75rem;
        right: 1rem;
    }

    .nav-menu-wrapper {
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-scroll-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.625rem;
    }

    .nav-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.6875rem;
    }

    .nav-link i {
        font-size: 0.625rem;
    }

    .nav-search-input {
        font-size: 0.6875rem;
        padding: 0.4375rem 1.75rem 0.4375rem 2rem;
    }

    .nav-search-icon {
        left: 0.625rem;
        font-size: 0.625rem;
    }

    .nav-search-result-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.6875rem;
    }

    .nav-search-result-label {
        font-size: 0.75rem;
    }

    /* Diagram */
    .diagram-wrapper { padding: 1.25rem 0.75rem; }
    .diagram-level { gap: 1rem; padding: 1.25rem 0; }
    .diagram-node { min-width: 110px; max-width: 130px; }
    .diagram-foto { width: 64px; height: 64px; border-width: 2px; }
    .diagram-node.kepala .diagram-foto { width: 80px; height: 80px; }
    .diagram-info { min-width: 110px; padding: 0.375rem 0.5rem; margin-top: 0.5rem; }
    .diagram-nama { font-size: 0.75rem; max-width: 120px; }
    .diagram-jabatan { font-size: 0.625rem; max-width: 120px; }
}

@media (max-width: 640px) {
    .headline-title { font-size: 1.125rem; }
    .headline-overlay { padding: 1rem; }

    .section-heading h2 { font-size: 0.875rem; }

    .stat-card .stat-value { font-size: 1.125rem; }

    .menu-card { padding: 1rem 0.625rem; }
    .menu-card-icon { width: 3rem; height: 3rem; font-size: 1.25rem; margin-bottom: 0.625rem; }
    .menu-card-title { font-size: 0.6875rem; }
    .menu-card-desc { font-size: 0.625rem; }

    .nav-search-input-front { font-size: 0.8125rem; padding: 0.625rem 2.5rem 0.625rem 2.5rem; }
    .nav-search-icon-front { left: 0.875rem; font-size: 0.8125rem; }

    .kalender-cell { min-height: 3.5rem; padding: 0.25rem; }
    .kalender-date { font-size: 0.6875rem; }
    .kalender-event { font-size: 0.5rem; padding: 0.0625rem 0.1875rem; }
    .kalender-head { font-size: 0.5625rem; padding: 0.375rem 0.125rem; }

    .agenda-detail-header { padding: 0.75rem 1rem; }
    .agenda-detail-date-box { width: 3rem; height: 3rem; }
    .agenda-detail-day { font-size: 1.125rem; }
    .agenda-detail-body { padding: 0.875rem 1rem; }
    .agenda-detail-foto { width: 3.5rem; height: 3.5rem; }

    .btn-view-more { padding: 0.375rem 0.75rem; font-size: 0.625rem; }
    .bpd-tab { padding: 0.5rem 0.75rem; font-size: 0.6875rem; }
}

@media (max-width: 480px) {
    .nav-scroll-btn { width: 1.5rem; height: 1.5rem; font-size: 0.5625rem; }
    .nav-link { padding: 0.3125rem 0.5rem; font-size: 0.625rem; gap: 0.25rem; }
    .nav-link span { display: inline; }

    /* Diagram paling kecil */
    .diagram-level { gap: 0.75rem; padding: 1rem 0; }
    .diagram-node { min-width: 90px; max-width: 110px; }
    .diagram-foto { width: 52px; height: 52px; }
    .diagram-node.kepala .diagram-foto { width: 68px; height: 68px; }
    .diagram-info { min-width: 90px; padding: 0.25rem 0.375rem; }
    .diagram-nama { font-size: 0.6875rem; max-width: 100px; }
    .diagram-jabatan { font-size: 0.5625rem; max-width: 100px; }
}