@import url('normalize.css');

.stats-section {
    background-color: #1f1f1f;
    color: var(--color-bg-light-white);
    padding: 100px 20px;
    width: 100%;
    box-sizing: border-box;
}

.stats-container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 60px 40px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--color-gray-dark-3);
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    height: 100%;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(55, 55, 55, 1);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.15s ease;
}

.stat-number {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 64px;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--color-bg-light-white);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-item:hover .stat-number {
    color: #b8b8b8;
    transform: scale(1.05);
    text-shadow: none;
}

.stat-label {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4;
    color: var(--color-bg-light-white);
    opacity: 0.8;
    text-transform: lowercase;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-item:hover .stat-label {
    opacity: 1;
    transform: translateY(0);
    color: #b8b8b8;
}

.stat-item .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.stat-item.clicked {
    animation: pulse 0.4s ease;
}

@keyframes pulse {
    0% {
        transform: translateY(-4px) scale(1.01);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        transform: translateY(-4px) scale(1.01);
    }
}

.stat-number.is-price {
    font-size: 56px;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px 30px;
    }

    .stat-number {
        font-size: 48px;
    }

    .stat-number.is-price {
        font-size: 42px;
    }

    .stat-item:hover {
        transform: translateY(-3px) scale(1.01);
    }
}

@media (max-width: 576px) {
    .stats-section {
        padding: 40px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-item {
        padding: 20px 10px;
        min-height: 120px;
    }

    .stat-number {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .stat-number.is-price {
        font-size: 20px;
        white-space: nowrap;
    }

    .stat-label {
        font-size: 12px;
        line-height: 1.2;
    }

    .stat-item:hover {
        transform: none;
    }

    .stat-item:hover .stat-number {
        transform: none;
    }
}

.stat-item:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 4px;
}

.stat-item:focus:not(:focus-visible) {
    outline: none;
}

@media (hover: none) and (pointer: coarse) {
    .stat-item:hover {
        transform: translateY(0);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        border-color: transparent;
        background-color: var(--color-gray-dark-3);
    }

    .stat-item:hover::before {
        opacity: 0;
    }

    .stat-item:hover .stat-number {
        color: var(--color-bg-light-white);
        transform: scale(1);
        text-shadow: none;
    }

    .stat-item:hover .stat-label {
        opacity: 0.8;
        transform: translateY(0);
        color: var(--color-bg-light-white);
    }

    .stat-item:active {
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
}