/* ==========================================================================
   Stats ("We Help Our Students To Achieve Their Industry Goals")
   Four tiles on white with a faint sky glow: icon in a soft sky circle, large DM Serif number with the
   +/% in sky blue, label and a thin accent line that grows when the tile is revealed.
   The first two numbers are odometers (#totalStaff, #totalAward) started by odo-counter.js.
   ========================================================================== */
.modern-stats-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(56px, 7vw, 104px) 0;
    background: #fff;
}

.modern-stats-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(55% 65% at 50% 100%, rgba(51, 189, 255, 0.11) 0%, rgba(51, 189, 255, 0) 70%);
    pointer-events: none;
}

.stats-head {
    max-width: 680px;
    margin: 0 auto clamp(32px, 4vw, 56px);
    text-align: center;
}

.stats-heading {
    font-family: "DM Serif Display", serif;
    font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem);
    font-weight: 400;
    color: #09212b;
    margin-bottom: 14px;
    line-height: 1.15;
}

.stats-subtext {
    max-width: 560px;
    margin: 0 auto;
    color: #5b6670;
    font-size: 1.08rem;
    line-height: 1.6;
}

/* --- Tiles --------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.stat-tile {
    --stat-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: clamp(24px, 2.4vw, 34px) clamp(20px, 2.2vw, 32px) clamp(26px, 2.6vw, 36px);
    overflow: hidden;
    border: 1px solid rgba(9, 33, 43, 0.07);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow: 0 10px 30px rgba(9, 33, 43, 0.05);
    transition: transform 0.35s var(--stat-ease), box-shadow 0.35s var(--stat-ease), border-color 0.35s ease;
}

.stat-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(51, 189, 255, 0.28);
    box-shadow: 0 18px 40px rgba(9, 33, 43, 0.09);
}

.stat-tile__icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: clamp(18px, 2vw, 26px);
    border-radius: 50%;
    background: rgba(51, 189, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(51, 189, 255, 0.18);
    color: #009ce3;
    font-size: 1.5rem;
}

.stat-tile__value {
    display: flex;
    align-items: flex-start;
    margin: 0 0 12px;
    color: #09212b;
    font-family: "DM Serif Display", serif;
    height: 1em;
    font-size: clamp(3rem, 2rem + 2.6vw, 4.4rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.5px;
}

/* Scoped to the tile: modern-course-details.css (loaded later) styles a global .stat-number / .stat-label. */
.stat-tile .stat-number,
.stat-tile .stat-number.odometer .odometer-value {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-size: 1em;
    font-weight: 400;
    color: inherit;
    line-height: 1;
}

.stat-number.odometer.odometer-auto-theme,
.stat-number.odometer.odometer-theme-default,
.stat-number.odometer .odometer-digit {
    vertical-align: top;
    line-height: 1;
}

.stat-plus {
    margin-left: 3px;
    color: #33BDFF;
    font-size: 0.62em;
    line-height: 1;
    transform: translateY(0.12em);
}

.stat-tile .stat-label {
    margin: 0;
    color: #4e5a64;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    line-height: 1.4;
    text-transform: uppercase;
}

/* Thin sky accent line at the foot of each tile; grows once the tile has been revealed. */
.stat-tile__line {
    position: absolute;
    left: clamp(20px, 2.2vw, 32px);
    bottom: 0;
    width: 44px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, #33BDFF, #009ce3);
    transform-origin: left center;
    transition: transform 0.7s var(--stat-ease) 0.25s, width 0.35s var(--stat-ease);
}

html.js-reveal .stat-tile[data-reveal]:not(.is-in) .stat-tile__line {
    transform: scaleX(0);
}

.stat-tile:hover .stat-tile__line {
    width: 72px;
}

/* --- Tablet: 2 × 2 ------------------------------------------------------- */
@media (max-width: 991.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Phone: compact 2 × 2 ------------------------------------------------- */
@media (max-width: 575.98px) {
    .stats-grid {
        gap: 12px;
    }

    .stat-tile {
        padding: 18px 16px 20px;
        border-radius: 16px;
    }

    .stat-tile__icon {
        width: 40px;
        height: 40px;
        margin-bottom: 14px;
        font-size: 1.2rem;
    }

    .stat-tile__value {
        font-size: 2.5rem;
    }

    .stat-tile .stat-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .stat-tile__line {
        left: 16px;
        width: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stat-tile,
    .stat-tile__line {
        transition: none;
    }

    .stat-tile:hover {
        transform: none;
    }

    html.js-reveal .stat-tile[data-reveal]:not(.is-in) .stat-tile__line {
        transform: none;
    }
}
