/* ==========================================================================
   Sparsh International School — home page v2
   Same content as before, new design. Needs site-v2.css (tokens, buttons).
   ========================================================================== */

.sx-hero,
.sx-sec { font-family: var(--sx-font); font-weight: 400; }

.sx-sec {
    padding: clamp(72px, 8vw, 120px) 0;
    color: var(--sx-text);
}

.sx-h2 {
    margin: 0;
    font-family: var(--sx-font); font-weight: 600;
    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 1.22;
    letter-spacing: -.02em;
    color: var(--sx-navy);
}

.sx-h2 span { display: block; }
.sx-h2--light { color: #fff; }

.sx-sec__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 40px;
    margin-bottom: clamp(32px, 4vw, 52px);
}

.sx-sec__foot { margin-top: clamp(32px, 4vw, 48px); }

.sx-sec a:focus-visible,
.sx-sec button:focus-visible,
.sx-hero a:focus-visible,
.sx-hero button:focus-visible {
    outline: 2px solid var(--sx-orange);
    outline-offset: 3px;
}

/* ---------- Round arrow buttons ---------- */
.sx-carousel__nav { display: flex; gap: 10px; flex: none; }

.sx-round-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(26, 72, 127, .3);
    border-radius: 50%;
    background: transparent;
    color: var(--sx-navy);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.sx-round-btn svg { width: 16px; height: 16px; fill: currentColor; }
.sx-round-btn:hover { background: var(--sx-navy); border-color: var(--sx-navy); color: #fff; }
.sx-round-btn:disabled { opacity: .3; cursor: default; background: transparent; color: var(--sx-navy); border-color: rgba(26, 72, 127, .3); }

/* ---------- Carousel track (bleeds to the right edge) ---------- */
.sx-carousel { position: relative; }

.sx-carousel__track {
    --sx-edge: max(var(--sx-gutter), calc((100% - 1280px) / 2 + var(--sx-gutter)));
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 4px var(--sx-gutter) 10px var(--sx-edge);
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--sx-edge);
    scrollbar-width: none;
}

.sx-carousel__track::-webkit-scrollbar { display: none; }
.sx-carousel__track > li { flex: 0 0 auto; scroll-snap-align: start; }
.sx-carousel__track::after { content: ""; flex: 0 0 1px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.sx-hero {
    position: relative;
    height: clamp(420px, calc(100vh - 182px), 820px);
    overflow: hidden;
    background: var(--sx-navy-900) url(../images/2025/01/Building.webp) center / cover no-repeat;
}

.sx-hero__video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 85%;
}

.sx-hero__toggle {
    position: absolute;
    right: clamp(60px, 6vw, 96px);
    bottom: 28px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    background: rgba(10, 26, 46, .45);
    cursor: pointer;
    transition: background-color .2s ease;
}

.sx-hero__toggle:hover { background: rgba(10, 26, 46, .8); }
.sx-hero__toggle svg { width: 12px; height: 12px; fill: #fff; }

.sx-hero__down {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-left: -25px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
    transition: transform .25s ease;
}

.sx-hero__down svg { width: 18px; height: 18px; fill: var(--sx-navy); }
.sx-hero__down:hover { transform: translateY(4px); }

/* ==========================================================================
   The Sparsh International School Way
   ========================================================================== */
.sx-way { background: var(--sx-paper); }

.sx-way__title { margin-bottom: clamp(40px, 5vw, 64px); }

.sx-way__body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.sx-way__list { border-bottom: 1px solid var(--sx-line); }

.sx-way__tab {
    position: relative;
    display: block;
    width: 100%;
    padding: 24px 0 24px 24px;
    border: 0;
    border-top: 1px solid var(--sx-line);
    background: none;
    text-align: left;
    font: inherit;
    color: var(--sx-muted);
    cursor: pointer;
    transition: color .2s ease;
}

.sx-way__tab::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: transparent;
    transition: background-color .2s ease;
}

.sx-way__tab:hover,
.sx-way__tab.is-active { color: var(--sx-navy); }
.sx-way__tab.is-active::before { background: var(--sx-orange); }
.sx-way__tab:focus-visible { outline-offset: -2px; }

.sx-way__name { font-family: var(--sx-font); font-weight: 500; font-size: 16.5px; line-height: 1.4; }

.sx-way__panel img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.sx-way__copy { padding-top: 26px; }

.sx-way__copy h3 {
    margin: 0 0 12px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: clamp(20px, 1.7vw, 24px);
    line-height: 1.3;
    color: var(--sx-navy);
}

.sx-way__copy p { margin: 0; max-width: 62ch; font-size: 15.5px; line-height: 1.85; color: var(--sx-text); }

@media (min-width: 901px) {
    .sx-way.sx-js .sx-way__panel { display: none; }
    .sx-way.sx-js .sx-way__panel.is-active { display: block; animation: sxFade .45s ease both; }
}

/* ==========================================================================
   01 – 04 (philosophy, leadership, legacy, mission & vision)
   ========================================================================== */
.sx-philosophy { background: #fff; }

.sx-philosophy__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sx-philosophy__card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--sx-line);
    color: inherit !important;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.sx-philosophy__card a:hover { border-color: #c8d2dd; box-shadow: 0 22px 40px -18px rgba(16, 48, 79, .22); }

.sx-philosophy__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sx-navy-900);
}

.sx-philosophy__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.sx-philosophy__card a:hover img { transform: scale(1.04); }

.sx-philosophy__media::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 55%;
    background: linear-gradient(to bottom, rgba(8, 22, 40, .5), rgba(8, 22, 40, 0));
    pointer-events: none;
}

.sx-philosophy__num {
    position: absolute;
    z-index: 1;
    left: 20px;
    top: 16px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 26px;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

.sx-philosophy__body { display: flex; flex: 1; flex-direction: column; padding: 24px 24px 26px; }

.sx-philosophy__title {
    margin-bottom: 10px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 18px;
    line-height: 1.35;
    color: var(--sx-navy);
}

.sx-philosophy__text { margin-bottom: 22px; font-size: 14px; line-height: 1.75; color: var(--sx-text); }

.sx-philosophy__view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 14px;
    color: var(--sx-blue);
}

.sx-philosophy__view svg { width: 12px; height: 12px; fill: currentColor; transition: transform .2s ease; }
.sx-philosophy__card a:hover .sx-philosophy__view svg { transform: translate(2px, -2px); }

/* ==========================================================================
   Evolve Beyond the Ordinary
   ========================================================================== */
.sx-evolve { background: var(--sx-mist); }

.sx-evolve__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.sx-evolve__media { margin: 0; }

.sx-evolve__media img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 40px 60px -40px rgba(16, 48, 79, .45);
}

.sx-evolve__text .sx-h2 { margin-bottom: 28px; }
.sx-evolve__text p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.85; color: var(--sx-text); }
.sx-evolve__text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Why Sparsh International School
   ========================================================================== */
.sx-why { background: var(--sx-navy); color: #fff; }

.sx-why__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px clamp(40px, 6vw, 96px);
    align-items: end;
    margin-bottom: clamp(48px, 5vw, 72px);
}

.sx-why__intro { margin: 0; font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.85; color: rgba(255, 255, 255, .84); }

.sx-why__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .2);
}

.sx-why__item { padding: 34px 24px 6px; border-left: 1px solid rgba(255, 255, 255, .2); }
.sx-why__item:first-child { padding-left: 0; border-left: 0; }
.sx-why__item:last-child { padding-right: 0; }

.sx-why__item img { display: block; width: 48px; height: 48px; object-fit: contain; margin-bottom: 24px; }

.sx-why__item h3 {
    margin: 0 0 12px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 17px;
    line-height: 1.35;
    color: #fff;
}

.sx-why__item p { margin: 0 0 18px; font-size: 14px; line-height: 1.8; color: rgba(255, 255, 255, .78); }

/* ==========================================================================
   High Priority Attainers
   ========================================================================== */
.sx-attainers { background: #fff; }
.sx-attainers > .sx-container > .sx-h2 { margin-bottom: clamp(36px, 4vw, 56px); }

.sx-attainers__groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 64px);
}

.sx-attainers__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sx-line);
    font-family: var(--sx-font); font-weight: 600;
    font-size: 17px;
    line-height: 1.35;
    color: var(--sx-navy);
}

.sx-attainers__title span { font-family: var(--sx-font); font-weight: 500; font-size: 13.5px; color: var(--sx-muted); }

.sx-attainers__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sx-attainers__grid li { border: 1px solid var(--sx-line); background: #fff; }
.sx-attainers__grid img { display: block; width: 100%; height: auto; }

/* ==========================================================================
   Discover — facilities (carousel)
   ========================================================================== */
.sx-discover { background: var(--sx-paper); }

.sx-discover__item { width: clamp(260px, 25vw, 330px); }
.sx-discover__item a { display: block; color: inherit !important; }

.sx-discover__item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 16px;
    background: var(--sx-line);
}

.sx-discover__name {
    display: block;
    margin-bottom: 6px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 16.5px;
    line-height: 1.4;
    color: var(--sx-navy);
    transition: color .2s ease;
}

.sx-discover__more { font-family: var(--sx-font); font-weight: 600; font-size: 14px; color: var(--sx-blue); }
.sx-discover__item a:hover .sx-discover__name { color: var(--sx-blue); }

/* ==========================================================================
   Sports Infrastructure
   ========================================================================== */
.sx-sports { background: var(--sx-navy-900); }

.sx-sports__strip {
    display: flex;
    gap: 8px;
    height: clamp(380px, 40vw, 540px);
    margin: clamp(36px, 4vw, 56px) 0 0;
    padding: 0;
    list-style: none;
}

.sx-sports__item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    background: #0b2440;
    cursor: pointer;
    outline: none;
    transition: flex-grow .6s cubic-bezier(.2, .7, .2, 1);
}

.sx-sports__item.is-open { flex-grow: 4.2; cursor: default; }
.sx-sports__item:focus-visible { box-shadow: inset 0 0 0 3px var(--sx-orange); }

.sx-sports__item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sx-sports__item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 22, 40, .8) 0%, rgba(8, 22, 40, .15) 45%, rgba(8, 22, 40, .35) 100%);
    transition: background-color .4s ease;
    pointer-events: none;
}

.sx-sports__item:not(.is-open)::after { background-color: rgba(8, 22, 40, .35); }

.sx-sports__name {
    position: absolute;
    left: 24px;
    bottom: 22px;
    z-index: 1;
    margin: 0;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 21px;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
}

.sx-sports__item:not(.is-open) .sx-sports__name {
    left: 50%;
    bottom: 24px;
    writing-mode: vertical-rl;
    transform: translateX(-50%) rotate(180deg);
    font-family: var(--sx-font); font-weight: 500;
    font-size: 14.5px;
}

/* ==========================================================================
   Latest Events (carousel)
   ========================================================================== */
.sx-events { background: #fff; }

.sx-events__item { width: clamp(260px, 25vw, 330px); }

.sx-events__item a { display: flex; flex-direction: column; height: 100%; color: inherit !important; }

.sx-events__item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    margin-bottom: 16px;
    background: var(--sx-line);
}

.sx-events__date { margin-bottom: 6px; font-size: 13.5px; color: var(--sx-muted); font-variant-numeric: tabular-nums; }

.sx-events__item h3 {
    min-height: 2.9em;
    margin: 0 0 12px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 16px;
    line-height: 1.45;
    color: var(--sx-navy);
    transition: color .2s ease;
}

.sx-events__item h3 strong { font-weight: inherit; }
.sx-events__item a:hover h3 { color: var(--sx-blue); }

.sx-events__more { font-family: var(--sx-font); font-weight: 600; font-size: 14px; color: var(--sx-blue); }

/* ==========================================================================
   Testimonials (carousel)
   ========================================================================== */
.sx-testimonials { background: var(--sx-mist); }

.sx-testimonials__item { display: flex; width: clamp(290px, 34vw, 430px); }

.sx-testimonials__item figure {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 30px 30px 26px;
    background: #fff;
    border: 1px solid #d6e3ef;
}

.sx-testimonials__stars { display: block; width: 110px; height: auto; margin-bottom: 20px; }

.sx-testimonials__item blockquote {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--sx-text);
}

.sx-testimonials__item figcaption {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--sx-line);
    font-family: var(--sx-font); font-weight: 600;
    font-size: 15px;
    color: var(--sx-navy);
}

.sx-testimonials__item figcaption span {
    display: block;
    margin-top: 2px;
    font-family: var(--sx-font); font-weight: 400;
    font-size: 13.5px;
    color: var(--sx-muted);
}

/* ==========================================================================
   Awards & Recognition, Proud Collaboration
   ========================================================================== */
.sx-awards { background: #fff; padding-bottom: clamp(48px, 5vw, 72px); }

.sx-awards__list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 24px;
    align-items: center;
    margin: clamp(32px, 4vw, 48px) 0 0;
    padding: 0;
    list-style: none;
}

.sx-awards__list img { display: block; width: 100%; max-width: 150px; height: auto; margin: 0 auto; }

.sx-collab { background: #fff; padding-top: 0; }

.sx-collab .sx-h2 {
    margin-bottom: clamp(28px, 3vw, 40px);
    padding-top: clamp(48px, 5vw, 72px);
    border-top: 1px solid var(--sx-line);
}

.sx-collab__logos {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--sx-line);
    border-left: 1px solid var(--sx-line);
}

.sx-collab__logos li {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    padding: 18px;
    border-right: 1px solid var(--sx-line);
    border-bottom: 1px solid var(--sx-line);
}

.sx-collab__logos img { display: block; width: 100%; height: 100%; max-height: 76px; object-fit: contain; }

/* ==========================================================================
   Sparsh Universe (carousel)
   ========================================================================== */
.sx-universe { background: var(--sx-paper); }

.sx-universe__item { width: clamp(170px, 15vw, 210px); padding: 10px; background: #fff; border: 1px solid var(--sx-line); }
.sx-universe__item img { display: block; width: 100%; height: auto; }

/* ---------- Motion ---------- */
@keyframes sxFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .sx-way.sx-js .sx-way__panel.is-active { animation: none; }
    .sx-sports__item,
    .sx-philosophy__media img,
    .sx-hero__down { transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .sx-philosophy__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sx-why__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
    .sx-why__item,
    .sx-why__item:first-child,
    .sx-why__item:last-child { padding: 28px 0 10px; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .2); }
    .sx-awards__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sx-collab__logos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1139px) {
    .sx-hero { height: clamp(360px, calc(100vh - 114px), 720px); }
}

@media (max-width: 900px) {
    .sx-way__body,
    .sx-evolve__grid,
    .sx-why__head,
    .sx-attainers__groups { grid-template-columns: minmax(0, 1fr); }

    /* The Sparsh Way: swipe through all five */
    .sx-way__list { display: none; }
    .sx-way__body { margin-right: calc(-1 * var(--sx-gutter)); }
    .sx-way__panels {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-right: var(--sx-gutter);
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .sx-way__panels::-webkit-scrollbar { display: none; }
    .sx-way__panel { flex: 0 0 84%; scroll-snap-align: start; }
    .sx-way__copy { padding-top: 20px; }
    .sx-way__copy p { font-size: 16px; line-height: 1.7; }

    .sx-evolve__media { order: 2; }

    /* Sports: swipe row */
    .sx-sports__strip {
        height: auto;
        margin-right: calc(-1 * var(--sx-gutter));
        padding-right: var(--sx-gutter);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .sx-sports__strip::-webkit-scrollbar { display: none; }
    .sx-sports__item,
    .sx-sports__item.is-open { flex: 0 0 72%; height: 380px; scroll-snap-align: start; }
    .sx-sports__item:not(.is-open)::after { background-color: transparent; }
    .sx-sports__item:not(.is-open) .sx-sports__name {
        left: 20px;
        bottom: 20px;
        writing-mode: horizontal-tb;
        transform: none;
        font-family: var(--sx-font); font-weight: 600;
        font-size: 19px;
    }
    .sx-sports__name { left: 20px; bottom: 20px; font-size: 19px; }

    .sx-sec__head { align-items: flex-end; }
}

@media (max-width: 759px) {
    .sx-hero { height: auto; aspect-ratio: 16 / 9; }
    .sx-hero__down { width: 40px; height: 40px; margin-left: -20px; bottom: 14px; }
    .sx-hero__toggle { width: 36px; height: 36px; bottom: 16px; right: 16px; }
    .sx-carousel__nav { display: none; }
}

@media (max-width: 560px) {
    .sx-philosophy__grid { grid-template-columns: minmax(0, 1fr); }
    .sx-why__list { grid-template-columns: minmax(0, 1fr); }
    .sx-attainers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sx-awards__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .sx-collab__logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sx-discover__item,
    .sx-events__item { width: 78vw; }
    .sx-testimonials__item { width: 84vw; }
    .sx-universe__item { width: 44vw; }
}
