/* =========================================================
   SIDARCO — HOME PAGE (Kecamatan Comal)
   Hero countdown modern & dashboard statistik wilayah & maskot Comara
   Tema: Dominan Biru Muda & Biru Dongker (Navy/Blue)
   File: assets/css/index.css
   ========================================================= */

.site-main.container { max-width: 1440px !important; }

/* HERO COUNTDOWN & MASKOT COMARA */
.intro-section { margin: 0 0 16px; }
.intro-header-flex {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
    row-gap: 12px;
    min-height: 240px;
    padding: 30px 36px;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 28px;
    background:
        radial-gradient(ellipse at 90% 15%, rgba(255,255,255,.85), transparent 40%),
        radial-gradient(ellipse at 5% 10%, rgba(255,255,255,.5), transparent 35%),
        linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 45%, #eff6ff 100%);
    box-shadow: 0 16px 36px rgba(2, 132, 199, .08);
}
.intro-header-flex::before,
.intro-header-flex::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}
.intro-header-flex::before {
    width: 120%;
    height: 105px;
    left: -8%;
    bottom: -50px;
    border-radius: 50% 48% 0 0;
    transform: rotate(-3deg);
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 45%, #1e3a8a 100%);
    opacity: .95;
}
.intro-header-flex::after {
    width: 110%;
    height: 80px;
    left: -4%;
    bottom: -52px;
    border-radius: 50% 45% 0 0;
    transform: rotate(2deg);
    background: linear-gradient(90deg, #7dd3fc 0%, #0284c7 46%, #1e40af 100%);
    opacity: .85;
}

/* Maskot Comara dalam Hero */
.hero-mascot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    min-width: 0;
}
.hero-mascot-img {
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(2, 132, 199, 0.18));
    transition: transform 0.3s ease;
}
.hero-mascot-img:hover {
    transform: scale(1.03);
}

.intro-copy { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.countdown-heading {
    color: #0f172a;
    font-size: clamp(1.1rem, 2.1vw, 1.7rem);
    font-weight: 850;
    letter-spacing: -.5px;
    line-height: 1.25;
    margin: 0;
}
.countdown-heading .heading-accent { color: #0284c7; }
.countdown-date { display: block; color: #475569; font-size: .95rem; font-weight: 700; }

.intro-countdown-inline { display: contents; }
.countdown-inline-timer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    max-width: 540px;
    padding: 12px 10px;
    color: #0f172a;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.98);
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(2, 132, 199, .05);
    text-align: center;
}
.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    line-height: 1.15;
    padding: 0 6px;
}
.countdown-unit + .countdown-unit { border-left: 1px solid #e2e8f0; }
.countdown-unit strong {
    color: #0284c7;
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    font-weight: 900;
    letter-spacing: -.8px;
    font-variant-numeric: tabular-nums;
}
.countdown-unit:nth-child(even) strong { color: #1e3a8a; }
.countdown-unit span { margin-top: 3px; font-size: .74rem; font-weight: 700; color: #64748b; text-transform: uppercase; }

.live-timestamp-box {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: fit-content;
    max-width: 100%;
    padding: 9px 20px;
    color: #1e3a8a;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.98);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
}
.live-timestamp-box i { color: #0284c7; }

/* SECTION HEADINGS */
.stat-section, .calon-stat-section, .system-adoption-section { margin-bottom: 24px; }
.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 10px;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: clamp(1.1rem, 2.1vw, 1.45rem);
    font-weight: 850;
    letter-spacing: -.4px;
    line-height: 1.25;
    margin: 0;
}
.section-title i { color: #0284c7; font-size: 1.2em; }
.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: .75rem;
    font-weight: 650;
}
.last-updated i { color: #0284c7; }

/* SUMMARY CARDS (PEMILIH & CALON) */
.stat-cards-grid, .calon-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.calon-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card, .calon-stat-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(2, 132, 199, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover, .calon-stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(2, 132, 199, .09); }

.card-orange { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-color: #bae6fd; }
.card-green { background: linear-gradient(135deg, #f8fafc, #eff6ff); border-color: #bfdbfe; }
.card-pink { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }

.stat-icon, .calon-stat-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.icon-orange, .icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-green { background: #eff6ff; color: #1e3a8a; }
.icon-pink { background: #dbeafe; color: #0ea5e9; }

.stat-content, .calon-stat-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.stat-label, .calon-stat-label {
    color: #64748b;
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 2px;
}
.stat-value-group { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.stat-number, .calon-stat-value {
    color: #0f172a;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 900;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-unit, .calon-stat-unit { color: #64748b; font-size: .76rem; font-weight: 650; }

/* INFORMASI PEMANFAAT SISTEM (PROGRESS BAR DESA) */
.system-adoption-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.adoption-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.adoption-title-group h3 {
    margin: 0 0 4px;
    color: #1e3a8a;
    font-size: 1.15rem;
    font-weight: 850;
    display: flex;
    align-items: center;
    gap: 8px;
}
.adoption-title-group p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}
.adoption-badge {
    background: #eff6ff;
    color: #1e3a8a;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 750;
    border: 1px solid #bfdbfe;
}
.adoption-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.adoption-progress-bar-bg {
    width: 100%;
    height: 14px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    border: 1px solid #cbd5e1;
}
.adoption-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #1e3a8a);
    border-radius: 999px;
    transition: width 0.6s ease;
}
.adoption-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 650;
}

/* TABLET RESPONSIVE */
@media (max-width: 1024px) {
    .calon-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* MOBILE RESPONSIVE (HP) */
@media (max-width: 768px) {
    .site-main.container { padding-left: 12px; padding-right: 12px; }
    
    .intro-header-flex {
        grid-template-columns: 1fr;
        grid-template-areas: "mascot" "title" "timer" "clock";
        text-align: center;
        justify-items: center;
        padding: 20px 16px;
        gap: 14px;
    }
    .hero-mascot-img { max-height: 160px; }
    .countdown-inline-timer { max-width: 100%; }
    
    .stat-cards-grid { grid-template-columns: 1fr; }
    .calon-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .calon-stat-card { padding: 14px; gap: 12px; }
    .calon-stat-icon { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.1rem; }
    .calon-stat-value { font-size: 1.25rem; }
}