/* ==========================================================================
   DESA JERORA SATU - MODERN GOVERNMENT PORTAL THEME
   Framework: Plus Jakarta Sans / Modern CSS Utilities
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --dj-primary: #059669;
    --dj-primary-hover: #047857;
    --dj-primary-light: #ecfdf5;
    --dj-primary-subtle: #d1fae5;
    --dj-secondary: #0f172a;
    --dj-secondary-light: #1e293b;
    --dj-accent: #f59e0b;
    --dj-accent-light: #fef3c7;
    --dj-bg: #f8fafc;
    --dj-surface: #ffffff;
    --dj-text-main: #1e293b;
    --dj-text-muted: #64748b;
    --dj-border: #e2e8f0;
    --dj-radius-sm: 8px;
    --dj-radius-md: 14px;
    --dj-radius-lg: 20px;
    --dj-radius-full: 9999px;
    --dj-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --dj-shadow-md: 0 4px 16px -2px rgba(15,23,42,0.06), 0 2px 6px -1px rgba(15,23,42,0.04);
    --dj-shadow-lg: 0 16px 32px -4px rgba(5,150,105,0.12), 0 6px 12px -2px rgba(15,23,42,0.04);
    --dj-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: var(--dj-text-main);
    background-color: var(--dj-bg);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a {
    color: var(--dj-primary);
    text-decoration: none;
    transition: var(--dj-transition);
}

a:hover {
    color: var(--dj-primary-hover);
    text-decoration: none;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.dj-topbar {
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.84rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dj-topbar a {
    color: #cbd5e1;
}

.dj-topbar a:hover {
    color: #ffffff;
}

.dj-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: 18px;
}

.dj-topbar-socials {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.dj-topbar-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    font-size: 0.78rem;
    transition: var(--dj-transition);
}

.dj-topbar-socials a:hover {
    background: var(--dj-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.dj-admin-pill {
    background: linear-gradient(135deg, var(--dj-primary), var(--dj-primary-hover));
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 4px 14px;
    border-radius: var(--dj-radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(5,150,105,0.3);
    transition: var(--dj-transition);
}

.dj-admin-pill:hover {
    box-shadow: 0 4px 12px rgba(5,150,105,0.45);
    transform: translateY(-1px);
}

/* ==========================================================================
   MODERN NAVBAR
   ========================================================================== */
.dj-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--dj-shadow-md);
    position: sticky;
    top: 0;
    z-index: 1040;
    border-bottom: 1px solid var(--dj-border);
    transition: var(--dj-transition);
}

.dj-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 0;
}

.dj-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.dj-brand-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dj-secondary);
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.dj-brand-text span {
    font-size: 0.75rem;
    color: var(--dj-text-muted);
    font-weight: 500;
    display: block;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.dj-nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.dj-nav-item {
    position: relative;
}

.dj-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dj-text-main) !important;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 12px;
    border-radius: var(--dj-radius-sm);
    transition: var(--dj-transition);
}

.dj-nav-link:hover, .dj-nav-item.active .dj-nav-link {
    color: var(--dj-primary) !important;
    background: var(--dj-primary-light);
}

.dj-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border-radius: var(--dj-radius-md);
    box-shadow: 0 12px 32px rgba(15,23,42,0.12);
    border: 1px solid var(--dj-border);
    padding: 8px;
    list-style: none;
    margin: 0;
    display: none;
    z-index: 1050;
    animation: djFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dj-nav-item:hover .dj-dropdown-menu {
    display: block;
}

.dj-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--dj-text-main);
    font-size: 0.84rem;
    font-weight: 500;
    border-radius: var(--dj-radius-sm);
    transition: var(--dj-transition);
}

.dj-dropdown-item:hover {
    background: var(--dj-primary-light);
    color: var(--dj-primary);
    transform: translateX(3px);
}

@keyframes djFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TICKER & HEADLINES
   ========================================================================== */
.dj-ticker-wrapper {
    background: #ffffff;
    border-bottom: 1px solid var(--dj-border);
    padding: 10px 0;
}

.dj-ticker-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: var(--dj-radius-full);
    padding: 4px 6px 4px 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.dj-ticker-badge {
    background: linear-gradient(135deg, var(--dj-primary), #10b981);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 14px;
    border-radius: var(--dj-radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dj-ticker-content {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    margin-left: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.dj-ticker-content a {
    color: var(--dj-text-main);
    margin-right: 24px;
}

.dj-ticker-content a:hover {
    color: var(--dj-primary);
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.dj-hero {
    position: relative;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
    color: #ffffff;
    padding: 60px 0 80px 0;
    overflow: hidden;
}

.dj-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(16,185,129,0.2) 0%, transparent 60%);
    pointer-events: none;
}

.dj-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.dj-hero-lead {
    font-size: 1.1rem;
    color: #a7f3d0;
    margin-bottom: 28px;
    font-weight: 400;
    max-width: 600px;
}

.dj-hero-slider {
    border-radius: var(--dj-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.35);
    border: 3px solid rgba(255,255,255,0.2);
}

/* ==========================================================================
   STATS BAR
   ========================================================================== */
.dj-stats-bar {
    margin-top: -45px;
    position: relative;
    z-index: 20;
}

.dj-stat-card {
    background: #ffffff;
    border-radius: var(--dj-radius-md);
    padding: 22px 20px;
    box-shadow: var(--dj-shadow-md);
    border: 1px solid var(--dj-border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--dj-transition);
}

.dj-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dj-shadow-lg);
    border-color: var(--dj-primary-subtle);
}

.dj-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--dj-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.dj-stat-icon.green { background: #dcfce7; color: #16a34a; }
.dj-stat-icon.blue  { background: #e0f2fe; color: #0284c7; }
.dj-stat-icon.amber { background: #fef3c7; color: #d97706; }
.dj-stat-icon.purple{ background: #f3e8ff; color: #9333ea; }

.dj-stat-number {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--dj-secondary);
    line-height: 1.1;
    margin: 0;
}

.dj-stat-label {
    font-size: 0.8rem;
    color: var(--dj-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 4px 0 0 0;
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.dj-section {
    padding: 60px 0;
}

.dj-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.dj-section-tag {
    display: inline-block;
    background: var(--dj-primary-subtle);
    color: var(--dj-primary-hover);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 14px;
    border-radius: var(--dj-radius-full);
    margin-bottom: 8px;
}

.dj-section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--dj-secondary);
    letter-spacing: -0.02em;
    margin: 0 0 10px 0;
}

.dj-section-subtitle {
    color: var(--dj-text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   CARDS (BERITA, PRODUK, PENGUMUMAN)
   ========================================================================== */
.dj-card {
    background: #ffffff;
    border-radius: var(--dj-radius-md);
    border: 1px solid var(--dj-border);
    box-shadow: var(--dj-shadow-sm);
    overflow: hidden;
    transition: var(--dj-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dj-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--dj-shadow-lg);
    border-color: var(--dj-primary-subtle);
}

.dj-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 60%;
    background: #e2e8f0;
    overflow: hidden;
}

.dj-card-thumb img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.dj-card:hover .dj-card-thumb img {
    transform: scale(1.06);
}

.dj-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dj-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--dj-text-muted);
    margin-bottom: 10px;
}

.dj-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dj-secondary);
    line-height: 1.35;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dj-card:hover .dj-card-title {
    color: var(--dj-primary);
}

.dj-card-text {
    color: var(--dj-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.dj-card-footer {
    padding-top: 14px;
    border-top: 1px solid var(--dj-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-dj {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 22px;
    border-radius: var(--dj-radius-full);
    border: none;
    cursor: pointer;
    transition: var(--dj-transition);
}

.btn-dj-primary {
    background: linear-gradient(135deg, var(--dj-primary), var(--dj-primary-hover));
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(5,150,105,0.3);
}

.btn-dj-primary:hover {
    box-shadow: 0 6px 20px rgba(5,150,105,0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-dj-outline {
    background: transparent;
    border: 2px solid var(--dj-primary);
    color: var(--dj-primary) !important;
}

.btn-dj-outline:hover {
    background: var(--dj-primary);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Global Bootstrap Outline & Solid Button Contrast Guards */
.btn-outline-success {
    color: #047857;
    border-color: #047857;
}
.btn-outline-success:hover,
.btn-outline-success:focus-visible,
.btn-outline-success:active {
    background-color: #047857 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible,
.btn-outline-secondary:active {
    background-color: #334155 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus-visible,
.btn-outline-primary:active,
.btn-outline-danger:hover,
.btn-outline-danger:focus-visible,
.btn-outline-danger:active,
.btn-primary:hover,
.btn-success:hover {
    color: #ffffff !important;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.dj-sidebar-card {
    background: #ffffff;
    border-radius: var(--dj-radius-md);
    border: 1px solid var(--dj-border);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--dj-shadow-sm);
}

.dj-sidebar-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dj-secondary);
    border-bottom: 2px solid var(--dj-primary);
    padding-bottom: 8px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dj-sidebar-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--dj-border);
}

.dj-sidebar-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dj-sidebar-thumb {
    width: 68px;
    height: 68px;
    border-radius: var(--dj-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.dj-sidebar-item-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--dj-secondary);
    line-height: 1.35;
    margin-bottom: 4px;
}

.dj-sidebar-item-meta {
    font-size: 0.74rem;
    color: var(--dj-text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.dj-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 0 0;
    border-top: 4px solid var(--dj-primary);
}

.dj-footer h4 {
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.dj-footer h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: var(--dj-primary);
    border-radius: 2px;
}

.dj-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dj-footer-links li {
    margin-bottom: 10px;
}

.dj-footer-links a {
    color: #cbd5e1;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dj-footer-links a:hover {
    color: #10b981;
    transform: translateX(4px);
}

.dj-subfooter {
    background: #020617;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.82rem;
    color: #64748b;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991.98px) {
    .dj-nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 16px 0;
    }
    .dj-nav-menu.show {
        display: flex;
    }
    .dj-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: #f8fafc;
    }
    .dj-hero-title {
        font-size: 1.85rem;
    }
    .dj-stats-bar {
        margin-top: 20px;
    }
}

/* ==========================================
   MODERN PAGINATION UI (PUBLIC PORTAL)
   ========================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}
.pagination .page-item .page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    font-size: 0.88rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    margin: 0 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.pagination .page-item:not(.disabled):not(.active) .page-link:hover {
    background-color: #ecfdf5 !important;
    border-color: #047857 !important;
    color: #047857 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(4, 120, 87, 0.12);
}
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
    border-color: #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.28) !important;
}
.pagination .page-item .page-link:focus-visible {
    outline: 2px solid #047857 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}
.pagination .page-item.disabled .page-link {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}
@media (max-width: 767.98px) {
    .pagination .page-item .page-link {
        min-width: 44px;
        height: 44px;
    }
}

