/* WSTR Statistics - Yellow & Red Theme with Google Fonts */
.wstr-statistics-wrapper {
    font-family: 'Google Sans', sans-serif;
    padding: 20px 0;
    background: linear-gradient(135deg, #fff5e6 0%, #ffd9b3 50%, #ffcc99 100%);
    border-radius: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern */
.wstr-statistics-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.wstr-statistics-wrapper::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(244, 67, 54, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.wstr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header - Yellow/Red Theme */
.wstr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.wstr-header h2 {
    font-size: 28px;
    color: #d32f2f;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(211, 47, 47, 0.1);
    font-family: 'Google Sans', sans-serif;
}

.wstr-header h2 i {
    color: #f9a825;
    margin-right: 10px;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.wstr-last-update {
    font-size: 14px;
    color: #e65100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 15px rgba(230, 81, 0, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    font-family: 'Google Sans', sans-serif;
    font-weight: 500;
}

/* Grid Layout - 4 Cards */
.wstr-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Card Style - Yellow/Red Theme */
.wstr-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    animation: cardAppear 0.6s ease forwards;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.wstr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f9a825, #d32f2f);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wstr-card:hover::before {
    opacity: 1;
}

.wstr-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(211, 47, 47, 0.2);
    background: rgba(255, 255, 255, 0.98);
}

/* Animation Delays - 4 Cards */
.wstr-card:nth-child(1) { animation-delay: 0.1s; }
.wstr-card:nth-child(2) { animation-delay: 0.2s; }
.wstr-card:nth-child(3) { animation-delay: 0.3s; }
.wstr-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Icon - Yellow/Red Theme */
.wstr-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.wstr-card-icon i {
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

/* Card Colors - Yellow/Red Theme (4 Cards) */
.wstr-card-students .wstr-card-icon {
    background: linear-gradient(135deg, #f9a825 0%, #d32f2f 100%);
}
.wstr-card-students .wstr-progress-bar {
    background: linear-gradient(90deg, #f9a825, #d32f2f);
}

.wstr-card-male .wstr-card-icon {
    background: linear-gradient(135deg, #ffb300 0%, #e65100 100%);
}
.wstr-card-male .wstr-progress-bar {
    background: linear-gradient(90deg, #ffb300, #e65100);
}

.wstr-card-female .wstr-card-icon {
    background: linear-gradient(135deg, #ff6f00 0%, #c62828 100%);
}
.wstr-card-female .wstr-progress-bar {
    background: linear-gradient(90deg, #ff6f00, #c62828);
}

.wstr-card-teachers .wstr-card-icon {
    background: linear-gradient(135deg, #ffca28 0%, #bf360c 100%);
}
.wstr-card-teachers .wstr-progress-bar {
    background: linear-gradient(90deg, #ffca28, #bf360c);
}

/* Card Content */
.wstr-card-content {
    position: relative;
    z-index: 1;
}

.wstr-card-number {
    font-size: 36px;
    font-weight: 800;
    color: #d32f2f;
    line-height: 1.2;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
    font-family: 'Google Sans', sans-serif;
}

.wstr-card-label {
    font-size: 14px;
    color: #bf360c;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: 'Google Sans', sans-serif;
}

/* Progress Bar */
.wstr-card-progress {
    width: 100%;
    height: 4px;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.wstr-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.wstr-card-teachers .wstr-card-progress {
    display: none;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 992px) {
    .wstr-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    
    .wstr-card {
        padding: 22px 18px;
    }
    
    .wstr-card-number {
        font-size: 32px;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .wstr-statistics-wrapper {
        padding: 15px 0;
        border-radius: 15px;
    }
    
    .wstr-container {
        padding: 15px;
    }
    
    .wstr-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .wstr-card {
        padding: 20px 15px;
    }
    
    .wstr-card-number {
        font-size: 28px;
    }
    
    .wstr-card-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .wstr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .wstr-header h2 {
        font-size: 24px;
    }
    
    .wstr-last-update {
        font-size: 12px;
        padding: 6px 14px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .wstr-statistics-wrapper {
        padding: 10px 0;
        border-radius: 12px;
        margin: 10px 0;
    }
    
    .wstr-container {
        padding: 10px;
    }
    
    .wstr-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .wstr-card {
        padding: 15px 12px;
        border-radius: 12px;
    }
    
    .wstr-card-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .wstr-card-number {
        font-size: 22px;
    }
    
    .wstr-card-label {
        font-size: 12px;
    }
    
    .wstr-header h2 {
        font-size: 20px;
    }
    
    .wstr-header h2 i {
        font-size: 18px;
    }
    
    .wstr-last-update {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .wstr-card-progress {
        height: 3px;
        margin-top: 10px;
    }
}

/* Extra Small */
@media (max-width: 380px) {
    .wstr-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .wstr-card {
        padding: 12px 10px;
    }
    
    .wstr-card-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .wstr-card-number {
        font-size: 18px;
    }
    
    .wstr-card-label {
        font-size: 10px;
    }
    
    .wstr-header h2 {
        font-size: 17px;
    }
}

/* Landscape Phone */
@media (max-height: 500px) and (orientation: landscape) {
    .wstr-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .wstr-card {
        padding: 15px 12px;
    }
    
    .wstr-card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .wstr-card-number {
        font-size: 24px;
    }
}