/* =========================================================
   Donnybrook Primary School — Stylesheet
   Palette grounded in the school crest: navy shield, crimson
   flower, cream banner, green leaves.
   ========================================================= */

:root{
  --navy: #16335A;
  --navy-deep: #0F2440;
  --crimson: #C13A3F;
  --crimson-dark: #9E2E33;
  --leaf: #3F7A52;
  --paper: #FBF9F4;
  --paper-dim: #F1ECE1;
  --ink: #1C2230;
  --ink-soft: #5B6472;
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px -12px rgba(15, 36, 64, 0.22);
  --shadow-soft: 0 4px 16px -6px rgba(15, 36, 64, 0.18);
  --max-width: 1180px;
}

/* ---------- Reset & base ---------- */
*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
}
p{ margin: 0 0 1em; }
address{ font-style: normal; }
.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--crimson);
  color: var(--white);
  padding: 10px 18px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

:focus-visible{
  outline: 3px solid var(--crimson);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary{
  background: var(--crimson);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover{
  background: var(--crimson-dark);
  transform: translateY(-2px);
}
.btn-ghost{
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.65);
}
.btn-ghost:hover{
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

/* ---------- Ribbon / eyebrow (signature motif, echoes the crest banner) ---------- */
.eyebrow{
  display: inline-flex;
  margin: 0 0 18px;
}
.eyebrow span{
  position: relative;
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 22px;
}
.eyebrow span::before,
.eyebrow span::after{
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
}
.eyebrow span::before{
  left: -10px;
  border-width: 14px 10px 14px 0;
  border-color: transparent var(--navy) transparent transparent;
}
.eyebrow span::after{
  right: -10px;
  border-width: 14px 0 14px 10px;
  border-color: transparent transparent transparent var(--navy);
}

.ribbon{ display: inline-flex; margin: 0 0 18px; }
.ribbon span{
  position: relative;
  display: inline-block;
  background: var(--crimson);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 24px;
}
.ribbon span::before,
.ribbon span::after{
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
}
.ribbon span::before{
  left: -11px;
  border-width: 15px 11px 15px 0;
  border-color: transparent var(--crimson-dark) transparent transparent;
}
.ribbon span::after{
  right: -11px;
  border-width: 15px 0 15px 11px;
  border-color: transparent transparent transparent var(--crimson-dark);
}

/* ---------- Header ---------- */
#site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  box-shadow: 0 2px 14px -6px rgba(15,36,64,0.18);
}

.announcement{
  background: var(--navy-deep);
  color: var(--paper);
  font-size: 0.85rem;
  text-align: center;
  padding: 9px 44px;
  position: relative;
}
.announcement p{ margin: 0; }
.announcement a{
  color: #F2C744;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 6px;
}
.announcement-tag{
  background: var(--crimson);
  color: var(--white);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 8px;
}
.announcement-close{
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.announcement.is-hidden{ display: none; }

.branding-row{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: padding 0.25s ease;
}
.brand{
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-crest{
  width: 54px;
  height: 54px;
  object-fit: contain;
  transition: width 0.25s ease, height 0.25s ease;
}
.brand-text{ display: flex; flex-direction: column; }
.brand-name{
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--navy);
}
.brand-tagline{
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span{
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.primary-nav{
  border-top: 1px solid var(--paper-dim);
}
.primary-nav ul{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.primary-nav a{
  display: inline-block;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.primary-nav a:hover{ color: var(--crimson); }
.primary-nav a.active{
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}

#site-header.is-compact .brand-crest{ width: 40px; height: 40px; }
#site-header.is-compact .branding-row{ padding: 8px 24px; }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-media{
  position: absolute;
  inset: 0;
}
.hero-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,36,64,0.55) 0%, rgba(15,36,64,0.55) 35%, rgba(15,36,64,0.88) 100%);
}
.hero-content{
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 90px 24px 70px;
  text-align: center;
}
.hero-content h1{
  color: var(--white);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 0.3em;
}
.hero-tagline{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: #F2C744;
  margin-bottom: 0.6em;
}
.hero-copy{
  font-size: 1.05rem;
  color: rgba(255,255,255,0.92);
  max-width: 540px;
  margin: 0 auto 1.6em;
}
.hero-actions{
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-edge{
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 64px;
  fill: var(--paper);
  z-index: 2;
}

/* ---------- Credentials strip ---------- */
.credentials{
  background: var(--navy);
  color: var(--paper);
}
.credentials-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  text-align: center;
}
.credential{ display: flex; flex-direction: column; gap: 2px; }
.credential strong{ font-family: var(--font-display); font-size: 1.05rem; }
.credential span{ font-size: 0.78rem; color: rgba(251,249,244,0.7); letter-spacing: 0.02em; }
.credential-divider{
  width: 1px;
  height: 28px;
  background: rgba(251,249,244,0.25);
}

/* ---------- Welcome ---------- */
.welcome-grid{
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  padding: 70px 24px;
  align-items: start;
}
.welcome-card{
  background: var(--white);
  border-left: 4px solid var(--crimson);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  box-shadow: var(--shadow-soft);
  margin-top: 18px;
}
.welcome-card h3{ font-size: 1.1rem; margin-bottom: 0.4em; }
.welcome-card p{ margin: 0; color: var(--ink-soft); }

.quick-links{
  background: var(--paper-dim);
  border-radius: var(--radius);
  padding: 28px;
}
.quick-links h3{ font-size: 1.05rem; margin-bottom: 0.8em; }
.quick-links li + li{ margin-top: 4px; }
.quick-links a{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid rgba(22,51,90,0.1);
  transition: color 0.18s ease, padding-left 0.18s ease;
}
.quick-links li:last-child a{ border-bottom: none; }
.quick-links a::before{
  content: "\2192";
  color: var(--crimson);
}
.quick-links a:hover{ color: var(--crimson); padding-left: 8px; }

/* ---------- Sections (generic) ---------- */
section{ padding: 78px 0; }
.section-about{ padding-bottom: 0; }
.lede{ max-width: 680px; color: var(--ink-soft); font-size: 1.05rem; }

.about-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 28px 0 48px;
}
.about-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--leaf);
}
.about-card:nth-child(1){ border-top-color: var(--navy); }
.about-card:nth-child(3){ border-top-color: var(--crimson); }
.about-card h3{ font-size: 1.1rem; }
.about-card p{ color: var(--ink-soft); margin: 0; }

.values{ padding-bottom: 56px; }
.values h3{ font-size: 1.1rem; margin-bottom: 16px; }
.value-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.value-chips li{
  background: var(--navy);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 999px;
}
.value-chips li:nth-child(odd){ background: var(--crimson); }

.community-banner{
  position: relative;
  margin: 0;
  height: 360px;
  overflow: hidden;
}
.community-banner img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.community-banner-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,36,64,0.78) 0%, rgba(15,36,64,0.05) 60%);
  display: flex;
  align-items: flex-end;
  padding: 32px 24px;
}
.community-banner-overlay p{
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.feature-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0 70px;
}
.feature-media img{
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}
.feature-copy h3{ font-size: 1.1rem; margin-top: 0.6em; }
.feature-copy h3:first-child{ margin-top: 0; }
.feature-copy p{ color: var(--ink-soft); }

/* ---------- Academics ---------- */
.section-academics{ background: var(--paper-dim); }
.subject-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0 48px;
}
.subject-grid li{
  background: var(--white);
  border: 1px solid rgba(22,51,90,0.1);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  text-align: center;
}

.phase-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.phase-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.phase-tag{
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.phase-card p{ color: var(--ink-soft); }
.phase-media{ margin-top: 18px; border-radius: var(--radius-sm); overflow: hidden; }
.phase-media img{ cursor: zoom-in; }

/* ---------- Admissions ---------- */
.admissions-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
.admissions-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.admissions-card h3{ font-size: 1.1rem; }
.admissions-card p{ color: var(--ink-soft); margin: 0; }

.check-list li{
  position: relative;
  padding: 9px 0 9px 30px;
  color: var(--ink-soft);
  border-bottom: 1px dashed rgba(22,51,90,0.14);
}
.check-list li:last-child{ border-bottom: none; }
.check-list li::before{
  content: "\2713";
  position: absolute;
  left: 0;
  top: 9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--leaf);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-banner{
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 34px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h3{ color: var(--white); margin-bottom: 0.3em; font-size: 1.25rem; }
.cta-banner p{ margin: 0; color: rgba(251,249,244,0.78); }


/* ---------- Our People / Staff Directory ---------- */

.section-staff {
  background: var(--paper);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.staff-card {
  background: var(--white);
  border: 1px solid rgba(22, 51, 90, 0.09);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.25s ease,
              box-shadow 0.25s ease;
}

.staff-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.staff-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-dim);
}

.staff-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.35s ease;
}

.staff-card:hover .staff-photo img {
  transform: scale(1.04);
}

.staff-info {
  padding: 15px 10px 17px;
  border-top: 3px solid var(--crimson);
}

.staff-info h3 {
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin: 0 0 5px;
}

.staff-info p {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
}

/* Tablet */
@media (max-width: 980px) {
  .staff-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 380px) {
  .staff-grid {
    gap: 12px;
  }

  .staff-info {
    padding: 12px 7px 14px;
  }

  .staff-info h3 {
    font-size: 0.85rem;
  }
}


/* ---------- Vacancies ---------- */
.section-vacancies{ background: var(--paper-dim); }
.vacancy-panel{
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-card);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.vacancy-panel p{ color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.contact-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border-bottom: 4px solid var(--crimson);
}
.contact-card h3{ font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 0.5em; }
.contact-card p, .contact-card address{ font-weight: 600; color: var(--navy); margin: 0; }
.contact-card a:hover{ color: var(--crimson); }

/* ---------- Footer ---------- */
#site-footer{
  position: relative;
  background: var(--navy-deep);
  color: rgba(251,249,244,0.85);
  padding-top: 20px;
}
.footer-edge{
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 46px;
  fill: var(--navy-deep);
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 40px;
  padding: 50px 24px 40px;
}
.footer-crest{
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 12px;
}
.footer-name{ font-family: var(--font-display); color: var(--white); font-size: 1.15rem; margin: 0; }
.footer-motto{ font-style: italic; color: #F2C744; margin: 4px 0 0; font-size: 0.92rem; }
.footer-links h4, .footer-contact h4{
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-links li{ margin-bottom: 8px; }
.footer-links a{ transition: color 0.18s ease; }
.footer-links a:hover{ color: var(--white); }
.footer-contact p{ margin: 0 0 8px; font-size: 0.92rem; }
.footer-bottom{
  border-top: 1px solid rgba(251,249,244,0.12);
  padding: 18px 24px 26px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(251,249,244,0.55);
}

/* ---------- Back to top ---------- */
.back-to-top{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--crimson);
  color: var(--white);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 90;
}
.back-to-top.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
.lightbox{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,22,36,0.92);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
}
.lightbox:not([hidden]){
  display: flex;
}


.lightbox img{
  max-width: 100%;
  max-height: 86vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close{
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px){
  .welcome-grid{ grid-template-columns: 1fr; gap: 32px; }
  .about-grid{ grid-template-columns: 1fr 1fr; }
  .feature-row{ grid-template-columns: 1fr; gap: 28px; }
  .phase-grid{ grid-template-columns: 1fr; }
  .admissions-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr 1fr; }
  .subject-grid{ grid-template-columns: repeat(3, 1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px){
  .nav-toggle{ display: flex; }
  .primary-nav{
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.is-open{ max-height: 420px; }
  .primary-nav ul{ flex-direction: column; padding: 8px 24px 16px; gap: 0; }
  .primary-nav a{ display: block; padding: 12px 4px; border-bottom: 1px solid var(--paper-dim); }

  .hero-content{ padding: 64px 20px 50px; }
  .credentials-inner{ gap: 18px 24px; }
  .about-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .subject-grid{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: 1fr; padding-top: 36px; }
  .cta-banner{ flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (max-width: 460px){
  .hero-content h1{ font-size: 1.9rem; }
  .brand-name{ font-size: 1.08rem; }
}

/* =========================================================
   Photo sliders (hero + sports & culture)
   ========================================================= */
.slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  /* the outgoing photo stays solid until the new one has fully faded in */
  transition: opacity 0s linear 1.6s;
}
.slide.is-active{
  opacity: 1;
  z-index: 2;
  transition: opacity 1.6s ease-in-out;
}
.slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.07);
  transition: transform 9s ease-out;
}
.slide.is-active img{ transform: scale(1); }

.slider-dots{
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}
.slider-dots button{
  width: 10px; height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease;
}
.slider-dots button:hover{ background: rgba(255,255,255,0.85); }
.slider-dots button.is-active{ width: 28px; background: var(--white); }
.slider-dots button:focus-visible{ outline: 2px solid var(--white); outline-offset: 3px; }

.feature-slider{
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-deep);
  box-shadow: var(--shadow-card);
}
.feature-slider .slide img{ object-position: center 30%; }

/* ---------- Hero fixes ---------- */
.hero-media{
  isolation: isolate;
  background: var(--navy-deep);
}
.hero{ min-height: max(86vh, 640px); }
.hero-content{ padding: 90px 24px 140px; }
.hero > .slider-dots{ bottom: 86px; }
body{ overflow-x: clip; }

/* =========================================================
   Forewords (Principal & SGB Chairperson)
   ========================================================= */
.messages{ padding-top: 24px; padding-bottom: 80px; }
.messages-head{ text-align: center; margin-bottom: 36px; }
.messages-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.message-card{
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--crimson);
  box-shadow: var(--shadow-card);
  padding: 32px;
}
.message-card.sgb{ border-top-color: var(--navy); }
.message-person{
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(22,51,90,0.1);
}
.message-person h3{ font-size: 1.05rem; margin-bottom: 0.3em; }
.message-name{
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--crimson-dark);
  line-height: 1.2;
}
.message-role{ margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.photo-holder{
  flex: 0 0 104px;
  width: 104px; height: 104px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: linear-gradient(135deg, var(--paper-dim), #E3DCCB);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--navy), var(--shadow-soft);
}
.photo-holder img{ width: 100%; height: 100%; object-fit: cover; }
.photo-holder svg{ width: 56%; height: 56%; opacity: 0.5; }
.message-body p{ color: var(--ink-soft); }
.message-sign{
  margin: auto 0 0;
  padding-top: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--navy);
}

/* ---------- Clubs ---------- */
.club-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.club-list li{
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--paper-dim);
  border: 1px solid rgba(22,51,90,0.12);
  border-radius: 999px;
}

/* ---------- Footer credit ---------- */
.footer-bottom .credit{ margin-top: -0.4em; font-size: 0.8rem; opacity: 0.75; }

/* ---------- Responsive additions ---------- */
@media (max-width: 900px){
  .messages-grid{ grid-template-columns: 1fr; }
  .hero > .slider-dots{ bottom: 78px; }
}
@media (max-width: 720px){
  .hero-content{ padding: 64px 20px 130px; }
}
@media (max-width: 520px){
  .message-card{ padding: 24px 20px; }
  .message-person{ flex-direction: column; text-align: center; }
  .photo-holder{ flex-basis: 96px; width: 96px; height: 96px; }
}

/* =========================================================
   Welcome section
   ========================================================= */
.welcome-grid{
  grid-template-columns: 1.55fr 1fr;
  gap: 72px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 48px;
}

/* quiet label instead of the ribbon */
.welcome-copy .eyebrow span{
  background: none;
  color: var(--crimson);
  padding: 0;
  letter-spacing: 0.22em;
}
.welcome-copy .eyebrow span::before,
.welcome-copy .eyebrow span::after{ display: none; }

.welcome-copy h2{
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  letter-spacing: -0.01em;
  max-width: 600px;
  margin-bottom: 0.6em;
}

.welcome-intro{
  font-size: 1.14rem;
  line-height: 1.8;
  color: var(--ink);
  max-width: 620px;
}
.welcome-intro::first-letter{
  float: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 4.1rem;
  line-height: 0.82;
  padding: 6px 12px 0 0;
  color: var(--navy);
}

.welcome-body{
  max-width: 620px;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(22,51,90,0.14);
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Quick Links: refined navy panel */
.quick-links{
  background: var(--navy);
  border-radius: var(--radius);
  padding: 34px 32px 26px;
  box-shadow: var(--shadow-card);
}
.quick-links h3{
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(251,249,244,0.18);
}
.quick-links a{
  justify-content: space-between;
  padding: 13px 0;
  font-weight: 500;
  font-size: 0.98rem;
  color: rgba(251,249,244,0.88);
  border-bottom: 1px solid rgba(251,249,244,0.1);
}
.quick-links a::before{ content: none; }
.quick-links a::after{
  content: "\2192";
  color: #F2C744;
  transition: transform 0.2s ease;
}
.quick-links a:hover{
  color: var(--white);
  padding-left: 0;
}
.quick-links a:hover::after{ transform: translateX(5px); }

.messages{ padding-top: 0; }

@media (max-width: 980px){
  .welcome-grid{ gap: 40px; padding-top: 56px; }
}

/* ---------- Leadership portraits ---------- */
.photo-holder{
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
}
.photo-holder img{
  object-position: center 20%;   /* keeps faces centred, not cropped at the forehead */
}

@media (max-width: 520px){
  .photo-holder{ flex-basis: 108px; width: 108px; height: 108px; }
}


/* ---------- Events & Gallery (new sections only) ---------- */
.section-events{ background: var(--paper); }
.section-gallery{ background: var(--paper-dim); }

.events-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  margin-top:32px;
}

.event-card{
  overflow:hidden;
  background:var(--white);
  border-radius:var(--radius);
  box-shadow:var(--shadow-card);
}

.event-card-image{
  height:220px;
  overflow:hidden;
  background:var(--paper-dim);
}

.event-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.event-card:hover .event-card-image img{
  transform:scale(1.04);
}

.event-card-content{ padding:24px; }

.event-type{
  margin:0 0 9px;
  color:var(--crimson);
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.event-card h3{
  font-size:1.25rem;
  margin-bottom:10px;
}

.event-card-content p:last-child{
  margin:0;
  color:var(--ink-soft);
}

.events-note{
  margin:24px 0 0;
  padding:16px 20px;
  border-left:3px solid var(--crimson);
  background:var(--white);
  color:var(--ink-soft);
  font-size:.93rem;
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-rows:230px;
  gap:16px;
  margin-top:32px;
}

.gallery-item{
  position:relative;
  min-width:0;
  margin:0;
  overflow:hidden;
  border-radius:var(--radius-sm);
  background:var(--navy-deep);
  box-shadow:var(--shadow-soft);
  cursor:zoom-in;
}

.gallery-item-wide{ grid-column:span 2; }

.gallery-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}

.gallery-item:hover img{ transform:scale(1.045); }

.gallery-item::after{
  content:"";
  position:absolute;
  inset:35% 0 0;
  background:linear-gradient(transparent,rgba(15,36,64,.82));
  pointer-events:none;
}

.gallery-item figcaption{
  position:absolute;
  z-index:1;
  left:18px;
  right:18px;
  bottom:15px;
  color:var(--white);
  font-weight:600;
  font-size:.95rem;
}

.gallery-item:focus-visible{
  outline:3px solid var(--crimson);
  outline-offset:3px;
}

@media (max-width:900px){
  .events-grid,
  .gallery-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:600px){
  .events-grid{ grid-template-columns:1fr; }
  .event-card-image{ height:230px; }

  .gallery-grid{
    grid-template-columns:1fr 1fr;
    grid-auto-rows:170px;
    gap:10px;
  }

  .gallery-item-wide{ grid-column:span 2; }

  .gallery-item figcaption{
    left:12px;
    right:12px;
    bottom:10px;
    font-size:.82rem;
  }
}
