/* Same sharp-serif heading font as the home page */
@import url("https://fonts.googleapis.com/css2?family=Marcellus&display=swap");

/* =========================================================================
   About page — hero banner, vision & mission, school history, leaders section
   Headings and fonts follow the home page: Marcellus capitals in red with a
   red underline for headings, Cormorant for sub-titles, Playfair Regular for text.

   Paragraphs are JUSTIFIED, so every line has the same width (no short / long
   lines). Colours are unchanged.
   ========================================================================= */

/* Colours used only on this page — change here if you want a different shade */
:root {
  --about-red: #D32F2F;               /* same red as the home page */
  --about-red-soft: rgba(211, 47, 47, 0.3);
}

/* Hero — full-width banner (about-banner.jpg, 1920 × 600), starts right below the navbar.
   aspect-ratio = exact image ratio, so the banner is never cropped at any screen width. */
.page-hero.page-hero--split {
  position: relative; overflow: hidden; padding: 0;
  width: 100%;
  aspect-ratio: 1920 / 600;
  min-height: 0;
}

/* Image placeholders (hero banner + vision/mission + history + leadership).
   Real image upload chesaka adi placeholder meeda vastundi. */
.hero-media, .vm-media, .hist-media, .lead-media {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, var(--blue-tint), var(--orange-tint));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(4px, 2%, 10px); text-align: center; color: var(--ink-soft);
  padding: clamp(8px, 6%, 20px);
}
.hero-media { position: absolute; inset: 0; }
.hero-media i, .vm-media i, .hist-media i, .lead-media i {
  font-size: clamp(1.2rem, 4vw, 2.6rem); color: var(--blue); opacity: .55; line-height: 1;
}
.hero-media span, .vm-media span, .hist-media span, .lead-media span {
  font-size: clamp(0.68rem, 2vw, 0.85rem); font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; max-width: 100%;
}
.hero-media small, .vm-media small, .hist-media small, .lead-media small {
  font-size: clamp(0.62rem, 1.7vw, 0.78rem); opacity: .75; max-width: 100%;
}
.hero-media img, .vm-media img, .hist-media img, .lead-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* Hero banner image: shown whole (never cropped). Must stay BELOW the common img rule above. */
.hero-media img { object-fit: contain; object-position: center top; }

@media (max-width: 600px) {
  .hero-media small, .hero-media span { display: none; }
}

.hist-media .ph-file, .lead-media .ph-file {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 92%; word-break: normal;
}

/* ---------- Headings (home page style) ---------- */
.hist .section-head h2,
.leadership .section-head h2,
.vm-title {
  display: inline-block;
  font-family: "Marcellus", var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--about-red);
  padding-bottom: 4px;
  margin: 0;
  border-bottom: 3px solid var(--about-red);
}
.hist .section-head h2,
.leadership .section-head h2,
.vm-title { font-size: clamp(2rem, 4vw, 3.1rem); }      /* same size as the home-page headings */

/* Line under the section headings: home paragraph style, justified so both lines are equal */
.hist .section-head .lede, .leadership .section-head .lede {
  margin-top: 22px;
  font-family: var(--font-body);
  font-size: 1.22rem; font-weight: 400; line-height: 1.9;
  -webkit-text-stroke: 0.15px currentColor;
  color: var(--ink-soft);
  text-align: justify; text-align-last: center; text-justify: inter-word;
  hyphens: auto;
}

/* Vision & Mission — zig-zag: text | image, then image | text */
.vm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.vm-row + .vm-row { margin-top: 88px; }
.vm-copy .body-text { margin-top: 22px; color: var(--ink-soft); }
.vm-copy .body-text + .body-text { margin-top: 14px; }
.vm-media {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3;
  border-radius: var(--radius-l); box-shadow: var(--shadow);
}

/* ---------- Body paragraphs (Vision, Mission, History):
   home page paragraph style + justified (equal line width) ---------- */
.vm-copy .body-text,
.hist-copy .body-text {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.9;
  -webkit-text-stroke: 0.15px currentColor;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .vm-row { grid-template-columns: 1fr; gap: 28px; }
  .vm-row + .vm-row { margin-top: 56px; }
  .vm-row--flip .vm-copy { order: -1; }
}

/* Our School History — centre timeline line, zig-zag rows (text | image, image | text). */
.hist {
  --hist-radius: 0;
  border-top: 1px solid var(--line);
}
.hist-timeline { position: relative; margin-top: 56px; }

.hist-timeline::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--about-red-soft) 10%, var(--about-red-soft) 90%, transparent);
}

.hist-row {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 104px; align-items: center;
}
.hist-row > * { min-width: 0; }
.hist-row + .hist-row { margin-top: 96px; }

.hist-row::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--about-red);
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--about-red);
}

.hist-row--flip .hist-figure { order: -1; }

/* Text side */
.hist-copy { max-width: 540px; }
.hist-year {
  display: block; font-family: var(--font-head); font-weight: 500;
  font-size: clamp(2.8rem, 5vw, 4.2rem); line-height: 1.05;
  letter-spacing: -0.01em; color: var(--about-red);
}
.hist-title {
  margin: 10px 0 0; color: var(--ink);
  font-family: var(--font-head); font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.005em;   /* home sub-heading */
}
.hist-copy .body-text { margin-top: 16px; color: var(--ink-soft); }
.hist-copy .body-text + .body-text { margin-top: 12px; }

.hist-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.hist-points li {
  display: flex; align-items: flex-start; gap: 12px;
  font-family: var(--font-body);
  font-size: 1.12rem; font-weight: 400; line-height: 1.6;
  -webkit-text-stroke: 0.15px currentColor;
  color: var(--ink);
}
.hist-points .tick {
  flex-shrink: 0; width: 26px; height: 26px; margin-top: 3px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--forest-tint); color: var(--forest); font-size: 0.72rem;
}

/* Image side — 1:1 square, red frame offset behind, dot grid top-right, tag on top-left */
.hist-figure {
  --off: 18px;
  position: relative; isolation: isolate;
  width: 100%; max-width: 440px; justify-self: center;
}
.hist-figure:hover { --off: 8px; }
.hist-figure--round { --hist-radius: 50%; }

.hist-figure::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border: 3px solid var(--about-red); border-radius: var(--hist-radius);
  transform: translate(var(--off), var(--off));
  transition: transform .35s ease;
}
.hist-row--flip .hist-figure::before { transform: translate(calc(var(--off) * -1), var(--off)); }

.hist-figure::after {
  content: ''; position: absolute; z-index: -2; top: -28px; right: -14px;
  width: 96px; height: 96px; opacity: .65;
  background-image: radial-gradient(var(--orange) 2.2px, transparent 2.7px);
  background-size: 16px 16px;
}

.hist-tag {
  position: absolute; left: 0; bottom: 100%;
  padding: 9px 18px; background: var(--about-red); color: #fff;
  font-family: var(--font-head);
  font-size: 1rem; font-weight: 700; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.hist-figure--round .hist-tag {
  left: 50%; transform: translateX(-50%); margin-bottom: 12px; border-radius: 999px;
}

.hist-media {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1;
  border-radius: var(--hist-radius); box-shadow: var(--shadow);
}

.hist-media img { transition: transform .7s ease; }
.hist-figure:hover .hist-media img { transform: scale(1.05); }
.hist-media::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.38) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s ease;
}
.hist-figure:hover .hist-media::after { transform: translateX(110%); }

@media (max-width: 900px) {
  .hist-timeline { margin-top: 44px; }
  .hist-timeline::before, .hist-row::after { display: none; }
  .hist-row { grid-template-columns: 1fr; gap: 44px; }
  .hist-row + .hist-row { margin-top: 72px; }
  .hist-row--flip .hist-figure { order: 0; }
  .hist-copy { max-width: none; border-left: 3px solid var(--about-red); padding-left: 18px; }
  .hist-figure { --off: 12px; max-width: 380px; width: calc(100% - 14px); justify-self: start; }
  .hist-figure:hover { --off: 12px; }
  .hist-row--flip .hist-figure::before { transform: translate(var(--off), var(--off)); }
}

@media (prefers-reduced-motion: reduce) {
  .hist-figure::before, .hist-media img, .hist-media::after { transition: none; }
}

/* Our Leadership — photo with a separate navy name box underneath (small gap between them)
   (name in gold, qualification and role in white). Row 1: 3 directors, row 2: Principal. */
.leadership { border-top: 1px solid var(--line); }

.lead-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.lead-grid-1 { max-width: 560px; margin: 64px auto 0; }

.lead-card {
  display: flex; flex-direction: column;
  gap: 16px;                           /* space between the photo and the name box */
  background: none;
  overflow: visible;
}
.lead-media {
  position: relative; overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.lead-media--portrait { aspect-ratio: 580 / 800; }
.lead-media--wide { aspect-ratio: 8192 / 6144; }   /* principal photo, 4:3 */

.lead-info {
  padding: 22px 18px 26px; text-align: center;
  background: #fff;                   /* separate rectangular name box (white) */
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.lead-name {
  margin: 0; font-family: var(--font-head); font-size: 1.75rem; font-weight: 700;
  line-height: 1.2; letter-spacing: 0.01em; color: #0B3F73;   /* dark blue */
}
.lead-qual {
  margin: 6px 0 0;
  font-family: var(--font-body);
  font-size: 1.1rem; font-weight: 400;
  -webkit-text-stroke: 0.15px currentColor;
  color: #000;
}
.lead-role {
  display: block; margin-top: 8px;
  font-family: var(--font-head);
  font-size: 1.05rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #000;
}

@media (max-width: 820px) {
  .lead-grid-3 { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; gap: 44px; }
}
@media (max-width: 700px) {
  .vm-copy .body-text, .hist-copy .body-text { font-size: 1.05rem; line-height: 1.8; }
  .hist .section-head .lede, .leadership .section-head .lede { font-size: 1.05rem; }
  .hist-points li { font-size: 1.02rem; }
}
@media (max-width: 560px) {
  .lead-grid-1 { max-width: 100%; }
}