/* ==========================================================================
   Sparsh International School — site v2
   Header, footer and shared building blocks (loaded on every page).
   Brand: navy #1a487f · blue #248bca · orange #df6926
   ========================================================================== */

:root {
    --sx-navy: #1a487f;
    --sx-navy-900: #10304f;
    --sx-blue: #248bca;
    --sx-orange: #df6926;
    --sx-orange-700: #c2561a;
    --sx-ink: #13263f;
    --sx-text: #3b4a5e;
    --sx-muted: #66758a;
    --sx-line: #dde2e8;
    --sx-paper: #f6f3ee;
    --sx-mist: #eaf2f9;

    --sx-font: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --sx-gutter: clamp(20px, 4vw, 48px);
}

.sx-container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: var(--sx-gutter);
    padding-right: var(--sx-gutter);
}

.sx-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

html.sx-lock,
html.sx-lock body { overflow: hidden; }

/* ---------- Buttons & links ---------- */
.sx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.sx-btn--primary { background: var(--sx-orange); color: #fff !important; }
.sx-btn--primary:hover,
.sx-btn--primary:focus-visible { background: var(--sx-orange-700); color: #fff !important; }

.sx-btn--outline { border-color: var(--sx-navy); color: var(--sx-navy) !important; }
.sx-btn--outline:hover,
.sx-btn--outline:focus-visible { background: var(--sx-navy); color: #fff !important; }

.sx-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 15px;
    color: var(--sx-navy) !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 6px;
    text-decoration-color: rgba(26, 72, 127, .35) !important;
    transition: color .2s ease, text-decoration-color .2s ease;
}

.sx-link:hover,
.sx-link:focus-visible {
    color: var(--sx-orange-700) !important;
    text-decoration-color: currentColor !important;
}

.sx-link--light { color: #fff !important; text-decoration-color: rgba(255, 255, 255, .45) !important; }
.sx-link--light:hover,
.sx-link--light:focus-visible { color: #fff !important; text-decoration-color: #fff !important; }

.sx-header a:focus-visible,
.sx-header button:focus-visible,
.sx-mainnav a:focus-visible,
.sx-footer a:focus-visible,
.sx-btn:focus-visible,
.sx-link:focus-visible {
    outline: 2px solid var(--sx-orange);
    outline-offset: 3px;
}

/* ==========================================================================
   Top bar
   ========================================================================== */
.sx-topbar {
    background: var(--sx-navy);
    color: #fff;
    font-family: var(--sx-font); font-weight: 500;
    font-size: 13.5px;
    line-height: 1.4;
}

.sx-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    text-align: center;
}

.sx-topbar p { margin: 0; }

/* ==========================================================================
   Header (logo row)
   ========================================================================== */
.sx-header {
    position: relative;
    z-index: 960;
    background: #fff;
    font-family: var(--sx-font); font-weight: 400;
}

.sx-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 88px;
}

.sx-header__logo { flex: none; display: block; line-height: 0; }
.sx-header__logo img { display: block; width: auto; max-width: none; height: 62px; }
.sx-header__logo .sx-logo-compact { display: none; height: 46px; }

.sx-header__tools { display: flex; align-items: center; gap: 26px; }

.sx-header__links { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }

.sx-header__links a,
.sx-header__login {
    font-family: var(--sx-font); font-weight: 500;
    font-size: 15px;
    color: var(--sx-ink) !important;
}

.sx-header__links a:hover,
.sx-header__login:hover { color: var(--sx-blue) !important; }

.sx-header__phone,
.sx-header__login { display: inline-flex; align-items: center; gap: 8px; }

.sx-header__phone {
    font-family: var(--sx-font); font-weight: 600;
    font-size: 15px;
    color: var(--sx-navy) !important;
    font-variant-numeric: tabular-nums;
}

.sx-header__phone:hover { color: var(--sx-blue) !important; }

.sx-header__phone svg,
.sx-header__login svg { width: 17px; height: 17px; fill: var(--sx-blue); flex: none; }

.sx-header__cta { min-height: 44px; padding: 0 22px; }

.sx-header__call { display: none; }

.sx-menu-btn {
    display: none;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--sx-line);
    border-radius: 2px;
    background: #fff;
    color: var(--sx-navy);
    font-family: var(--sx-font); font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.sx-menu-btn__bars { position: relative; width: 18px; height: 12px; }

.sx-menu-btn__bars::before,
.sx-menu-btn__bars::after,
.sx-menu-btn__bars span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

.sx-menu-btn__bars::before { top: 0; }
.sx-menu-btn__bars span { top: 5px; }
.sx-menu-btn__bars::after { top: 10px; }

.sx-menu-btn[aria-expanded="true"] .sx-menu-btn__bars::before { transform: translateY(5px) rotate(45deg); }
.sx-menu-btn[aria-expanded="true"] .sx-menu-btn__bars span { opacity: 0; }
.sx-menu-btn[aria-expanded="true"] .sx-menu-btn__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ==========================================================================
   Main menu bar (desktop, sticky)
   ========================================================================== */
.sx-mainnav {
    position: sticky;
    top: 0;
    z-index: 950;
    background: #fff;
    border-top: 1px solid var(--sx-line);
    border-bottom: 1px solid var(--sx-line);
    font-family: var(--sx-font); font-weight: 400;
    transition: box-shadow .25s ease;
}

.sx-mainnav.is-stuck { box-shadow: 0 8px 24px rgba(16, 48, 79, .08); }

.sx-nav__list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -12px;
    padding: 0;
    list-style: none;
}

.sx-nav__item { position: relative; }

.sx-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 12px;
    font-family: var(--sx-font); font-weight: 500;
    font-size: 15px;
    color: var(--sx-ink) !important;
    white-space: nowrap;
}

.sx-nav__link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    background: var(--sx-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.sx-nav__item:hover > .sx-nav__link,
.sx-nav__item:focus-within > .sx-nav__link { color: var(--sx-navy) !important; }

.sx-nav__item:hover > .sx-nav__link::after,
.sx-nav__item:focus-within > .sx-nav__link::after { transform: scaleX(1); }

.sx-nav__panel {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 270px;
    padding: 10px 0;
    background: #fff;
    border: 1px solid var(--sx-line);
    box-shadow: 0 20px 40px rgba(16, 48, 79, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.sx-nav__item:hover > .sx-nav__panel,
.sx-nav__item:focus-within > .sx-nav__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s ease, transform .18s ease;
}

.sx-nav__item:nth-last-child(-n+3) > .sx-nav__panel { left: auto; right: 0; }

.sx-nav__panel ul { margin: 0; padding: 0; list-style: none; }
.sx-nav__panel--wide ul { width: 560px; column-count: 2; column-gap: 0; }

.sx-nav__panel a {
    display: block;
    padding: 9px 22px;
    font-size: 14.5px;
    line-height: 1.35;
    color: var(--sx-text) !important;
    break-inside: avoid;
}

.sx-nav__panel a:hover,
.sx-nav__panel a:focus-visible { background: var(--sx-mist); color: var(--sx-navy) !important; outline: none; }

/* ==========================================================================
   Drawer (tablet & mobile)
   ========================================================================== */
.sx-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--sx-line);
    overscroll-behavior: contain;
}

.sx-drawer[hidden] { display: none; }

.sx-drawer__inner { padding-top: 8px; padding-bottom: 40px; }

.sx-drawer__group,
.sx-drawer__single { border-bottom: 1px solid var(--sx-line); }

.sx-drawer__group summary,
.sx-drawer__single {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    font-family: var(--sx-font); font-weight: 500;
    font-size: 17px;
    color: var(--sx-ink) !important;
    list-style: none;
    cursor: pointer;
}

.sx-drawer__group summary::-webkit-details-marker { display: none; }

.sx-drawer__group summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-right: 2px solid var(--sx-muted);
    border-bottom: 2px solid var(--sx-muted);
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.sx-drawer__group[open] summary::after { transform: rotate(-135deg); }

.sx-drawer__group ul { margin: 0 0 14px; padding: 0 0 0 2px; list-style: none; }

.sx-drawer__group li a {
    display: block;
    padding: 9px 0;
    font-size: 15.5px;
    color: var(--sx-text) !important;
}

.sx-drawer__foot { display: grid; gap: 12px; padding-top: 28px; }
.sx-drawer__foot .sx-btn { width: 100%; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.sx-footer {
    position: relative;
    z-index: 1;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--sx-text);
    font-family: var(--sx-font); font-weight: 400;
    border-top: 1px solid var(--sx-line);
}

.sx-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    padding-top: clamp(56px, 6vw, 88px);
    padding-bottom: clamp(48px, 5vw, 72px);
}

.sx-footer__logo { display: inline-block; line-height: 0; margin-bottom: 16px; }
.sx-footer__logo img { width: 260px; max-width: 100%; height: auto; }

.sx-footer__name {
    margin: 0 0 24px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 17px;
    line-height: 1.4;
    color: var(--sx-navy);
}

.sx-footer__mid { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.sx-footer__mid .sx-btn { min-height: 42px; padding: 0 18px; font-size: 14.5px; }

.sx-footer__social { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }

.sx-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--sx-line);
    border-radius: 50%;
    color: var(--sx-navy) !important;
    font-size: 15px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.sx-footer__social a:hover { background: var(--sx-navy); border-color: var(--sx-navy); color: #fff !important; }

.sx-footer__title {
    margin: 0 0 20px;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 17px;
    line-height: 1.35;
    color: var(--sx-navy);
}

.sx-footer__col ul { margin: 0; padding: 0; list-style: none; }
.sx-footer__col li { margin: 0 0 11px; font-size: 15px; line-height: 1.6; }

.sx-footer__col a {
    font-size: 15px;
    line-height: 1.5;
    color: var(--sx-text) !important;
}

.sx-footer__col a:hover { color: var(--sx-navy) !important; text-decoration: underline !important; text-underline-offset: 3px; }

.sx-footer__contact i { width: 18px; margin-right: 8px; color: var(--sx-blue); text-align: center; }

.sx-footer__bar { background: var(--sx-navy); color: rgba(255, 255, 255, .82); font-size: 13.5px; }

.sx-footer__bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 32px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.sx-footer__bar p { margin: 0; }
.sx-footer__bar ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.sx-footer__bar a { color: rgba(255, 255, 255, .82) !important; }
.sx-footer__bar a:hover { color: #fff !important; text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- Floating: enquiry tabs, WhatsApp, mobile bar ---------- */
.sticky-btn {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 940;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform: translateY(-50%);
}

.sticky-btn .sx-side-tab {
    display: block;
    padding: 18px 11px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    border-radius: 0 3px 3px 0;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 13px;
    line-height: 1;
    color: #fff !important;
    background: var(--sx-navy);
    box-shadow: 0 6px 18px rgba(16, 48, 79, .18);
    transition: background-color .2s ease, padding .2s ease;
}

.sticky-btn .sx-side-tab--enroll { background: var(--sx-orange); }
.sticky-btn .sx-side-tab:hover { padding-left: 15px; }
.sticky-btn .sx-side-tab--enroll:hover { background: var(--sx-orange-700); }
.sticky-btn .sx-side-tab--enquire:hover { background: var(--sx-navy-900); }

.sx-whatsapp {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 930;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 20px 0 14px;
    border-radius: 25px;
    background: #25d366;
    color: #fff !important;
    font-family: var(--sx-font); font-weight: 600;
    font-size: 14.5px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    transition: transform .2s ease;
}

.sx-whatsapp:hover { transform: translateY(-2px); color: #fff !important; }
.sx-whatsapp svg { width: 24px; height: 24px; fill: #fff; flex: none; }

.find-boxht .navigation-mobile-link { font-family: var(--sx-font); font-weight: 500; color: var(--sx-navy) !important; }
.find-boxht .navigation-mobile-link span { font-size: 12px; margin-top: 2px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1279px) {
    .sx-nav__link { padding: 0 9px; font-size: 14.5px; }
    .sx-nav__link::after { left: 9px; right: 9px; }
    .sx-nav__list { margin: 0 -9px; }
    .sx-header__tools { gap: 20px; }
    .sx-header__links { gap: 20px; }
}

@media (max-width: 1139px) {
    .sx-mainnav { display: none; }
    .sx-header { position: sticky; top: 0; border-bottom: 1px solid var(--sx-line); transition: box-shadow .25s ease; }
    .sx-header.is-scrolled { box-shadow: 0 8px 24px rgba(16, 48, 79, .08); }
    .sx-header__inner { height: 76px; }
    .sx-header__logo img { height: 48px; }
    .sx-header__links,
    .sx-header__login { display: none; }
    .sx-menu-btn { display: inline-flex; }
    .sx-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
    .sx-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
    .sx-whatsapp { display: none; }
    .sticky-btn .sx-side-tab--enroll { display: none; }
    .sticky-btn { top: auto; bottom: 96px; transform: none; }
    footer.sx-footer { padding-bottom: 56px; }
}

@media (max-width: 759px) {
    .sx-topbar__inner { min-height: 34px; font-size: 13px; }
    .sx-header__inner { height: 68px; gap: 12px; }
    .sx-header__logo .sx-logo-full { display: none; }
    .sx-header__logo .sx-logo-compact { display: block; }
    .sx-header__phone,
    .sx-header__cta { display: none; }
    .sx-header__tools { gap: 12px; }
    .sx-header__call {
        display: inline-flex;
        align-items: center;
        height: 44px;
        padding: 0 14px;
        border: 1px solid var(--sx-line);
        border-radius: 2px;
        font-family: var(--sx-font); font-weight: 600;
        font-size: 14px;
        color: var(--sx-navy) !important;
    }
    .sx-menu-btn__label { display: none; }
    .sx-menu-btn { width: 44px; justify-content: center; padding: 0; }
}

@media (max-width: 559px) {
    .sx-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .sx-nav__panel,
    .sx-nav__link::after,
    .sx-menu-btn__bars::before,
    .sx-menu-btn__bars::after,
    .sx-menu-btn__bars span,
    .sx-whatsapp,
    .sticky-btn .sx-side-tab { transition: none; }
}
