/* Custom Theme WebGIS Stunting - Modern Healthcare & Geospatial UI */
:root {
    --primary-color: #0284c7;
    --primary-dark: #0369a1;
    --accent-teal: #0d9488;
    --accent-emerald: #10b981;
    --danger-coral: #ef4444;
    --warning-amber: #f59e0b;
    --dark-navy: #0f172a;
    --slate-muted: #64748b;
    --light-bg: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 20px 30px -10px rgba(2, 132, 199, 0.15);
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    color: #334155;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Header & Navbar Desktop Styling */
.header {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    padding: 12px 0;
    z-index: 1030;
}

.header .logo img {
    max-height: 44px;
    width: auto;
    margin-right: 12px;
}

.header .logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
}

.header .logo h1 span {
    font-size: 11px;
    font-weight: 400;
    color: #38bdf8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Navbar Menu List */
.navbar {
    padding: 0;
}

.navbar ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
    gap: 6px;
}

.navbar li {
    position: relative;
    list-style: none;
}

.navbar a, .navbar a:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    white-space: nowrap;
    transition: 0.3s;
    border-radius: 9999px;
    text-decoration: none;
}

.navbar a:hover, .navbar .active, .navbar .active:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.navbar .btn-login-nav {
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.navbar .btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
    color: #ffffff !important;
}

/* Mobile Nav Toggle Controls */
.mobile-nav-show {
    display: none;
}
.mobile-nav-hide {
    display: none;
}

/* Responsive Breakpoints (Mobile & Tablet) */
@media (max-width: 991px) {
    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 300px;
        bottom: 0;
        transition: 0.3s;
        z-index: 9997;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        padding: 60px 20px 20px;
        overflow-y: auto;
    }

    .navbar ul {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .navbar a {
        padding: 12px 18px;
        font-size: 15px;
        color: #e2e8f0;
        border-radius: 10px;
    }

    .navbar a:hover, .navbar .active {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-show {
        display: block !important;
        cursor: pointer;
        color: #ffffff;
        font-size: 30px;
    }

    .mobile-nav-hide {
        display: none;
        cursor: pointer;
        color: #ffffff;
        font-size: 30px;
        position: fixed;
        right: 20px;
        top: 20px;
        z-index: 9999;
    }

    .mobile-nav-active {
        overflow: hidden;
    }

    .mobile-nav-active .navbar {
        right: 0;
    }

    .mobile-nav-active .mobile-nav-show {
        display: none !important;
    }

    .mobile-nav-active .mobile-nav-hide {
        display: block !important;
    }
}

/* Hero Section */
.hero-stunting {
    position: relative;
    padding: 160px 0 100px;
    background: radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.15) 0%, transparent 40%),
                linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    overflow: hidden;
}

.hero-stunting::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: #ffffff;
    clip-path: ellipse(60% 100% at 50% 100%);
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-stunting h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.8px;
    color: #ffffff;
    margin-bottom: 20px;
}

.hero-stunting h1 .highlight-text {
    background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stunting p.lead-text {
    font-size: 17px;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-primary-gis {
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-gis:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(2, 132, 199, 0.55);
}

.btn-outline-gis {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
    padding: 13px 26px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline-gis:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Stat Cards in Hero */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card-modern {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.stat-card-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.stat-card-modern .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.stat-icon.red { background: rgba(244, 63, 94, 0.2); color: #fb7185; }
.stat-icon.green { background: rgba(52, 211, 153, 0.2); color: #34d399; }

.stat-card-modern .stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}

.stat-card-modern .stat-info p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* Hero Map Graphic / Card */
.hero-map-preview {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #0f172a;
}

.hero-map-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.floating-map-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Section Header */
.section-header-modern {
    text-align: center;
    margin-bottom: 50px;
}

.section-header-modern .badge-sub {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    background: #e0f2fe;
    padding: 5px 14px;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 12px;
}

.section-header-modern h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.section-header-modern p {
    font-size: 16px;
    color: #64748b;
    max-width: 650px;
    margin: 10px auto 0;
}

/* Feature Cards */
.feature-card-modern {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 26px;
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
}

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

.feature-card-modern .feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 22px;
}

.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-teal { background: #ccfbf1; color: #0d9488; }
.icon-emerald { background: #dcfce7; color: #10b981; }

.feature-card-modern h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.feature-card-modern p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* 1000 HPK Education Section */
.hpk-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.hpk-card:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.hpk-card h4 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.hpk-card p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

/* Info / Berita Cards */
.article-card-modern {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.article-card-modern .article-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.article-card-modern .article-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-modern .article-date {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card-modern h4 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card-modern p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
}

.article-card-modern .btn-read {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-card-modern .btn-read:hover {
    color: var(--primary-dark);
    gap: 9px;
}

/* Call to Action Banner */
.cta-banner-stunting {
    background: linear-gradient(135deg, #0f172a 0%, #0369a1 100%);
    border-radius: 24px;
    padding: 60px 40px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.4);
}

.cta-banner-stunting::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
}

/* Leaflet Map Popup Styling */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.custom-leaflet-popup .leaflet-popup-content {
    margin: 0;
    line-height: 1.4;
}

.popup-balita-card {
    width: 260px;
}

.popup-balita-header {
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
    color: #ffffff;
    padding: 12px 14px;
}

.popup-balita-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.popup-balita-body {
    padding: 12px 14px;
    font-size: 13px;
    color: #334155;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    border-bottom: 1px dashed #f1f5f9;
    padding-bottom: 4px;
}

.popup-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-stunting {
        padding: 130px 0 70px;
    }
    .hero-stunting h1 {
        font-size: 32px;
    }
    .hero-stats-grid {
        grid-template-columns: 1fr;
    }
}



/* Base Navigation & Layout Helpers (Self-contained) */
.header.sticked {
    background: rgba(15, 23, 42, 0.98) !important;
    padding: 10px 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.mobile-nav-show {
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    line-height: 0;
    transition: 0.5s;
    z-index: 9999;
}

.mobile-nav-hide {
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    line-height: 0;
    transition: 0.5s;
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 9999;
}

.mobile-nav-active {
    overflow: hidden;
}

.mobile-nav-active .navbar {
    position: fixed;
    overflow-y: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    transition: 0.3s;
    z-index: 9997;
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
}

.mobile-nav-active .navbar ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    list-style: none;
}

.mobile-nav-active .navbar a {
    font-size: 18px;
    padding: 12px 20px;
}

/* Scroll top button */
.scroll-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.35);
    text-decoration: none;
}

.scroll-top i {
    font-size: 24px;
    color: #ffffff;
    line-height: 0;
}

.scroll-top:hover {
    color: #ffffff;
    transform: translateY(-3px);
}

.scroll-top.active {
    visibility: visible;
    opacity: 1;
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    background: #0f172a;
    transition: all 0.6s ease-out;
    width: 100%;
    height: 100vh;
}

#preloader:before {
    content: "";
    position: absolute;
    top: calc(50% - 24px);
    left: calc(50% - 24px);
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #0284c7;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
}
