/*
 * Our Impact — screenshot-matched Laravel section
 * All selectors are namespaced to avoid leaking styles into the host application.
 */

.our-impact,
.our-impact * {
    box-sizing: border-box;
}

.our-impact {
    --oi-bg-left: #d5d3d8;
    --oi-bg-center: #e0dee5;
    --oi-bg-right: #d5d3d8;
    --oi-card: #f7f6f4;
    --oi-card-border: rgba(35, 32, 31, 0.10);
    --oi-white: #23201f;
    --oi-soft-white: #56504f;
    /* Matched to the homepage brand palette for consistency */
    --oi-mint: #0d9488;
    --oi-red: #A3181E;
    --oi-font: Inter, Arial, Helvetica, sans-serif;
    --oi-stage-scale: 1;

    position: relative;
    isolation: isolate;
    width: 100%;
    height: clamp(720px, 49.05vw, 878px);
    min-height: 720px;
    overflow: hidden;
    color: var(--oi-white);
    font-family: var(--oi-font);
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.65), transparent 46%),
        radial-gradient(circle at 86% 82%, rgba(35, 32, 31, 0.06), transparent 55%),
        linear-gradient(135deg, var(--oi-bg-left) 0%, var(--oi-bg-center) 52%, var(--oi-bg-right) 100%);
}

.our-impact::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 58%, rgba(35, 32, 31, 0.05) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(35, 32, 31, 0.02));
}

.oi-container {
    position: relative;
    width: 100%;
    max-width: 1790px;
    height: 100%;
    min-height: inherit;
    margin: 0 auto;
}

.oi-copy {
    position: absolute;
    z-index: 3;
    top: 50.5%;
    left: 4.4%;
    width: 565px;
    transform: translateY(-50%);
}

.oi-eyebrow {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 27px;
    color: var(--oi-white);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.21em;
    text-transform: uppercase;
}

.oi-eyebrow__line {
    display: block;
    width: 27px;
    height: 3px;
    border-radius: 999px;
    background: var(--oi-mint);
}

.oi-heading {
    max-width: 590px;
    margin: 0;
    color: var(--oi-white);
    font-size: 55px;
    font-weight: 800;
    line-height: 1.17;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.oi-heading-rule {
    display: block;
    width: 96px;
    height: 4px;
    margin: 25px 0 29px;
    border-radius: 1px;
    background: var(--oi-red);
}

.oi-description {
    margin: 0;
    color: var(--oi-soft-white);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.92;
    letter-spacing: -0.01em;
}

.oi-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-width: 289px;
    min-height: 59px;
    margin-top: 35px;
    padding: 15px 29px 15px 33px;
    border: 1px solid rgba(35, 32, 31, 0.12);
    border-radius: 999px;
    color: #b51019;
    background: #fffefe;
    box-shadow: 0 12px 26px rgba(35, 32, 31, 0.16);
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.oi-cta svg {
    width: 18px;
    height: 18px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 180ms ease;
}

.oi-cta:hover {
    color: #8d0c14;
    box-shadow: 0 16px 34px rgba(19, 0, 4, 0.3);
    transform: translateY(-3px);
}

.oi-cta:hover svg {
    transform: translateX(4px);
}

.oi-cta:focus-visible {
    outline: 3px solid var(--oi-mint);
    outline-offset: 4px;
}

.oi-stage {
    position: absolute;
    z-index: 2;
    top: 53%;
    right: 4.25%;
    width: 1010px;
    height: 590px;
    transform: translateY(-50%) scale(var(--oi-stage-scale));
    transform-origin: right center;
}

.oi-route {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.oi-route__path,
.oi-route__drop {
    fill: none;
    stroke: var(--oi-mint);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.oi-route__endpoint circle:nth-child(1),
.oi-route__endpoint circle:nth-child(3) {
    fill: rgba(35, 32, 31, 0.5);
    stroke: var(--oi-mint);
    stroke-width: 3;
}

.oi-route__endpoint circle:nth-child(2),
.oi-route__endpoint circle:nth-child(4),
.oi-route__drop-dot circle {
    fill: var(--oi-mint);
}

.oi-route__node-outer {
    fill: rgba(255, 255, 255, 0.6);
    stroke: var(--oi-red);
    stroke-width: 3;
}

.oi-route__node-inner {
    fill: #ffffff;
    stroke: rgba(163, 24, 30, 0.6);
    stroke-width: 1;
}

.oi-route__node-core {
    fill: var(--oi-mint);
}

.oi-card {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid var(--oi-card-border);
    border-radius: 18px;
    color: var(--oi-white);
    background:
        linear-gradient(160deg, #fafaf9, #f7f6f4);
    box-shadow:
        0 18px 40px rgba(35, 32, 31, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding-bottom: 26px;
    transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.oi-card:hover {
    border-color: rgba(13, 148, 136, 0.5);
    box-shadow:
        0 24px 46px rgba(35, 32, 31, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-6px);
}

.oi-card--schools {
    top: 274px;
    left: 14px;
    width: 218px;
    min-height: 293px;
    padding-top: 23px;
}

.oi-card--students {
    top: 220px;
    left: 270px;
    width: 222px;
    min-height: 323px;
    padding-top: 31px;
}

.oi-card--programs {
    top: 164px;
    left: 522px;
    width: 210px;
    min-height: 291px;
    padding-top: 31px;
}

.oi-card--partners {
    top: 109px;
    left: 760px;
    width: 202px;
    min-height: 293px;
    padding-top: 31px;
}

.oi-icon {
    display: grid;
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    place-items: center;
    border: 2px solid rgba(13, 148, 136, 0.35);
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.10);
    box-shadow: inset 0 0 22px rgba(13, 148, 136, 0.10);
}

.oi-icon svg {
    width: 45px;
    height: 45px;
    fill: none;
    stroke: var(--oi-mint);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.oi-card__rule {
    display: block;
    width: 44px;
    height: 3px;
    margin: 15px 0 11px;
    border-radius: 1px;
    background: var(--oi-red);
}

.oi-card__number {
    color: var(--oi-white);
    font-size: 43px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
}

.oi-card__title {
    margin-top: 3px;
    color: var(--oi-soft-white);
    font-size: 34px;
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.oi-card__label {
    margin: 14px 12px 0;
    color: var(--oi-soft-white);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.32;
    text-wrap: balance;
}

.oi-card--students .oi-card__number {
    font-size: 39px;
}

.oi-card--students .oi-card__title {
    font-size: 36px;
}

.oi-card--students .oi-card__label {
    margin-top: 19px;
}

.oi-card--programs .oi-card__number,
.oi-card--partners .oi-card__number {
    font-size: 43px;
}

.oi-card--programs .oi-card__label,
.oi-card--partners .oi-card__label {
    margin-top: 19px;
}

@media (max-width: 1699px) and (min-width: 1180px) {
    .our-impact {
        --oi-stage-scale: 0.92;
    }

    .oi-copy {
        left: 4.1%;
    }
}

@media (max-width: 1560px) and (min-width: 1180px) {
    .our-impact {
        --oi-stage-scale: 0.84;
    }

    .oi-heading {
        font-size: 49px;
    }

    .oi-copy {
        width: 510px;
    }
}

@media (max-width: 1430px) and (min-width: 1180px) {
    .our-impact {
        --oi-stage-scale: 0.77;
    }

    .oi-copy {
        width: 470px;
    }

    .oi-heading {
        font-size: 45px;
    }

    .oi-description {
        font-size: 18px;
    }
}

@media (max-width: 1300px) and (min-width: 1180px) {
    .our-impact {
        --oi-stage-scale: 0.7;
    }

    .oi-copy {
        width: 435px;
    }

    .oi-heading {
        font-size: 42px;
    }

    .oi-desktop-break {
        display: none;
    }
}

/* Tablet: copy first, then a proportional 2 x 2 card composition. */
@media (max-width: 1179px) {
    .our-impact {
        height: auto;
        min-height: 0;
        padding: 92px 32px 84px;
    }

    .oi-container {
        max-width: 980px;
        height: auto;
        min-height: 0;
    }

    .oi-copy {
        position: relative;
        top: auto;
        left: auto;
        width: min(650px, 100%);
        transform: none;
    }

    .oi-heading {
        max-width: 650px;
        font-size: clamp(45px, 6vw, 58px);
    }

    .oi-stage {
        position: relative;
        top: auto;
        right: auto;
        display: grid;
        width: 100%;
        height: auto;
        margin-top: 84px;
        padding-top: 46px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
        transform: none;
    }

    .oi-stage::before {
        position: absolute;
        top: 10px;
        right: 6%;
        left: 6%;
        height: 3px;
        border-radius: 999px;
        content: "";
        background: var(--oi-mint);
    }

    .oi-stage::after {
        position: absolute;
        top: -5px;
        left: calc(50% - 16px);
        width: 32px;
        height: 32px;
        border: 3px solid var(--oi-red);
        border-radius: 50%;
        content: "";
        background: radial-gradient(circle, var(--oi-mint) 0 5px, #531119 6px 100%);
    }

    .oi-route {
        display: none;
    }

    .oi-card,
    .oi-card--schools,
    .oi-card--students,
    .oi-card--programs,
    .oi-card--partners {
        position: relative;
        inset: auto;
        width: auto;
        height: auto;
        min-height: 312px;
        padding: 28px 22px 26px;
    }

    .oi-card__label {
        white-space: normal;
    }
}

/* Mobile: the cards become a single vertical timeline. */
@media (max-width: 639px) {
    .our-impact {
        padding: 72px 20px 70px;
    }

    .oi-eyebrow {
        margin-bottom: 22px;
        font-size: 12px;
    }

    .oi-heading {
        font-size: clamp(37px, 11vw, 48px);
        line-height: 1.12;
    }

    .oi-heading-rule {
        width: 76px;
        margin: 23px 0 25px;
    }

    .oi-description {
        font-size: 17px;
        line-height: 1.7;
    }

    .oi-desktop-break {
        display: none;
    }

    .oi-cta {
        width: 100%;
        min-width: 0;
        margin-top: 30px;
        font-size: 17px;
    }

    .oi-stage {
        display: grid;
        margin-top: 68px;
        padding: 0 0 0 50px;
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .oi-stage::before {
        top: 0;
        right: auto;
        bottom: 0;
        left: 17px;
        width: 3px;
        height: auto;
    }

    .oi-stage::after {
        top: -2px;
        left: 2px;
    }

    .oi-card,
    .oi-card--schools,
    .oi-card--students,
    .oi-card--programs,
    .oi-card--partners {
        overflow: visible;
        min-height: 300px;
    }

    .oi-card::before {
        position: absolute;
        top: 54px;
        left: -39px;
        width: 39px;
        height: 3px;
        content: "";
        background: var(--oi-mint);
    }

    .oi-card::after {
        position: absolute;
        top: 45px;
        left: -46px;
        width: 19px;
        height: 19px;
        border: 3px solid var(--oi-red);
        border-radius: 50%;
        content: "";
        background: var(--oi-mint);
        box-shadow: 0 0 0 5px #531119;
    }

    .oi-icon {
        width: 90px;
        height: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oi-card,
    .oi-cta,
    .oi-cta svg {
        transition: none;
    }
}

