/* ==========================================================================
   VILLAGE ERP - NEXUS UI SYSTEM (ULTIMATE PRO EDITION)
   Mencakup: Beranda, Profil, Bansos, Berita, Layanan
   ========================================================================== */

/* =========================================
   [MODUL UMUM & WARNA DASAR]
   ========================================= */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #06b6d4;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light);
    color: var(--dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

main { min-height: 70vh; }

/* =========================================
   [MODUL NAVIGASI] (Navbar & Sidebar)
   ========================================= */
.navbar-custom {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    z-index: 1050;
}

.logo-box { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; }
.main-logo { max-width: 100%; max-height: 100%; object-fit: contain; }

.nav-link-custom {
    color: var(--dark) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link-custom:hover { background: rgba(37, 99, 235, 0.05); color: var(--primary) !important; }
.nav-link-custom.active { background: rgba(37, 99, 235, 0.08); color: var(--primary) !important; }

.offcanvas { border-left: 5px solid var(--primary) !important; width: 280px !important; }
.offcanvas-header { border-bottom: 1px solid var(--border); padding: 1.5rem; }
.offcanvas-body .nav-link-custom { border-radius: 0; border-bottom: 1px solid var(--border); padding: 1rem 1.5rem !important; }

/* =========================================
   [MODUL BERANDA] (Slider & Identity)
   ========================================= */
.hero-container {
    position: relative; background: #000;
    border-bottom-left-radius: clamp(20px, 5vw, 50px);
    border-bottom-right-radius: clamp(20px, 5vw, 50px);
    overflow: hidden; box-shadow: var(--shadow-lg);
}
.carousel-item { height: 75vh; min-height: 400px; position: relative; }
.slider-bg-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(20px) brightness(0.4); transform: scale(1.1); z-index: 1; }
.slider-img-main { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 8s ease; }

/* UPDATE: Overlay dibuat sedikit lebih gelap di tengah untuk memperjelas teks */
.carousel-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(15,23,42,0.2) 50%, rgba(15,23,42,0.85) 100%);
    z-index: 3;
}

.hero-caption { position: absolute; bottom: 15%; left: 50%; transform: translateX(-50%); z-index: 10; width: 90%; max-width: 900px; text-align: center; color: var(--white); }

/* UPDATE: Penambahan Text Shadow agar tulisan terlihat sangat jelas */
.hero-title {
    font-size: clamp(1.6rem, 5vw, 3.3rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7); /* Efek bayangan teks */
}
.hero-caption p {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); /* Efek bayangan deskripsi */
    font-weight: 500;
}

.hero-title span { color: var(--secondary); }

.id-wrapper { position: relative; z-index: 100; margin-top: -35px; padding: 0 15px; }
.id-card { background: var(--white); border-radius: 20px; padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 1150px; margin: 0 auto; }
.id-box { display: flex; align-items: center; gap: 12px; padding: 10px; border-right: 1px solid var(--border); }
.id-box:last-child { border-right: none; }
.id-icon-circle { width: 42px; height: 42px; background: rgba(37,99,235,0.08); color: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.id-info h6 { font-size: 0.65rem; font-weight: 700; color: var(--gray); text-transform: uppercase; margin: 0; }
.id-info p { font-size: 0.85rem; font-weight: 800; color: var(--dark); margin: 0; text-transform: uppercase; }

/* =========================================
   [MODUL KARTU] (Statistik & Layanan)
   ========================================= */
.stat-box { background: var(--white); border-radius: 20px; padding: 30px 15px; border: 1px solid var(--border); text-align: center; height: 100%; transition: 0.3s; }
.stat-box:hover { transform: translateY(-10px); box-shadow: var(--shadow-sm); border-color: var(--primary); }
.stat-val { font-size: 2.5rem; font-weight: 900; line-height: 1; margin-bottom: 5px; color: var(--dark); }
.stat-lbl { font-size: 0.8rem; font-weight: 700; color: var(--gray); text-transform: uppercase; }

.gov-card { background: var(--white); border-radius: 24px; padding: 30px; border: 1px solid var(--border); height: 100%; transition: 0.3s; display: flex; flex-direction: column; }
.gov-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-md); }
.gov-icon { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 20px; }

/* =========================================
   [MODUL DALAMAN] (Page Header Halaman Dalam)
   ========================================= */
.page-header {
    background: var(--dark); color: var(--white); padding: 80px 0 70px; text-align: center;
    border-bottom-left-radius: 40px; border-bottom-right-radius: 40px; margin-bottom: 50px;
    position: relative; overflow: hidden;
}
.page-header::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(37,99,235,0.2) 0%, transparent 60%); pointer-events: none;
}
.page-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; margin-bottom: 10px; }
.page-subtitle { color: #94a3b8; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* =========================================
   [MODUL BANSOS & PENCARIAN] (KHUSUS CEK BANSOS)
   ========================================= */
.search-wrapper { position: relative; z-index: 10; margin-top: -80px; padding: 0 15px; }
.search-card {
    background: var(--white); border-radius: 24px; padding: 40px; border: 1px solid var(--border);
    box-shadow: var(--shadow-lg); max-width: 800px; margin: 0 auto; text-align: center;
}
.search-input-group {
    display: flex; gap: 10px; margin-top: 20px;
    background: var(--light); padding: 10px; border-radius: 16px; border: 1px solid var(--border);
}
.search-input {
    flex-grow: 1; border: none; background: transparent; padding: 15px 20px;
    font-size: 1.2rem; font-weight: 700; color: var(--dark); letter-spacing: 2px; outline: none;
}
.search-input::placeholder { color: #94a3b8; font-weight: 400; letter-spacing: normal; }
.btn-search {
    background: var(--primary); color: white; border: none; border-radius: 12px;
    padding: 0 30px; font-weight: 700; font-size: 1.1rem; transition: 0.3s;
}
.btn-search:hover { background: var(--primary-dark); transform: scale(1.02); }

.info-box { background: var(--white); border-radius: 20px; padding: 25px; border: 1px solid var(--border); height: 100%; }
.info-box-icon { width: 50px; height: 50px; background: rgba(16,185,129,0.1); color: #10b981; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 15px; }

/* =========================================
   [MODUL FOOTER & RESPONSIVE]
   ========================================= */
footer { background: var(--white); border-top: 1px solid var(--border); padding: 50px 0 30px; }

@media (max-width: 991px) {
    .id-card { grid-template-columns: repeat(2, 1fr); }
    .id-box:nth-child(even) { border-right: none; }
}
@media (max-width: 576px) {
    /* Perbaikan Slider Mobile */
    .carousel-item {
        height: 45vh; /* Menggunakan Viewport Height agar proporsional di berbagai HP */
        min-height: 200px; /* Batas minimum agar tidak terlalu gepeng */
    }

    .slider-img-main {
        object-fit: cover;
        /* Mengatur titik fokus agar wajah/objek di tengah tetap terlihat */
        object-position: center center;
    }

    .hero-caption {
        bottom: 10%; /* Menaikkan sedikit teks agar tidak menumpuk di bawah */
    }

    .hero-title {
        font-size: 1.6rem; /* Ukuran teks disesuaikan agar tidak terlalu sesak */
    }

    /* Modul Identity Card tetap aman */
    .id-card { grid-template-columns: 1fr; }
    .id-box { border-right: none; border-bottom: 1px solid var(--border); }
    .id-box:last-child { border-bottom: none; }

    /* Penyesuaian Bansos di HP */
    .search-input-group { flex-direction: column; background: transparent; padding: 0; border: none; }
    .search-input { background: var(--light); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
    .btn-search { padding: 15px; width: 100%; }
}
