/*
Theme Name: Tassia Quest
Theme URI: https://tassiaschool.co.ke/
Author: Tassia School
Description: A modern, responsive and update-safe school theme for Tassia School.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: tassia-quest
*/

:root {
  --ink: #11233d;
  --ink-soft: #496078;
  --red: #d6363e;
  --red-dark: #ad222c;
  --gold: #f1b24b;
  --cream: #fffaf2;
  --mist: #f4f7fb;
  --white: #fff;
  --line: rgba(17, 35, 61, .12);
  --shadow: 0 20px 60px rgba(17, 35, 61, .13);
  --radius: 22px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: "Manrope", "Segoe UI", sans-serif; line-height: 1.65; overflow-x: hidden; }
body, button, input, textarea, select { font-size: 16px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover, a:focus-visible { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.screen-reader-text { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.container { width: min(calc(100% - 40px), var(--container)); margin: 0 auto; }
.eyebrow { margin: 0 0 10px; color: var(--red); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, h4 { margin: 0 0 16px; font-family: "Fraunces", Georgia, serif; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.8rem, 6vw, 5.9rem); }
h2 { font-size: clamp(2.2rem, 4vw, 4rem); }
h3 { font-size: clamp(1.45rem, 2vw, 2.1rem); }
.lede { max-width: 650px; color: var(--ink-soft); font-size: 1.08rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; background: var(--red); color: var(--white); font-weight: 800; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover, .button:focus-visible { background: var(--red-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(214,54,62,.22); }
.button--light { background: var(--white); color: var(--ink); }
.button--light:hover, .button--light:focus-visible { background: var(--cream); color: var(--ink); }
.button--outline { border-color: var(--line); background: transparent; color: var(--ink); }
.button--outline:hover, .button--outline:focus-visible { border-color: var(--red); background: var(--white); color: var(--red); }

.site-header { position: relative; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.tassia-splash { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; background: rgba(255,255,255,.88); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: tassia-splash-fade 1.7s 3.25s ease-in forwards; }
.tassia-splash::before { content: ""; position: absolute; top: -20%; left: -10%; width: 125%; height: 135%; background: linear-gradient(135deg, transparent 38%, rgba(255,255,255,.2) 40%, rgba(214,54,62,.12) 42%, transparent 45%), radial-gradient(circle at 82% 18%, rgba(255,115,190,.24), transparent 22%), radial-gradient(circle at 20% 86%, rgba(104,221,255,.18), transparent 24%); transform: rotate(-4deg); }
.tassia-splash::after { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(255,255,255,.22); border-radius: 40px; box-shadow: inset 0 0 80px rgba(17,35,61,.1); }
.tassia-splash__piece { position: absolute; left: var(--x); top: var(--y); display: block; z-index: 2; font-size: clamp(1.1rem, 2.8vw, 2.4rem); filter: drop-shadow(0 6px 8px rgba(17,35,61,.22)); opacity: 0; animation: tassia-splash-fall 1.45s calc(var(--i) * 42ms) cubic-bezier(.18,.72,.28,1) forwards; }
.tassia-splash__smoke { position: absolute; left: var(--x); top: var(--y); width: clamp(28px, 5vw, 72px); height: clamp(18px, 3vw, 38px); border-radius: 50%; background: rgba(255,255,255,.5); filter: blur(6px); opacity: 0; animation: tassia-splash-smoke 2s calc(var(--i) * 110ms) ease-out forwards; }
.tassia-splash__sky { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.tassia-splash__cloud { position: absolute; color: rgba(190,211,232,.5); font-size: clamp(3rem, 8vw, 7rem); filter: blur(.2px) drop-shadow(0 8px 12px rgba(17,35,61,.08)); opacity: 0; animation: tassia-cloud-drift 3.4s ease-out forwards; }
.tassia-splash__cloud--one { top: 9%; left: -8%; animation-delay: 80ms; }
.tassia-splash__cloud--two { top: 54%; left: -15%; font-size: clamp(2.4rem, 6vw, 5rem); animation-delay: 320ms; }
.tassia-splash__flyer { position: absolute; display: block; font-size: clamp(2rem, 5vw, 4rem); opacity: 0; filter: drop-shadow(0 8px 8px rgba(17,35,61,.18)); }
.tassia-splash__flyer--eagle { top: 18%; left: -12%; animation: tassia-eagle-flight 2.8s 120ms ease-in-out forwards; }
.tassia-splash__flyer--horse { top: 70%; left: -15%; animation: tassia-horse-flight 3s 420ms ease-in-out forwards; }
.tassia-splash__rain { position: absolute; top: -10%; left: var(--x); width: 2px; height: clamp(10px, 1.8vw, 20px); z-index: 3; border-radius: 999px; background: linear-gradient(to bottom, rgba(104,221,255,0), rgba(71,164,225,.55)); opacity: 0; animation: tassia-rain-fall 1.9s var(--delay) linear forwards; }
.tassia-splash__ribbon { position: absolute; z-index: 2; width: 125%; height: 24px; left: -15%; border-radius: 50%; opacity: 0; filter: drop-shadow(0 5px 5px rgba(17,35,61,.1)); animation: tassia-ribbon-sweep 4.8s ease-in-out forwards; }
.tassia-splash__ribbon--red { top: 22%; background: linear-gradient(90deg, transparent, rgba(214,54,62,.3), rgba(214,54,62,.7), transparent); transform: rotate(-12deg); }
.tassia-splash__ribbon--blue { top: 48%; background: linear-gradient(90deg, transparent, rgba(71,164,225,.25), rgba(71,164,225,.62), transparent); transform: rotate(9deg); animation-delay: 250ms; }
.tassia-splash__ribbon--gold { top: 76%; background: linear-gradient(90deg, transparent, rgba(226,173,65,.18), rgba(226,173,65,.55), transparent); transform: rotate(-7deg); animation-delay: 500ms; }
.tassia-splash__firework { position: absolute; z-index: 3; color: var(--red); font-size: clamp(2.5rem, 6vw, 5rem); font-family: Georgia, serif; font-weight: 900; line-height: 1; opacity: 0; text-shadow: 0 0 5px #fff, 0 0 12px currentColor, 0 0 30px rgba(255,115,190,.7); animation: tassia-firework-flash 1.5s ease-in-out infinite; }
.tassia-splash__firework--one { top: 13%; left: 22%; animation-delay: 700ms; }
.tassia-splash__firework--two { top: 37%; right: 18%; color: var(--blue); animation-delay: 1.15s; }
.tassia-splash__firework--three { bottom: 16%; left: 53%; color: var(--gold); animation-delay: 1.6s; }
@keyframes tassia-splash-fall { 0% { opacity: 0; transform: translate(-45px,-150px) rotate(-30deg) scale(.35); } 35% { opacity: 1; transform: translate(8px,-20px) rotate(14deg) scale(1.1); } 75% { opacity: 1; transform: translate(-4px,48px) rotate(-10deg) scale(1); } 100% { opacity: 0; transform: translate(18px,150px) rotate(24deg) scale(.78); } }
@keyframes tassia-splash-fade { to { opacity: 0; visibility: hidden; } }
@keyframes tassia-splash-smoke { 0% { opacity: 0; transform: translateY(-15px) scale(.4); } 22% { opacity: .65; } 100% { opacity: 0; transform: translateY(65px) scale(1.45); } }
@keyframes tassia-cloud-drift { 0% { opacity: 0; transform: translateX(-30px) scale(.8); } 22% { opacity: .8; } 100% { opacity: .22; transform: translateX(115vw) scale(1.08); } }
@keyframes tassia-eagle-flight { 0% { opacity: 0; transform: translate(-8vw, 20px) rotate(-8deg) scale(.7); } 18% { opacity: 1; } 70% { opacity: 1; transform: translate(68vw, -30px) rotate(5deg) scale(1); } 100% { opacity: 0; transform: translate(120vw, -10px) rotate(8deg) scale(.75); } }
@keyframes tassia-horse-flight { 0% { opacity: 0; transform: translate(-10vw, 35px) rotate(5deg) scale(.65); } 18% { opacity: 1; } 72% { opacity: 1; transform: translate(72vw, -45px) rotate(-5deg) scale(1.03); } 100% { opacity: 0; transform: translate(120vw, -70px) rotate(-8deg) scale(.75); } }
@keyframes tassia-rain-fall { 0% { opacity: 0; transform: translateY(-5vh) rotate(12deg); } 12% { opacity: .6; } 100% { opacity: 0; transform: translateY(120vh) rotate(12deg); } }
@keyframes tassia-ribbon-sweep { 0% { opacity: 0; transform: translateX(-18vw) rotate(-12deg) scaleX(.5); } 18% { opacity: .8; } 72% { opacity: .58; } 100% { opacity: 0; transform: translateX(18vw) rotate(-12deg) scaleX(1.05); } }
@keyframes tassia-firework-flash { 0%, 100% { opacity: 0; transform: scale(.18) rotate(0); filter: brightness(1); } 16% { opacity: 1; transform: scale(1.22) rotate(18deg); filter: brightness(1.8); } 30% { opacity: .35; transform: scale(.78) rotate(38deg); } 46% { opacity: .95; transform: scale(1.08) rotate(58deg); filter: brightness(1.5); } 68% { opacity: 0; transform: scale(1.45) rotate(90deg); filter: brightness(1); } }
.topbar { background: var(--ink); color: rgba(255,255,255,.85); font-size: .82rem; }
.topbar__inner, .header-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header > .container, .site-header .topbar > .container { width: min(calc(100% - 40px), var(--container)); max-width: var(--container); margin-inline: auto; }
.topbar__inner { min-height: 36px; }
.topbar a { color: var(--white); }
.topbar__links { display: flex; flex-wrap: wrap; gap: 18px; }
.topbar__links a { white-space: nowrap; }
.gallery-page__social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.announcement-ticker { display:flex; min-width:0; flex:1; align-items:center; gap:10px; overflow:hidden; }
.announcement-ticker__label { flex:none; color:var(--gold); font-weight:800; letter-spacing:.06em; text-transform:uppercase; font-size:.68rem; }
.announcement-ticker__track { display:flex; min-width:0; gap:28px; overflow:hidden; white-space:nowrap; }
.announcement-ticker__track a, .announcement-ticker__track > span { flex:none; color:rgba(255,255,255,.82); font-size:.75rem; }
.announcement-ticker__track a:hover { color:var(--gold); }
.announcement-ticker__track { animation: announcement-scroll 14s linear infinite; }
.announcement-ticker:hover .announcement-ticker__track, .announcement-ticker:focus-within .announcement-ticker__track { animation-play-state:paused; }
@keyframes announcement-scroll { from { transform:translateX(0); } to { transform:translateX(-22%); } }
.header-main { min-height: 86px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 900; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 48px; height: 48px; border-radius: 14px; background: var(--red); object-fit: contain; padding: 4px; }
.brand__name { font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; line-height: 1; }
.brand__tag { display: block; margin-top: 5px; color: var(--red); font-family: "Manrope", sans-serif; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav > ul { display: flex; align-items: stretch; gap: 4px; margin: 0; padding: 0; list-style: none; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 31px 13px; color: var(--ink); font-size: .84rem; font-weight: 800; }
.topbar__social { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; }
.topbar__links > a[href^="tel"]::before { content: "☎"; margin-right: 5px; }
.topbar__links > a[href^="mailto"]::before { content: "✉"; margin-right: 5px; }
.topbar__social a { display: inline-grid; width: 22px; height: 22px; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 900; line-height: 1; text-decoration: none; }
.topbar__social a:hover, .topbar__social a:focus-visible { background: #fff; color: var(--red); }
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav .current-menu-item > a { color: var(--red); }
.primary-nav .menu-item-has-children > a::after { content: "⌄"; display: inline-block; margin-left: 6px; color: var(--red); }
.primary-nav .sub-menu { position: absolute; top: 100%; left: 50%; display: grid; grid-template-columns: 1.25fr repeat(3, minmax(155px, 1fr)); gap: 14px; width: min(1080px, calc(100vw - 40px)); min-height: 208px; margin: 0; padding: 30px; transform: translate(-50%, 10px); visibility: hidden; opacity: 0; border-top: 5px solid var(--red); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 0 0 24px 24px; background: var(--white); box-shadow: var(--shadow); list-style: none; transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.primary-nav .sub-menu li { border-left: 2px solid transparent; }
.primary-nav .sub-menu li:hover, .primary-nav .sub-menu li:focus-within { border-left-color: var(--gold); background: var(--cream); }
.primary-nav .sub-menu a { padding: 12px 10px; font-size: .82rem; }
.primary-nav .sub-menu .mega-menu__intro { display: flex; flex-direction: column; justify-content: flex-start; gap: 9px; padding: 10px 24px 12px 0; border-right: 1px solid var(--line); border-left: 0; background: linear-gradient(135deg, var(--cream), var(--white)); }
.primary-nav .sub-menu .mega-menu__intro:hover { background: transparent; }
.mega-menu__intro strong { color: var(--ink); font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; }
.mega-menu__intro span { color: var(--ink-soft); font-size: .76rem; line-height: 1.45; }
.mega-menu__intro a { padding: 5px 0 !important; color: var(--red) !important; font-size: .74rem !important; }
.primary-nav .sub-menu > li:not(.mega-menu__intro) { min-width:0; border-radius:12px; }
.primary-nav .sub-menu > li:not(.mega-menu__intro) > a { display:flex; align-items:flex-start; gap:10px; min-height:76px; padding:12px 11px; border-radius:12px; }
.mega-menu__icon { display:grid; flex:0 0 30px; width:30px; height:30px; place-items:center; border-radius:9px; background:var(--cream); color:var(--red); font-size:1rem; font-weight:900; line-height:1; }
.mega-menu__link-copy { display:flex; min-width:0; flex-direction:column; gap:3px; }
.mega-menu__link-copy strong { color:var(--ink); font-size:.78rem; line-height:1.25; }
.mega-menu__link-copy small { color:var(--ink-soft); font-size:.68rem; font-weight:500; line-height:1.35; }
.primary-nav .sub-menu > li:not(.mega-menu__intro) > a:hover .mega-menu__icon, .primary-nav .sub-menu > li:not(.mega-menu__intro) > a:focus-visible .mega-menu__icon { background:var(--gold); color:var(--ink); }
.primary-nav > ul > li:first-child > .sub-menu { left: 50%; transform: translate(-50%, 10px); }
.primary-nav > ul > li:first-child:hover > .sub-menu, .primary-nav > ul > li:first-child:focus-within > .sub-menu { transform: translate(-50%, 0); }
.primary-nav > ul > li:last-child > .sub-menu { right: 0; left: auto; transform: translate(0, 10px); }
.primary-nav > ul > li:last-child:hover > .sub-menu, .primary-nav > ul > li:last-child:focus-within > .sub-menu { transform: translate(0, 0); }
/* Keep the wide XWA-style panel inside the viewport even when a middle
   navigation label is close to the right edge. */
.primary-nav > ul > li:not(:first-child) > .sub-menu { right: 0; left: auto; transform: translate(0, 10px); }
.primary-nav > ul > li:not(:first-child):hover > .sub-menu, .primary-nav > ul > li:not(:first-child):focus-within > .sub-menu { transform: translate(0, 0); }
.mobile-primary-nav { display: none; }
/* Anchor every desktop dropdown to the centered site header, not to the
   individual menu label. This keeps the complete panel inside the viewport. */
@media (min-width: 1021px) {
  .primary-nav > ul > li { position: static; }
  .primary-nav > ul > li > .sub-menu { top: 100%; left: 50%; right: auto; width: 100vw; min-height: 0; padding: 30px max(24px, calc((100vw - var(--container)) / 2)); grid-template-columns: minmax(245px, .9fr) repeat(4, minmax(160px, 1fr)); gap: 10px 18px; align-content: start; transform: translate(-50%, 10px); }
  .primary-nav > ul > li:hover > .sub-menu, .primary-nav > ul > li:focus-within > .sub-menu { transform: translate(-50%, 0); }
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .button { min-height: 44px; padding: 0 17px; font-size: .8rem; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); font-size: 1.7rem; }

.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--white); }
.hero__slides { position: relative; height: 680px; min-height: 0; overflow: hidden; background:var(--ink); }
.hero__slide { position: absolute; inset: 0; display: grid; align-items: end; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s ease; }
.hero__slide.is-active { position: relative; opacity: 1; visibility: visible; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background:var(--ink); opacity: .72; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17,35,61,.92), rgba(17,35,61,.42) 58%, rgba(17,35,61,.16)); }
.hero__content { position: relative; z-index: 1; width: min(calc(100% - 40px), var(--container)); margin: 0 auto; padding: 110px 0 120px; }
.hero__content h1 { max-width: 760px; }
.hero__content p { max-width: 610px; color: rgba(255,255,255,.84); font-size: 1.1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__controls { position: absolute; z-index: 2; right: auto; left: 50%; bottom: 28px; display: flex; width: max-content; align-items: center; gap: 8px; transform: translateX(-50%); }
.hero__dots { display: flex; gap: 8px; align-items: center; }
.hero__arrow, .hero__pause { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(17,35,61,.45); color: var(--white); font-size: 1.55rem; line-height: 1; cursor: pointer; }
.hero__pause { font-size: .85rem; }
.hero__arrow:hover, .hero__arrow:focus-visible, .hero__pause:hover, .hero__pause:focus-visible { background: var(--red); border-color: var(--red); }
.hero__dot { width: 12px; height: 12px; padding: 0; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: transparent; cursor: pointer; }
.hero__dot.is-active { background: var(--gold); border-color: var(--gold); }
.resilience-banner { text-align:center; background:linear-gradient(135deg, var(--cream), #eef5ef); }
.resilience-banner > .container { width:min(calc(100% - 40px), var(--container)); max-width:var(--container); }
.resilience-banner > .resilience-layout { max-width:var(--container); }
.resilience-banner .lede { margin:0 auto; }
.resilience-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(360px,.85fr); gap:clamp(36px,6vw,88px); align-items:stretch; width:100%; }
.resilience-showcase { position:relative; min-height:520px; overflow:hidden; border-radius:var(--radius); background:var(--ink); box-shadow:var(--shadow); }
.resilience-slide { position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .45s ease, visibility .45s ease; }
.resilience-slide.is-active { opacity:1; visibility:visible; }
.resilience-slide img { width:100%; height:520px; object-fit:contain; background:var(--ink); }
.resilience-label { position:absolute; right:20px; bottom:64px; left:20px; padding:12px 16px; border-left:3px solid var(--gold); background:rgba(17,35,61,.78); color:#fff; font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.resilience-controls { position:absolute; right:auto; bottom:16px; left:50%; display:flex; align-items:center; justify-content:center; gap:24px; color:#fff; font-size:.82rem; transform:translateX(-50%); }
.resilience-controls button { width:38px; height:38px; border:1px solid rgba(255,255,255,.55); border-radius:50%; background:rgba(17,35,61,.55); color:#fff; font-size:1.5rem; cursor:pointer; }
.resilience-controls button:hover { background:var(--red); border-color:var(--red); }
.resilience-copy { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:34px 0; }
.resilience-copy h2 { max-width:620px; }
.gallery-lightbox { position:fixed; z-index:100; inset:0; display:grid; grid-template-columns:auto minmax(0,1800px) auto; align-items:center; justify-content:center; gap:28px; padding:32px 20px; background:rgba(5,13,25,.98); }
.gallery-lightbox figure { position:relative; width:min(1800px,94vw); max-width:1800px; margin:0; text-align:center; }
.gallery-lightbox figure img { display:block; width:auto; max-width:94vw; height:auto; max-height:88vh; margin:auto; object-fit:contain; border-radius:10px; background:#f5f7f8; filter:saturate(1.05) contrast(1.03); box-shadow:0 24px 100px rgba(0,0,0,.62); }
.gallery-lightbox-trigger { cursor:zoom-in; }
.gallery-lightbox figcaption { display:flex; justify-content:space-between; gap:18px; padding:12px 4px 0; color:#fff; text-align:left; }
.gallery-lightbox figcaption span { color:rgba(255,255,255,.65); }
.gallery-lightbox button { border:1px solid rgba(255,255,255,.5); border-radius:50%; background:rgba(255,255,255,.08); color:#fff; cursor:pointer; }
.gallery-lightbox__close { position:absolute; top:18px; right:22px; width:44px; height:44px; font-size:1.8rem; }
.gallery-lightbox__prev, .gallery-lightbox__next { width:48px; height:48px; font-size:2rem; }
.gallery-lightbox button:hover, .gallery-lightbox button:focus-visible { background:var(--red); border-color:var(--red); }
.gallery-tile--deferred, .gallery-card--deferred { display:none; }
.gallery-scroll-sentinel { height:72px; margin-top:20px; border-radius:18px; background:linear-gradient(90deg, rgba(17,35,61,.06), rgba(214,54,62,.12), rgba(17,35,61,.06)); animation:gallery-loading 1.4s ease-in-out infinite; }
@keyframes gallery-loading { 0%,100% { opacity:.45; } 50% { opacity:1; } }

.section { padding: 100px 0; }
.section--mist { background: var(--mist); }
.section--cream { background: var(--cream); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 42px; }
.section-heading > div:first-child { max-width: 700px; }
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.glance-pathways { grid-template-columns: 1fr; gap: 16px; }
.glance-pathways .card__body { display: block; padding: 24px 28px; }
.glance-pathways h3 { margin: 0 0 8px; }
.glance-pathways p { max-width: 900px; margin: 0 0 12px; }
.glance-pathways .card__link { margin: 0; white-space: normal; }
.glance-icon { display: block; width: max-content; margin-bottom: 10px; font-size: 1.65rem; line-height: 1; }
.card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 28px rgba(17,35,61,.05); }
.card__image { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card__body { padding: 25px; }
.card__body p { color: var(--ink-soft); }
.video-story__image { position: relative; overflow: hidden; }
.video-story__image iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 220px; border: 0; background: #203753; }
.video-story__play { position: absolute; right: 18px; bottom: 18px; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--red); color: var(--white); box-shadow: 0 8px 18px rgba(17,35,61,.25); }
.cbc-pathways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cbc-pathway { position: relative; overflow: hidden; min-height: 245px; padding: 28px; border-radius: var(--radius); background: var(--white); box-shadow: 0 12px 32px rgba(17,35,61,.07); }
.cbc-pathway::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 7px; background: var(--pathway-color, var(--red)); }
.cbc-pathway__number { display: inline-grid; width: 38px; height: 38px; place-items: center; margin-bottom: 22px; border-radius: 50%; background: var(--pathway-color, var(--red)); color: var(--white); font-weight: 900; }
.cbc-pathway h3 { margin-bottom: 8px; }
.cbc-pathway p { margin: 0; color: var(--ink-soft); }
.card__link { display: inline-flex; margin-top: 8px; font-weight: 800; }
.activity-card { position: relative; min-height: 340px; display: flex; align-items: end; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.activity-card > a { display: flex; align-items: end; width: 100%; min-height: 340px; color: inherit; }
.activity-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: transform .4s ease; }
.activity-card:hover img { transform: scale(1.06); }
.activity-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(17,35,61,.9), transparent 75%); }
.activity-card__body { position: relative; z-index: 1; padding: 25px; }
.activity-card h3 { margin-bottom: 6px; }
.activity-card p { margin: 0; color: rgba(255,255,255,.8); }
.passions { overflow: hidden; border-radius: var(--radius); background: var(--ink); box-shadow: var(--shadow); }
.passions-section { background: linear-gradient(145deg, #f4efe5 0%, #fff 48%, #e8f0ec 100%); }
.passions__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 0; background: rgba(255,255,255,.16); }
.passion-tab { min-height: 44px; padding: 0 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: transparent; color: rgba(255,255,255,.78); font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.passion-tab { min-height: 72px; border: 0; border-radius: 0; background: #203753; color: rgba(255,255,255,.78); }
.passion-tab:hover, .passion-tab:focus-visible, .passion-tab.is-active { border-color: transparent; background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.passion-tab::before { display: inline-block; margin-right: 7px; }
.passion-tab:nth-child(1)::before { content: "🩰"; }
.passion-tab:nth-child(2)::before { content: "🏊"; }
.passion-tab:nth-child(3)::before { content: "🛼"; }
.passion-tab:nth-child(4)::before { content: "🎵"; }
.passions__panels { position: relative; min-height: 470px; }
.passion-panel { position: absolute; inset: 0; display: grid; grid-template-columns: 1.2fr .8fr; align-items: stretch; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease; }
.passion-panel.is-active { position: relative; opacity: 1; visibility: visible; }
.passion-panel > img { width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.passion-panel__content { display: flex; flex-direction: column; justify-content: center; padding: 48px; color: var(--white); }
.passion-panel__content h3 { font-size: clamp(2rem, 3vw, 3.3rem); }
.passion-panel__content p:not(.eyebrow) { color: rgba(255,255,255,.78); }
.passion-panel__content .button { align-self: flex-start; margin-top: 16px; }

.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.intro__figure { position: relative; overflow: hidden; margin: 0; border-radius: var(--radius); background: var(--mist); box-shadow: var(--shadow); }
.intro__image { width: 100%; max-height: 620px; border-radius: var(--radius); object-fit: contain; object-position: center; }
.intro__figure figcaption { position: absolute; right: 18px; bottom: 18px; left: 18px; padding: 14px 18px; border-left: 4px solid var(--gold); background: rgba(17,35,61,.9); color: var(--white); font-size: .78rem; font-weight: 900; letter-spacing: .13em; line-height: 1.4; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.stat { padding: 20px; border-top: 3px solid var(--gold); background: var(--cream); }
.stat strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 2.2rem; }
.stat span { color: var(--ink-soft); font-size: .82rem; }
.video-feature { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; min-height: 420px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.video-feature__media { position: relative; min-height: 360px; background: #203753; }
.video-feature__media img { width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.video-embed, .video-embed iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }
.video-embed iframe { min-height: 0; aspect-ratio: 16 / 9; }
.video-archive-card__embed { min-height: 260px; background:var(--ink); }
.video-archive-card__embed iframe, .single-video-embed iframe, .social-video-embed { display:block; width:100%; min-height:300px; border:0; }
.single-video-embed { max-width:980px; margin:55px auto 35px; overflow:hidden; border-radius:var(--radius); background:var(--ink); box-shadow:var(--shadow); }
.single-video-copy { max-width:820px; margin:0 auto 80px; }
.play-button { position: absolute; top: 50%; left: 50%; display: grid; width: 78px; height: 78px; place-items: center; transform: translate(-50%,-50%); border: 0; border-radius: 50%; background: var(--red); color: var(--white); font-size: 1.6rem; cursor: pointer; box-shadow: 0 0 0 12px rgba(255,255,255,.18); }
.video-feature__body { display: flex; flex-direction: column; justify-content: center; padding: 55px; }
.video-feature__body p { color: rgba(255,255,255,.76); }
.video-feature__body .button { align-self: flex-start; margin-top: 15px; }
.video-section-heading { margin-top: 64px; }
.notice-list { display: grid; gap: 12px; }
.notice { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.notice__date { color: var(--red); font-weight: 900; }
.notice h3 { margin: 0; font-family: "Manrope", sans-serif; font-size: 1rem; letter-spacing: 0; }
.notice p { margin: 4px 0 0; color: var(--ink-soft); font-size: .9rem; }
.notice__arrow { font-size: 1.25rem; }
.social-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.social-card { padding: 32px; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.social-card--red { background: var(--red); }
.social-card p { color: rgba(255,255,255,.8); }
.footer-quick-panel { display: none; padding: 14px 0; background: var(--red); color: var(--white); }
.footer-quick-panel__inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.footer-quick-link { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; color: var(--white); font-size: .82rem; font-weight: 800; text-align: center; transition: background .2s ease, color .2s ease, transform .2s ease; }
.footer-quick-link:hover, .footer-quick-link:focus-visible { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.footer-quick-link__icon { display: grid; width: 25px; height: 25px; place-items: center; flex: 0 0 25px; }
.footer-quick-link__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.site-footer { padding: 70px 0 22px; background: var(--ink); color: rgba(255,255,255,.77); }
.mobile-footer-panel { display: none; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: var(--white); font-size: 1.3rem; }
.site-footer a { color: rgba(255,255,255,.77); }
.site-footer a:hover { color: var(--gold); }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li { margin: 8px 0; }
.site-info { margin-top: 60px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); font-size: .8rem; }
.site-credit { display: inline-block; margin-left: 16px; }
.site-credit a { color: var(--gold); font-weight: 800; }
.page-hero { padding: 100px 0 80px; background: var(--ink); color: var(--white); }
.page-hero--admissions { position:relative; isolation:isolate; background:linear-gradient(90deg,rgba(8,18,32,.9),rgba(8,18,32,.62)),url('../../../images/main%20school.jpg') center/cover no-repeat; }
.page-hero--admissions .container { position:relative; z-index:1; }
.page-hero p { max-width: 650px; color: rgba(255,255,255,.78); }
.entry-content { width: min(calc(100% - 40px), var(--container)); max-width: none; margin: 0 auto; padding: 86px 0 105px; }
.entry-content > p, .entry-content > ul, .entry-content > ol { max-width: 780px; margin-right: auto; margin-left: auto; }
.entry-content > h2, .entry-content > h3 { max-width: 780px; margin-right: auto; margin-left: auto; }
.entry-content img { margin: 26px 0; border-radius: 18px; }
.entry-content h2 { margin-top: 42px; }
.entry-content li { margin: 8px 0; }
.page-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; width:100%; margin: 35px auto 55px; padding-bottom: 55px; border-bottom: 1px solid var(--line); }
.page-feature.container { width:min(calc(100% - 40px), var(--container)); }
.page-feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background:var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-feature__gallery { min-width: 0; }
.page-feature__gallery .about-photo-gallery { margin: 0; }
.page-feature__gallery .about-photo-gallery .container { width: 100%; }
.about-photo-gallery--compact .explore-gallery__track { min-height: 420px; }
.about-photo-gallery--compact .explore-gallery__slide > img { min-height: 420px; }
.about-photo-gallery--compact .section-heading { display: none; }
.director-message { display:grid; grid-template-columns:1.1fr .9fr; gap:50px; align-items:center; width:min(calc(100% - 40px), var(--container)); margin:80px auto; padding:42px; border-radius:var(--radius); background:var(--ink); color:#fff; }
.director-message p { color:rgba(255,255,255,.82); }
.director-message img { width:100%; max-height:520px; object-fit:contain; border-radius:18px; background:#203753; }
.director-portrait { margin:0; min-width:0; }
.director-portrait img { width:100%; height:520px; object-fit:contain; background:#203753; border-radius:18px; box-shadow:var(--shadow); }
.director-portrait figcaption { margin-top:12px; color:var(--gold); font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.director-read-more { display:block; clear:both; width:max-content; margin:24px 0 26px; }
.director-message__expandable[hidden] { display:none; }
.campus-card { transition: transform .25s ease, box-shadow .25s ease; }
.campus-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.campus-card > a { display:block; height:100%; color:inherit; }
.campus-card .card__image { aspect-ratio: 16 / 10; object-fit:cover; }
.campus-card .card__body { min-height: 220px; }
.campus-facilities { margin: 70px 0 20px; padding: 56px 0; border-top: 1px solid var(--line); }
.facility-card { overflow:hidden; }
.facility-card .card__image { aspect-ratio: 4 / 3; object-fit:cover; }
.facility-card .card__body { min-height:220px; }
.values-panel, .page-links { margin:80px 0; }
.admissions-form-section { width:min(calc(100% - 40px), 980px); margin:80px auto; padding:48px; border-radius:var(--radius); background:var(--mist); }
.admissions-content { width:min(100%,980px); margin:0 auto; }
.admissions-block { margin:0 0 62px; padding:34px 0; border-bottom:1px solid var(--line); scroll-margin-top:100px; }
.admissions-block h2 { margin:8px 0 14px; }
.admissions-steps { display:grid; gap:16px; padding-left:24px; }
.admissions-steps li { padding-left:8px; }
.admissions-block details { padding:16px 0; border-top:1px solid var(--line); }
.admissions-block summary { cursor:pointer; font-weight:800; }
.admissions-contact { padding:36px; border:0; border-radius:var(--radius); background:var(--ink); color:#fff; }
.admissions-contact p { color:rgba(255,255,255,.82); }
.admission-form-wrap { max-width:900px; margin-top:30px; }
.admission-form { display:grid; gap:18px; }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.admission-form label { display:grid; gap:7px; color:var(--ink); font-weight:800; font-size:.88rem; }
.admission-form input, .admission-form select, .admission-form textarea { width:100%; padding:13px 14px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font:inherit; font-weight:400; }
.admission-form textarea { resize:vertical; }
.admission-form .button { justify-self:start; border:0; cursor:pointer; }
.form-note { margin:0; color:var(--ink-soft); font-size:.82rem; }
.form-success, .form-error { padding:14px 16px; border-radius:10px; font-weight:800; }
.form-success { background:#e6f6eb; color:#176b35; }
.form-error { background:#fff0ef; color:#9c252d; }
.explore-gallery { overflow:hidden; border-radius:var(--radius); background:var(--ink); color:#fff; box-shadow:var(--shadow); }
.explore-gallery__track { position:relative; min-height:520px; }
.explore-gallery__slide { position:absolute; inset:0; display:grid; grid-template-columns:1.35fr .65fr; opacity:0; visibility:hidden; transition:opacity .4s ease, visibility .4s ease; }
.explore-gallery__slide.is-active { position:relative; opacity:1; visibility:visible; }
.explore-gallery__slide > img { width:100%; height:520px; min-height:520px; object-fit:contain; background:var(--ink); }
.explore-gallery__caption { display:flex; flex-direction:column; justify-content:center; padding:48px; }
.explore-gallery__caption h3 { font-size:clamp(2rem,3vw,3.4rem); }
.explore-gallery__caption p:not(.eyebrow) { color:rgba(255,255,255,.78); }
.explore-gallery__controls { display:flex; align-items:center; justify-content:center; gap:14px; padding:16px; background:#203753; }
.explore-gallery__dots { display:flex; gap:8px; }
.explore-gallery__dots button { width:10px; height:10px; padding:0; border:1px solid rgba(255,255,255,.8); border-radius:50%; background:transparent; cursor:pointer; }
.explore-gallery__dots button.is-active { border-color:var(--gold); background:var(--gold); }
.tassia-pathways { margin:80px 0; overflow:hidden; border-radius:var(--radius); background:var(--ink); color:#fff; box-shadow:var(--shadow); }
.tassia-pathways__tabs { display:flex; flex-wrap:wrap; gap:4px; margin:0; padding:16px 18px 0; list-style:none; background:#203753; }
.tassia-pathway-tab { padding:15px 18px; border:0; border-bottom:4px solid transparent; background:transparent; color:rgba(255,255,255,.72); font:inherit; font-weight:800; cursor:pointer; }
.tassia-pathway-tab:hover, .tassia-pathway-tab:focus-visible, .tassia-pathway-tab.is-active { border-bottom-color:var(--gold); color:#fff; }
.tassia-pathways__panels { position:relative; min-height:480px; }
.tassia-pathway-panel { position:absolute; inset:0; display:grid; grid-template-columns:.85fr 1.15fr; opacity:0; visibility:hidden; transition:opacity .35s ease, visibility .35s ease; }
.tassia-pathway-panel.is-active { position:relative; opacity:1; visibility:visible; }
.tassia-pathway-panel__copy { display:flex; flex-direction:column; justify-content:center; padding:54px; }
.tassia-pathway-panel__copy p:not(.eyebrow) { color:rgba(255,255,255,.78); }
.tassia-pathway-panel__copy .button { align-self:flex-start; margin-top:16px; }
.tassia-pathway-panel__visual { position:relative; min-height:480px; }
.tassia-pathway-panel__visual > img { width:100%; height:100%; min-height:480px; object-fit:cover; opacity:.65; }
.tassia-pathway-stats { position:absolute; right:26px; bottom:24px; left:26px; display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.tassia-pathway-stats div { padding:16px; border:1px solid rgba(255,255,255,.22); border-radius:14px; background:rgba(17,35,61,.76); backdrop-filter:blur(8px); }
.tassia-pathway-stats strong, .tassia-pathway-stats b, .tassia-pathway-stats span { display:block; }
.tassia-pathway-stats strong { color:var(--gold); font:700 1.8rem "Fraunces",Georgia,serif; }
.tassia-pathway-stats b { font-size:.8rem; }
.tassia-pathway-stats span { margin-top:5px; color:rgba(255,255,255,.68); font-size:.7rem; line-height:1.35; }
.tassia-pathway-panel__controls { position:absolute; right:auto; top:24px; left:50%; display:flex; align-items:center; justify-content:center; gap:18px; width:max-content; color:rgba(255,255,255,.72); font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; transform:translateX(-50%); }
.pathway-arrow { display:grid; width:40px; height:40px; place-items:center; border:1px solid rgba(255,255,255,.45); border-radius:50%; background:rgba(17,35,61,.62); color:#fff; font-size:1.45rem; cursor:pointer; }
.pathway-arrow:hover, .pathway-arrow:focus-visible { border-color:var(--gold); background:var(--gold); color:var(--ink); }
.page-cards { margin-top: 35px; }
.archive-grid { padding: 80px 0; }
.archive-year-grid .card { min-height: 220px; display: flex; align-items: stretch; background: #fff; border-top: 4px solid var(--red); }
.archive-year-grid .card:nth-child(3n+2) { border-top-color: var(--blue); }
.archive-year-grid .card:nth-child(3n) { border-top-color: var(--gold); }
.archive-year-grid .card__body { width: 100%; display: flex; flex-direction: column; }
.archive-year-grid .card__body > a { margin-top: auto; padding-top: 18px; font-weight: 700; }
.archive-categories { margin-top: 42px; padding: 28px; border-radius: 22px; background: var(--mist); }
.archive-categories__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.blog-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:48px; align-items:start; }
.blog-posts { display:grid; gap:28px; }
.blog-card[hidden] { display:none; }
.blog-empty-state { padding:34px; border:1px solid var(--line); border-radius:var(--radius); background:var(--mist); }
.blog-empty-state h2 { margin-top:0; }
.blog-card { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr); overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:var(--white); box-shadow:0 12px 30px rgba(17,35,61,.07); }
.blog-card__media { min-height:250px; background:var(--ink); }
.blog-card__media img { display:block; width:100%; height:100%; margin:0; object-fit:cover; }
.blog-card__body { padding:30px; }
.blog-card__body h2 { margin:10px 0 12px; font-size:clamp(1.45rem,2.2vw,2rem); }
.blog-card__body p { color:var(--ink-soft); }
.blog-sidebar { display:grid; gap:22px; position:sticky; top:24px; }
.sidebar-card { padding:26px; border:1px solid var(--line); border-radius:var(--radius); background:var(--mist); }
.sidebar-card h2 { margin:8px 0 10px; }
.sidebar-card nav { display:grid; margin-top:20px; }
.sidebar-card nav a { padding:12px 0; border-top:1px solid var(--line); font-weight:800; }
.sidebar-recent { display:grid; gap:16px; margin:18px 0 0; padding:0; list-style:none; }
.sidebar-recent li { display:grid; gap:4px; }
.sidebar-recent a { font-weight:800; }
.sidebar-recent small { color:var(--ink-soft); }
.article-page { min-width:0; padding:40px; border:1px solid var(--line); border-radius:var(--radius); background:var(--white); }
.article-page__image { width:100%; max-height:620px; object-fit:contain; background:var(--ink); }
.article-page__content { max-width:780px; margin:35px auto 0; font-size:1.05rem; line-height:1.8; }
.related-posts { margin-top:58px; padding-top:34px; border-top:1px solid var(--line); }
.related-posts h2 { margin:8px 0 22px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 12px 30px rgba(17,35,61,.07); transition: transform .2s ease, box-shadow .2s ease; }
.gallery-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gallery-card__cover { display:block; overflow:hidden; background:linear-gradient(135deg,var(--ink),var(--red)); }
.gallery-card__image { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background:var(--ink); }
.gallery-card__cover .gallery-card__image { display:block; object-fit:cover; transition:transform .35s ease; }
.gallery-card:hover .gallery-card__cover .gallery-card__image { transform:scale(1.04); }
.gallery-card__placeholder { display:grid; min-height:220px; place-items:center; color:rgba(255,255,255,.85); font-size:3rem; }
.gallery-card__body { padding: 22px; }
.gallery-card__body h3 { margin-bottom: 8px; }
.gallery-card__body p:last-child { margin-bottom: 0; color: var(--ink-soft); }
.album-detail { padding: 32px 0 100px; background:var(--mist); }
.album-detail__toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:26px; color:var(--ink-soft); font-size:.82rem; font-weight:800; }
.album-content { max-width:1120px; margin:0 auto; padding:clamp(20px,4vw,46px); border:1px solid var(--line); border-radius:var(--radius); background:var(--white); box-shadow:var(--shadow); }
.album-content > p { max-width:760px; margin:0 auto 24px; color:var(--ink-soft); }
.album-content .wp-block-gallery, .album-content .gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:0; }
.album-content .wp-block-gallery figure, .album-content .gallery figure { margin:0; overflow:hidden; border-radius:16px; background:var(--ink); }
.album-content .wp-block-gallery .wp-block-image { min-width:0; margin:0; }
.album-content .wp-block-gallery img, .album-content .gallery img { display:block; width:100%; height:260px; margin:0; object-fit:cover; }
.album-content > figure, .album-content__single-image { margin:0; text-align:center; }
.album-content__single-image img { max-height:720px; margin:0 auto; border-radius:18px; object-fit:contain; }
.notice-empty { padding:40px; border:1px dashed var(--line); border-radius:16px; background:var(--cream); text-align:center; }

@media (max-width:1020px) {
  .album-content .wp-block-gallery, .album-content .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:760px) {
  .album-detail { padding:22px 0 92px; }
  .album-detail__toolbar { align-items:flex-start; flex-direction:column; gap:8px; margin-bottom:18px; }
  .album-content { padding:14px; border-radius:18px; }
  .album-content .wp-block-gallery, .album-content .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .album-content .wp-block-gallery img, .album-content .gallery img { height:160px; }
  .album-content > p > img { display:block; width:100%; height:auto; margin:0 0 10px; border-radius:14px; }
}

/* Gallery thumbnails: consistent square 400px presentation; lightbox keeps originals. */
.album-content { max-width:1400px; padding:28px; }
.album-content .wp-block-gallery, .album-content .gallery { grid-template-columns:repeat(3,minmax(0,400px)); justify-content:center; gap:24px; }
.album-content .wp-block-gallery figure, .album-content .gallery figure { display:block !important; flex:none !important; width:400px !important; min-width:400px !important; max-width:400px !important; height:400px; border-radius:14px; }
.album-content .wp-block-gallery img, .album-content .gallery img { display:block; width:400px; max-width:100%; height:400px; aspect-ratio:1 / 1; object-fit:cover; }
.gallery-card__image { width:100%; height:400px; aspect-ratio:1 / 1; object-fit:cover; }

@media (max-width:1300px) {
  .album-content .wp-block-gallery, .album-content .gallery { grid-template-columns:repeat(2,minmax(0,400px)); }
}

@media (max-width:760px) {
  .album-content { padding:14px; }
  .album-content .wp-block-gallery, .album-content .gallery { grid-template-columns:minmax(0,400px); gap:16px; }
  .album-content .wp-block-gallery figure, .album-content .gallery figure,
  .album-content .wp-block-gallery img, .album-content .gallery img,
  .gallery-card__image { width:min(400px,100%) !important; min-width:0 !important; max-width:400px !important; height:400px; }
}
.search-form { display: flex; gap: 10px; }
.search-form input { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; }

@media (max-width: 1020px) {
  .header-main { position: relative; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 16px 20px 24px; background: var(--white); box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { display: block; }
  .primary-nav > ul > li { position: relative; }
  .primary-nav > ul > li > a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
  .primary-nav a { padding: 14px 10px; border-bottom: 1px solid var(--line); }
  .primary-nav .sub-menu { position: static; display: block; width: auto; min-height: 0; padding: 5px 15px 10px; transform: none; visibility: visible; opacity: 1; border: 0; border-radius: 0; box-shadow: none; }
  .primary-nav .sub-menu a { padding: 10px; }
  .primary-nav .sub-menu > li:not(.mega-menu__intro) > a { min-height:0; padding:10px; }
  .mega-menu__icon { flex-basis:28px; width:28px; height:28px; }
  .primary-nav .sub-menu .mega-menu__intro { padding: 10px 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); border-left: 0; }
  .menu-toggle { display: block; }
  .menu-toggle { display: grid; width: 48px; height: 48px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--cream); color: var(--ink); font-size: 1.65rem; line-height: 1; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
  .menu-toggle:hover, .menu-toggle:focus-visible, .menu-toggle[aria-expanded="true"] { background: var(--red); color: var(--white); transform: translateY(-1px); }
  .menu-toggle[aria-expanded="true"] span:first-child { font-size: 0; }
  .menu-toggle[aria-expanded="true"] span:first-child::after { content: "×"; font-size: 1.9rem; }
  .mobile-primary-nav { display: none; position: absolute; top: calc(100% + 10px); right: 14px; left: 14px; z-index: 30; max-height: calc(100vh - 120px); overflow-y: auto; padding: 10px; border: 1px solid rgba(17,35,61,.1); border-top: 4px solid var(--red); border-radius: 20px; background: var(--white); box-shadow: 0 24px 60px rgba(17,35,61,.2); }
  .mobile-primary-nav.is-open { display: block; }
  .mobile-menu { display: grid; gap: 4px; }
  .mobile-menu > li { border: 0; border-radius: 12px; background: var(--mist); }
  .mobile-menu > li > a { min-height: 50px; display: flex; align-items: center; padding: 12px 48px 12px 16px; border: 1px solid transparent; border-radius: 12px; color: var(--ink); font-size: .9rem; font-weight: 850; }
  .mobile-menu > li > a:hover, .mobile-menu > li > a:focus-visible { border-color: rgba(214,54,62,.25); background: var(--cream); color: var(--red); }
  .mobile-menu > li > a::before { content: ""; width: 7px; height: 7px; margin-right: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(241,178,75,.14); }
  .mobile-menu__more { top: 8px; right: 8px; width: 34px; height: 34px; border: 0; background: var(--white); box-shadow: 0 4px 12px rgba(17,35,61,.08); }
  .mobile-menu__sublist { margin: 0 10px 10px 18px; padding: 4px 0 4px 12px; border-left: 2px solid var(--gold); }
  .mobile-menu__sublist a { min-height: 42px; padding: 10px 12px; border-radius: 9px; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
  .mobile-menu__sublist a:hover, .mobile-menu__sublist a:focus-visible { background: var(--white); color: var(--red); }
  body.mobile-menu-open { overflow: hidden; }
  body.mobile-menu-open::after { content: ""; position: fixed; inset: 0; z-index: 19; background: rgba(17,35,61,.42); backdrop-filter: blur(2px); }
  .header-actions .button--outline { display: none; }
  .grid--4, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-layout { grid-template-columns:1fr; }
  .blog-sidebar { position:static; grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 760px) {
  .video-section-heading { margin-top: 42px; }
  .primary-nav { display: none !important; }
  .mobile-primary-nav { display: none; position: absolute; top: 100%; left: 50%; width: 100vw; transform: translateX(-50%); z-index: 20; padding: 10px 18px 18px; background: var(--white); box-shadow: var(--shadow); }
  .mobile-primary-nav.is-open { display: block; }
  .mobile-menu { max-width: 520px; margin: 0 auto; padding: 0; list-style: none; }
  .mobile-menu li { position: relative; border-bottom: 1px solid var(--line); }
  .mobile-menu > li > a { display: block; padding: 13px 48px 13px 8px; color: var(--ink); text-align: left; font-weight: 800; }
  .mobile-menu > li > a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; }
  .mobile-menu__more { position: absolute; top: 7px; right: 3px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); color: var(--red); font-size: 1.25rem; font-weight: 800; line-height: 1; cursor: pointer; }
  .mobile-menu__more:hover, .mobile-menu__more:focus-visible { background: var(--gold); color: var(--ink); }
  .mobile-menu__sublist { display: none; margin: 0 12px 8px; padding: 0 0 0 12px; border-left: 2px solid var(--gold); list-style: none; }
  .mobile-menu .is-expanded > .mobile-menu__sublist { display: block; }
  .mobile-menu .is-expanded > .mobile-menu__more { transform: rotate(45deg); }
  .mobile-menu__sublist a { display: block; padding: 10px 8px; color: var(--ink-soft); font-size: .86rem; }
  .mobile-menu__sublist a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-menu a:hover, .mobile-menu a:focus-visible { background: var(--cream); color: var(--red); }
  .mobile-primary-nav { top: calc(100% + 8px); right: 10px; left: 10px; width: auto; transform: none; padding: 9px; border-radius: 18px; }
  .mobile-menu > li > a { display: flex; align-items: center; min-height: 50px; padding: 12px 48px 12px 16px; border: 1px solid transparent; border-radius: 12px; }
  .mobile-menu__more { top: 8px; right: 8px; border: 0; background: var(--white); box-shadow: 0 4px 12px rgba(17,35,61,.08); }
  .mobile-menu__sublist { margin: 0 10px 10px 18px; padding: 4px 0 4px 12px; border-left: 2px solid var(--gold); }
  .header-main { position: relative; }
  .header-main > .button { display: none; }
  .mobile-footer-panel { display: block; padding: 28px 18px; background: var(--red); color: var(--white); }
  .mobile-footer-panel__inner { max-width: 560px; margin: 0 auto; }
  .mobile-footer-panel h2 { margin: 4px 0 6px; color: var(--white); font-size: 1.8rem; }
  .mobile-footer-panel p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.85); }
  .mobile-footer-panel__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
  .mobile-footer-panel__actions .button { width: 100%; padding: 12px 8px; text-align: center; font-size: .78rem; }
  .mobile-footer-panel .button--outline { border-color: rgba(255,255,255,.55); color: var(--white); }
  .mobile-footer-panel .button--gold { background: var(--gold); color: var(--ink); }
  body { padding-bottom: 82px; }
  .footer-quick-panel { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1000; display: block; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--red); box-shadow: 0 -8px 24px rgba(17,35,61,.18); }
  .footer-quick-panel__inner { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .footer-quick-link { flex-direction: column; gap: 3px; min-height: 58px; padding: 6px 2px; border-radius: 9px; font-size: .67rem; line-height: 1.1; }
  .footer-quick-link__icon { width: 22px; height: 22px; flex-basis: 22px; }
  .footer-quick-link__icon svg { width: 19px; height: 19px; }
  .glance-pathways .card__body { display: block; }
  .glance-pathways .card__body p { margin: 8px 0 12px; }
  .hero__controls { right: auto; left: 50%; width: max-content; transform: translateX(-50%); }
  .resilience-controls { right: auto; left: 50%; width: max-content; transform: translateX(-50%); gap: 24px; }
  .resilience-layout { grid-template-columns:1fr; gap:26px; }
  .resilience-showcase { min-height:360px; }
  .resilience-slide img { height:360px; }
  .resilience-copy { padding:8px 0 0; }
  .passions__tabs { grid-template-columns: repeat(2, 1fr); }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .topbar__inner { align-items: flex-start; padding: 8px 0; }
  .topbar__links { gap: 10px; }
  .header-main { min-height: 74px; }
  .brand__name { font-size: 1.05rem; }
  .brand__mark { width: 40px; height: 40px; }
  .header-actions .button { display: none; }
  .hero__slides { height: 620px; }
  .hero__content { padding: 100px 0 105px; }
  .hero__content p { font-size: 1rem; }
  .section { padding: 70px 0; }
  .section-heading, .intro, .video-feature { display: block; }
  .section-heading .button { margin-top: 18px; }
  .grid--2, .grid--3, .grid--4, .social-strip, .footer-grid, .cbc-pathways { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .intro__figure { margin-top: 30px; }
  .intro__image { margin-top: 0; }
  .page-feature { display: block; }
  .page-feature__gallery { margin-top: 30px; }
  .about-photo-gallery--compact .explore-gallery__track { min-height: 0; }
  .about-photo-gallery--compact .explore-gallery__slide > img { min-height: 300px; }
  .explore-gallery__slide { grid-template-columns:1fr; }
  .explore-gallery__slide > img { min-height:300px; max-height:360px; }
  .blog-card { display:block; }
  .blog-card__media { min-height:220px; }
  .blog-sidebar { grid-template-columns:1fr; }
  .article-page { padding:24px; }
  .explore-gallery__caption { padding:30px 24px 36px; }
  .page-feature img { margin-top: 30px; }
  .director-message { display:block; width:min(calc(100% - 28px), var(--container)); margin:55px auto; padding:28px 22px; }
  .director-message img { margin-top:28px; max-height:420px; }
  .admissions-form-section { width:min(calc(100% - 28px), 980px); margin:55px auto; padding:28px 20px; }
  .form-grid { grid-template-columns:1fr; }
  .video-feature__body { padding: 35px 25px; }
  .video-archive-card__embed iframe { min-height:220px; }
  .tassia-pathways { margin:55px 0; }
  .tassia-pathways__tabs { overflow:auto; flex-wrap:nowrap; padding:10px 10px 0; }
  .tassia-pathway-tab { flex:0 0 auto; padding:13px 12px; font-size:.82rem; }
  .tassia-pathway-panel { display:block; }
  .tassia-pathway-panel__copy { padding:32px 24px; }
  .tassia-pathway-panel__visual, .tassia-pathway-panel__visual > img { min-height:390px; }
  .tassia-pathway-stats { right:12px; bottom:12px; left:12px; }
  .tassia-pathway-stats div { padding:10px; }
  .tassia-pathway-stats strong { font-size:1.35rem; }
  .tassia-pathway-panel__controls { right:12px; top:12px; left:12px; }
  .passions__panels { min-height: 620px; }
  .passion-panel { display: block; }
  .passion-panel > img { min-height: 310px; height: 310px; }
  .passion-panel__content { padding: 30px 24px 38px; }
  .stat-row { grid-template-columns: 1fr 1fr 1fr; }
  .stat { padding: 14px 10px; }
  .stat strong { font-size: 1.5rem; }
  .notice { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .notice__date { grid-column: 1 / -1; }
  .notice__arrow { grid-column: 2; grid-row: 2; }
  .footer-grid { gap: 28px; }
}
@media (max-width: 420px) {
  .mobile-primary-nav { padding-right: 10px; padding-left: 10px; }
  .mobile-menu > li > a { padding-top: 11px; padding-bottom: 11px; font-size: .78rem; }
  .mobile-menu__more { top: 5px; width: 30px; height: 30px; font-size: 1.1rem; }
  .mobile-menu__sublist a { font-size: .75rem; padding-top: 8px; padding-bottom: 8px; }
  .topbar__links { white-space: nowrap; }
  .topbar__links > a { font-size: .67rem; }
  .topbar__social { gap: 4px; margin-left: 4px; }
  .topbar__social a { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Rebuilt mobile navigation drawer. */
@media (max-width: 1020px) {
  .mobile-primary-nav { padding: 0; overflow: hidden; }
  .mobile-menu__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--cream), var(--white)); }
  .mobile-menu__header > div { display: grid; gap: 2px; }
  .mobile-menu__eyebrow { color: var(--red); font-size: .66rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
  .mobile-menu__header strong { color: var(--ink); font-family: "Fraunces", Georgia, serif; font-size: 1.45rem; line-height: 1; }
  .mobile-menu__close { display: grid; width: 40px; height: 40px; place-items: center; flex: 0 0 40px; border: 0; border-radius: 12px; background: var(--red); color: var(--white); font-size: 1.7rem; line-height: 1; cursor: pointer; }
  .mobile-menu__close:hover, .mobile-menu__close:focus-visible { background: var(--red-dark); }
  .mobile-menu__body { max-height: calc(100vh - 220px); overflow-y: auto; padding: 12px; }
  .mobile-menu { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .mobile-menu > li { margin: 0; }
  .mobile-menu > li:not(.mobile-menu__quick) { background: var(--mist); }
  .mobile-menu > li > a { min-height: 52px; padding: 14px 50px 14px 17px; }
  .mobile-menu > li.mobile-menu__quick > a { background: var(--ink); color: var(--white); }
  .mobile-menu > li.mobile-menu__quick > a:hover, .mobile-menu > li.mobile-menu__quick > a:focus-visible { background: var(--red); color: var(--white); }
  .mobile-menu__quick > a::before { background: var(--gold); }
  .mobile-menu__more { z-index: 1; }
  .mobile-menu__more[aria-expanded="true"] { background: var(--gold); color: var(--ink); transform: rotate(45deg); }
  .mobile-menu .is-expanded > .mobile-menu__sublist { display: grid; gap: 2px; }
}

@media (max-width: 760px) {
  .mobile-primary-nav { top: calc(100% + 8px); right: 8px; left: 8px; max-height: calc(100vh - 150px); border-radius: 18px; }
  .mobile-menu__header { padding: 16px 15px 14px; }
  .mobile-menu__body { max-height: calc(100vh - 245px); padding: 9px; }
  .mobile-menu > li > a { min-height: 48px; padding: 12px 48px 12px 14px; font-size: .84rem; }
  .mobile-menu__sublist a { min-height: 40px; font-size: .78rem; }
}

/* Consistent, full-frame media for every scrolling showcase. */
.about-photo-gallery--compact .explore-gallery__track { min-height:520px; }
.about-photo-gallery--compact .explore-gallery__slide > img { height:520px; min-height:520px; object-fit:contain; background:var(--ink); }
@media (max-width:760px) {
  .about-photo-gallery--compact .explore-gallery__track { min-height:360px; }
  .about-photo-gallery--compact .explore-gallery__slide > img { height:360px; min-height:360px; }
  .explore-gallery__slide > img { height:360px; min-height:360px; }
}
