/* Homepage sections (BEM). Visual polish comes with full Invento page CSS in stage 5. */

.home-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Shared simple slider */
.js-home-slider {
    position: relative;
}

.home-slider__dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.home-slider__dot {
    width: 0.65rem;
    height: 0.65rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--bs-link-color, #00828e);
    background: transparent;
    cursor: pointer;
}

.home-slider__dot--active {
    background: var(--bs-link-color, #00828e);
}

.home-slider__btn {
    border: 1px solid var(--bs-border-color, #cfd4d9);
    background: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

/* 1. Main banner — block-width (aligned to header container), flush with header */
.home-main-banner {
    width: 100%;
    padding: 0;
}

.home-main-banner__track {
    position: relative;
    width: 100%;
    min-height: clamp(360px, 56vh, 560px);
    border-radius: var(--content-border-radius, 20px);
    overflow: hidden;
}

.home-main-banner__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
}

.home-main-banner__slide--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.home-main-banner__media {
    position: absolute;
    inset: 0;
}

.home-main-banner__media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.home-main-banner__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.home-main-banner__loop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.home-main-banner__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    /* Soft left gradient keeps white text legible over bright photos */
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0) 65%);
    color: #fff;
}

.home-main-banner__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 34rem;
    width: 100%;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 4rem);
}

.home-main-banner__title {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4.5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.home-main-banner__subtitle {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 500;
    line-height: 1.5;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.home-main-banner__btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 1.5rem;
    padding: 0.85rem 2rem;
    background: #fff;
    color: var(--text-primary, #474849);
    font: inherit;
    font-weight: 600;
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.home-main-banner__btn:hover {
    background: var(--bs-link-color, #00828e);
    color: #fff;
    transform: translateY(-2px);
}

.home-banner-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.home-banner-modal[hidden] {
    display: none;
}

.home-banner-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.home-banner-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
}

.home-banner-modal__embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.home-banner-modal__embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.home-banner-modal__close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* Navigation arrows sit below the banner, right-aligned (matches reference) */
.home-main-banner__nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.home-main-banner__arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--bs-link-color, #00828e);
    background: transparent;
    color: var(--bs-link-color, #00828e);
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.home-main-banner__arrow:hover {
    background: var(--bs-link-color, #00828e);
    color: #fff;
}

@media (max-width: 767px) {
    .home-main-banner__track {
        min-height: 380px;
    }

    .home-main-banner__content {
        max-width: 100%;
    }
}

/* Preview only (?preview_banner=1).
   One object, not a stack: the copy card overlaps the frame,
   and the button shares a row with the slide arrows. */
@media (max-width: 767.98px) {
    .home-main-banner--preview .container {
        display: grid;
    }

    .home-main-banner--preview .home-main-banner__track,
    .home-main-banner--preview .home-main-banner__nav {
        grid-area: 1 / 1;
    }

    .home-main-banner--preview .home-main-banner__track {
        min-height: 0;
        overflow: visible;
        border-radius: 0;
    }

    .home-main-banner--preview .home-main-banner__slide--active {
        position: relative;
        inset: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: visible;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .home-main-banner--preview .home-main-banner__media {
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 22px;
        overflow: hidden;
        background: #10262a;
    }

    .home-main-banner--preview .home-main-banner__bg,
    .home-main-banner--preview .home-main-banner__loop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #10262a;
    }

    /* Wide stills letterbox inside the 16/9 frame; fill the frame instead. */
    .home-main-banner--preview .home-main-banner__bg {
        object-fit: cover;
        object-position: center;
    }

    .home-main-banner--preview .home-main-banner__overlay {
        position: relative;
        z-index: 2;
        inset: auto;
        display: block;
        margin: -32px 8px 0;
        padding: 16px 16px 14px;
        background: #fff;
        color: #1d3336;
        border-radius: 18px;
        box-shadow: 0 14px 32px rgba(16, 42, 46, 0.16);
    }

    .home-main-banner--preview .home-main-banner__overlay::before {
        content: "";
        display: block;
        width: 40px;
        height: 3px;
        margin: 0 0 12px;
        border-radius: 99px;
        background: linear-gradient(90deg, #00828e, #7e2f3d);
    }

    .home-main-banner--preview .home-main-banner__content {
        max-width: none;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
    }

    .home-main-banner--preview .home-main-banner__title {
        margin: 0 0 8px;
        font-size: 1.2rem;
        line-height: 1.15;
        letter-spacing: 0.01em;
        color: #16383c;
        text-shadow: none;
    }

    .home-main-banner--preview .home-main-banner__subtitle {
        margin: 0;
        max-width: 34ch;
        color: #3f4a4d;
        font-size: 0.95rem;
        line-height: 1.45;
        text-shadow: none;
    }

    .home-main-banner--preview .home-main-banner__btn {
        align-self: flex-start;
        margin-top: 16px;
        min-height: 44px;
        padding: 0.65rem 1.15rem;
        white-space: nowrap;
        background: #00828e;
        color: #fff;
        box-shadow: none;
    }

    .home-main-banner--preview .home-main-banner__btn:hover,
    .home-main-banner--preview .home-main-banner__btn:focus-visible {
        background: #7e2f3d;
        color: #fff;
    }

    .home-main-banner--preview .home-main-banner__btn:focus-visible,
    .home-main-banner--preview .home-main-banner__arrow:focus-visible {
        outline: 2px solid #16383c;
        outline-offset: 3px;
    }

    .home-main-banner--preview .home-main-banner__nav {
        align-self: end;
        justify-self: end;
        z-index: 3;
        margin: 0 22px 16px 0;
    }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
    .home-main-banner--preview .home-main-banner__loop {
        display: none;
    }
}

/* 2. About — matches invento.uz (photo slider + overlays + stats) */
.home-about {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.home-about__grid {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}

/* Mobile: text above photo. Desktop: photo left, text right. */
.home-about__media {
    position: relative;
    order: 1;
}

.home-about__body {
    order: 0;
}

@media (min-width: 768px) {
    .home-about__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 2.5rem;
        align-items: center;
    }

    .home-about__media {
        order: 0;
    }

    .home-about__body {
        order: 1;
    }
}

.home-about__slider {
    position: relative;
    border-radius: var(--content-border-radius, 20px);
}

@media (min-width: 768px) {
    .home-about__slider {
        padding-top: 42px;
    }
}

@media (min-width: 1200px) {
    .home-about__slider {
        padding-top: 11px;
        max-width: calc(100% - 48px);
    }
}

.home-about__slide {
    display: none;
}

.home-about__slide--active {
    display: block;
}

.home-about__image-wrap {
    display: block;
    text-align: center;
}

@media (min-width: 768px) {
    .home-about__image-wrap {
        padding: 30px;
    }
}

.home-about__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--content-border-radius, 20px);
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.home-about__highlights {
    display: none;
}

@media (min-width: 768px) {
    .home-about__highlights {
        display: block;
    }
}

.home-about__highlight {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px 18px 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 2px 18px rgba(171, 160, 160, 0.15);
    max-width: calc(100% - 24px);
}

.home-about__highlight--1 {
    top: 0;
    left: 0;
}

.home-about__highlight--2 {
    right: 0;
    bottom: 85px;
}

.home-about__highlight-icon {
    display: block;
    width: auto;
    height: 66px;
    max-width: 166px;
    object-fit: contain;
    flex-shrink: 0;
}

.home-about__highlight-text {
    max-width: 146px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--text-primary, #474849);
}

.home-about__highlight-text b {
    font-weight: 700;
}

.home-about__controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 16px auto 0;
    height: 44px;
    user-select: none;
}

@media (min-width: 768px) {
    .home-about__controls {
        justify-content: flex-end;
        margin-right: 0;
    }
}

.home-about__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--bs-link-color, #00828E);
    background: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.home-about__nav img {
    width: 20px;
    height: 20px;
    display: block;
    /* teal chevrons — invento uses CSS filter; keep icons as-is */
}

.home-about__nav:hover {
    background: var(--bs-link-hover-color, #006d76);
    border-color: var(--bs-link-hover-color, #006d76);
}

.home-about__nav:hover img {
    filter: brightness(0) invert(1);
}

@media (min-width: 768px) {
    .home-about__nav {
        width: 48px;
        height: 48px;
    }
}

.home-about__heading {
    margin: 0 0 1.25rem;
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary, #474849);
}

.home-about__text {
    color: var(--text-primary, #474849);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.home-about__text p {
    margin: 0 0 1rem;
}

.home-about__text p:last-child {
    margin-bottom: 0;
}

/* Stats / counters row — invento infographics */
.home-about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-top: 0.5rem;
}

.home-about__stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: rgba(71, 72, 73, 0.5);
    font-size: 12px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .home-about__stat {
        font-size: 16px;
    }
}

.home-about__stat-number {
    font-size: 52px;
    font-weight: 700;
    line-height: 100%;
    display: inline-block;
    background: linear-gradient(281deg, #892436 11.88%, #02AABA 84.86%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 0.35rem;
}

@media (min-width: 768px) {
    .home-about__stat-number {
        font-size: 68px;
        margin-bottom: 0.5rem;
    }
}

.home-about__stat-label {
    margin-top: 0;
    font-size: inherit;
    line-height: 1.3;
    color: inherit;
    font-weight: inherit;
}

@media (max-width: 767px) {
    .home-about__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 0.25rem;
    }

    .home-about__stat {
        font-size: 10px;
        min-width: 0;
    }

    .home-about__stat:last-child {
        grid-column: auto;
    }

    .home-about__stat-number {
        font-size: 28px;
        margin-bottom: 0.2rem;
    }

    .home-about__stat-label {
        line-height: 1.2;
    }
}

/* 3. Campuses */
.home-campuses {
    padding: 3rem 0;
}

.home-campuses__heading {
    margin: 0 0 1.75rem;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    color: var(--text-primary, #474849);
}

.home-campuses__grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .home-campuses__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.home-campuses__card {
    --campus-pattern-size: auto;
    --campus-pattern-pos: 50px 127px;
    position: relative;
    display: block;
    height: 260px;
    border-radius: var(--content-border-radius, 20px);
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
    background-color: transparent;
    background-image: var(--campus-bg-image), var(--campus-bg);
    background-size: var(--campus-pattern-size), auto;
    background-position: var(--campus-pattern-pos), 0 0;
    background-repeat: no-repeat, no-repeat;
}

@media (min-width: 1200px) {
    .home-campuses__card {
        height: 300px;
    }
}

.home-campuses__card--tashkent {
    --campus-bg: linear-gradient(55deg, #00828e 0%, #015d66 100%);
    --campus-bg-image: url("../img/campus-flower-rotated_min.17985a28ebfe.svg");
    --campus-pattern-size: 148px;
    --campus-pattern-pos: 52px 88px;
}

.home-campuses__card--ashgabat {
    --campus-bg: linear-gradient(55deg, #7e2f3d 0%, #691726 100%);
    --campus-bg-image: url("../img/campus-star-rotated_min.6301aac6780a.svg");
    /* Star is larger than the flower — shift like invento default (50px 127px) */
    --campus-pattern-size: 180px;
    --campus-pattern-pos: 36px 70px;
}

/* Building photo cutout — invento.uz ellipse sizes */
.home-campuses__img {
    position: absolute;
    right: -130px;
    bottom: 0;
    z-index: 0;
    clip-path: ellipse(150px 150px at 57% 81%);
    pointer-events: none;
}

@media (min-width: 346px) {
    .home-campuses__img {
        clip-path: ellipse(170px 170px at 57% 81%);
        right: -150px;
    }
}

@media (min-width: 376px) {
    .home-campuses__img {
        right: -120px;
    }
}

@media (min-width: 426px) {
    .home-campuses__img {
        right: -70px;
    }
}

@media (min-width: 476px) {
    .home-campuses__img {
        right: -20px;
    }
}

@media (min-width: 576px) {
    .home-campuses__img {
        right: -13px;
    }
}

@media (min-width: 768px) {
    .home-campuses__img {
        clip-path: ellipse(268px 229px at 54% 99%);
    }
}

@media (min-width: 992px) {
    .home-campuses__img {
        clip-path: ellipse(170px 170px at 57% 81%);
    }
}

@media (min-width: 1200px) {
    .home-campuses__img {
        clip-path: ellipse(295px 275px at 65% 99%);
        right: -80px;
    }
}

@media (min-width: 1400px) {
    .home-campuses__img {
        right: -13px;
    }
}

.home-campuses__img img {
    display: block;
    width: auto;
    height: 185px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

@media (min-width: 346px) {
    .home-campuses__img img {
        height: 215px;
    }
}

@media (min-width: 768px) {
    .home-campuses__img img {
        height: 235px;
        width: 505px;
    }
}

@media (min-width: 992px) {
    .home-campuses__img img {
        height: 215px;
        width: auto;
    }
}

@media (min-width: 1200px) {
    .home-campuses__img img {
        width: 460px;
        height: 280px;
    }
}

@media (min-width: 1400px) {
    .home-campuses__img img {
        width: 470px;
        height: 280px;
    }
}

.home-campuses__card:hover .home-campuses__img img {
    transform: scale(1.1);
}

.home-campuses__card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-width: 213px;
    padding: 24px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .home-campuses__card-inner {
        padding: 33px;
    }
}

@media (min-width: 1200px) {
    .home-campuses__card-inner {
        padding: 40px;
    }
}

.home-campuses__card-title {
    margin: 0 40px 0 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 130%;
    transition: color 0.2s ease;
}

@media (min-width: 1200px) {
    .home-campuses__card-title {
        font-size: 28px;
    }
}

.home-campuses__card:hover .home-campuses__card-title {
    color: var(--orange, #ff9900);
}

.home-campuses__card-age {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 130%;
}

.home-campuses__card-age b {
    display: block;
    font-size: 54px;
    font-weight: 700;
    line-height: 100%;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .home-campuses__card-age b {
        margin-bottom: 12px;
    }
}

@media (min-width: 1200px) {
    .home-campuses__card-age b {
        font-size: 70px;
        margin-bottom: 16px;
    }
}

.home-campuses__card-age-unit {
    display: block;
    font-size: 22px;
    font-weight: 700;
    margin-top: 0;
}

/* 4. Programs */
.home-programs {
    padding: 4rem 0;
}

.home-programs__header {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .home-programs__header {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 3rem;
    }
}

.home-programs__heading {
    margin: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary, #474849);
}

.home-programs__intro {
    color: var(--text-primary, #474849);
    line-height: 1.6;
}

.home-programs__cards {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 576px) {
    .home-programs__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .home-programs__cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.home-programs__wrapper {
    position: relative;
}

.home-programs__card {
    display: block;
    height: 100%;
    min-height: 240px;
    border-radius: var(--content-border-radius, 20px);
    background-color: var(--bg-secondary, #f2f9f9);
    background-image: var(--bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s ease;
}

/* The inner light layer hides the photo until hover reveals it */
.home-programs__inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    height: 100%;
    min-height: 240px;
    padding: 3.25rem 1.5rem 1.5rem;
    border-radius: var(--content-border-radius, 20px);
    background-color: var(--bg-secondary, #f2f9f9);
    transition: background-color 0.3s ease;
}

@media (hover: hover) {
    .home-programs__card:hover {
        transform: translateY(-4px);
    }

    .home-programs__card:hover .home-programs__inner {
        background-color: rgba(0, 0, 0, 0.35);
    }

    .home-programs__card:hover .home-programs__card-title {
        color: #fff;
    }

    .home-programs__card:hover .home-programs__card-age-num {
        -webkit-text-fill-color: #fff;
        color: #fff;
    }

    .home-programs__card:hover .home-programs__card-age-unit {
        -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
        color: rgba(255, 255, 255, 0.85);
    }

    .home-programs__card:hover + .home-programs__tag {
        color: #fff;
        border-color: #fff;
        background: transparent;
    }
}

.home-programs__tag {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    padding: 0.3rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: #fff;
    pointer-events: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-programs__tag--tashkent {
    color: #00828e;
}

.home-programs__tag--ashgabat {
    color: #7e2f3d;
}

.home-programs__card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary, #474849);
    transition: color 0.2s ease;
}

.home-programs__card-age {
    margin: auto 0 0;
    line-height: 1;
}

.home-programs__card-age-num {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(60deg, #892436 10%, #02aaba 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transition: color 0.2s ease;
}

.home-programs__card-age-unit {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #959aa6);
}

@media (max-width: 767.98px) {
    .home-campuses__card {
        width: calc(100% - 28px);
        margin-inline: auto;
        height: 188px;
    }

    .home-campuses__card-inner {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 8px;
        max-width: 68%;
        height: auto;
        padding: 16px 14px;
    }

    .home-campuses__card-title {
        margin: 0;
        flex: 1 1 auto;
        min-width: 0;
        font-size: 16px;
        line-height: 1.25;
    }

    .home-campuses__card-age {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        gap: 0.28em;
        margin: 2px 0 0;
        white-space: nowrap;
        font-size: 14px;
        line-height: 1.2;
    }

    .home-campuses__card-age b {
        display: inline;
        font-size: 16px;
        line-height: 1.2;
        margin: 0;
    }

    .home-campuses__card-age-unit {
        display: inline;
        font-size: 14px;
        font-weight: 600;
    }

    .home-programs__cards {
        gap: 0.85rem;
    }

    .home-programs__card,
    .home-programs__inner {
        min-height: 148px;
    }

    .home-programs__inner {
        justify-content: flex-start;
        gap: 0.45rem;
        padding: 2.55rem 1rem 0.85rem;
        background-color: rgba(0, 0, 0, 0.4);
    }

    .home-programs__card-title {
        font-size: 0.95rem;
        color: #fff;
    }

    .home-programs__card-age {
        margin: 0;
    }

    .home-programs__card-age-num {
        font-size: 1.55rem;
        background: none;
        -webkit-text-fill-color: #fff;
        color: #fff;
    }

    .home-programs__card-age-unit {
        margin-top: 0.15rem;
        -webkit-text-fill-color: rgba(255, 255, 255, 0.88);
        color: rgba(255, 255, 255, 0.88);
    }

    .home-programs__tag {
        top: 0.75rem;
        left: 0.85rem;
        color: #fff;
        border-color: #fff;
        background: transparent;
    }
}

/* 5. How to apply */
.home-how-to-apply {
    padding: 3rem 0;
}

.home-how-to-apply__heading {
    margin: 0 0 1.5rem;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    color: var(--text-primary, #474849);
}

.home-how-to-apply__steps {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .home-how-to-apply__steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.home-how-to-apply__step {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 150px;
    padding: 1.75rem;
    border-radius: var(--content-border-radius, 20px);
    background: linear-gradient(135deg, #00a5b5 0%, #00727d 100%);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-how-to-apply__step:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 130, 142, 0.28);
}

.home-how-to-apply__step-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.home-how-to-apply__step-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}

/* 6. Main quote */
.home-main-quote {
    padding: 3rem 0 4rem;
}

.home-main-quote__inner {
    max-width: 60rem;
    margin: 0 auto;
    text-align: center;
}

.home-main-quote__mark {
    display: block;
    font-size: 5rem;
    line-height: 0.6;
    font-weight: 800;
    color: var(--orange, #ff9900);
}

.home-main-quote__heading {
    margin: 0 0 1.25rem;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(90deg, #00828e 0%, #7e2f3d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.home-main-quote__text {
    max-width: 46rem;
    margin: 0 auto 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #474849);
    line-height: 1.5;
}

.home-main-quote__author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: left;
}

.home-main-quote__author-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.home-main-quote__author-meta {
    display: flex;
    flex-direction: column;
}

.home-main-quote__author-name {
    font-weight: 700;
    color: var(--text-primary, #474849);
}

.home-main-quote__author-title {
    font-size: 0.9rem;
    color: var(--text-secondary, #959aa6);
}

/* 7. Advantages */
.home-advantages {
    padding: 2rem 0 4rem;
}

.home-advantages__panel {
    background: var(--bg-secondary, #f2f9f9);
    border-radius: var(--content-border-radius, 20px);
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.home-advantages__heading {
    margin: 0 0 2rem;
    font-size: clamp(1.6rem, 2.8vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary, #474849);
}

.home-advantages__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-advantages__row {
    display: grid;
    gap: 0;
    align-items: stretch;
    background: #fff;
    border-radius: var(--content-border-radius, 20px);
    overflow: hidden;
}

@media (min-width: 768px) {
    .home-advantages__row {
        grid-template-columns: 1fr 1fr;
    }

    /* Default row: text left, photo right.
       Reverse row: photo left, text right. */
    .home-advantages__row--reverse .home-advantages__media {
        order: 1;
    }

    .home-advantages__row--reverse .home-advantages__content {
        order: 2;
    }
}

.home-advantages__content {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    align-self: center;
}

.home-advantages__media {
    min-height: 240px;
    padding: clamp(1rem, 1.6vw, 1.5rem);
}

.home-advantages__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--content-border-radius, 20px);
}

.home-advantages__title {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #474849);
}

.home-advantages__content .rich-text {
    color: var(--text-primary, #474849);
    line-height: 1.6;
}

/* Mobile: compact swipeable cards (not full-viewport tall) */
@media (max-width: 767px) {
    .home-advantages {
        padding: 1.25rem 0 2rem;
    }

    .home-advantages__panel {
        padding: 1.1rem 0.9rem 1.15rem;
        border-radius: 16px;
    }

    .home-advantages__heading {
        margin: 0 0 0.9rem;
        font-size: 1.2rem;
        line-height: 1.25;
    }

    .home-advantages__list {
        flex-direction: row;
        gap: 0.75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        scrollbar-width: none;
        /* peek of next card without stretching height */
        margin-inline: -0.15rem;
        padding-inline: 0.15rem;
    }

    .home-advantages__list::-webkit-scrollbar {
        display: none;
    }

    .home-advantages__row {
        flex: 0 0 min(82vw, 300px);
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        border-radius: 16px;
    }

    .home-advantages__media {
        order: -1;
        min-height: 0;
        height: 132px;
        padding: 0.55rem 0.55rem 0;
        flex-shrink: 0;
    }

    .home-advantages__image {
        height: 100%;
        border-radius: 12px;
    }

    .home-advantages__content {
        padding: 0.7rem 0.85rem 0.9rem;
        align-self: stretch;
    }

    .home-advantages__title {
        margin: 0 0 0.35rem;
        font-size: 1rem;
        line-height: 1.25;
    }

    .home-advantages__content .rich-text {
        font-size: 13px;
        line-height: 1.45;
    }

    .home-advantages__content .rich-text p {
        margin: 0;
    }
}
