/* =========================================================
   President's College Maharagama — About Us
   Liquid-glass design system
   ========================================================= */

:root{
  --green: #00A859;
  --green-glow: rgba(0,168,89,.55);
  --orange: #F58634;
  --orange-glow: rgba(245,134,52,.55);
  --ink: #eef1ee;
  --ink-dim: #c7cbc8;
  --bg: #0a0b0a;

  --glass-fill: rgba(24,26,24,.42);
  --glass-fill-strong: rgba(15,16,15,.58);
  --glass-border: rgba(255,255,255,.14);
  --glass-highlight: rgba(255,255,255,.35);

  --radius-xl: 48px;
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Poppins', 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22,1,.36,1);
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: #050605;
  overflow-x: hidden;
}

/* ---------- fixed blurred backdrop ---------- */
.backdrop{
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('images/hero-bg.png');
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(.55) saturate(1.05);
  transform: scale(1.08);
}
.backdrop::after{
  content:'';
  position:absolute; inset:0;
  background:
    radial-gradient(120% 90% at 15% -10%, rgba(0,168,89,.18), transparent 55%),
    radial-gradient(120% 90% at 100% 10%, rgba(245,134,52,.16), transparent 55%),
    linear-gradient(180deg, rgba(4,5,4,.55), rgba(4,5,4,.85) 60%, #04050400 100%);
}

/* floating ambient orbs for a little life behind the glass */
.orb{
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: .35;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite;
}
.orb.o1{ width:420px; height:420px; background:var(--green); top:-120px; left:-100px; }
.orb.o2{ width:380px; height:380px; background:var(--orange); bottom:-140px; right:-80px; animation-duration: 22s; animation-delay: -6s; }

@keyframes drift{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(40px,-30px) scale(1.08); }
}

/* ---------- utility: divider (green/orange rule) ---------- */
.rule{
  display:flex;
  align-items:center;
  gap: 8px;
  margin-top: 6px;
}
.rule span{
  display:block;
  height: 3px;
  border-radius: 2px;
}
.rule .g{ width: 46px; background: var(--green); box-shadow: 0 0 10px var(--green-glow); }
.rule .o{ flex: 1; max-width: 210px; background: var(--orange); box-shadow: 0 0 10px var(--orange-glow); }

.eyebrow{
  font-family: var(--font-display);
  letter-spacing: .04em;
  color: var(--orange);
  font-size: clamp(.8rem, 1vw, .98rem);
  margin: 0 0 2px;
  text-shadow: 0 0 14px var(--orange-glow);
}

.section-title{
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .01em;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  margin: 0;
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}

/* =========================================================
   Navbar — now provided by the shared navbar.css component
   (see navbar.html / navbar.css / navbar.js). Old page-local
   navbar rules removed to avoid conflicting with it.
   ========================================================= */

/* =========================================================
   Page intro
   ========================================================= */
.page-intro{
  max-width: 900px;
  margin: 64px auto 0;
  padding: 0 24px;
  text-align:center;
}
.page-intro h1{
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 10px 0 0;
  color:#fff;
  text-shadow: 0 4px 40px rgba(0,0,0,.55);
}
.page-intro .rule{ justify-content:center; }
.page-intro p{
  color: var(--ink-dim);
  max-width: 640px;
  margin: 18px auto 0;
  line-height: 1.7;
  font-size: .98rem;
}

/* =========================================================
   Shared: liquid glass panel
   ========================================================= */
.container{
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.glass{
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--glass-fill);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 60px rgba(255,255,255,.02);
  overflow: hidden;
}
.glass::before{
  /* top glossy highlight, like light hitting glass */
  content:'';
  position:absolute;
  top:0; left:6%; right:6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity:.6;
}
.glass::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.10), transparent 60%);
}

section{ padding: 46px 0; }

.panel{
  padding: 44px clamp(20px,4vw,56px) 40px;
}

.panel-head{
  display:flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}
.panel-head .heading-block{ text-align:left; }

/* =========================================================
   Badge & Flag section
   ========================================================= */
.badge-flag{
  display:grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(20px,4vw,54px);
  align-items:center;
}
.bf-item{ text-align:center; }
.bf-media{
  border-radius: var(--radius-lg);
  padding: 22px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 260px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.bf-media img{ max-width: 100%; max-height: 260px; object-fit: contain; filter: drop-shadow(0 10px 26px rgba(0,0,0,.45)); }
.bf-item:hover .bf-media{
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(0,168,89,.35), 0 0 40px var(--green-glow);
}
.bf-item:nth-child(2):hover .bf-media{
  box-shadow: 0 0 0 1px rgba(245,134,52,.35), 0 0 40px var(--orange-glow);
}
.bf-label{
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin: 20px 0 0;
}
.bf-item .rule{ justify-content:center; margin-top:8px; }

/* =========================================================
   History section (video + caption)
   ========================================================= */
.history-frame{
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: #000;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  position: relative;
}
.video-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background:#000;
}
.video-wrap iframe{
  position:absolute; inset:0;
  width:100%; height:100%;
  border:0;
}
.video-caption{
  text-align:center;
  color: var(--ink-dim);
  font-size: .78rem;
  letter-spacing:.04em;
  margin-top: 18px;
  text-transform: uppercase;
}

/* =========================================================
   Anthem section (lyrics + video)
   ========================================================= */
.anthem-grid{
  display:grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(24px,4vw,56px);
  align-items: start;
}
.lyrics{
  font-size: .98rem;
  line-height: 1.85;
  color: var(--ink);
}
.lyrics p{ margin: 0 0 22px; }
.lyrics p:last-child{ margin-bottom:0; }

.anthem-video .history-frame{ margin-bottom: 14px; }
.anthem-credit{
  font-size: .82rem;
  color: var(--ink-dim);
  line-height: 1.7;
}
.anthem-credit b{ color:#fff; }

/* =========================================================
   School Profile section (narrative copy)
   ========================================================= */
.profile-copy{
  font-size: .98rem;
  line-height: 1.85;
  color: var(--ink);
  max-width: 980px;
}
.profile-copy p{ margin: 0 0 20px; }
.profile-copy p:last-child{ margin-bottom: 0; }

/* =========================================================
   Vision & Mission section
   ========================================================= */
.vm-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px,3vw,40px);
}
.vm-card{
  padding: 28px clamp(18px,3vw,32px);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.vm-card:hover{
  transform: translateY(-4px);
  border-color: rgba(0,168,89,.4);
  box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 30px var(--green-glow);
}
.vm-card.mission-card:hover{
  border-color: rgba(245,134,52,.4);
  box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 30px var(--orange-glow);
}
.vm-tag{
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 1.1rem;
  color: var(--orange);
  margin: 0 0 6px;
}
.vm-card.mission-card .vm-tag{ color: var(--green); }
.vm-sinhala-title{
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}
.vm-quote{
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.7;
  margin: 0 0 16px;
}
.vm-translation{
  font-size: .88rem;
  color: var(--ink-dim);
  line-height: 1.75;
  margin: 0;
}

/* =========================================================
   School Uniform section
   ========================================================= */
.uniform-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px,3vw,28px);
}
.uniform-card{
  padding: 26px clamp(16px,2.6vw,26px);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.uniform-card:hover{
  transform: translateY(-4px);
  border-color: rgba(0,168,89,.4);
  box-shadow: 0 16px 36px rgba(0,0,0,.35), 0 0 28px var(--green-glow);
}
.uniform-card:nth-child(2):hover{
  border-color: rgba(245,134,52,.4);
  box-shadow: 0 16px 36px rgba(0,0,0,.35), 0 0 28px var(--orange-glow);
}
.uniform-card h3{
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 4px;
}
.uniform-card .rule{ margin-bottom: 16px; }
.uniform-sub{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--orange);
  margin: 18px 0 8px;
}
.uniform-sub:first-of-type{ margin-top: 0; }
.uniform-card ul{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.uniform-card li{
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-dim);
  padding-left: 16px;
  position: relative;
}
.uniform-card li::before{
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 900px){
  .vm-grid{ grid-template-columns: 1fr; }
  .uniform-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Rules section
   ========================================================= */
.rules-list{
  display:grid;
  gap: 16px;
}
.rule-item{
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  line-height: 1.65;
  font-size: .95rem;
  color: var(--ink-dim);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.rule-item b{ color:#fff; font-weight:600; }
.rule-item:hover{
  background: rgba(255,255,255,.055);
  border-color: rgba(0,168,89,.4);
  transform: translateX(4px);
  box-shadow: -3px 0 0 var(--green), 0 10px 30px rgba(0,0,0,.35);
}
.rule-item:nth-child(even):hover{
  border-color: rgba(245,134,52,.4);
  box-shadow: -3px 0 0 var(--orange), 0 10px 30px rgba(0,0,0,.35);
}

/* =========================================================
   Footer — now provided by the shared footer.css component
   (see footer.html / footer.css / footer.js).
   ========================================================= */

/* =========================================================
   Click / ripple + reveal animations, neon focus states
   ========================================================= */
.ripple{
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim .65s var(--ease);
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  pointer-events: none;
}
@keyframes rippleAnim{
  to{ transform: scale(1); opacity: 0; }
}

.clickable{ position: relative; overflow: hidden; cursor: pointer; }

.neon-pulse{
  animation: neonPulse .65s var(--ease);
}
@keyframes neonPulse{
  0%{ box-shadow: 0 0 0 0 var(--green-glow); }
  40%{ box-shadow: 0 0 34px 6px var(--green-glow); }
  100%{ box-shadow: 0 0 0 0 rgba(0,168,89,0); }
}
.neon-pulse.orange{ animation-name: neonPulseOrange; }
@keyframes neonPulseOrange{
  0%{ box-shadow: 0 0 0 0 var(--orange-glow); }
  40%{ box-shadow: 0 0 34px 6px var(--orange-glow); }
  100%{ box-shadow: 0 0 0 0 rgba(245,134,52,0); }
}

/* content is visible by default; only animates in once JS confirms it can
   run the reveal (html.js-ready), so a slow/blocked script never hides content */
html.js-ready .reveal{
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
html.js-ready .reveal.in{
  opacity: 1;
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
.icon-btn:focus-visible{
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001s !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px){
  .badge-flag, .anthem-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  section{ padding: 30px 0; }
  .panel{ padding: 32px 18px 30px; }
}

/* =========================================================
   Breadcrumbs (matching events.html page-intro pattern)
   ========================================================= */
.breadcrumbs{
  display:flex; align-items:center; justify-content:center; gap:8px;
  margin-top:20px; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase;
  font-weight:600; color: var(--ink-dim);
}
.breadcrumbs a{ color: var(--ink-dim); text-decoration:none; display:flex; align-items:center; gap:5px; transition: color .2s; }
.breadcrumbs a:hover{ color: var(--orange); }
.breadcrumbs .sep{ color: rgba(255,255,255,.3); }
.breadcrumbs .active{ color: var(--green); }

/* ============================================================================
   SHARED NAVBAR + PRELOADER + QUICK MENU + SEARCH OVERLAY + FOOTER
   Ported from the Home page so Events shares the exact same navbar/footer
   features as Home and News (mobile drawer, quick-access menu, live search,
   sign-in dropdown, chat launcher, dark/light toggle), using this file's own
   design tokens (--green/--orange/--ink/--glass-*).
   The preloader below uses the school's official maroon + green orbital-ring
   design (ported 1:1 from preloader.html) instead of a generic spinner.
   ============================================================================ */

body{ padding-top: 92px; } /* navbar is now position:fixed, was sticky/in-flow before */
html.nav-locked, body.nav-locked{ overflow: hidden !important; height: 100vh !important; }
.nav-icons button svg{ pointer-events: none; }

/* ---------- 1. Preloader — official maroon/green orbital rings (ported from preloader.html) ---------- */
.preloader{
  position: fixed; inset: 0; z-index: 9999;
  background-color: #030710;
  display:flex; align-items:center; justify-content:center;
  transform: translate3d(0,0,0);
  transition: transform .85s cubic-bezier(.85,0,.15,1);
}
.preloader.dismissed{ transform: translate3d(0,-100%,0); }
.preloader-structure{
  position: relative; width: 190px; height: 190px;
  display:flex; align-items:center; justify-content:center;
}
.preloader-ring{
  position: absolute; border: 5px solid transparent; border-radius: 50%;
  animation: pcmOrbitLinear infinite linear;
}
.preloader-ring.ring-maroon{
  width: 100%; height: 100%;
  border-top-color: #802400; border-bottom-color: #802900;
  animation-duration: 1.4s;
}
.preloader-ring.ring-green{
  width: 78%; height: 78%;
  border-left-color: #008751; border-right-color: #008751;
  animation-duration: 1s; animation-direction: reverse;
}
.preloader-logo-capsule{
  position: absolute; width: 110px; height: 110px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(255,183,3,.1);
  animation: pcmBreathingGlow 2s ease-in-out infinite;
}
.preloader-logo{ width: 90%; height: 90%; object-fit: contain; }
@keyframes pcmOrbitLinear{ 0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); } }
@keyframes pcmBreathingGlow{
  0%,100%{ transform: scale(.94); opacity:.85; box-shadow: 0 0 28px rgba(255,183,3,.1); }
  50%{ transform: scale(1.04); opacity:1; box-shadow: 0 0 50px rgba(255,183,3,.25); }
}

/* ---------- 2. Navbar (fixed, full-width, curved bottom corners) ---------- */
.navbar{
  position: fixed; top: 0; left: 0; width: 100%; z-index: 3500;
  background: rgba(6,7,6,.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 14px 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  border-bottom: 1px solid var(--glass-border);
}
.nav-container{ display:flex; justify-content:space-between; align-items:center; max-width: 1550px; margin: 0 auto; width: 100%; }
.mobile-menu-toggle{
  display:none; background:transparent; border:none;
  width: 26px; height: 20px; flex-direction:column; justify-content:space-between;
  cursor:pointer; z-index: 2200;
}
.hamburger-bar{
  width:100%; height:3px; background-color:#fff; border-radius:4px;
  transform-origin:left center;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .2s ease;
}
.mobile-menu-toggle.open .hamburger-bar:nth-child(1){ transform: rotate(45deg) translateY(-2px); }
.mobile-menu-toggle.open .hamburger-bar:nth-child(2){ opacity:0; transform: scaleX(0); }
.mobile-menu-toggle.open .hamburger-bar:nth-child(3){ transform: rotate(-45deg) translateY(2px); }

.logo-area{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.nav-crest{ height:48px; width:auto; object-fit:contain; }
.logo-text .main-title{
  font-family: var(--font-display); font-weight:400; letter-spacing:.01em;
  text-transform:uppercase; color:#fff; display:block; font-size: 1.05rem;
}
.logo-text .sub-title{
  font-family: var(--font-body); font-weight:600; letter-spacing:.14em;
  color: var(--orange); text-shadow: 0 0 12px var(--orange-glow);
  display:block; font-size:.72rem;
}

.nav-links{ display:flex; align-items:center; gap: 4px; }
.nav-links a{
  color: var(--ink-dim); text-decoration:none; font-weight:600; font-size:.85rem;
  border-radius: 999px; padding: 6px 12px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-links a:hover{ color:#fff; background: rgba(255,255,255,.06); }
.nav-links a.active-pill{
  color: var(--orange) !important;
  background: rgba(245,134,52,.12);
  border: 1px solid rgba(245,134,52,.35);
  box-shadow: 0 0 16px rgba(245,134,52,.2);
}

.nav-icons{ display:flex; align-items:center; gap: 10px; }
.nav-icons button{
  width: 36px; height: 36px; border-radius:50%;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,.04);
  display:inline-flex; align-items:center; justify-content:center;
  color: var(--ink); cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), color .2s, background .2s;
}
.nav-icons button:hover{
  color:#0a0b0a; background: var(--green); box-shadow: 0 0 18px var(--green-glow);
  transform: translateY(-2px);
}
.nav-icons button svg{ width:16px; height:16px; }
#quickMenuTriggerBtn.menu-trigger-active{ background-color: var(--orange) !important; box-shadow: 0 0 18px var(--orange-glow); color:#fff; }

/* ---------- 3. Dark / Light mode toggle ---------- */
.theme-mode-toggle{ background:none; border:none !important; padding:0; cursor:pointer; display:inline-flex; align-items:center; }
.theme-mode-toggle .tmt-track{
  position:relative; width:36px; height:36px; border-radius:50%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-border);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  transition: background .4s ease, box-shadow .4s ease;
}
.tmt-thumb{ position:relative; width:100%; height:100%; border-radius:50%; display:flex; align-items:center; justify-content:center; color: var(--orange); transition: color .4s ease; }
.tmt-icon{ width:16px; height:16px; position:absolute; transition: opacity .25s ease, transform .3s ease; }
.tmt-icon-moon{ opacity:1; transform: rotate(0) scale(1); }
.tmt-icon-sun{ opacity:0; transform: rotate(-90deg) scale(.5); }
body.light-mode .tmt-track{ background: rgba(245,134,52,.12); box-shadow: 0 0 10px rgba(245,134,52,.25); }
body.light-mode .tmt-icon-sun{ opacity:1; transform: rotate(0) scale(1); }
body.light-mode .tmt-icon-moon{ opacity:0; transform: rotate(90deg) scale(.5); }
.theme-mode-toggle.tmt-glitch .tmt-track{ animation: tmtSoftSwitch .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes tmtSoftSwitch{ 0%{transform:scale(1) rotate(0);} 45%{transform:scale(.85) rotate(160deg);} 100%{transform:scale(1) rotate(360deg);} }

/* ---------- 4. Sign-in dropdown ---------- */
.signin-dropdown-wrapper{ position:relative; display:inline-flex; align-items:center; }
.signin-trigger-btn{ background:none; border:1px solid var(--glass-border); color:#fff; }
.signin-dropdown-wrapper.signin-open .signin-trigger-btn{ color: var(--orange); transform: scale(1.05); background: rgba(255,255,255,.04); }
.signin-dropdown-menu{
  position:absolute; top: calc(100% + 16px); right: -8px; min-width: 210px;
  background: rgba(10,11,10,.85); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border); border-radius: 18px; padding: 8px;
  box-shadow: 0 20px 45px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.14);
  display:flex; flex-direction:column; gap:4px;
  opacity:0; visibility:hidden; transform: translateY(-8px) scale(.96); transform-origin: top right;
  transition: opacity .25s cubic-bezier(.16,1,.3,1), transform .25s cubic-bezier(.16,1,.3,1), visibility .25s;
  z-index: 4000;
}
.signin-dropdown-wrapper.signin-open .signin-dropdown-menu{ opacity:1; visibility:visible; transform: translateY(0) scale(1); }
.signin-dropdown-item{
  display:flex; align-items:center; gap:10px; padding: 11px 14px; border-radius: 12px;
  color: var(--ink-dim); text-decoration:none; font-size:.85rem; font-weight:600; letter-spacing:.3px;
  transition: background .2s ease, color .2s ease;
}
.signin-dropdown-item svg{ flex-shrink:0; }
.signin-dropdown-item:hover{ background: rgba(0,168,89,.14); color:#fff; }
.signin-dropdown-item:last-child:hover{ background: rgba(245,134,52,.14); }

/* ---------- 5. Nav chat launcher ---------- */
.nav-icons .nav-chat-btn{
  width:36px; height:36px; border-radius:50%;
  background: var(--green); border: 1px solid #00e676; color:#fff;
  animation: navChatNeoBlink 2.2s ease-in-out infinite;
}
.nav-icons .nav-chat-btn:hover{ background:#00e676; transform: translateY(-1px); }
.nav-icons .nav-chat-btn.nav-chat-btn-clicked{ animation: navChatClickPulse .55s ease; }
@keyframes navChatNeoBlink{ 0%,100%{ box-shadow: 0 0 3px rgba(0,230,118,.35), 0 0 0 rgba(0,230,118,0); } 50%{ box-shadow: 0 0 14px rgba(0,230,118,.75), 0 0 22px rgba(0,230,118,.35); } }
@keyframes navChatClickPulse{ 0%{transform:scale(1);} 35%{transform:scale(1.1); box-shadow:0 0 26px rgba(0,230,118,.95);} 100%{transform:scale(1);} }

/* ---------- 6. Menu backdrop + Quick access overlay ---------- */
.menu-backdrop-overlay{
  position: fixed; inset:0; background-color: rgba(0,0,0,.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity:0; visibility:hidden; z-index: 1500;
  transition: opacity .4s ease, visibility .4s ease;
}
body.nav-locked .menu-backdrop-overlay{ opacity:1; visibility:visible; }

.quick-access-overlay{
  position: fixed; inset:0; max-height: 100dvh; overflow-y:auto;
  background-color: #05060a;
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  z-index: 3000; display:flex; justify-content:center; align-items:center;
  opacity:0; visibility:hidden; transform: scale(1.01);
  transition: opacity .4s cubic-bezier(.16,1,.3,1), visibility .4s cubic-bezier(.16,1,.3,1), transform .4s cubic-bezier(.16,1,.3,1);
}
.quick-access-overlay::before{
  content:""; position:absolute; inset:0;
  background: radial-gradient(circle at 35% 50%, rgba(0,168,89,.14) 0%, rgba(5,6,5,.95) 100%);
  opacity:.6; z-index:-1;
}
.quick-access-overlay.active{ opacity:1; visibility:visible; transform: scale(1); }
.quick-menu-close{
  position:absolute; top: 95px; right: 45px; background:none; border:none;
  color: rgba(255,255,255,.35); font-size: 4rem; cursor:pointer; line-height:1;
  transition: color .2s, transform .25s cubic-bezier(.16,1,.3,1); z-index: 3200;
}
.quick-menu-close:hover{ color: var(--orange); transform: rotate(90deg); }
.quick-menu-wrapper{
  width:100%; max-width: 1340px; display:grid; grid-template-columns: 1.3fr 1fr;
  align-items:center; padding: 20px 80px; gap: 80px;
}
.quick-menu-branding{ position:relative; display:flex; justify-content:center; align-items:center; width:100%; min-height:620px; }
.giant-vertical-text{
  position:absolute; top:50%; left:50%; transform: translate(-50%,-50%);
  display:flex; flex-direction:column; justify-content:center; align-items:center;
  line-height:.8; user-select:none; pointer-events:none; width:100%; z-index:1;
}
.giant-vertical-text span{
  font-size: clamp(9rem, 16vw, 15rem); font-weight:900; font-family: var(--font-body);
  background: linear-gradient(180deg, rgba(0,168,89,.28) 0%, rgba(5,6,5,.05) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -4px; margin-right: 350px;
}
.quick-menu-crest-glow-zone{ position:relative; display:flex; justify-content:center; align-items:center; z-index:2; }
.quick-menu-crest{
  width: clamp(220px, 30vw, 520px); max-width:100%; margin-left:-100px; height:auto; object-fit:contain;
  filter: drop-shadow(0 0 50px var(--green-glow)) drop-shadow(0 0 100px rgba(0,168,89,.4)) drop-shadow(0 25px 45px rgba(0,0,0,.7));
  animation: subtle-float 6s ease-in-out infinite;
}
@keyframes subtle-float{ 0%,100%{transform:translateY(0);} 50%{transform:translateY(-12px);} }
.quick-menu-links-panel{ display:flex; justify-content:flex-start; align-items:center; }
.quick-nav-tree{ display:flex; flex-direction:column; gap: clamp(8px,2.3vh,18px); text-align:left; }
.quick-link-item{
  font-size: 40px; font-weight:400; font-style:italic; text-transform:uppercase;
  color: var(--orange); text-decoration:none; letter-spacing:.5px; line-height:1.1;
  display:inline-block; transition: transform .25s cubic-bezier(.16,1,.3,1), color .2s ease;
  transform-origin: left center; text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.quick-link-item:hover{ color:#fff; transform: translateX(12px) scale(1.02); }
.quick-link-item.link-green-active{ color: var(--green); }
.quick-link-item.link-green-active:hover{ color:#fff; }

/* ---------- 7. Search overlay ---------- */
.search-overlay{
  position: fixed; inset:0; background-color: #05060a;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 4000; display:flex; justify-content:center; align-items:center;
  opacity:0; visibility:hidden; transform: scale(1.02);
  transition: opacity .35s cubic-bezier(.16,1,.3,1), visibility .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1);
}
.search-overlay::before{
  content:""; position:absolute; inset:0;
  background: radial-gradient(circle at center, rgba(0,168,89,.16) 0%, rgba(5,6,5,.92) 100%), url('images/Hero Section Background 03.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity:.55; z-index:-1;
}
.search-overlay.active{ opacity:1; visibility:visible; transform: scale(1); }
.search-overlay-close{
  position:absolute; top:30px; right:45px; background:none; border:none;
  color: rgba(255,255,255,.4); font-size:4rem; cursor:pointer; line-height:1;
  transition: color .2s, transform .25s cubic-bezier(.16,1,.3,1); z-index: 4200;
}
.search-overlay-close:hover{ color: var(--orange); transform: rotate(90deg); }
.search-overlay-wrapper{ width:100%; max-width:720px; display:flex; flex-direction:column; align-items:center; padding:24px; margin-top:-20px; }
.search-branding-zone{ margin-bottom:25px; display:flex; justify-content:center; }
.search-overlay-crest{
  width:380px; height:auto; object-fit:contain;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,.5));
  animation: searchCrestFloat 3.5s ease-in-out infinite;
}
@keyframes searchCrestFloat{ 0%,100%{transform:translateY(0);} 50%{transform:translateY(-8px);} }
.search-title-divider{ display:flex; align-items:center; justify-content:center; width:100%; gap:20px; margin-bottom:25px; }
.search-title-divider h2{
  font-family: var(--font-display); font-size:1.25rem; font-weight:400; color:#fff;
  text-transform:uppercase; letter-spacing:1.5px; white-space:nowrap; text-shadow: 0 2px 4px rgba(0,0,0,.4);
}
.decor-line{ height:4px; flex-grow:1; border-radius:2px; }
.decor-line.line-left{ background: linear-gradient(to right, var(--green) 0%, var(--orange) 100%); }
.decor-line.line-right{ background: linear-gradient(to left, var(--green) 0%, var(--orange) 100%); }
.search-input-container{ position:relative; width:100%; max-width:640px; margin-bottom:25px; border-radius:50px; animation: searchBarPulseGlow 2.6s ease-in-out infinite; }
@keyframes searchBarPulseGlow{ 0%,100%{ box-shadow: 0 10px 30px rgba(0,168,89,.15), 0 0 0 0 rgba(0,168,89,.25); } 50%{ box-shadow: 0 10px 40px rgba(245,134,52,.2), 0 0 0 10px rgba(245,134,52,0); } }
.search-box-icon{ position:absolute; left:24px; top:50%; transform: translateY(-50%); color: var(--green); display:flex; align-items:center; pointer-events:none; z-index:5; }
#siteSearchInput{
  width:100%; padding: 16px 24px 16px 64px; font-size:1.1rem; font-weight:700;
  font-family: var(--font-body); color:#fff;
  background: linear-gradient(135deg, rgba(0,168,89,.3), rgba(245,134,52,.24));
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,.35); border-radius:50px; outline:none;
  box-shadow: inset 0 1px 20px rgba(255,255,255,.08);
  transition: border-color .3s ease, background .3s ease;
}
#siteSearchInput:focus{ border-color: rgba(255,255,255,.6); background: linear-gradient(135deg, rgba(0,168,89,.4), rgba(245,134,52,.32)); }
#siteSearchInput::placeholder{ color: rgba(255,255,255,.7); font-weight:700; }
.search-results-card{
  width:100%; max-width:640px;
  background: linear-gradient(135deg, rgba(0,168,89,.16), rgba(245,134,52,.12));
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,.25); border-radius:40px; padding: 20px 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display:flex; flex-direction:column; max-height:0; opacity:0; overflow:hidden;
  transform: translateY(-10px);
  transition: max-height .4s cubic-bezier(.16,1,.3,1), opacity .3s ease, transform .4s cubic-bezier(.16,1,.3,1), padding .4s ease;
}
.search-results-card.has-matches{ max-height:50vh; opacity:1; padding: 22px 16px; transform: translateY(0); }
.search-results-viewport{ width:100%; max-height:40vh; overflow-y:auto; }
.search-results-viewport::-webkit-scrollbar{ width:6px; }
.search-results-viewport::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.2); border-radius:10px; }
.search-result-item{
  display:block; text-decoration:none; padding:14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: background-color .2s ease, transform .2s ease; border-radius:8px;
}
.search-result-item:hover{ background-color: rgba(255,255,255,.1); transform: translateX(4px); }
.search-result-title{ font-size:1.05rem; font-weight:700; color:#fff; margin-bottom:2px; }
.search-result-category{ font-size:.78rem; font-weight:600; color: var(--orange); text-transform:uppercase; }

/* ---------- 8. Theme switch transition veil ---------- */
.theme-transition-veil{ position:fixed; inset:0; z-index:100000; pointer-events:none; background:#050605; opacity:0; }
.theme-transition-veil.veil-active{ animation: themeGlitchFlicker .55s steps(1,end) forwards; }
@keyframes themeGlitchFlicker{
  0%{opacity:0;} 5%{opacity:.75;} 10%{opacity:.1;} 22%{opacity:0;} 30%{opacity:.5;}
  45%{opacity:.55;} 60%{opacity:.35;} 76%{opacity:.2;} 100%{opacity:0;}
}

/* ---------- 9. Footer (Home-style) ---------- */
.site-footer{
  position:relative; width:100%;
  background-image:
    radial-gradient(120% 90% at 12% 0%, rgba(0,168,89,.14), transparent 55%),
    radial-gradient(120% 90% at 100% 10%, rgba(245,134,52,.12), transparent 55%),
    linear-gradient(rgba(6,7,6,.9), rgba(6,7,6,.95));
  padding-top: 60px; overflow:hidden; font-family: var(--font-body);
}
.footer-map-bg-link{ position:absolute; top:0; left:0; width:100%; height: calc(100% - 90px); z-index:1; cursor:pointer; }
.footer-main-content{ position:relative; width:100%; max-width:1280px; margin:0 auto; padding: 0 32px; z-index:2; }
.footer-grid-container{ display:grid; grid-template-columns: 1.1fr .8fr 1.1fr; gap:40px; align-items:flex-start; }
.footer-column{ display:flex; flex-direction:column; }
.footer-brand-title{
  font-family: var(--font-display); font-weight:400; text-transform:uppercase;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem); line-height:1.25; letter-spacing:.5px; margin:0 0 28px 0; color:#fff;
}
.footer-brand-title .text-green{ color: var(--green) !important; }
.text-orange{ color: var(--orange) !important; }
.footer-section-heading{
  font-family: var(--font-display); font-weight:400; font-size:1rem;
  letter-spacing:1.5px; text-transform:uppercase; margin:0 0 16px 0;
  text-shadow: 0 0 14px var(--orange-glow);
}
.contact-details-list{ display:flex; flex-direction:column; gap:6px; }
.contact-item{ font-size:.92rem; color: var(--ink-dim); font-weight:500; line-height:1.45; margin:0; }
.contact-link{ text-decoration:none; display:inline-block; width:fit-content; cursor:pointer; transition: color .2s ease, transform .2s ease; }
.contact-link:hover, .interactive-email:hover{ color: var(--green) !important; transform: translateX(3px); }
.interactive-email{ color: var(--ink-dim); text-decoration:none; transition: color .2s ease; }

.map-badge-col{ align-items:center; justify-content:center; padding-top:10px; }
.maps-display-card{
  display:flex; align-items:center; gap:14px;
  background: var(--glass-fill); border: 1px solid var(--glass-border);
  padding: 12px 20px; border-radius:20px; text-decoration:none; max-width:320px;
  box-shadow: 0 10px 25px rgba(0,0,0,.4); backdrop-filter: blur(16px);
  transition: transform .2s ease, box-shadow .25s ease;
}
.maps-display-card:hover{ transform: translateY(-2px); box-shadow: 0 0 26px var(--green-glow); }
.maps-pin-graphic{ display:flex; align-items:center; justify-content:center; }
.maps-pin-svg{ width:32px; height:32px; fill: var(--green) !important; }
.maps-card-typography{ display:flex; flex-direction:column; line-height:1.2; }
.m-card-title, .m-card-subtitle{ font-family: var(--font-display) !important; font-weight:400 !important; color:#fff !important; margin:0; }
.m-card-title{ font-size:.8rem; letter-spacing:.5px; }
.m-card-subtitle{ font-size:1.15rem; margin:1px 0 3px 0; }
.m-card-status{ font-size:.65rem; color: var(--green) !important; font-weight:700; letter-spacing:1px; }

.social-links-col{ align-items:flex-end; }
.alignment-right{ text-align:right; }
.social-icon-row{ display:flex; gap:14px; margin-bottom:24px; }
.social-icon-wrapper{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--glass-border);
  background: rgba(255,255,255,.04);
  display:flex; align-items:center; justify-content:center; text-decoration:none;
  transition: transform .2s ease, background .2s ease;
}
.social-svg{ width:22px; height:22px; fill:#fff; transition: fill .2s ease; }
.social-icon-wrapper:hover{ transform: scale(1.12); background: var(--orange); box-shadow: 0 0 16px var(--orange-glow); }
.social-icon-wrapper:hover .social-svg{ fill:#0a0b0a !important; }
.legal-links-stack{ display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.policy-link{ font-size:.95rem; color: var(--ink-dim) !important; text-decoration:none; font-weight:500; transition: color .2s ease, padding-right .2s ease; }
.policy-link:hover{ color:#fff !important; padding-right:4px; }

.footer-bottom-vault{ position:relative; width:100%; display:flex; justify-content:center; margin-top:50px; z-index:3; }
.footer-arc-badge{
  background: var(--glass-fill) !important; backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-top-left-radius: 120px 100px; border-top-right-radius: 120px 100px;
  padding: 24px 40px 18px 40px; width:82%; max-width:880px; text-align:center;
  box-shadow: 0 -10px 30px rgba(0,0,0,.35) !important;
}
.copyright-statement{ font-size: clamp(.72rem,1.4vw,.95rem); font-weight:600; letter-spacing:.2px; margin:0 0 4px 0; color: var(--ink) !important; }
.school-boys-credit{ font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color: var(--ink-dim) !important; margin:0; }

/* ---------- 10. Responsive: navbar / quick menu / search / footer ---------- */
@media (max-width: 1024px){
  body{ padding-top: 78px; }
  .navbar{ padding: 12px 20px; border-radius: 0 0 16px 16px; }
  .nav-container{ display:grid; grid-template-columns: auto 1fr auto; gap:10px; }
  .mobile-menu-toggle{ display:flex; grid-column:1; }
  .logo-area{ grid-column:2; justify-content:center; }
  .nav-crest{ height:38px; margin-right:-15px; margin-left:-30px; }
  .logo-text .main-title{ font-size:.8rem; }
  .logo-text .sub-title{ font-size:.72rem; }
  .nav-icons{ grid-column:3; gap:12px; }

  .nav-links{
    position:fixed; top:0; left:0; width:290px; height:100vh;
    background: rgba(6,7,6,.96); backdrop-filter: blur(18px);
    border-right: 1px solid var(--glass-border);
    flex-direction:column; align-items:flex-start; padding: 90px 24px; gap:12px;
    box-shadow: 8px 0 30px rgba(0,0,0,.6); z-index:2100;
    transform: translate3d(-100%,0,0);
    transition: transform .4s cubic-bezier(.16,1,.3,1);
  }
  .nav-links.mobile-open{ transform: translate3d(0,0,0); }
  .nav-links a{ font-size:1.05rem; width:100%; padding:10px; }

  .quick-menu-close{ top:78px; right:20px; font-size:3.2rem; }
  .quick-menu-wrapper{ grid-template-columns:1fr; padding:20px 24px 10px 24px; gap:0; height:100%; overflow-y:auto; }
  .quick-menu-branding{ order:1; min-height:auto; height:auto; }
  .giant-vertical-text{ flex-direction:row; gap:12px; top:50%; left:50%; transform: translate(-50%,-50%); }
  .giant-vertical-text span{ font-size: clamp(5rem,15vw,7rem); letter-spacing:-2px; margin-right:0; }
  .quick-menu-crest{ width: clamp(60px,58vw,340px); margin-left:0; }
  .quick-menu-links-panel{ order:2; justify-content:center; width:100%; margin-top:-120px; }
  .quick-nav-tree{ text-align:center; align-items:center; width:100%; gap:16px; }
  .quick-link-item{ font-size: clamp(1.45rem,5.5vw,1.85rem); transform-origin:center center; }

  .search-overlay-close{ top:15px; right:20px; font-size:3.2rem; }
  .search-overlay-wrapper{ padding:16px; width:100%; }
  .search-overlay-crest{ width:110px; }
  .search-title-divider h2{ font-size:1.05rem; letter-spacing:1px; }
  .search-title-divider{ gap:12px; }
}

@media (max-width: 992px){
  .footer-grid-container{ grid-template-columns:1fr; gap:36px; text-align:center; }
  .footer-column{ align-items:center !important; }
  .alignment-right{ text-align:center; }
  .legal-links-stack{ align-items:center; }
  .footer-brand-title{ margin-bottom:20px; }
  .footer-arc-badge{ width:92%; border-top-left-radius:60px 40px; border-top-right-radius:60px 40px; padding:20px 20px 14px 20px; }
}

@media (max-width: 480px){
  .site-footer{ padding-top:45px; }
}

/* ============================================================================
   LIGHT MODE — applies to Events-page content only. The navbar, footer,
   quick menu, search overlay and preloader intentionally stay dark in both
   modes (same as Home/News) — only the page content below the navbar
   switches to a light surface.
   ============================================================================ */
body.light-mode{ background: #eef2ee; --ink: #14251a; --ink-dim: #47554c; }

/* Keep the navbar and footer looking exactly like dark mode, even
   when the rest of the page switches to light mode. Re-declaring
   the variables back to their original dark values, scoped only
   to .navbar and .site-footer, means every element inside them
   (text, glass surfaces, borders) stays untouched by the
   body.light-mode override above. */
body.light-mode .navbar,
body.light-mode .site-footer{
  --ink: #eef1ee;
  --ink-dim: #c7cbc8;
  --glass-fill: rgba(24,26,24,.42);
  --glass-fill-strong: rgba(15,16,15,.58);
  --glass-border: rgba(255,255,255,.14);
  --glass-highlight: rgba(255,255,255,.35);
}
body.light-mode .nav-links a{ color: var(--ink-dim); }
body.light-mode .nav-links a:hover{ color:#fff; }
body.light-mode .nav-links a.active-pill{ color: var(--orange) !important; }
body.light-mode .nav-icons button{ color: var(--ink); }
body.light-mode .contact-item{ color: var(--ink-dim); }
body.light-mode .interactive-email{ color: var(--ink-dim); }
body.light-mode .policy-link{ color: var(--ink-dim) !important; }
body.light-mode .policy-link:hover{ color:#fff !important; }
body.light-mode .copyright-statement{ color: var(--ink) !important; }
body.light-mode .school-boys-credit{ color: var(--ink-dim) !important; }
body.light-mode .backdrop{ filter: blur(6px) brightness(1.05) saturate(1.05); }
body.light-mode .backdrop::after{
  background:
    radial-gradient(120% 90% at 15% -10%, rgba(0,168,89,.10), transparent 55%),
    radial-gradient(120% 90% at 100% 10%, rgba(245,134,52,.10), transparent 55%),
    linear-gradient(180deg, rgba(238,242,238,.6), rgba(238,242,238,.92) 60%, #eef2ee 100%);
}
body.light-mode .orb{ opacity: .18; }
body.light-mode .eyebrow{ color: #c9701f; text-shadow: none; }
body.light-mode .page-intro h1{ color: #14251a; text-shadow: none; }
body.light-mode .page-intro p{ color: #47554c; }
body.light-mode .breadcrumbs{ color: #5b6a61; }
body.light-mode .breadcrumbs a{ color: #5b6a61; }
body.light-mode .breadcrumbs .sep{ color: rgba(20,37,26,.3); }
body.light-mode .glass{
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(20,37,26,.1);
  box-shadow: 0 30px 60px -20px rgba(20,37,26,.12), inset 0 1px 0 rgba(255,255,255,.6);
}
body.light-mode .section-title{ color: #14251a; text-shadow:none; }
body.light-mode .tab-btn{ color:#5b6a61; background: rgba(20,37,26,.04); border-color: rgba(20,37,26,.1); }
body.light-mode .tab-btn:hover{ color:#14251a; background: rgba(20,37,26,.08); }
body.light-mode .tab-btn.active{ color:#14251a; }
body.light-mode .event-card{ border-color: rgba(20,37,26,.1); box-shadow: 0 20px 40px rgba(20,37,26,.14); }
body.light-mode .event-card-scrim{ background: linear-gradient(180deg, transparent, rgba(20,37,26,.75)); }
body.light-mode .event-card-date{ color: rgba(255,255,255,.85); }
body.light-mode .event-card-title{ color:#fff; }
body.light-mode .event-empty{ color:#5b6a61; }
body.light-mode .modal-title{ color:#14251a; }
body.light-mode .modal-desc{ color:#47554c; }
body.light-mode .modal-img{ border-color: rgba(20,37,26,.1); background-color: rgba(20,37,26,.03); }
body.light-mode .modal-close{ color:#14251a; }
body.light-mode .rule .g{ box-shadow: 0 0 10px var(--green-glow); }
body.light-mode .rule .o{ box-shadow: 0 0 10px var(--orange-glow); }
body.light-mode .anthem-credit b{ color:#14251a; }
body.light-mode .vm-sinhala-title,
body.light-mode .vm-quote,
body.light-mode .uniform-card h3,
body.light-mode .rule-item b{ color:#14251a; }

/* =========================================================
   QUICK LINKS — topic tiles (mirrors the six-card index grid,
   restyled into our green/orange glass system)
   ========================================================= */
.quicklinks-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px,2.6vw,26px);
}
.quicklink-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding: 34px 20px 28px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  text-decoration:none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.quicklink-card:hover{
  transform: translateY(-6px);
  border-color: rgba(0,168,89,.4);
  box-shadow: 0 18px 42px rgba(0,0,0,.35), 0 0 32px var(--green-glow);
}
.quicklink-card:nth-child(even):hover{
  border-color: rgba(245,134,52,.4);
  box-shadow: 0 18px 42px rgba(0,0,0,.35), 0 0 32px var(--orange-glow);
}
.quicklink-icon{
  width: 70px; height: 70px;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(150deg, rgba(0,168,89,.22), rgba(245,134,52,.16));
  border: 1px solid rgba(255,255,255,.12);
  margin-bottom: 18px;
  transition: transform .5s var(--ease);
}
.quicklink-card:hover .quicklink-icon{ transform: rotate(-8deg) scale(1.08); }
.quicklink-icon svg{ width:30px; height:30px; stroke: var(--orange); fill:none; }
.quicklink-card:nth-child(even) .quicklink-icon svg{ stroke: var(--green); }
.quicklink-title{
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing:.02em;
  font-size: 1.02rem;
  color:#fff;
  margin: 0 0 16px;
  line-height:1.3;
}
.quicklink-pill{
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  color: var(--orange);
  border: 1px solid rgba(245,134,52,.5);
  border-radius: 999px;
  padding: 9px 22px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.quicklink-card:hover .quicklink-pill{ background: var(--orange); color:#0a0b0a; }
.quicklink-card:nth-child(even) .quicklink-pill{ color: var(--green); border-color: rgba(0,168,89,.5); }
.quicklink-card:nth-child(even):hover .quicklink-pill{ background: var(--green); color:#0a0b0a; }

@media (max-width: 900px){ .quicklinks-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .quicklinks-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   PAST PRINCIPALS — photo + bio cards (from the school's
   archival records), inserted after the History video
   ========================================================= */
.principals-list{
  display:grid;
  gap: 28px;
}
.principal-card{
  display:grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.principal-card:hover{
  transform: translateY(-3px);
  border-color: rgba(0,168,89,.35);
  box-shadow: 0 16px 36px rgba(0,0,0,.3), 0 0 24px var(--green-glow);
}
.principal-card:nth-child(even):hover{
  border-color: rgba(245,134,52,.35);
  box-shadow: 0 16px 36px rgba(0,0,0,.3), 0 0 24px var(--orange-glow);
}
.principal-photo-wrap{
  border-radius: var(--radius-md);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.1);
  cursor: zoom-in;
  position:relative;
  aspect-ratio: 3/4;
  background:#111;
}
.principal-photo-wrap img{
  width:100%; height:100%; object-fit:cover;
  transition: transform .45s var(--ease), filter .45s var(--ease);
  filter: grayscale(.1) sepia(.12);
}
.principal-photo-wrap:hover img{ transform: scale(1.08); filter: grayscale(0) sepia(0); }
.principal-photo-wrap::after{
  content:'\26F6';
  position:absolute; right:8px; bottom:8px;
  width:26px; height:26px;
  border-radius:50%;
  background: rgba(0,0,0,.55);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:.7rem;
  opacity:0; transition: opacity .3s var(--ease);
}
.principal-photo-wrap:hover::after{ opacity:1; }
.principal-info h3{
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing:.02em;
  font-size: 1.08rem;
  color:#fff;
  margin: 0 0 4px;
}
.principal-term{
  font-size:.76rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: var(--orange);
  margin: 0 0 10px;
}
.principal-card:nth-child(even) .principal-term{ color: var(--green); }
.principal-info p.bio{
  font-size:.9rem;
  line-height: 1.7;
  color: var(--ink-dim);
  margin:0;
}

@media (max-width: 620px){
  .principal-card{ grid-template-columns: 96px 1fr; }
  .principal-info h3{ font-size:.94rem; }
}

/* =========================================================
   LIGHTBOX — click-to-enlarge preview for photos
   ========================================================= */
.lightbox-backdrop{
  position: fixed; inset:0; z-index: 100000;
  background: rgba(4,5,4,.88);
  display:flex; align-items:center; justify-content:center;
  padding: 40px;
  opacity:0; visibility:hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.lightbox-backdrop.active{ opacity:1; visibility:visible; }
.lightbox-backdrop img{
  max-width: min(90vw, 620px);
  max-height: 82vh;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: scale(.94);
  transition: transform .3s var(--ease);
}
.lightbox-backdrop.active img{ transform: scale(1); }
.lightbox-close{
  position: absolute; top: 22px; right: 28px;
  width: 42px; height:42px; border-radius:50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color:#fff; font-size:1.4rem; line-height:1;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background .25s ease, transform .25s ease;
}
.lightbox-close:hover{ background: var(--orange); transform: rotate(90deg); }
.lightbox-caption{
  position:absolute; bottom: 30px; left:0; right:0;
  text-align:center; color: var(--ink-dim); font-size:.85rem;
}

/* =========================================================
   PDF / DOCUMENT RESOURCES — downloadable school records
   ========================================================= */
.doc-resource-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px,3vw,26px);
}
.doc-resource-grid.single{ grid-template-columns: 1fr; }
.doc-card{
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  padding: 26px clamp(18px,2.6vw,28px) 24px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.doc-card:hover{
  transform: translateY(-4px);
  border-color: rgba(0,168,89,.4);
  box-shadow: 0 16px 36px rgba(0,0,0,.32), 0 0 26px var(--green-glow);
}
.doc-card:nth-child(even):hover{
  border-color: rgba(245,134,52,.4);
  box-shadow: 0 16px 36px rgba(0,0,0,.32), 0 0 26px var(--orange-glow);
}
.doc-card-head{ display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.doc-icon{
  flex-shrink:0;
  width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(0,168,89,.14);
  border: 1px solid rgba(0,168,89,.3);
}
.doc-card:nth-child(even) .doc-icon{ background: rgba(245,134,52,.14); border-color: rgba(245,134,52,.3); }
.doc-icon svg{ width:22px; height:22px; stroke: var(--green); fill:none; }
.doc-card:nth-child(even) .doc-icon svg{ stroke: var(--orange); }
.doc-card h3{
  font-family: var(--font-display);
  text-transform:uppercase;
  letter-spacing:.02em;
  font-size:1rem;
  color:#fff;
  margin:0;
  line-height:1.3;
}
.doc-card p{ font-size:.88rem; line-height:1.65; color: var(--ink-dim); margin: 0 0 18px; }
.doc-preview{
  border-radius: var(--radius-md);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.1);
  margin-bottom:18px;
  cursor: zoom-in;
  background:#111;
}
.doc-preview img{ width:100%; display:block; transition: transform .4s var(--ease); }
.doc-preview:hover img{ transform: scale(1.03); }
.doc-download-btn{
  display:inline-flex; align-items:center; gap:9px;
  font-size:.78rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:#0a0b0a;
  background: var(--green);
  border-radius: 999px;
  padding: 11px 22px;
  text-decoration:none;
  box-shadow: 0 8px 20px rgba(0,168,89,.25);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.doc-download-btn:hover{ transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,168,89,.4); }
.doc-card:nth-child(even) .doc-download-btn{ background: var(--orange); box-shadow: 0 8px 20px rgba(245,134,52,.25); }
.doc-card:nth-child(even) .doc-download-btn:hover{ box-shadow: 0 12px 26px rgba(245,134,52,.4); }
.doc-download-btn svg{ width:15px; height:15px; }

@media (max-width: 800px){ .doc-resource-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   Light-mode support for the new components above
   ========================================================= */
body.light-mode .quicklink-card,
body.light-mode .principal-card,
body.light-mode .doc-card{
  background: rgba(20,37,26,.03);
  border-color: rgba(20,37,26,.1);
}
body.light-mode .quicklink-title,
body.light-mode .principal-info h3,
body.light-mode .doc-card h3{ color:#14251a; }
body.light-mode .quicklink-icon{ background: linear-gradient(150deg, rgba(0,168,89,.16), rgba(245,134,52,.12)); border-color: rgba(20,37,26,.1); }
body.light-mode .principal-info p.bio,
body.light-mode .doc-card p{ color:#47554c; }
body.light-mode .doc-icon{ background: rgba(0,168,89,.1); }
body.light-mode .doc-card:nth-child(even) .doc-icon{ background: rgba(245,134,52,.1); }
body.light-mode .lightbox-caption{ color:#cfd6d1; }

/* ============================================================================
   ██  MOBILE-ONLY UI OVERHAUL  —  phones (≤ 640px)                        ██
   ----------------------------------------------------------------------------
   Everything below ONLY fires on narrow/phone-width screens. Desktop and
   tablet layouts above are completely untouched — nothing in this block
   overrides anything above ~640px, and every selector here is scoped
   strictly inside these two media queries. This is a dedicated, purpose-built
   phone layout, not a shrunken desktop layout: spacing, card shapes, the
   quick-links section, and touch feedback are all redesigned specifically
   for one-handed phone use.
   ============================================================================ */
@media (max-width: 640px){

  /* ---------- 1. Base rhythm & container ---------- */
  .container{ padding: 0 16px; }
  section{ padding: 22px 0; }
  .glass{ border-radius: 26px; }
  .panel{ padding: 26px 16px 24px; }
  .panel-head{ margin-bottom: 22px; gap: 10px; }
  .panel-head .heading-block{ width: 100%; }

  .eyebrow{ font-size: .7rem; letter-spacing: .03em; }
  .section-title{ font-size: clamp(1.5rem, 7.4vw, 2rem); }

  /* ---------- 2. Page intro / hero ---------- */
  .page-intro{ margin: 34px auto 0; padding: 0 16px; }
  .page-intro h1{ font-size: clamp(1.85rem, 9.5vw, 2.5rem); margin-top: 6px; }
  .page-intro p{ font-size: .86rem; line-height: 1.65; margin-top: 14px; }
  .breadcrumbs{ font-size: .68rem; gap: 6px; margin-top: 16px; flex-wrap: wrap; }

  /* ---------- 3. Quick Links — horizontal snap-scroll chip rail ----------
     A dedicated phone pattern: instead of squeezing a 3-col grid into one
     column (tall, lots of scrolling), the six links become a swipeable,
     snap-aligned horizontal rail — a single thumb-swipe browses all of
     them. Desktop keeps its original grid untouched. */
  #quicklinks{ margin: 0 -16px; padding: 0 0 4px; }
  #quicklinks::before{
    content: 'Swipe to explore ›';
    display: block;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-dim);
    opacity: .65;
    padding: 0 16px 10px;
  }
  .quicklinks-grid{
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding: 2px 16px 6px;
  }
  .quicklinks-grid::-webkit-scrollbar{ display: none; }
  .quicklink-card{
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 148px;
    padding: 22px 14px 20px;
  }
  .quicklink-icon{ width: 54px; height: 54px; margin-bottom: 12px; }
  .quicklink-icon svg{ width: 24px; height: 24px; }
  .quicklink-title{ font-size: .84rem; margin-bottom: 12px; line-height: 1.25; }
  .quicklink-pill{ font-size: .62rem; padding: 7px 16px; }

  /* ---------- 4. Badge & Flag / History / Anthem media blocks ---------- */
  .bf-media{ min-height: 190px; padding: 16px; }
  .bf-media img{ max-height: 190px; }
  .bf-label{ font-size: 1.02rem; margin-top: 14px; }
  .anthem-grid{ gap: 26px; }
  .lyrics{ font-size: .9rem; line-height: 1.75; }
  .anthem-credit{ font-size: .78rem; }

  /* ---------- 5. School Profile narrative ---------- */
  .profile-copy{ font-size: .9rem; line-height: 1.75; }
  .profile-copy p{ margin-bottom: 16px; }

  /* ---------- 6. Vision & Mission cards ---------- */
  .vm-card{ padding: 22px 18px; }
  .vm-sinhala-title{ font-size: 1rem; margin-bottom: 12px; }
  .vm-quote{ font-size: clamp(1rem, 4.6vw, 1.15rem); }
  .vm-translation{ font-size: .84rem; }

  /* ---------- 7. Past Principals — full-width profile-card layout ----------
     Below 640px the photo moves ABOVE the bio instead of squeezing into a
     96px thumbnail column — a proper portrait card, not a cramped strip. */
  .principals-list{ gap: 18px; }
  .principal-card{
    grid-template-columns: 1fr !important;
    padding: 0;
    overflow: hidden;
    text-align: center;
  }
  .principal-photo-wrap{
    aspect-ratio: 4/3;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .principal-info{ padding: 18px 18px 22px; }
  .principal-info h3{ font-size: 1.02rem !important; }
  .principal-term{ margin-bottom: 12px; }
  .principal-info p.bio{ font-size: .86rem; text-align: left; }

  /* ---------- 8. School Uniform cards ---------- */
  .uniform-card{ padding: 22px 18px; }
  .uniform-card h3{ font-size: 1.08rem; }
  .uniform-sub{ font-size: .74rem; }
  .uniform-card li{ font-size: .84rem; }

  /* ---------- 9. School Rules ---------- */
  .rules-list{ gap: 12px; }
  .rule-item{ padding: 14px 16px; font-size: .88rem; border-radius: 16px; }
  .rule-item:hover{ transform: none; }

  /* ---------- 10. Applications / Results-analysis document cards ---------- */
  .doc-resource-grid{ gap: 16px; }
  .doc-card{ padding: 20px 16px; }
  .doc-card-head{ gap: 10px; margin-bottom: 12px; }
  .doc-card h3{ font-size: .95rem; }
  .doc-card p{ font-size: .84rem; }
  .doc-download-btn{
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
  }

  /* ---------- 11. Touch feedback (phones have no :hover) ---------- */
  .quicklink-card:active,
  .principal-card:active,
  .vm-card:active,
  .uniform-card:active,
  .doc-card:active,
  .rule-item:active{
    transform: scale(.97);
    transition: transform .12s ease;
  }
}

/* Extra-small phones (older/compact devices) */
@media (max-width: 380px){
  .page-intro h1{ font-size: 1.65rem; }
  .section-title{ font-size: 1.4rem; }
  .quicklink-card{ width: 132px; }
  .principal-info{ padding: 16px 14px 18px; }
  .vm-card, .uniform-card, .doc-card{ padding: 18px 14px; }
}
