/* Lora (headings), Inter (body) and Montserrat 700 (header site name only). Self-hosted, Latin only, free under the SIL Open Font License 1.1.
   Paste this block at the very top of styles.css. The paths are written for styles.css in the site root. */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/lora-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2");
}

/* =========================================================
   EL WAK ISLAMIC CENTRE: styles.css
   One design system for all six pages. Mobile first.
   Breakpoints: 640px and 960px (plus 800px for two-column
   course grids, 880px for the contact page, and 480px and
   1024px for the gallery columns).
   Order: tokens, base, typography, layout, buttons, cards,
   skip link, header and menu, banners, page parts, footer,
   small screens, reduced motion.
   ========================================================= */


/* ---------------------------------------------------------
   1. Tokens (the only place colours are defined)
   --------------------------------------------------------- */
:root {
  /* Colour */
  --green-900: #1b5e20;
  --green-700: #2e7d32;
  --green-50: #f1f8e9;
  --green-100: #e8f5e9;
  --green-200: #c8e6c9;
  --green-300: #a5d6a7;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --line: #e0e0e0;
  --white: #ffffff;

  /* Type: families */
  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-title: "Montserrat", "Segoe UI", Arial, sans-serif;   /* header site name only */

  /* Type: sizes. Written in rem (1rem = 16px at the browser default) so they
     follow the visitor's own text-size setting. The px value is in the comment.
     These are the PHONE values (under 640px). The block after this one sets
     the DESKTOP values (640px and up). Every font-size below uses these. */
  --fs-body: 0.9375rem;          /* 15px  body text */
  --fs-small: 0.8125rem;         /* 13px  copyright, notes */
  --fs-compact: 0.875rem;        /* 14px  pills, trustee roles, term lists */
  --fs-field: 1rem;              /* 16px  form fields (keeps iPhones from zooming) */
  --fs-label: 0.875rem;          /* 14px  form labels */
  --fs-btn: 0.9375rem;           /* 15px  buttons */
  --fs-site-title: 0.75rem;      /* 12px  header site name (Montserrat 700) */
  --fs-tagline: 0.75rem;         /* 12px  header tagline */
  --fs-nav: 0.875rem;            /* 14px  desktop nav links */
  --fs-nav-menu: 0.9375rem;      /* 15px  links in the phone and tablet menu */
  --fs-hero-h1: 1.75rem;         /* 28px  home hero heading */
  --fs-hero-p: 0.9375rem;        /* 15px  home hero paragraph */
  --fs-banner-h1: 1.625rem;      /* 26px  page banner heading */
  --fs-banner-p: 0.9375rem;      /* 15px  page banner paragraph */
  --fs-h2: 1.3125rem;            /* 21px */
  --fs-h3: 1.0625rem;            /* 17px */
  --fs-h4: 0.9375rem;            /* 15px */
  --fs-lead: 0.9375rem;          /* 15px  opening paragraphs (Overview, About, Mission) */
  --fs-footer-title: 1rem;       /* 16px */
  --fs-footer: 0.875rem;         /* 14px  footer text and links */
  --ls-site-title: 0.1em;        /* letter-spacing of the header site name */
  --lh-body: 1.55;
  --lh-heading: 1.25;
  --lh-banner-h1: 1.15;          /* page banner heading and paragraph: a little tighter on phones */
  --lh-banner-p: 1.4;

  /* Gaps between paragraphs, list items and headings (about 20% under the old values) */
  --gap-p: 13px;
  --gap-li: 6px;
  --gap-h: 13px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Shape and depth */
  --radius-card: 12px;
  --radius-btn: 8px;
  --shadow-card: 0 1px 2px rgba(17, 17, 17, 0.06), 0 4px 12px rgba(17, 17, 17, 0.06);
  --shadow-lift: 0 2px 4px rgba(17, 17, 17, 0.08), 0 10px 24px rgba(17, 17, 17, 0.12);

  /* Layout */
  --container: 1160px;
  --section-pad: 28px;             /* content sections: 28px on phones, 36px from 640px up */
  --banner-pad: 22px;              /* page banners: 22px on phones, 28px from 640px up */
  --hero-pad: 32px;                /* home hero: 32px on phones, 40px from 640px up */
  --card-pad: 18px;                /* cards and boxes: 18px on phones, 24px from 640px up */

  /* Eight-pointed star tile: two squares, one turned 45 degrees.
     Used only on the hero, the page banners and the footer. */
  --pattern-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.5' opacity='.08'%3E%3Crect x='14' y='14' width='28' height='28'/%3E%3Crect x='14' y='14' width='28' height='28' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");

  /* Section divider: a short line, a small eight-pointed star, a short line */
  --divider-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' viewBox='0 0 120 16'%3E%3Cpath d='M0 8h44M76 8h44' stroke='%23a5d6a7' stroke-width='2' stroke-linecap='round'/%3E%3Cg fill='%232e7d32'%3E%3Crect x='55' y='3' width='10' height='10'/%3E%3Crect x='55' y='3' width='10' height='10' transform='rotate(45 60 8)'/%3E%3C/g%3E%3C/svg%3E");

  --divider-star-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' viewBox='0 0 120 16'%3E%3Cpath d='M0 8h44M76 8h44' stroke='%23a5d6a7' stroke-width='2' stroke-linecap='round'/%3E%3Cg fill='%23ffffff'%3E%3Crect x='55' y='3' width='10' height='10'/%3E%3Crect x='55' y='3' width='10' height='10' transform='rotate(45 60 8)'/%3E%3C/g%3E%3C/svg%3E");

  /* Small eight-pointed star, used as a list marker */
  --star: polygon(50% 0, 64.64% 14.64%, 85.36% 14.64%, 85.36% 35.36%, 100% 50%, 85.36% 64.64%, 85.36% 85.36%, 64.64% 85.36%, 50% 100%, 35.36% 85.36%, 14.64% 85.36%, 14.64% 64.64%, 0 50%, 14.64% 35.36%, 14.64% 14.64%, 35.36% 14.64%);
}

/* Desktop values (640px and up) */
@media (min-width: 640px) {
  :root {
    --fs-site-title: 0.9375rem;  /* 15px */
    --ls-site-title: 0.25em;
    --fs-hero-h1: 2.5rem;        /* 40px */
    --fs-hero-p: 1.0625rem;      /* 17px */
    --fs-banner-h1: 1.875rem;    /* 30px */
    --fs-banner-p: 1rem;         /* 16px */
    --fs-h2: 1.5rem;             /* 24px */
    --fs-h3: 1.125rem;           /* 18px */
    --fs-h4: 1rem;               /* 16px */
    --fs-lead: 1rem;             /* 16px */
    --lh-banner-h1: 1.25;
    --lh-banner-p: 1.5;
    --section-pad: 36px;
    --banner-pad: 28px;
    --hero-pad: 40px;
    --card-pad: 24px;
  }
}


/* ---------------------------------------------------------
   2. Reset and base
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--green-700);
  outline-offset: 3px;
}


/* ---------------------------------------------------------
   3. Typography
   --------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 var(--gap-h);
  color: var(--green-900);
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-banner-h1);
  font-weight: 700;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
}

p {
  margin: 0 0 var(--gap-p);
}

ul,
ol {
  margin: 0 0 var(--gap-p);
  padding-left: var(--space-5);
}

li {
  margin-bottom: var(--gap-li);
}

li::marker {
  color: var(--green-700);
}

strong {
  font-weight: 600;
}

a {
  color: var(--green-900);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--green-700);
}


/* ---------------------------------------------------------
   4. Layout helpers
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.content-section,
.course-content,
.gallery-content {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.center-wrapper {
  margin-bottom: var(--space-5);
  text-align: center;
}

.center-wrapper p {
  max-width: 640px;
  margin: var(--gap-p) auto 0;
  color: var(--ink-soft);
}

/* Section titles: centred, with a small star divider underneath */
.section-title {
  margin: 0 0 20px;
  text-align: center;
}

.section-title::after,
.intro h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 16px;
  margin: 10px auto 0;
  background: var(--divider-star) center / contain no-repeat;
}

.center-wrapper .section-title {
  margin-bottom: 0;
}

/* On a deep green band the divider uses a light star */
.mission-box .section-title::after {
  background-image: var(--divider-star-light);
}


/* ---------------------------------------------------------
   5. Buttons
   --------------------------------------------------------- */
.btn,
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--green-700);
  color: var(--white);
  font-size: var(--fs-btn);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover,
.btn-submit:hover {
  background: var(--green-900);
  color: var(--white);
}

.btn:focus-visible,
.btn-submit:focus-visible {
  outline: 3px solid var(--green-900);
  outline-offset: 3px;
}


/* ---------------------------------------------------------
   6. Cards (white, 1px line, 12px radius, soft shadow)
   --------------------------------------------------------- */
.highlights article,
.obj-card,
.pillar-card,
.course-card,
.term-card,
.stage-block,
.gallery-item,
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.highlights article,
.obj-card,
.pillar-card,
.course-card,
.term-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .highlights article:hover,
  .obj-card:hover,
  .pillar-card:hover,
  .course-card:hover,
  .term-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
  }
}


/* ---------------------------------------------------------
   7. Skip link (visible only when it has keyboard focus)
   --------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-4);
  z-index: 1100;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  background: var(--green-900);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-300%);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green-900);
}


/* ---------------------------------------------------------
   8. Header, navigation and mobile menu
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: 6px;
  padding-bottom: 6px;
}

.logo-group {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.logo-link {
  display: block;
  flex: none;
  line-height: 0;
  text-decoration: none;
}

.logo-img {
  display: block;
  width: auto;
  height: 40px;
}

.logo-text {
  min-width: 0;
}

.site-title {
  margin: 0;
  color: var(--green-900);
  font-family: var(--font-title);
  font-size: var(--fs-site-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--ls-site-title);
}

.slogan {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--fs-tagline);
  line-height: 1.35;
}

/* Menu button (phones and tablets) */
.nav-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--green-700);
  border-radius: var(--radius-btn);
  background: var(--white);
  color: var(--green-900);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.nav-toggle:hover {
  background: var(--green-50);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-toggle .icon-x {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-bars {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-x {
  display: inline;
}

/* Menu panel: opens under the header, full width */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: var(--space-2) 20px var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.1);
}

.nav.nav-open {
  display: flex;
  flex-direction: column;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px var(--space-4);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-nav-menu);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a:last-child {
  border-bottom: 0;
}

.nav a:hover {
  background: var(--green-50);
  color: var(--green-900);
}

.nav a.active {
  background: var(--green-50);
  color: var(--green-900);
  box-shadow: inset 4px 0 0 var(--green-700);
}

/* Tablet and desktop header (640px and up): a taller logo and 8px padding */
@media (min-width: 640px) {
  .site-header .container {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .logo-img {
    height: 52px;
  }
}

/* Desktop header (960px and up): the menu button gives way to the nav row */
@media (min-width: 960px) {
  .site-header .container {
    gap: var(--space-5);
  }

  .logo-group {
    gap: var(--space-4);
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    display: flex;
    flex: none;
    flex-direction: row;
    gap: var(--space-1);
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav a {
    position: relative;
    min-height: 44px;
    padding: var(--space-2) var(--space-3);
    border-bottom: 0;
    font-size: var(--fs-nav);
    white-space: nowrap;
  }

  .nav a::after {
    content: "";
    position: absolute;
    left: var(--space-3);
    right: var(--space-3);
    bottom: 4px;
    height: 2px;
    background: var(--green-700);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .nav a:hover,
  .nav a.active {
    background: transparent;
    box-shadow: none;
  }

  .nav a:hover::after,
  .nav a.active::after {
    opacity: 1;
  }
}


/* ---------------------------------------------------------
   9. Hero and page banners (the star pattern lives here)
   --------------------------------------------------------- */
/* Page banner (all inner pages): deep green, faint star pattern, centred */
.page-hero {
  padding: var(--banner-pad) 0;
  background-color: var(--green-900);
  background-image: var(--pattern-dark);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  color: var(--white);
  font-size: var(--fs-banner-h1);
  line-height: var(--lh-banner-h1);
}

.page-hero p {
  max-width: 60rem;
  margin: 6px auto 0;
  line-height: var(--lh-banner-p);
  color: var(--green-200);
  font-size: var(--fs-banner-p);
}

/* Home page hero: deep green band, star pattern, text beside an arched photo */
.hero {
  padding: var(--hero-pad) 0;
  background-color: var(--green-900);
  background-image: var(--pattern-dark);
  color: var(--white);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
}

.hero h1 {
  margin-bottom: var(--gap-h);
  color: var(--green-200);
  font-size: var(--fs-hero-h1);
  font-weight: 500;
}

.hero h1 span {
  color: var(--white);
  font-weight: 700;
}

.hero p {
  max-width: 34rem;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-hero-p);
}

.hero .btn {
  background: var(--white);
  color: var(--green-900);
}

.hero .btn:hover {
  background: var(--green-50);
  color: var(--green-900);
}

.hero .btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

/* Decorative photo in an arch-shaped frame (about 4:5, centred crop). The <picture> is the frame
   and the grid item; it is hidden under 640px, where its <source> also swaps the photo for blank.svg
   so phones do not download it. */
.hero-frame {
  display: block;
  justify-self: center;
  width: min(100%, 256px);
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 999px 999px 0 0;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1);
}

@media (max-width: 639.98px) {
  .hero-frame {
    display: none;
  }
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: var(--space-8);
  }

  .hero-frame {
    justify-self: end;
    width: 100%;
    max-width: 320px;
  }
}


/* ---------------------------------------------------------
   10. Home page
   --------------------------------------------------------- */
/* Overview: heading centred, paragraph left-aligned in a 720px column */
.intro {
  max-width: 760px;
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.intro h2 {
  margin-bottom: 20px;
  text-align: center;
}

.intro p {
  margin-bottom: 0;
  font-size: var(--fs-lead);
  text-align: left;
}

/* Highlight cards: full-width pale green band, 1 column then 3 */
.highlights {
  padding: var(--section-pad) 0;
  background: var(--green-50);
}

.highlights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.highlights article {
  padding: var(--card-pad);
  border-top: 4px solid var(--green-700);
}

/* Star ornament above each card heading, drawn in CSS */
.highlights article h3 {
  margin-bottom: 10px;
  color: var(--green-900);
}

.highlights article h3::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin-bottom: 10px;
  background: var(--green-700);
  clip-path: var(--star);
}

.highlights article ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlights article li {
  position: relative;
  margin: 0 0 10px;
  padding-left: var(--space-5);
}

.highlights article li:last-child {
  margin-bottom: 0;
}

.highlights article li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  background: var(--green-700);
  clip-path: var(--star);
}

.highlights article li strong {
  color: var(--green-900);
}

@media (min-width: 960px) {
  .highlights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ---------------------------------------------------------
   11. Inner pages: shared parts
   Sections alternate white and --green-50 (.section-tint).
   --------------------------------------------------------- */
.section-tint {
  background: var(--green-50);
}

/* Lists on the About, Courses and Curriculum pages: small green stars */
.course-card ul,
.admission-box ul,
.pillar-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-card li,
.admission-box li,
.pillar-card li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 26px;
}

.course-card li:last-child,
.admission-box li:last-child,
.pillar-card li:last-child {
  margin-bottom: 0;
}

.course-card li::before,
.admission-box li::before,
.pillar-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 12px;
  height: 12px;
  background: var(--green-700);
  clip-path: var(--star);
}


/* ---------------------------------------------------------
   12. About page
   --------------------------------------------------------- */
.narrow .lead {
  font-size: var(--fs-lead);
}

.narrow p:last-child {
  margin-bottom: 0;
}

/* Our Mission: full-width deep green band with the star pattern */
.mission-box {
  padding: var(--section-pad) 0;
  background-color: var(--green-900);
  background-image: var(--pattern-dark);
  color: var(--white);
}

.mission-box h2 {
  color: var(--white);
}

.mission-box p {
  font-size: var(--fs-lead);
}

/* Leadership: the trustees as a grid of cards */
.leadership .narrow p {
  text-align: center;
}

.leadership ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.leadership li {
  margin: 0;
  padding: 14px var(--card-pad);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-700);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.leadership li strong {
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 700;
}

.leadership li span {
  display: block;
  margin-top: var(--space-1);
  color: var(--ink-soft);
  font-size: var(--fs-compact);
}

@media (min-width: 640px) {
  .leadership ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .leadership ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ---------------------------------------------------------
   13. Curriculum page
   --------------------------------------------------------- */
.objectives-grid,
.pillars-grid,
.term-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

/* Educational outcomes: white cards with a green left border */
.obj-card {
  padding: var(--space-3) var(--card-pad);
  border-left: 4px solid var(--green-700);
  font-weight: 500;
}

/* Pillars: pale green cards with a green top border */
.pillars-grid {
  gap: 20px;
}

.pillar-card {
  padding: var(--card-pad);
  border: 1px solid var(--green-200);
  border-top: 4px solid var(--green-700);
  background: var(--green-50);
}

.pillar-card h3 {
  margin: 0 0 var(--gap-h);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--green-300);
  color: var(--green-900);
  text-align: center;
}

/* Stage blocks: white panel, deep green header bar across the top */
.stage-block {
  margin-bottom: var(--space-5);
  padding: 0;
  overflow: hidden;
}

.stage-block:last-child {
  margin-bottom: 0;
}

.stage-block > :not(.stage-header) {
  margin-left: var(--card-pad);
  margin-right: var(--card-pad);
}

.stage-header {
  margin: 0;
  padding: var(--space-3) var(--card-pad);
  background: var(--green-900);
  color: var(--white);
}

.stage-header h3 {
  margin: 0;
  color: var(--white);
}

/* Level, Duration, Focus: a wrapping row of pills */
.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-top: 20px;
  margin-bottom: 20px;
}

.stage-meta > div {
  padding: 6px 14px;
  border: 1px solid var(--green-200);
  border-radius: 20px;
  background: var(--green-50);
  color: var(--ink);
  font-size: var(--fs-compact);
  line-height: 1.4;
}

.stage-meta strong {
  color: var(--green-900);
}

.term-grid {
  gap: 20px;
  margin-bottom: 20px;
}

.term-card {
  min-width: 0;
  overflow: hidden;
}

.term-title {
  padding: var(--space-3) var(--space-4);
  background: var(--green-700);
  color: var(--white);
  font-weight: 600;
  line-height: 1.3;
}

.term-card ul {
  margin: 0;
  padding: var(--space-2) var(--space-4) var(--space-3);
  list-style: none;
}

.term-card li {
  position: relative;
  margin: 0;
  padding: 8px 0 8px 24px;
  border-bottom: 1px dotted var(--green-300);
  font-size: var(--fs-compact);
  line-height: 1.5;
}

.term-card li:last-child {
  border-bottom: 0;
}

/* A small green star, drawn in CSS */
.term-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 12px;
  height: 12px;
  background: var(--green-700);
  clip-path: var(--star);
}

/* Requirement boxes (the "Graduation & Requirements" box uses the same style) */
.req-box {
  margin-top: 0;
  margin-bottom: 20px;
  padding: var(--card-pad);
  border: 1px solid var(--green-200);
  border-left: 4px solid var(--green-700);
  border-radius: var(--radius-btn);
  background: var(--green-50);
}

.req-box h4 {
  margin: 0 0 10px;
  color: var(--green-900);
}

.req-box p {
  max-width: 70ch;
  margin: 0 0 var(--gap-li);
}

.req-box p:last-child {
  margin-bottom: 0;
}

.req-box strong {
  color: var(--green-900);
}

.req-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.req-item {
  padding: 6px 14px;
  border: 1px solid var(--green-200);
  border-radius: 20px;
  background: var(--white);
  color: var(--green-900);
  font-size: var(--fs-compact);
  font-weight: 600;
  line-height: 1.4;
}

@media (min-width: 640px) {
  .objectives-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 800px) {
  .term-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ---------------------------------------------------------
   14. Courses page
   --------------------------------------------------------- */
.course-card {
  margin-bottom: 20px;
  padding: var(--card-pad);
}

.course-card:last-child {
  margin-bottom: 0;
}

/* Card titles: Lora, deep green, with a short green underline accent */
.course-card h2,
.admission-box h2 {
  margin-bottom: var(--gap-h);
  color: var(--green-900);
}

.course-card h2::after,
.admission-box h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--green-700);
}

.course-card > p {
  max-width: 70ch;
}

.course-card h3 {
  margin: 20px 0 10px;
  color: var(--green-700);
}

.course-card strong,
.admission-box strong {
  color: var(--ink);
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px var(--space-5);
}

.grid-2 h3 {
  margin-top: 0;
}

/* Admission information: pale green panel with a green left border */
.admission-box {
  padding: var(--card-pad);
  border: 1px solid var(--green-200);
  border-left: 4px solid var(--green-700);
  border-radius: var(--radius-card);
  background: var(--green-50);
}

.admission-box h3 {
  margin: 0 0 10px;
  color: var(--green-900);
}

@media (min-width: 800px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ---------------------------------------------------------
   15. Gallery page
   Masonry: 1 column, 2 from 480px, 3 from 1024px. Photos are never cropped.
   The lightbox is a native <dialog>.
   Without JavaScript the photos flow down CSS columns. With JavaScript,
   script.js splits them into .gallery-col wrappers (round robin, so they read
   left to right in file order) and adds .is-split. It reads --gallery-cols.
   --------------------------------------------------------- */
.gallery-grid {
  --gallery-cols: 1;
  columns: var(--gallery-cols);
  column-gap: var(--space-4);
}

.gallery-grid.is-split {
  display: flex;
  align-items: flex-start;
}

.gallery-col {
  flex: 1 1 0;
  min-width: 0;
}

/* The card look (white, line, 12px radius, shadow) comes from section 6 */
.gallery-item {
  margin: 0 0 var(--space-4);
  overflow: hidden;
  break-inside: avoid;
}

/* The photo button fills the frame; the photo scales inside it on hover */
.gallery-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-open img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gallery-open:hover img {
    transform: scale(1.03);
  }
}

/* Focus ring drawn inside the frame (the frame clips anything outside it) */
.gallery-open:focus-visible {
  outline: 3px solid var(--green-700);
  outline-offset: -3px;
}

.gallery-open:focus-visible::after {
  content: "";
  position: absolute;
  inset: 3px;
  box-shadow: inset 0 0 0 3px var(--white);
  pointer-events: none;
}

@media (min-width: 480px) {
  .gallery-grid {
    --gallery-cols: 2;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    --gallery-cols: 3;
  }
}

/* Lightbox: the dialog fills the screen and is see-through, so a click
   on empty space lands on the dialog itself. The black sits on ::backdrop. */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightbox-fade 0.2s ease;
}

/* Translucent black, the owner's choice */
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

.lightbox[open]::backdrop {
  animation: lightbox-fade 0.2s ease;
}

@keyframes lightbox-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Keep the page behind from scrolling while the lightbox is open */
html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox-btn:hover {
  background: var(--green-900);
}

/* White ring; the thin deep-green ring inside it keeps it visible
   when a button sits over a light part of a photo */
.lightbox-btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--green-900);
}

.lightbox-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-close {
  top: var(--space-4);
  right: var(--space-4);
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  margin-top: -24px;
}

.lightbox-prev {
  left: var(--space-4);
}

.lightbox-next {
  right: var(--space-4);
}

/* Phones: Close stays in the corner; Previous and Next sit at the bottom
   so they do not cover the photo */
@media (max-width: 639.98px) {
  .lightbox-close {
    top: var(--space-2);
    right: var(--space-2);
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: var(--space-2);
    margin-top: 0;
  }

  .lightbox-prev {
    left: var(--space-2);
  }

  .lightbox-next {
    right: var(--space-2);
  }
}


/* ---------------------------------------------------------
   16. Contact page
   --------------------------------------------------------- */
.contact-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  max-width: 1000px;
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* Info card (comes first on phones) */
.contact-info {
  align-self: start;
  padding: var(--card-pad);
  border: 1px solid var(--green-200);
  border-radius: var(--radius-card);
  background: var(--green-50);
}

.contact-info h2 {
  margin-bottom: var(--gap-h);
}

.contact-info p:last-child {
  margin-bottom: 0;
  font-size: var(--fs-small);
}

.contact-item {
  position: relative;
  padding-left: 36px;
}

.contact-icon {
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--green-700);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-info strong {
  display: block;
  color: var(--green-900);
}

.contact-info a {
  color: var(--ink);
}

.contact-info a:hover {
  color: var(--green-700);
}

/* Form card */
.contact-form {
  padding: var(--card-pad);
}

.contact-form h2 {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: var(--gap-p);
  font-size: var(--fs-label);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: var(--space-2);
  padding: 12px 14px;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius-btn);
  background: var(--white);
  font-size: var(--fs-field);
  font-weight: 400;
  line-height: 1.4;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green-700);
  outline: 3px solid var(--green-700);
  outline-offset: 2px;
}

/* Spam trap: off-screen, not display:none, so bots still fill it in */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 880px) {
  .contact-content {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-5);
  }
}


/* ---------------------------------------------------------
   17. Footer
   --------------------------------------------------------- */
.site-footer {
  padding-top: var(--space-5);
  padding-bottom: var(--space-3);
  background-color: var(--green-900);
  background-image: var(--pattern-dark);
  color: var(--green-200);
  font-size: var(--fs-footer);
}

.site-footer .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px var(--space-6);
}

/* The short green line under each footer heading is an underline, so it stays
   as wide as the words even when the heading fills a whole row */
.footer-title {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--white);
  font-size: var(--fs-footer-title);
  text-decoration: underline;
  text-decoration-color: var(--green-700);
  text-decoration-thickness: 2px;
  text-decoration-skip-ink: none;
  text-underline-offset: 6px;
}

.site-footer p {
  margin: 0 0 4px;
  color: var(--green-200);
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--green-200);
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer :focus-visible {
  outline-color: var(--white);
}

/* Quick Links: the heading on its own row, then the four links in one row */
.links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  column-gap: 20px;
}

.links .footer-title {
  flex: 0 0 100%;
}

.links a {
  display: flex;
  align-items: center;
  min-height: 32px;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

/* Touch screens and phones: footer links stay at least 44px tall */
@media (pointer: coarse), (max-width: 639.98px) {
  .links a {
    min-height: 44px;
  }
}

.copyright {
  margin-top: var(--space-3);
  padding: var(--space-3) 20px;
  border-top: 1px solid var(--green-700);
  color: var(--green-200);
  font-size: var(--fs-small);
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ---------------------------------------------------------
   18. Small screens (under 640px)
   --------------------------------------------------------- */
@media (max-width: 639.98px) {
  .btn-submit {
    width: 100%;
  }
}


/* ---------------------------------------------------------
   19. Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
