/**
 * Impact Numbers Block Styles
 *
 * Stats section with 5 metric cards.
 * Two variations: Full (with header + watermark) and Minimal (cards only + optional CTA).
 *
 * Based on the EverSmith HTML design (home-impact section).
 */

/* ============================================================
   Main Block Container
   ============================================================ */

.impact-numbers-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 100px 80px 80px;
    overflow: hidden;
}

/* Full variation with header - standard padding */
.impact-numbers-block.has-header {
    padding: 100px 80px 80px;
}

/* Minimal variation without header - reduced padding */
.impact-numbers-block.no-header {
    padding: 60px 80px;
}

/* ============================================================
   Watermark Background (shown only with header)
   ============================================================ */

.impact-numbers-watermark {
    position: absolute;
    top: 167px;
    left: 66%;
    transform: translateX(-40%);
    width: 700px;
    height: 420px;
    opacity: 0.4;
    pointer-events: none;
}

/* Hide watermark on minimal variation (safety check) */
.impact-numbers-block.no-header .impact-numbers-watermark {
    display: none;
}

/* ============================================================
   Section Header
   ============================================================ */

.impact-numbers-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1280px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Label crown: theme .es-icon-titles */

/* Section label styling - uses shared .home-section-label class
   but scoped for this block's context */
.impact-numbers-header .home-section-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.impact-numbers-header .home-section-label span {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: #0097a7;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ============================================================
   Stats Cards Grid
   ============================================================ */

.impact-numbers-cards {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 1280px;
}

/* Individual stat card */
.impact-numbers-card {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 40px 24px;
    overflow: hidden;
}

/* Large teal stat number */
.impact-numbers-number {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: 46px;
    line-height: 1.4;
    color: #21abb6;
}

/* Stat label - bold */
.impact-numbers-label {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
}

/* Stat description text */
.impact-numbers-text {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
}

/* ============================================================
   CTA Button (for minimal variation)
   ============================================================ */

.impact-numbers-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 8px 32px;
    border-radius: 8px;
    background-color: #e57440;
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.impact-numbers-cta-btn:hover {
    background-color: #f26828;
    box-shadow: 0px 6px 14px rgba(1, 13, 20, 0.1);
}

.impact-numbers-cta-btn:active {
    background-color: #c87400;
    box-shadow: none;
}

.impact-numbers-cta-btn:focus-visible {
    outline: 2px solid #c87400;
    outline-offset: 2px;
}

/* ============================================================
   Responsive Styles - Tablet
   ============================================================ */

@media (max-width: 1024px) {
    .impact-numbers-block {
        padding: 60px 32px;
    }

    .impact-numbers-block.has-header {
        padding: 60px 32px;
    }

    .impact-numbers-block.no-header {
        padding: 40px 32px;
    }

    .impact-numbers-watermark {
        top: 200px;
        left: 50%;
    }

    /* Base uses align-items: flex-start; keep row cross-axis at start for desktop-like rows */
    .impact-numbers-cards {
        flex-wrap: wrap;
        gap: 16px;
        /* Center wrapped rows so an odd last card (e.g. 5 stats) is not stuck on the left */
        justify-content: center;
    }

    .impact-numbers-card {
        flex: 1 1 calc(50% - 8px);
        min-width: 200px;
        /* With flex-grow 1, a single card on the last row would stretch to full width; cap width so it can stay visually centered */
        max-width: calc(50% - 8px);
    }
}

/* ============================================================
   Responsive Styles - Mobile
   ============================================================ */

@media (max-width: 768px) {
    .impact-numbers-block {
        padding: 48px 20px;
    }

    .impact-numbers-block.has-header {
        padding: 48px 20px;
    }

    .impact-numbers-block.no-header {
        padding: 32px 20px;
    }

    .impact-numbers-watermark {
        display: none;
    }

    /* Column stack: override base align-items: flex-start — otherwise cards shrink to content width and sit left (e.g. ~764px) */
    .impact-numbers-cards {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .impact-numbers-card {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .impact-numbers-text {
        text-align: center;
    }

    .impact-numbers-number {
        font-size: 40px;
    }

    .impact-numbers-label {
        font-size: 16px;
    }
}

/* ============================================================
   Small Mobile
   ============================================================ */

@media (max-width: 480px) {
    .impact-numbers-number {
        font-size: 36px;
    }

    .impact-numbers-cta-btn {
        width: 100%;
        max-width: 300px;
    }
}
