/* ============================================
   STATISTIK PREMIUM - Bimbel Bintang Cemerlang
   ============================================ */
.stats-section {
    padding: 80px 20px;
    background: linear-gradient(160deg, #f0fdf4 0%, #ffffff 50%, #eff6ff 100%);
    font-family: 'Poppins', Arial, sans-serif;
    overflow: hidden;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* HEADER */
.stats-header {
    text-align: center;
    margin-bottom: 56px;
}
.stats-badge {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 30px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}
.stats-header h2 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px;
}
.stats-header h2 span { color: #16a34a; }
.stats-header p {
    font-size: 15px;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* GRID CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.stat-card {
    border-radius: 24px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
}
.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.16);
}
.card-green  { background: linear-gradient(135deg, #16a34a, #15803d); }
.card-blue   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.card-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.card-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* RING PROGRESS */
.stat-icon-wrap { margin-bottom: 20px; }
.stat-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}
.stat-ring svg {
    width: 100%; height: 100%;
    transform: rotate(-90deg);
}
.stat-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring-bg    { stroke: rgba(255,255,255,0.25); }
.ring-fill  { stroke: #fff; transition: stroke-dashoffset 1.5s ease; }
.stat-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    color: #fff;
}
.stat-pct small { font-size: 14px; font-weight: 700; margin-top: 4px; }

/* NUMBER BOX */
.stat-number-box { text-align: center; padding: 10px 0; }
.big-num {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.big-num sup { font-size: 22px; font-weight: 800; }
.big-icon { font-size: 32px; margin-top: 6px; }

/* STAT INFO */
.stat-info h3 { font-size: 17px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.stat-info p  { font-size: 13px; color: rgba(255,255,255,0.8); margin: 0 0 12px; }
.stat-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* CHART CARD */
.chart-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07);
    border: 1px solid #f1f5f9;
    margin-top: 12px;
}
.chart-header {
    text-align: center;
    margin-bottom: 32px;
}
.chart-header h3 { font-size: 20px; font-weight: 800; color: #0f172a; margin: 0 0 6px; }
.chart-header p  { font-size: 13px; color: #64748b; margin: 0; }

.chart-body {
    display: flex;
    align-items: flex-end;
    gap: 0;
    height: 260px;
    border-bottom: 2px solid #e2e8f0;
    border-left: 2px solid #e2e8f0;
    padding: 0 20px 0 0;
    position: relative;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 2px;
    min-width: 40px;
    text-align: right;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    padding-right: 10px;
    height: 100%;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    padding: 0 10px;
    gap: 16px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar-wrap {
    position: relative;
    width: 100%;
    max-width: 80px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: calc(100% - 30px);
}

.chart-bar {
    width: 100%;
    max-width: 64px;
    border-radius: 10px 10px 0 0;
    background: var(--clr, #16a34a);
    height: 0;
    transition: height 1.2s cubic-bezier(.34,1.56,.64,1);
    position: relative;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
}
.chart-bar.best {
    box-shadow: 0 -6px 24px rgba(245,158,11,0.4);
}

.bar-tooltip {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
}
.bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #0f172a;
}

.bar-year {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-top: 10px;
    text-align: center;
    white-space: nowrap;
}

/* LEGEND */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.leg { font-size: 12px; font-weight: 700; color: #475569; }
.leg.blue   { color: #3b82f6; }
.leg.purple { color: #8b5cf6; }
.leg.green  { color: #16a34a; }
.leg.orange { color: #f59e0b; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .stats-section { padding: 50px 16px; }
    .chart-card { padding: 20px 12px; }
    .chart-body { height: 180px; }
    .chart-bar { max-width: 44px; }
    .bar-year { font-size: 10px; }
    .chart-bars { gap: 8px; padding: 0 4px; }
}
