/* ==========================================================================
   THEME CUSTOM - BKPSDM KABUPATEN AGAM
   Modern, Professional, Government Executive Design System
   ========================================================================== */

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

:root {
    /* Brand Colors - Executive Government Palette */
    --brand-navy-950: #0b132b;
    --brand-navy-900: #0f172a;
    --brand-navy-800: #1e293b;
    --brand-navy-700: #334155;
    
    --brand-primary: #1e40af;       /* Royal Blue */
    --brand-primary-hover: #1d4ed8;
    --brand-primary-light: #eff6ff;
    --brand-primary-rgb: 30, 64, 175;

    --brand-emerald: #059669;       /* Agam Ranah Minang Heritage Green */
    --brand-emerald-hover: #047857;
    --brand-emerald-light: #ecfdf5;
    --brand-emerald-rgb: 5, 150, 105;

    --brand-amber: #d97706;         /* Gold/Amber Highlight */
    --brand-amber-light: #fffbeb;

    --brand-danger: #dc2626;
    --brand-danger-light: #fef2f2;

    /* Neutrals & Surfaces */
    --brand-bg: #f8fafc;
    --brand-surface: #ffffff;
    --brand-surface-muted: #f1f5f9;
    --brand-border: #e2e8f0;
    --brand-border-focus: #93c5fd;

    /* Text Colors */
    --brand-text-dark: #0f172a;
    --brand-text-body: #334155;
    --brand-text-muted: #64748b;
    --brand-text-light: #94a3b8;

    /* Shadows & Elevations */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 25px rgba(30, 64, 175, 0.22);
    --shadow-glow-emerald: 0 0 25px rgba(5, 150, 105, 0.22);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Typography & Layout
   ========================================================================== */
html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--brand-text-body);
    background-color: var(--brand-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .fw-bold, .fw-semibold {
    color: var(--brand-text-dark);
    letter-spacing: -0.02em;
}

p {
    line-height: 1.7;
}

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

a:hover {
    color: var(--brand-primary-hover);
}

/* ==========================================================================
   Component: Modern Glassmorphism Navbar (Public)
   ========================================================================== */
.navbar-modern {
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-base);
    padding: 0.85rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.navbar-brand .brand-title {
    line-height: 1.2;
}

.navbar-brand .brand-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
    display: block;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.navbar-modern .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.navbar-modern .nav-link:hover,
.navbar-modern .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-menu-modern {
    background: #ffffff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeInSlide 0.2s ease;
}

.dropdown-menu-modern .dropdown-item {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--brand-text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.dropdown-menu-modern .dropdown-item:hover {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
}

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

/* ==========================================================================
   Component: Cards & Modern Elevators
   ========================================================================== */
.card-modern {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card-modern:hover {
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl) !important;
}

/* ==========================================================================
   Component: Buttons & Interactive Elements
   ========================================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), #2563eb);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.4rem;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.25);
    transition: all var(--transition-fast);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--brand-primary-hover), #1d4ed8);
    box-shadow: 0 6px 14px rgba(30, 64, 175, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-success {
    background: linear-gradient(135deg, var(--brand-emerald), #10b981);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.4rem;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
    transition: all var(--transition-fast);
}

.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, var(--brand-emerald-hover), #059669);
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-pill {
    border-radius: var(--radius-full) !important;
}

.btn-outline-modern {
    border: 1.5px solid var(--brand-border);
    background: #ffffff;
    color: var(--brand-text-dark);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-outline-modern:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-primary-light);
}

/* ==========================================================================
   Component: Badges Soft / Modern
   ========================================================================== */
.badge-soft-primary {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-soft-success {
    background: var(--brand-emerald-light);
    color: var(--brand-emerald);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-soft-amber {
    background: var(--brand-amber-light);
    color: var(--brand-amber);
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Component: Newsroom & Editorial Styling
   ========================================================================== */
.news-hero-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
}

.news-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.news-hero-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-hero-card:hover img {
    transform: scale(1.03);
}

.news-scrim {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 50%, transparent 100%);
}

.news-card-modern {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.news-card-modern .img-container {
    height: 210px;
    overflow: hidden;
    position: relative;
    background: var(--brand-surface-muted);
}

.news-card-modern .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card-modern:hover .img-container img {
    transform: scale(1.05);
}

.news-card-modern .card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-modern .news-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--brand-text-dark);
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-modern:hover .news-title {
    color: var(--brand-primary);
}

.news-card-modern .news-excerpt {
    color: var(--brand-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-modern .news-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--brand-text-muted);
}

/* Article Reading View */
.article-container {
    background: #ffffff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem 3rem;
}

@media (max-width: 768px) {
    .article-container {
        padding: 1.5rem 1.25rem;
    }
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #1e293b;
}

.article-content p {
    margin-bottom: 1.6rem;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--brand-primary);
    padding: 1rem 1.5rem;
    background: var(--brand-primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    margin: 1.8rem 0;
}

/* Lampiran Card Box */
.attachment-card {
    background: linear-gradient(to right, #f8fafc, #eff6ff);
    border: 1.5px dashed #93c5fd;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.attachment-card .file-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.attachment-card .file-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ef4444;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Component: Modern Dashboard Sidebar & Navigation
   ========================================================================== */
.sidebar-modern {
    background: var(--brand-navy-900);
    min-height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.05);
    padding: 1.25rem 0.85rem;
    width: 260px;
    flex-shrink: 0;
}

.sidebar-modern .sidebar-heading {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem 0.35rem;
}

.sidebar-modern .nav-link {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    transition: all var(--transition-fast);
}

.sidebar-modern .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
}

.sidebar-modern .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.sidebar-modern .nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--brand-primary), #2563eb);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Theme Variant: Silapag Green Sidebar Active */
.sidebar-silapag .sidebar-modern .nav-link.active,
.theme-silapag .sidebar-modern .nav-link.active {
    background: linear-gradient(90deg, var(--brand-emerald), #10b981);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

/* Theme Variant: Superadmin Purple Sidebar Active */
.theme-superadmin .sidebar-modern .nav-link.active {
    background: linear-gradient(90deg, #6d28d9, #8b5cf6);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
}

/* Topbar in Admin Dashboard */
.topbar-modern {
    background: #ffffff;
    border-bottom: 1px solid var(--brand-border);
    box-shadow: var(--shadow-xs);
    padding: 0.75rem 1.5rem;
}

/* ==========================================================================
   Component: Form Controls & Tables
   ========================================================================== */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--brand-border);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    color: var(--brand-text-dark);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.12);
    outline: none;
}

.form-control-lg {
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.table-modern {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--brand-border);
    box-shadow: var(--shadow-xs);
}

.table-modern th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--brand-border);
}

.table-modern td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--brand-border);
    font-size: 0.92rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #f8fafc;
}

/* ==========================================================================
   Footer Styling
   ========================================================================== */
.footer-modern {
    background: var(--brand-navy-950);
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4rem 0 2rem;
    font-size: 0.92rem;
}

.footer-modern h5, .footer-modern h6 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

.footer-modern a {
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.footer-modern a:hover {
    color: #ffffff;
}

.footer-modern hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2.5rem 0 1.5rem;
}
