/* ── PENGUMUMAN PUBLIK CSS (OFFICIAL DESA BENDUNGAN DESIGN SYSTEM) ── */

.pengumuman-container,
.pengumuman-detail-container {
    width: 100%;
    margin: 0;
    padding: 0 0 60px 0;
}

/* ── HEADER PUBLIK ── */
.pengumuman-header {
    margin-bottom: 28px;
}

.pengumuman-title {
    font-family: var(--font-heading, sans-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark, #0f172a);
    margin: 0 0 8px 0;
}

.pengumuman-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ── BREADCRUMB ── */
.pengumuman-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 14px;
}

.pengumuman-breadcrumb a {
    color: var(--accent, #f97316);
    font-weight: 600;
    text-decoration: none;
}

.pengumuman-breadcrumb span {
    color: #94a3b8;
}

.pengumuman-breadcrumb span.active {
    color: var(--primary-dark, #0f172a);
    font-weight: 600;
}

/* Tombol Kembali */
.btn-back-simple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-dark, #0f172a);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 99px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-back-simple:hover {
    background: #f1f5f9;
    border-color: var(--primary-dark, #0f172a);
}

/* ── CONTROLS PANEL: SEARCH & FILTERS ── */
.pengumuman-controls {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.pengumuman-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.pengumuman-search-inputwrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.pengumuman-search-inputwrap .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 900 !important;
    font-family: "Font Awesome 6 Free" !important;
    pointer-events: none;
    z-index: 2;
}

.pengumuman-search-input {
    width: 100%;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    padding-left: 44px !important;
    padding-right: 36px !important;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-dark, #0f172a);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pengumuman-search-input:focus {
    border-color: var(--accent, #f97316);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.pengumuman-select-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pengumuman-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2523475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 14px;
    padding: 10px 38px 10px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark, #0f172a);
    outline: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pengumuman-select:hover {
    border-color: var(--accent, #f97316);
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pengumuman-select:focus {
    border-color: var(--accent, #f97316);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.pengumuman-search-btn {
    background: var(--primary-dark, #0f172a);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pengumuman-search-btn:hover {
    background: var(--accent, #f97316);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

/* Kategori Pills Bar */
.pengumuman-pills-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 14px;
}

.pengumuman-pill {
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pengumuman-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.pengumuman-pill.active {
    background: var(--primary-dark, #0f172a);
    color: #ffffff;
    border-color: var(--primary-dark, #0f172a);
}

/* ── CARD LIST DESIGN ── */
.pengumuman-card-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.pengumuman-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--accent, #f97316);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.pengumuman-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pengumuman-card:hover .pengumuman-card-title a {
    color: var(--accent, #f97316);
}

.pengumuman-card.status-arsip,
.pengumuman-card.status-selesai {
    border-left-color: #94a3b8;
    background: #fafafa;
}

.pengumuman-card.status-mendatang {
    border-left-color: #2563eb;
}

.pengumuman-card.status-berlangsung {
    border-left-color: #f97316;
}

.pengumuman-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.pengumuman-card-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badges */
.badge-status {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-status-aktif {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-status-arsip {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-status-mendatang {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-status-berlangsung {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.badge-status-selesai {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-kategori {
    font-size: 12px;
    font-weight: 700;
    background: #f0f9ff;
    color: #0284c7;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #bae6fd;
}

.badge-lampiran {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.badge-lampiran-ada {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.badge-lampiran-tidak {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.pengumuman-card-title {
    font-family: var(--font-heading, sans-serif);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.pengumuman-card-title a {
    color: var(--primary-dark, #0f172a);
    text-decoration: none;
    transition: color 0.2s;
}

.pengumuman-card-title a:hover {
    color: var(--accent, #f97316);
}

/* Meta Grid */
.pengumuman-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.meta-value {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-dark, #0f172a);
}

.pengumuman-card-ringkasan {
    font-size: 14.5px;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pengumuman-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-download-direct {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 8px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-download-direct:hover {
    background: #166534;
    color: #ffffff;
    border-color: #166534;
}

.btn-lihat-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-dark, #0f172a);
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-lihat-detail:hover {
    background: var(--primary-dark, #0f172a);
    color: #ffffff;
    border-color: var(--primary-dark, #0f172a);
}

/* ── DETAIL PENGUMUMAN PAGE STYLING ── */
.pengumuman-article {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 48px;
}

.detail-badge-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.pengumuman-main-title {
    font-family: var(--font-heading, sans-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark, #0f172a);
    margin: 0 0 20px 0;
    line-height: 1.35;
}

/* Info Card Metadata (Simplified) */
.pengumuman-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
}

.info-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.info-card-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-card-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-card-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark, #0f172a);
}

.pengumuman-summary-box {
    background: #fff7ed;
    border: 1px solid #ffedd5;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 28px;
    font-size: 14.5px;
    color: #334155;
    line-height: 1.6;
}

/* Reading Layout Content (700-800px) */
.pengumuman-content-body {
    max-width: 780px;
    margin: 0 auto 36px auto;
    font-size: 16px;
    color: #334155;
    line-height: 1.85;
    text-align: justify;
}

.pengumuman-content-body p { margin-bottom: 1.2em; }
.pengumuman-content-body ul, .pengumuman-content-body ol { padding-left: 24px; margin-bottom: 1.2em; }
.pengumuman-content-body li { margin-bottom: 6px; }
.pengumuman-content-body h2, .pengumuman-content-body h3 { color: var(--primary-dark, #0f172a); font-weight: 800; margin-top: 1.5em; margin-bottom: 0.5em; }

/* ── BAGIAN LAMPIRAN DOKUMEN RESMI (CARD RESMI PEMDES) ── */
.pengumuman-attachment-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-top: 36px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.attachment-card-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.attachment-icon-box {
    width: 48px;
    height: 48px;
    background: #fef3c7;
    color: #d97706;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.attachment-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark, #0f172a);
    margin: 0 0 2px 0;
    word-break: break-all;
}

.attachment-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 4px 0;
}

.attachment-meta {
    font-size: 12px;
    font-weight: 700;
    color: #d97706;
    background: #fffbeb;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #fef08a;
}

.attachment-card-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

.attachment-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-action-view {
    background: var(--primary-dark, #0f172a);
    color: #ffffff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-action-view:hover {
    background: var(--accent, #f97316);
}

.btn-action-download {
    background: #166534;
    color: #ffffff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-action-download:hover {
    background: #15803d;
}

/* ── PENGUMUMAN TERKAIT ── */
.pengumuman-terkait-section {
    margin-top: 48px;
    border-top: 1px solid #e2e8f0;
    padding-top: 32px;
}

.terkait-title {
    font-family: var(--font-heading, sans-serif);
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-dark, #0f172a);
    margin: 0 0 20px 0;
}

.terkait-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.terkait-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.terkait-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.terkait-card-item:hover .terkait-card-heading a {
    color: var(--accent, #f97316);
}

.terkait-card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.terkait-card-heading {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.terkait-card-heading a {
    color: var(--primary-dark, #0f172a);
    text-decoration: none;
}

.terkait-card-heading a:hover {
    color: var(--accent, #f97316);
}

.terkait-card-meta {
    font-size: 12.5px;
    color: #64748b;
    margin: 0 0 12px 0;
}

.terkait-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #f97316);
    text-decoration: none;
}

@media (max-width: 640px) {
    .pengumuman-article { padding: 22px 18px; }
    .pengumuman-main-title { font-size: 22px; }
    .pengumuman-attachment-card { padding: 16px; }
}

/* ── PAGINASI STYLING (RIGHT ALIGNED & COMPACT) ── */
.pengumuman-pagination,
.agenda-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark, #0f172a);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.page-number:hover {
    border-color: var(--accent, #f97316);
    color: var(--accent, #f97316);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.15);
}

.page-number.active {
    background: var(--accent, #f97316);
    border-color: var(--accent, #f97316);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.25);
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    height: 34px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark, #0f172a);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.page-link:hover {
    border-color: var(--accent, #f97316);
    color: var(--accent, #f97316);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.15);
}

/* ── EMPTY STATE DESIGN ── */
.pengumuman-empty-box,
.agenda-empty-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 56px 28px;
    text-align: center;
    margin: 24px 0 40px 0;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.04);
}

.empty-icon-circle {
    width: 76px;
    height: 76px;
    background: #fff7ed;
    color: var(--accent, #f97316);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.15);
    border: 4px solid #ffffff;
}

.empty-title {
    font-family: var(--font-heading, sans-serif);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark, #0f172a);
    margin: 0 0 10px 0;
}

.empty-desc {
    font-size: 14.5px;
    color: #64748b;
    max-width: 480px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

.empty-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dark, #0f172a);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.empty-reset-btn:hover {
    background: var(--accent, #f97316);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}

@media (max-width: 768px) {
    .pengumuman-search-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .pengumuman-search-inputwrap {
        min-width: 100% !important;
        width: 100% !important;
    }
    .pengumuman-detail-layout {
        grid-template-columns: 1fr !important;
    }
    .pengumuman-card {
        padding: 20px 18px !important;
        margin-bottom: 20px !important;
    }
    .pengumuman-meta-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px 10px !important;
        padding: 14px !important;
        margin-top: 12px !important;
        margin-bottom: 16px !important;
    }
    .pengumuman-card-title {
        font-size: 17px !important;
        margin: 14px 0 !important;
    }
}

