/**
 * Statistics Section Styles
 * OBF 2026 Theme - Statistics with Leyka Integration
 */

/* Statistics Section */
.statistics-section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: #ffffff;
    overflow: hidden;
}

.statistics-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/islam-pattern-white.svg');
    background-repeat: repeat;
    background-size: 100px 100px;
    pointer-events: none;
    z-index: 0;
}

.statistics-section .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Section Header */
.statistics-section__header {
    text-align: center;
    margin-bottom: 60px;
}

/* Statistics Grid - 4 блока в ряд */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1320px;
    margin: 0 auto;
}

/* Statistic Cards */
.statistic-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.statistic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.statistic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.statistic-card:hover::before {
    opacity: 1;
}

/* Card Icon - теперь сверху */
.statistic-card__icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.3s ease;
    order: 1;
}

/* Card Content - теперь снизу */
.statistic-card__content {
    position: relative;
    z-index: 2;
    order: 2;
}

.statistic-card__number {
    font-family: 'Jost', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.statistic-card__label {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Новые стили для двухуровневых подписей */
.statistic-card__label-main {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
}

.statistic-card__label-main::before {
    content: '✦';
    margin-right: 8px;
    color: #FFD700;
    font-size: 10px;
    opacity: 0.8;
}

.statistic-card__label-main::after {
    content: '✦';
    margin-left: 8px;
    color: #FFD700;
    font-size: 10px;
    opacity: 0.8;
}

.statistic-card__label-sub {
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}



.statistic-card:hover .statistic-card__icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.statistic-card__icon svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Animation for numbers */
.statistic-card__number.counting {
    animation: pulse 0.1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .statistics-section {
        padding: 60px 0;
    }
    
    .statistics-grid {
        gap: 30px;
        max-width: 1000px;
    }
    
    .statistic-card {
        padding: 35px 25px;
    }
    
    .statistic-card__number {
        font-size: 3rem;
    }
    
    .statistic-card__label-main {
        font-size: 1rem;
    }
    
    .statistic-card__label-sub {
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .statistics-section {
        padding: 50px 0;
    }
    
    .statistics-section__header {
        margin-bottom: 50px;
    }
    
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .statistic-card {
        padding: 30px 20px;
    }
    
    .statistic-card__number {
        font-size: 2.5rem;
    }
    
    .statistic-card__label {
        font-size: 1rem;
    }
    
    .statistic-card__label-main {
        font-size: 0.95rem;
    }
    
    .statistic-card__label-sub {
        font-size: 0.8rem;
    }
    
    .statistic-card__icon {
        width: 70px;
        height: 70px;
    }
    
    .statistic-card__icon svg {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .statistics-section {
        padding: 40px 0;
    }
    
    .statistics-section__header {
        margin-bottom: 40px;
    }
    
    .statistics-grid {
        gap: 20px;
    }
    
    .statistic-card {
        padding: 25px 15px;
    }
    
    .statistic-card__number {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .statistic-card__label {
        font-size: 0.9rem;
    }
    
    .statistic-card__label-main {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .statistic-card__label-sub {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .statistics-section {
        padding: 30px 0;
    }
    
    .statistics-section .container {
        padding: 0 15px;
    }
    
    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .statistic-card {
        padding: 30px 20px;
    }
    
    .statistic-card__number {
        font-size: 2.8rem;
    }
    
    .statistic-card__label {
        font-size: 1rem;
    }
    
    .statistic-card__label-main {
        font-size: 1rem;
    }
    
    .statistic-card__label-sub {
        font-size: 0.85rem;
    }
    
    .statistic-card__icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .statistic-card__icon svg {
        width: 30px;
        height: 30px;
    }
}

/* Loading state */
.statistics-section.loading .statistic-card {
    opacity: 0.7;
    animation: statisticsLoading 1.5s ease-in-out infinite;
}

@keyframes statisticsLoading {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Accessibility improvements */
.statistic-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .statistic-card {
        border-width: 2px;
        background: rgba(255, 255, 255, 0.2);
    }
    
    .statistic-card__number,
    .statistic-card__label {
        text-shadow: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .statistic-card,
    .statistic-card__icon {
        transition: none;
    }
    
    .statistic-card:hover {
        transform: none;
    }
    
    .statistic-card__number.counting {
        animation: none;
    }
    
    .statistics-section.loading .statistic-card {
        animation: none;
    }
}

/* Print styles */
@media print {
    .statistics-section {
        background: transparent !important;
        color: #000 !important;
        padding: 20px 0;
    }
    
    .statistic-card {
        background: transparent !important;
        border: 2px solid #000 !important;
        box-shadow: none !important;
    }
    
    .statistic-card__number,
    .statistic-card__label {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .statistic-card__icon {
        display: none;
    }
}