/* =========================================
   V2 Stats Cards Block Styles
   Cards overlap the banner above via
   negative margin-top.
   ========================================= */

/* Section Base — pulls up into the banner */
.v2-stats-cards-section {
    position: relative;
    z-index: 2;
    margin-top: -60px;
    padding: 0 0 60px;
    background: transparent;
}

.v2-stats-cards-section .container {
    position: relative;
    z-index: 1;
}

/* ---- Header (optional) ---- */
.v2-stats-cards-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 10px;
}

.v2-stats-cards-heading {
    font-size: 42px;
    font-weight: 700;
    color: var(--v2sc-heading-color, #ffffff);
    margin: 0 0 12px;
    line-height: 1.25;
    font-family: var(--heading-font);
}

.v2-stats-cards-subheading {
    font-size: 18px;
    line-height: 1.6;
    color: var(--v2sc-heading-color, #ffffff);
    opacity: 0.85;
    margin: 0 auto;
    max-width: 720px;
}

/* ---- Grid ---- */
.v2-stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ---- Card Base ---- */
.v2-stats-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.v2-stats-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ---- Card Front (Default) ---- */
.v2-stats-card-front {
    padding: 36px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.v2-stats-card-number {
    font-size: 46px;
    font-weight: 800;
    color: var(--v2sc-stat-color, #f15a24);
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: var(--heading-font);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2-stats-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--v2sc-label-color, #333333);
    line-height: 1.4;
}

/* ---- Sub-label (Detailed style) ---- */
.v2-stats-card-sub-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--v2sc-sub-label-color, #002e5b);
    margin-top: 14px;
    line-height: 1.4;
}

/* ---- Card Back (Hover face — detailed style) ---- */
.v2-stats-card-back {
    position: absolute;
    inset: 0;
    padding: 30px 22px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.v2-stats-card.has-hover-text:hover .v2-stats-card-back {
    opacity: 1;
    visibility: visible;
}

.v2-stats-card.has-hover-text:hover .v2-stats-card-front {
    opacity: 0;
    visibility: hidden;
}

.v2-stats-card-back-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.v2-stats-card-back-text {
    font-size: 14px;
    line-height: 1.65;
    color: #555555;
}

/* =========================================
   Simple Style Adjustments
   ========================================= */
.v2-stats-cards--simple .v2-stats-card-front {
    min-height: 150px;
    padding: 34px 22px;
}

/* =========================================
   Detailed Style Adjustments
   ========================================= */
.v2-stats-cards--detailed .v2-stats-card-front {
    min-height: 195px;
    padding: 34px 22px;
}

.v2-stats-cards--detailed .v2-stats-card-number {
    font-size: 42px;
}

.v2-stats-cards--detailed .v2-stats-card-label {
    font-size: 15px;
}

/* =========================================
   Responsive Styles
   ========================================= */

/* Large Desktop (max 1400px) */
@media (max-width: 1400px) {
    .v2-stats-cards-section {
        margin-top: -50px;
    }

    .v2-stats-cards-grid {
        gap: 20px;
    }

    .v2-stats-card-number {
        font-size: 40px;
    }
}

/* Desktop / Tablet Landscape (max 1199px) */
@media (max-width: 1199px) {
    .v2-stats-cards-section {
        margin-top: -40px;
        padding-bottom: 50px;
    }

    .v2-stats-cards-heading {
        font-size: 36px;
    }

    .v2-stats-cards-grid {
        gap: 18px;
    }

    .v2-stats-card-number {
        font-size: 36px;
    }

    .v2-stats-card-front {
        padding: 28px 18px;
        min-height: 145px;
    }

    .v2-stats-cards--detailed .v2-stats-card-front {
        min-height: 180px;
    }
}

/* Tablet (max 991px) */
@media (max-width: 991px) {
    .v2-stats-cards-section {
        margin-top: -40px;
        padding-bottom: 40px;
    }

    .v2-stats-cards-heading {
        font-size: 32px;
    }

    .v2-stats-cards-header {
        margin-bottom: 24px;
    }

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

    .v2-stats-card-number {
        font-size: 34px;
    }

    .v2-stats-card-front {
        min-height: 140px;
    }

    .v2-stats-cards--detailed .v2-stats-card-front {
        min-height: 170px;
    }
}

/* Mobile Landscape (max 767px) */
@media (max-width: 767px) {
    .v2-stats-cards-section {
        margin-top: 0 !important;
        padding-bottom: 32px;
    }

    .v2-stats-cards-heading {
        font-size: 28px;
    }

    .v2-stats-cards-subheading {
        font-size: 16px;
    }

    .v2-stats-cards-header {
        margin-bottom: 20px;
    }

    .v2-stats-cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .v2-stats-card {
        border-radius: 14px;
    }

    .v2-stats-card-number {
        font-size: 28px;
    }

    .v2-stats-card-label {
        font-size: 14px;
    }

    .v2-stats-card-front {
        padding: 22px 14px;
        min-height: 125px;
    }

    .v2-stats-cards--detailed .v2-stats-card-front {
        min-height: 155px;
    }

    .v2-stats-card-sub-label {
        font-size: 12px;
        margin-top: 8px;
    }

    .v2-stats-card-back {
        padding: 22px 14px;
    }

    .v2-stats-card-back-text {
        font-size: 13px;
    }
}

/* Mobile Portrait (max 480px) */
@media (max-width: 480px) {
    .v2-stats-cards-section {
        margin-top: -0 !important;
        padding-bottom: 24px;
    }

    .v2-stats-cards-heading {
        font-size: 22px;
    }

    .v2-stats-cards-subheading {
        font-size: 15px;
    }

    .v2-stats-cards-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .v2-stats-card {
        border-radius: 12px;
    }

    .v2-stats-card-number {
        font-size: 24px;
    }

    .v2-stats-card-label {
        font-size: 13px;
    }

    .v2-stats-card-front {
        padding: 18px 12px;
        min-height: 110px;
    }

    .v2-stats-cards--detailed .v2-stats-card-front {
        min-height: 140px;
    }

    .v2-stats-card-sub-label {
        font-size: 11px;
    }

    .v2-stats-card-back {
        padding: 18px 12px;
    }

    .v2-stats-card-back-title {
        font-size: 13px;
    }

    .v2-stats-card-back-text {
        font-size: 12px;
    }
}
