/* ===================================================================
   JDIH DPRD PROVINSI SUMATERA BARAT - MODERN FRONTEND STYLESHEET
   Design System: Deep Navy & Minang Gold Accents
   =================================================================== */

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

:root {
    --jdih-primary: #0d2b45;
    --jdih-primary-dark: #071929;
    --jdih-primary-light: #184166;
    --jdih-secondary: #c59b27;
    --jdih-secondary-light: #dfb547;
    --jdih-secondary-dark: #a17c18;
    --jdih-accent: #203a43;
    --jdih-bg: #f8fafc;
    --jdih-surface: #ffffff;
    --jdih-text: #1e293b;
    --jdih-text-muted: #64748b;
    --jdih-border: #e2e8f0;
    --jdih-success: #10b981;
    --jdih-danger: #ef4444;
    --jdih-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --jdih-shadow-md: 0 4px 12px rgba(13, 43, 69, 0.08);
    --jdih-shadow-lg: 0 12px 28px rgba(13, 43, 69, 0.12);
    --jdih-radius: 12px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--jdih-text);
    background-color: var(--jdih-bg);
    line-height: 1.65;
    overflow-x: hidden;
}

/* --- Top Bar --- */
.jdih-topbar {
    background-color: var(--jdih-primary-dark);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.jdih-topbar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}
.jdih-topbar a:hover {
    color: var(--jdih-secondary-light);
}

/* --- Navbar --- */
.jdih-navbar {
    background-color: var(--jdih-surface);
    box-shadow: var(--jdih-shadow-sm);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: all 0.3s ease;
}
/* --- Unified Global Container Width (1200px) --- */
@media (min-width: 1200px) {
    .container,
    .jdih-topbar .container,
    .jdih-navbar .container,
    .jdih-footer .container,
    .jdih-footer-bottom .container {
        max-width: 1200px !important;
    }
}
.jdih-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.jdih-brand-logo {
    display: flex;
    align-items: center;
    margin-right: 12px;
}
.jdih-brand-logo img {
    height: 36px;
}

.jdih-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap;
}
.jdih-brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--jdih-primary);
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.3px;
}
.jdih-brand-text span {
    font-size: 0.68rem;
    color: var(--jdih-text-muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    display: block;
}

.navbar-nav .nav-item {
    white-space: nowrap;
}
.nav-link {
    color: var(--jdih-primary);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 6px 9px !important;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--jdih-secondary-dark);
    background-color: rgba(197, 155, 39, 0.08);
}
.btn-login-nav {
    background-color: var(--jdih-primary);
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}
.btn-login-nav:hover {
    background-color: var(--jdih-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 43, 69, 0.2);
}

/* --- Hero Section with Background Photo & 40% Transparent Overlay --- */
.jdih-hero {
    position: relative;
    color: #ffffff;
    padding: 85px 0 95px;
    overflow: hidden;
    background-color: #0d2b45;
    background-image: url('../images/hero_banner.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* 40% Translucent Deep Navy Overlay */
.jdih-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 43, 69, 0.40) 0%, rgba(18, 52, 82, 0.42) 50%, rgba(7, 25, 41, 0.48) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Subtle Gold Ambient Glow */
.jdih-hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(197, 155, 39, 0.14) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.jdih-hero .container {
    position: relative;
    z-index: 2;
}

.jdih-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.jdih-hero-title .highlight {
    color: var(--jdih-secondary-light);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.jdih-hero-desc {
    font-size: 1.15rem;
    color: #f1f5f9;
    font-weight: 500;
    margin-bottom: 32px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* Search Box Container */
.jdih-search-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.jdih-search-input {
    border: 2px solid var(--jdih-border);
    border-radius: 10px;
    height: 52px;
    font-size: 1rem;
    padding: 0 18px;
    transition: all 0.2s;
}
.jdih-search-input:focus {
    border-color: var(--jdih-primary);
    box-shadow: 0 0 0 3px rgba(13, 43, 69, 0.15);
}
.jdih-search-btn {
    height: 52px;
    background: linear-gradient(135deg, var(--jdih-secondary), var(--jdih-secondary-dark));
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0 28px;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jdih-search-btn:hover {
    background: linear-gradient(135deg, var(--jdih-secondary-light), var(--jdih-secondary));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197, 155, 39, 0.35);
}

/* Quick Search Tags */
.quick-tags {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--jdih-text-muted);
}
.quick-tag-item {
    display: inline-block;
    background: #f1f5f9;
    color: var(--jdih-primary);
    padding: 3px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.quick-tag-item:hover {
    background: var(--jdih-primary);
    color: #fff;
}

/* --- Category Cards --- */
.category-card {
    background: #ffffff;
    border-radius: var(--jdih-radius);
    padding: 24px 20px;
    text-align: center;
    border: 1px solid var(--jdih-border);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--jdih-shadow-md);
    border-color: var(--jdih-secondary);
}
.category-icon {
    width: 58px;
    height: 58px;
    background: rgba(13, 43, 69, 0.05);
    color: var(--jdih-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 14px;
    transition: all 0.3s;
}
.category-card:hover .category-icon {
    background: var(--jdih-primary);
    color: var(--jdih-secondary-light);
}
.category-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--jdih-primary);
    margin-bottom: 6px;
}
.category-count {
    font-size: 0.82rem;
    color: var(--jdih-text-muted);
    font-weight: 600;
}

/* --- Product Law Card --- */
.product-card {
    background: #ffffff;
    border-radius: var(--jdih-radius);
    border: 1px solid var(--jdih-border);
    padding: 22px;
    margin-bottom: 18px;
    transition: all 0.3s ease;
    box-shadow: var(--jdih-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--jdih-shadow-md);
    border-color: #cbd5e1;
}
.product-category-badge {
    background-color: rgba(13, 43, 69, 0.08);
    color: var(--jdih-primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
}
.product-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--jdih-primary);
    margin-bottom: 8px;
    line-height: 1.45;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}
.product-title:hover {
    color: var(--jdih-secondary-dark);
}
.product-excerpt {
    font-size: 0.88rem;
    color: var(--jdih-text-muted);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-meta {
    font-size: 0.82rem;
    color: var(--jdih-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--jdih-border);
    margin-top: auto;
}
.product-meta i {
    color: var(--jdih-secondary-dark);
    margin-right: 4px;
}

/* --- Section Titles --- */
.section-title-wrap {
    text-align: center;
    margin-bottom: 40px;
}
.section-badge {
    background: rgba(197, 155, 39, 0.12);
    color: var(--jdih-secondary-dark);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 5px 14px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--jdih-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.section-desc {
    color: var(--jdih-text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Stats Infographics Section --- */
.jdih-stats-wrapper {
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    position: relative;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(13, 43, 69, 0.1);
    border-color: #cbd5e1;
}

.stat-card-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.18;
    pointer-events: none;
    transition: opacity 0.3s;
}

.stat-card-gold .stat-card-glow { background: #c59b27; }
.stat-card-teal .stat-card-glow { background: #06b6d4; }
.stat-card-blue .stat-card-glow { background: #3b82f6; }
.stat-card-purple .stat-card-glow { background: #10b981; }

.stat-card:hover .stat-card-glow {
    opacity: 0.35;
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.bg-gold-gradient {
    background: linear-gradient(135deg, #c59b27 0%, #a17c18 100%);
}
.bg-teal-gradient {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}
.bg-blue-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
.bg-purple-gradient {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.stat-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--jdih-primary);
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Visitor Stats Panel */
.visitor-stats-panel {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.visitor-metric-card {
    transition: all 0.25s ease;
    border-color: #e2e8f0 !important;
}

.visitor-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1 !important;
}

.visitor-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-light-success {
    background-color: #ecfdf5;
}

.bg-light-primary {
    background-color: #eff6ff;
}

.bg-light-warning {
    background-color: #fffbeb;
}

.visitor-metric-number {
    font-size: 1.45rem;
    line-height: 1.1;
    margin-bottom: 2px;
}

@media (min-width: 992px) {
    .border-right-lg {
        border-right: 1px solid #e2e8f0;
    }
}

/* --- News Cards --- */
.news-card {
    background: #ffffff;
    border-radius: var(--jdih-radius);
    border: 1px solid var(--jdih-border);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--jdih-shadow-md);
}
.news-img {
    height: 190px;
    background-color: #e2e8f0;
    position: relative;
    overflow: hidden;
}
.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.news-card:hover .news-img img {
    transform: scale(1.05);
}
.news-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-date {
    font-size: 0.8rem;
    color: var(--jdih-text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}
.news-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--jdih-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    text-decoration: none;
}
.news-title:hover {
    color: var(--jdih-secondary-dark);
}
.news-excerpt {
    font-size: 0.88rem;
    color: var(--jdih-text-muted);
    margin-bottom: 16px;
    flex-grow: 1;
}

/* --- Detail Page Meta Table --- */
.meta-table {
    width: 100%;
    background: #ffffff;
    border-radius: var(--jdih-radius);
    overflow: hidden;
    border: 1px solid var(--jdih-border);
}
.meta-table tr {
    border-bottom: 1px solid var(--jdih-border);
}
.meta-table tr:last-child {
    border-bottom: none;
}
.meta-table th {
    width: 30%;
    background-color: #f8fafc;
    color: var(--jdih-primary);
    font-weight: 600;
    padding: 12px 18px;
    font-size: 0.9rem;
}
.meta-table td {
    padding: 12px 18px;
    color: var(--jdih-text);
    font-size: 0.9rem;
}

/* --- PDF Viewer Embed --- */
.pdf-viewer-frame {
    width: 100%;
    height: 700px;
    border: 1px solid var(--jdih-border);
    border-radius: var(--jdih-radius);
    background: #525659;
}

/* --- Footer --- */
.jdih-footer {
    background-color: var(--jdih-primary-dark);
    color: #94a3b8;
    padding: 60px 0 25px;
    margin-top: 70px;
    border-top: 3px solid var(--jdih-secondary);
}
.jdih-footer h5 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.jdih-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
}
.jdih-footer a:hover {
    color: var(--jdih-secondary-light);
    padding-left: 4px;
}
.jdih-footer a.badge-pse-link,
.jdih-footer a.badge-pse-link:hover {
    padding-left: 0 !important;
    transform: none !important;
    transition: none !important;
}
.jdih-footer-links li {
    margin-bottom: 10px;
    list-style: none;
}
.jdih-footer-bottom {
    padding-top: 25px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

/* --- Modern JDIH Pagination --- */
.jdih-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0 1.5rem;
    width: 100%;
}

.pagination,
.jdih-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--jdih-border);
    box-shadow: 0 4px 14px rgba(13, 43, 69, 0.05);
    list-style: none;
    margin: 0;
}

.pagination .page-item,
.jdih-pagination .page-item {
    margin: 0;
    list-style: none;
}

.pagination .page-item .page-link,
.jdih-pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--jdih-primary);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

/* Hover State */
.pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.jdih-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #f1f5f9;
    color: var(--jdih-secondary-dark);
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(13, 43, 69, 0.08);
}

/* Active State */
.pagination .page-item.active .page-link,
.jdih-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--jdih-primary) 0%, var(--jdih-primary-light) 100%);
    color: #ffffff !important;
    border-color: var(--jdih-primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(13, 43, 69, 0.25);
    position: relative;
    overflow: hidden;
}

.pagination .page-item.active .page-link::after,
.jdih-pagination .page-item.active .page-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--jdih-secondary);
    border-radius: 2px;
}

/* Nav & Step Buttons (Previous, Next, First, Last) */
.jdih-pagination .page-nav .page-link,
.jdih-pagination .page-step .page-link {
    font-weight: 600;
    color: var(--jdih-primary);
    background-color: #f8fafc;
    border-color: var(--jdih-border);
}

.jdih-pagination .page-nav:not(.disabled) .page-link:hover,
.jdih-pagination .page-step:not(.disabled) .page-link:hover {
    background-color: var(--jdih-primary);
    color: #ffffff !important;
    border-color: var(--jdih-primary);
}

/* Disabled State */
.pagination .page-item.disabled .page-link,
.jdih-pagination .page-item.disabled .page-link {
    color: #cbd5e1 !important;
    background-color: transparent !important;
    border-color: transparent !important;
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .jdih-hero-title {
        font-size: 1.8rem;
    }
    .jdih-search-box {
        padding: 16px;
    }
    .pdf-viewer-frame {
        height: 480px;
    }
    .meta-table th {
        width: 40%;
    }
    .pagination,
    .jdih-pagination {
        gap: 4px;
        padding: 4px 6px;
    }
    .pagination .page-item .page-link,
    .jdih-pagination .page-item .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.825rem;
        border-radius: 8px;
    }
}
