﻿
/* ==================================================
   ECOMACCOUNTXPERT - PREMIUM STATISTICS SECTION
   Emerald + Gold Interactive Theme
================================================== */

.stats-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 70px 0;
    background: radial-gradient(circle at 10% 50%, rgba(16, 185, 129, .12), transparent 30%), radial-gradient(circle at 90% 50%, rgba(214, 173, 96, .15), transparent 30%), linear-gradient(135deg, #f0f8f3, #ffffff 50%, #f8f5ec);
}

    /* Background decoration */

    .stats-section::before,
    .stats-section::after {
        content: "";
        position: absolute;
        z-index: -1;
        border-radius: 50%;
        pointer-events: none;
    }

    .stats-section::before {
        width: 330px;
        height: 330px;
        top: -200px;
        right: -90px;
        border: 1px solid rgba(6, 95, 70, .12);
    }

    .stats-section::after {
        width: 280px;
        height: 280px;
        bottom: -190px;
        left: -90px;
        border: 1px solid rgba(214, 173, 96, .22);
    }

/* Grid */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* Statistic Cards */

.stat-item {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 155px;
    padding: 28px 15px;
    text-align: center;
    border: 1px solid rgba(6, 95, 70, .12);
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #eaf7ef);
    box-shadow: 0 8px 25px rgba(5, 46, 43, .07), inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), background .4s ease, box-shadow .4s ease, border-color .4s ease;
}

    /* Different card shades */

    .stat-item:nth-child(2) {
        background: linear-gradient(145deg, #fffdf5, #f8efd9);
    }

    .stat-item:nth-child(3) {
        background: linear-gradient(145deg, #f1fbf8, #dff3eb);
    }

    .stat-item:nth-child(4) {
        background: linear-gradient(145deg, #fffaf0, #f6edda);
    }

    /* Gold top line */

    .stat-item::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        left: 20%;
        width: 60%;
        height: 4px;
        border-radius: 0 0 8px 8px;
        background: linear-gradient(90deg, transparent, #d6ad60, transparent);
        transition: width .4s ease, left .4s ease;
    }

    /* Shine effect */

    .stat-item::after {
        content: "";
        position: absolute;
        top: -100%;
        left: -60%;
        width: 45%;
        height: 300%;
        transform: rotate(25deg);
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, .35), transparent );
        transition: left .7s ease;
        pointer-events: none;
    }

    /* Hover Animation */

    .stat-item:hover {
        transform: translateY(-12px) scale(1.045);
        border-color: #d6ad60;
        background: linear-gradient(135deg, #064e3b, #08785a);
        box-shadow: 0 20px 40px rgba(5, 46, 43, .20), 0 0 18px rgba(214, 173, 96, .20);
    }

        .stat-item:hover::before {
            left: 10%;
            width: 80%;
        }

        .stat-item:hover::after {
            left: 130%;
        }

    /* Number */

    .stat-item h2 {
        margin: 0;
        color: #075c48;
        font-family: "Manrope", "DM Sans", sans-serif;
        font-size: clamp(35px, 3.5vw, 49px);
        font-weight: 900;
        line-height: 1.2;
        letter-spacing: -1.8px;
        transition: color .35s ease, transform .35s ease;
    }

    .stat-item:nth-child(2) h2,
    .stat-item:nth-child(4) h2 {
        color: #a77b2e;
    }

    /* Label */

    .stat-item p {
        margin: 12px 0 0;
        color: #647a70;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.5;
        letter-spacing: 1.3px;
        transition: color .35s ease;
    }

    /* Hover text */

    .stat-item:hover h2 {
        color: #f0d79d;
        transform: scale(1.08);
    }

    .stat-item:hover p {
        color: #ffffff;
    }

/* =========================
   TABLET
========================= */

@media (max-width: 900px) {
    .stats-section {
        padding: 55px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .stat-item {
        min-height: 145px;
        padding: 25px 14px;
    }

        .stat-item h2 {
            font-size: 42px;
        }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {
    .stats-section {
        padding: 42px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .stat-item {
        min-height: 125px;
        padding: 22px 9px;
        border-radius: 16px;
    }

        .stat-item h2 {
            font-size: clamp(28px, 8vw, 36px);
            letter-spacing: -1.2px;
        }

        .stat-item p {
            margin-top: 8px;
            font-size: 10px;
            letter-spacing: .8px;
        }

        .stat-item:hover {
            transform: translateY(-5px) scale(1.02);
        }
}

/* Small Mobile */

@media (max-width: 380px) {
    .stats-grid {
        gap: 10px;
    }

    .stat-item {
        min-height: 115px;
        padding: 18px 6px;
    }

        .stat-item h2 {
            font-size: 27px;
        }

        .stat-item p {
            font-size: 9px;
            letter-spacing: .5px;
        }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .stat-item,
    .stat-item::before,
    .stat-item::after,
    .stat-item h2,
    .stat-item p {
        transition: none !important;
    }

        .stat-item:hover {
            transform: none;
        }
}
