/* ===== Why STEMigo (layout handled by Bootstrap grid) ===== */
.why {
    --w-navy: #0f1f5c;
    --w-gold: #dc9a1c;

    position: relative;
    overflow: hidden;
}

.why .container {
    position: relative;
    z-index: 1;
}

/* Heading */
.why-line {
    width: 34px;
    height: 2px;
    background: var(--w-gold);
}

.why-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--w-navy);
}

.why-title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 2.4vw, 2.2rem);
    line-height: 1.2;
    color: var(--w-navy);
}

.why-title span {
    display: block;
    color: var(--w-gold);
}

.why-text {
    max-width: 430px;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Student image (inside the container) with a gentle zoom in / out effect */
.why-visual {
    line-height: 0;
}

.why-student {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    transform-origin: center bottom;
    animation: why-zoom 6s ease-in-out infinite alternate;
}

/* Feature cards */
.why-card {
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 31, 92, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.why-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 31, 92, 0.14);
}

.why-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
}

.is-blue .why-icon { background: #e4eefc; color: var(--w-navy); }
.is-gold .why-icon { background: #fcebc9; color: var(--w-gold); }

.why-card-title {
    font-size: 0.95rem;
    color: var(--w-navy);
}

.why-card-text {
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Stats bar */
.why-stats {
    background: #fdf1d9;
    border: 1px solid #f6e0b0;
    border-radius: 14px;
}

.why-stat i {
    font-size: 1.8rem;
    color: var(--w-gold);
}

.why-stat strong {
    font-size: 1.3rem;
    line-height: 1.2;
    color: var(--w-navy);
}

.why-stat span {
    font-size: 0.82rem;
    color: #4b5563;
}

/* Stat dividers: horizontal on mobile (stacked) */
.why-stat + .why-stat {
    border-top: 1px solid #f0d9a6;
}

/* ===== Tablet and mobile ===== */
@media (max-width: 991.98px) {
    .why-text {
        max-width: 100%;
    }

    /* image is no longer at the section bottom: soften its flat bottom edge */
    .why-student {
        max-width: 420px;
        margin: 0 auto;
        -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
    }
}

/* ===== sm and up: stats in one row with vertical dividers ===== */
@media (min-width: 576px) {
    .why-stat + .why-stat {
        border-top: 0;
        border-left: 1px solid #f0d9a6;
    }
}

/* ===== Small mobile ===== */
@media (max-width: 575.98px) {
    .why-eyebrow {
        font-size: 0.72rem;
    }

    .why-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .why-stat {
        justify-content: flex-start !important;
        padding-left: 1.5rem !important;
    }
}