/* =========================================================
   CASANOVA CAR RENTAL — HOME PAGE: STATS COUNTER
   Fixed background image + dark overlay | 3-column counters
========================================================= */

.stats-section {
    position: relative;
    background-color: var(--color-rich-black);
    background-image: url('../../images/stats-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 110px 0;
    overflow: hidden;
}

/* Dark overlay so the fixed image never fights with the text */
.stats-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 9, 0.72);
    z-index: 1;
}

.stats-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* -----------------------------------------
   Row + columns
----------------------------------------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.stats-col {
    position: relative;
    text-align: center;
    padding: 0 36px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: calc(var(--stat-index, 0) * 0.12s);
}

.stats-col.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Vertical divider between columns */
.stats-col:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    right: 0;
    width: 1px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* -----------------------------------------
   Number
----------------------------------------- */
.stats-number {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: clamp(42px, 5vw, 60px);
    line-height: 1.1;
    color: var(--color-amber);
    margin: 6px 0 12px;
}

.stats-suffix {
    color: var(--color-amber);
}

/* -----------------------------------------
   Label + description
----------------------------------------- */
.stats-label {
    display: block;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.3px;
    color: var(--color-white);
}

.stats-col-label-first .stats-label {
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: rgba(255, 191, 1, 0.8);
    font-weight: 500;
}

.stats-desc {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 14.5px;
    line-height: 1.7;
    color: #ffffffbd;
    max-width: 300px;
    margin: 14px auto 0;
}

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */
@media (max-width: 1024px) {
    .stats-section {
        padding: 90px 0;
        background-attachment: scroll; /* fixed bg can lag/flicker on tablets */
    }

    .stats-container {
        padding: 0 24px;
    }

    .stats-col {
        padding: 0 20px;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE (stacked, horizontal dividers)
========================================================= */
@media (max-width: 720px) {
    .stats-section {
        padding: 70px 0;
    }

    .stats-row {
        grid-template-columns: 1fr;
        row-gap: 44px;
    }

    .stats-col {
        padding: 0 12px 44px;
    }

    .stats-col:not(:last-child)::after {
        top: auto;
        bottom: 0;
        left: 20%;
        right: 20%;
        width: auto;
        height: 1px;
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.18) 50%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    .stats-desc {
        max-width: 340px;
    }
}

@media (max-width: 420px) {
    .stats-number {
        font-size: 40px;
    }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .stats-col {
        opacity: 1;
        transform: none;
        transition: none;
    }
}