/* ================== MODERN STATS SECTION - REDESIGNED ================== */

.bray-stats-section {
    padding: 80px 0 !important;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.bray-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(147, 197, 253, 0.05) 100%),
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

body.dark-mode .bray-stats-section {
    background: #0f172a;
}

body.dark-mode .bray-stats-section::before {
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(147, 197, 253, 0.08) 100%),
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 40px 24px;
    background: #ffffff;
    border-radius: 24px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 24px rgba(79, 70, 229, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.15);
    border-color: #4f46e5;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-item p {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.dark-mode .stat-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat-item:hover {
    border-color: #4f46e5;
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.3);
}

body.dark-mode .stat-item p {
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 968px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .stat-item {
        padding: 32px 20px;
    }

    .stat-item h3 {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-item {
        padding: 28px 20px;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    .stat-item p {
        font-size: 0.85rem;
    }
}

/* Animation on scroll */
.reveal .stat-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active .stat-item {
    opacity: 1;
    transform: translateY(0);
}

.reveal.active .stat-item:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal.active .stat-item:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal.active .stat-item:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal.active .stat-item:nth-child(4) {
    transition-delay: 0.4s;
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item.active h3 {
    animation: countUp 0.6s ease-out;
}