/*
 * BPS-Style Statistics CSS - PPID SMAN 1 Lubuk Sikaping
 * Model statistik mengikuti desain website BPS (Badan Pusat Statistik)
 */

/* ===== BPS STATISTICS SECTION ===== */
.bps-statistics-section {
    padding: 5rem 0 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    position: relative !important;
    overflow: hidden !important;
}

.bps-statistics-section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 123, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(40, 167, 69, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 193, 7, 0.05) 0%, transparent 50%) !important;
    z-index: 1 !important;
}

/* ===== BPS SECTION HEADER ===== */
.bps-stats-header {
    text-align: center !important;
    margin-bottom: 4rem !important;
    position: relative !important;
    z-index: 3 !important;
}

.bps-stats-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin-bottom: 1rem !important;
    position: relative !important;
}

.bps-stats-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80px !important;
    height: 4px !important;
    background: linear-gradient(90deg, #007bff, #28a745) !important;
    border-radius: 2px !important;
}

.bps-stats-subtitle {
    font-size: 1.2rem !important;
    color: #6c757d !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
}

/* ===== BPS STAT CARDS ===== */
.bps-stat-card {
    background: white !important;
    border-radius: 15px !important;
    padding: 2rem 1.5rem !important;
    margin-bottom: 2rem !important;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 3 !important;
}

.bps-stat-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: var(--card-accent-color, #007bff) !important;
    z-index: 1 !important;
}

.bps-stat-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--card-accent-color, #007bff) !important;
}

/* ===== STAT CARD VARIANTS ===== */
.bps-stat-card.visitors {
    --card-accent-color: #007bff;
}

.bps-stat-card.documents {
    --card-accent-color: #28a745;
}

.bps-stat-card.requests {
    --card-accent-color: #ffc107;
}

.bps-stat-card.objections {
    --card-accent-color: #dc3545;
}

/* ===== STAT ICON ===== */
.bps-stat-icon {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1.5rem !important;
    background: linear-gradient(135deg, var(--card-accent-color, #007bff), var(--card-accent-color, #007bff)) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.bps-stat-icon::before {
    content: '' !important;
    position: absolute !important;
    top: -3px !important;
    left: -3px !important;
    right: -3px !important;
    bottom: -3px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--card-accent-color, #007bff), transparent) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: -1 !important;
}

.bps-stat-card:hover .bps-stat-icon {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2) !important;
}

.bps-stat-card:hover .bps-stat-icon::before {
    opacity: 0.3 !important;
}

.bps-stat-icon i {
    font-size: 2rem !important;
    color: white !important;
}

/* ===== STAT NUMBER ===== */
.bps-stat-number {
    font-size: 3rem !important;
    font-weight: 800 !important;
    color: var(--card-accent-color, #007bff) !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    text-align: center !important;
    line-height: 1 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    position: relative !important;
}

.bps-stat-number::after {
    content: '+' !important;
    font-size: 1.5rem !important;
    opacity: 0.7 !important;
    margin-left: 0.2rem !important;
}

/* ===== STAT LABEL ===== */
.bps-stat-label {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    text-align: center !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ===== STAT DESCRIPTION ===== */
.bps-stat-description {
    font-size: 0.9rem !important;
    color: #6c757d !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    line-height: 1.4 !important;
}

/* ===== STAT TREND INDICATOR ===== */
.bps-stat-trend {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    background: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

.bps-stat-trend.down {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

.bps-stat-trend i {
    font-size: 0.7rem !important;
}

/* ===== LOADING ANIMATION ===== */
@keyframes bpsCountUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bps-stat-number.counting {
    animation: bpsCountUp 0.6s ease-out !important;
}

/* ===== SHIMMER EFFECT ===== */
@keyframes bpsShimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.bps-stat-card.loading .bps-stat-number {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%) !important;
    background-size: 200px 100% !important;
    animation: bpsShimmer 1.5s infinite !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .bps-stat-card {
        margin-bottom: 1.5rem !important;
    }
    
    .bps-stat-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 1rem !important;
    }
    
    .bps-stat-icon i {
        font-size: 1.75rem !important;
    }
    
    .bps-stat-number {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .bps-statistics-section {
        padding: 3rem 0 !important;
    }
    
    .bps-stats-header {
        margin-bottom: 3rem !important;
    }
    
    .bps-stats-title {
        font-size: 2rem !important;
    }
    
    .bps-stats-subtitle {
        font-size: 1.1rem !important;
    }
    
    .bps-stat-card {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .bps-stat-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .bps-stat-icon i {
        font-size: 1.5rem !important;
    }
    
    .bps-stat-number {
        font-size: 2rem !important;
    }
    
    .bps-stat-label {
        font-size: 1rem !important;
    }
    
    .bps-stat-description {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 576px) {
    .bps-statistics-section {
        padding: 2rem 0 !important;
    }
    
    .bps-stats-title {
        font-size: 1.75rem !important;
    }
    
    .bps-stat-card {
        padding: 1.25rem 0.75rem !important;
    }
    
    .bps-stat-number {
        font-size: 1.75rem !important;
    }
    
    .bps-stat-label {
        font-size: 0.9rem !important;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .bps-stat-card,
    .bps-stat-icon,
    .bps-stat-number {
        animation: none !important;
        transition: none !important;
    }
    
    .bps-stat-card:hover {
        transform: none !important;
    }
    
    .bps-stat-card:hover .bps-stat-icon {
        transform: none !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .bps-statistics-section {
        background: white !important;
        padding: 2rem 0 !important;
    }
    
    .bps-statistics-section::before {
        display: none !important;
    }
    
    .bps-stat-card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid !important;
    }
    
    .bps-stat-icon {
        background: #f8f9fa !important;
        box-shadow: none !important;
    }
    
    .bps-stat-icon i {
        color: #333 !important;
    }
    
    .bps-stat-trend {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}
