/* ===========================
   STATISTICS SECTION STYLES
   Стили для секции статистики с анимированными счетчиками
   =========================== */

.statistics-section {
    background-color: var(--color-button-primary);
    padding: 45px 0;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

/* Добавляем тонкий градиент для глубины */
.statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-button-primary) 0%, var(--color-button-primary-hover) 100%);
    z-index: 0;
}

.statistics-section .container {
    position: relative;
    z-index: 1;
}

/* ===== СЕТКА СТАТИСТИКИ ===== */

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
    align-items: center;
    text-align: center;
}

/* ===== ЭЛЕМЕНТЫ СТАТИСТИКИ ===== */

.statistics-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Анимация появления элементов */
.statistics-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ЧИСЛА (СЧЕТЧИКИ) ===== */

.statistics-number {
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1.1;
    margin-bottom: 15px;
    color: var(--color-white);
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); */
    position: relative;
}

/* Эффект "подсвечивания" числа во время анимации */
/* .statistics-number.counting {
    animation: numberGlow 0.1s ease-in-out;
}

@keyframes numberGlow {

    0%,
    100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    50% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.3);
    }
} */

/* ===== ОПИСАНИЯ ===== */

.statistics-description {
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 120px;
    text-align: left;
    white-space: nowrap;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Для планшетов (6 колонок не помещаются) */
@media screen and (max-width: 1200px) {
    .statistics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .statistics-section {
        padding: 60px 0;
    }
}

/* Для планшетов в портретной ориентации */
@media screen and (max-width: 768px) {
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .statistics-section {
        padding: 50px 0;
    }

    .statistics-number {
        margin-bottom: 10px;
    }

    .statistics-description {
        max-width: 100px;
        font-size: clamp(10px, 2.5vw, 12px);
    }
}

/* Для мобильных устройств */
@media screen and (max-width: 480px) {
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .statistics-section {
        padding: 40px 0;
    }

    .statistics-number {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 8px;
    }

    .statistics-description {
        font-size: clamp(9px, 3vw, 11px);
        max-width: 90px;
        letter-spacing: 0.5px;
    }
}

/* Для очень маленьких экранов */
@media screen and (max-width: 360px) {
    .statistics-grid {
        gap: 15px;
    }

    .statistics-description {
        max-width: 80px;
    }
}

/* ===== АНИМАЦИИ ЗАГРУЗКИ ===== */

/* Плавное появление всей секции */
.statistics-section {
    animation: statisticsSectionFadeIn 1s ease-out;
}

@keyframes statisticsSectionFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== ACCESSIBILITY ===== */

/* Для пользователей, которые предпочитают уменьшенную анимацию */
@media (prefers-reduced-motion: reduce) {
    .statistics-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .statistics-number.counting {
        animation: none;
    }

    .statistics-section {
        animation: none;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ ===== */

/* Тонкий border снизу для разделения секций */
.statistics-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Эффект глубины для чисел */
/* .statistics-number::before {
    content: attr(data-original);
    position: absolute;
    top: 2px;
    left: 2px;
    color: rgba(0, 0, 0, 0.1);
    z-index: -1;
    font-size: inherit;
    font-weight: inherit;
} */

/* Hover эффект для интерактивности (только на больших экранах) */
@media (hover: hover) and (pointer: fine) {
    .statistics-item:hover {
        transform: translateY(-5px);
    }

    .statistics-item:hover .statistics-number {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.2);
    }
}

/* ===== ОПТИМИЗАЦИЯ ПРОИЗВОДИТЕЛЬНОСТИ ===== */

/* GPU ускорение для анимаций */
.statistics-item,
.statistics-number {
    will-change: transform, opacity;
}

/* Оптимизация для retina дисплеев */
@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi) {
    .statistics-number {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}