/*
 * Inner pages (about, gallery, album, contact, admission, policies) of the website templates.
 * One stylesheet for all templates: colours come from the design tokens every template defines
 * (and the school's brand colours override), fonts are inherited from the template.
 */
:root {
    --sp-primary: var(--Colours-Shades-Primary-P---500, #22577a);
    --sp-primary-hover: var(--Colours-Shades-Primary-P---600, #1b4662);
    --sp-tint: var(--Colours-Shades-Primary-P---50, #f2f5f7);
    --sp-accent: var(--green, #4caf7d);
    --sp-text: var(--text-body, #4a6381);
    --sp-heading: var(--text-dark, #16365c);
    --sp-border: #e3e8ee;
}

/* ---------- Title band ---------- */
.sp-banner {
    background: var(--sp-primary);
    color: #fff;
    padding: 56px 0;
}
.sp-banner__inner { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sp-banner__title { color: #fff; font-size: clamp(28px, 4vw, 44px); font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.sp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; color: rgba(255, 255, 255, .85); }
.sp-crumbs a { color: #fff; text-decoration: none; }
.sp-crumbs a:hover { text-decoration: underline; }
.sp-crumbs__sep { opacity: .6; }

/* ---------- Sections ---------- */
.sp-section { padding: 72px 0; background: #fff; color: var(--sp-text); }
.sp-section--tint { background: var(--sp-tint); }
.sp-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.sp-tag {
    display: inline-block; padding: 6px 14px; margin-bottom: 14px; border-radius: 999px;
    background: var(--sp-tint); color: var(--sp-primary); font-size: 14px; font-weight: 500;
}
.sp-title { color: var(--sp-heading); font-size: clamp(24px, 3vw, 36px); font-weight: 600; margin: 0 0 14px; overflow-wrap: anywhere; }
.sp-title--sm { font-size: 24px; }
.sp-text { font-size: 16px; line-height: 1.7; margin: 0 0 16px; white-space: pre-line; }
.sp-lead { max-width: 760px; margin: 0 auto 32px; text-align: center; font-size: 17px; line-height: 1.7; white-space: pre-line; }
.sp-empty { text-align: center; padding: 48px 0; font-size: 17px; }

/* ---------- Image + text ---------- */
.sp-split { display: flex; align-items: center; gap: 48px; }
.sp-split--reverse { flex-direction: row; }
.sp-split__media, .sp-split__body { flex: 1 1 0; min-width: 0; }
.sp-split__media img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 20px; display: block; }
.sp-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.sp-points li { position: relative; padding-left: 28px; color: var(--sp-heading); font-weight: 500; }
.sp-points li::before {
    content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--sp-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Teachers slider ---------- */
.sp-slider { position: relative; }
.sp-slider__track {
    display: flex; gap: 24px; overflow-x: auto; padding: 4px 2px 16px; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sp-slider__track::-webkit-scrollbar { display: none; }
.sp-slider__track:focus-visible { outline: 2px solid var(--sp-primary); outline-offset: 4px; }
.sp-slider__track > .sp-person { flex: 0 0 calc((100% - 24px * 4) / 5); scroll-snap-align: start; min-width: 0; }
.sp-slider__controls { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.sp-slider__btn {
    display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
    background: var(--sp-primary); color: #fff; cursor: pointer; transition: background .2s ease, opacity .2s ease;
}
.sp-slider__btn svg { width: 28px; height: 28px; fill: currentColor; }
.sp-slider__btn:hover:not(:disabled) { background: var(--sp-primary-hover); }
.sp-slider__btn:disabled { opacity: .35; cursor: default; }
[dir="rtl"] .sp-slider__btn svg { transform: scaleX(-1); }
.sp-person { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--sp-border); border-radius: 16px; text-align: center; background: #fff; }
.sp-person img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--sp-tint); margin-bottom: 10px; }
.sp-person__name { color: var(--sp-heading); font-weight: 600; overflow-wrap: anywhere; }
.sp-person__role { font-size: 14px; overflow-wrap: anywhere; }
.sp-person { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.sp-person img { transition: transform .4s ease; }
/* the slider track clips what leaves it: the lift stays inside its 4px top padding */
@media (hover: hover) and (pointer: fine) {
    .sp-person:hover { transform: translateY(-4px); border-color: var(--sp-primary); box-shadow: 0 8px 18px rgba(22, 54, 92, .12); }
    .sp-person:hover img { transform: scale(1.04); }
}

/* ---------- Gallery: albums ---------- */
.sp-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.sp-album { display: flex; flex-direction: column; border: 1px solid var(--sp-border); border-radius: 16px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.sp-album:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(22, 54, 92, .12); }
.sp-album__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sp-tint); }
.sp-album__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.sp-album:hover .sp-album__media img { transform: scale(1.05); }
.sp-album__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.sp-album__name { color: var(--sp-heading); font-weight: 600; font-size: 18px; overflow-wrap: anywhere; }
.sp-album__meta { font-size: 14px; }

/* ---------- Gallery: album tabs and media ---------- */
.sp-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; border-bottom: 2px solid var(--sp-border); list-style: none; }
.sp-tabs .nav-link { margin-bottom: -2px; padding: 12px 26px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--sp-text); font-weight: 600; }
.sp-tabs .nav-link:hover { color: var(--sp-primary); }
.sp-tabs .nav-link.active { color: var(--sp-primary); border-bottom-color: var(--sp-primary); background: none; }
.sp-tabs__count { display: inline-block; min-width: 24px; padding: 1px 8px; margin-left: 6px; border-radius: 999px; background: var(--sp-tint); font-size: 13px; text-align: center; }

.sp-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.sp-media__item { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: var(--sp-tint); cursor: zoom-in; }
.sp-media__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.sp-media__item:hover img { transform: scale(1.05); }
.sp-media__item--video { cursor: pointer; }
.sp-media__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25); transition: background .2s ease; }
.sp-media__play::after {
    content: ""; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .92)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316365c'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 28px no-repeat;
}
.sp-media__item:hover .sp-media__play { background: rgba(0, 0, 0, .4); }

.sp-lightbox .modal-content { background: #000; border: 0; border-radius: 12px; overflow: hidden; }
.sp-lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; background-color: #fff; opacity: 1; padding: 8px; border-radius: 50%; }
.sp-lightbox__body { display: grid; place-items: center; min-height: 200px; }
.sp-lightbox__image { max-width: 100%; max-height: 85vh; display: block; }
.sp-lightbox__frame { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }

/* ---------- Forms ---------- */
.sp-card { padding: 32px; margin-bottom: 28px; border: 1px solid var(--sp-border); border-radius: 18px; background: #fff; }
.sp-card__title { color: var(--sp-heading); font-size: 22px; font-weight: 600; margin: 0 0 24px; }
.sp-label { display: block; margin-bottom: 6px; color: var(--sp-heading); font-size: 15px; font-weight: 500; }
.sp-req { color: #d93025; }
.sp-input {
    width: 100%; padding: 11px 14px; border: 1px solid #ced4da; border-radius: 10px; background: #fff; color: var(--sp-heading);
    font: inherit; font-size: 15px; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.sp-input:focus { border-color: var(--sp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-primary) 15%, transparent); }
.sp-input.error, .sp-input.is-invalid { border-color: #d93025; }
.sp-form label.error { color: #d93025; font-size: 13px; margin-top: 4px; }
.sp-phone { display: flex; gap: 8px; }
.sp-phone select { flex: 0 0 110px; width: 110px; }
.sp-choices { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 8px; }
.sp-choices label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.sp-photo { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sp-photo img { width: 100%; max-width: 260px; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--sp-tint); }
.sp-actions { display: flex; justify-content: flex-end; gap: 12px; }
.sp-map iframe { width: 100%; min-height: 380px; border: 0; border-radius: 16px; }

.sp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border: 2px solid var(--sp-primary);
    border-radius: 999px; background: var(--sp-primary); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.sp-btn:hover { background: var(--sp-primary-hover); border-color: var(--sp-primary-hover); color: #fff; transform: translateY(-1px); }
.sp-btn--ghost { background: transparent; color: var(--sp-primary); }
.sp-btn--ghost:hover { background: var(--sp-primary); color: #fff; }

/* ---------- Admission stepper ---------- */
.sp-stepper { display: flex; gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; counter-reset: none; }
.sp-stepper__item {
    position: relative; flex: 1 1 0; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 18px;
    border: 1px solid var(--sp-border); border-radius: 14px; background: #fff; color: var(--sp-text); cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.sp-stepper__num {
    flex: 0 0 34px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--sp-tint); color: var(--sp-primary); font-weight: 600;
}
.sp-stepper__label { font-weight: 500; overflow-wrap: anywhere; }
.sp-stepper__item.is-active { border-color: var(--sp-primary); background: var(--sp-tint); color: var(--sp-heading); }
.sp-stepper__item.is-active .sp-stepper__num { background: var(--sp-primary); color: #fff; }
.sp-stepper__item.is-done .sp-stepper__num { background: var(--sp-accent); color: #fff; font-size: 0; }
.sp-stepper__item.is-done .sp-stepper__num::after { content: "\2713"; font-size: 16px; }
.sp-stepper__item:focus-visible { outline: 2px solid var(--sp-primary); outline-offset: 2px; }
.sp-photo.is-invalid { outline: 2px solid #d93025; outline-offset: 6px; border-radius: 16px; }
.sp-actions [data-step-prev] { margin-inline-end: auto; }

/* ---------- Policy text ---------- */
.sp-prose { max-width: 900px; margin: 0 auto; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.sp-prose h1, .sp-prose h2, .sp-prose h3, .sp-prose h4 { color: var(--sp-heading); margin: 28px 0 12px; }
.sp-prose ul, .sp-prose ol { list-style: revert; padding-left: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .sp-slider__track > .sp-person { flex-basis: calc((100% - 24px * 3) / 4); }
}
@media (max-width: 991px) {
    .sp-slider__track > .sp-person { flex-basis: calc((100% - 24px * 2) / 3); }
    .sp-section { padding: 48px 0; }
    .sp-split, .sp-split--reverse { flex-direction: column; gap: 28px; }
    .sp-split--reverse .sp-split__media { order: -1; }
    .sp-split__media { width: 100%; }
    .sp-card { padding: 22px; }
}
@media (max-width: 767px) {
    .sp-slider__track > .sp-person { flex-basis: calc((100% - 24px) / 2); }
    .sp-stepper__label { display: none; }
    .sp-stepper__item.is-active .sp-stepper__label { display: block; }
    .sp-stepper__item { padding: 10px 12px; flex: 0 1 auto; }
    .sp-stepper__item.is-active { flex: 1 1 0; }
}
@media (max-width: 575px) {
    .sp-slider__track > .sp-person { flex-basis: 78%; }
    .sp-banner { padding: 40px 0; }
    .sp-points { grid-template-columns: 1fr; }
    .sp-phone select { flex-basis: 96px; width: 96px; }
    .sp-actions { flex-wrap: wrap; }
    .sp-actions .sp-btn { flex: 1 1 40%; }
}
