/* Liberty School Ikota — additions for the inner pages.
   Builds on css/styles.css and reuses its colour, type and spacing tokens. */

html { scroll-behavior: smooth; }

/* ---------- Navigation: current page ---------- */
.desktop-nav a.is-active { color: var(--primary); }
.desktop-nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
}
.mobile-nav a.is-active { color: var(--primary); }

/* ---------- Inner-page hero ---------- */
.page-hero { min-height: clamp(400px, 56vh, 500px); }
.page-hero .hero-content { padding-top: 40px; padding-bottom: 92px; }
.page-hero .hero-content h1 { max-width: 760px; font-size: clamp(40px, 5.4vw, 64px); }
.page-hero .hero-photo { object-position: center 45%; }
.breadcrumb { display: flex; align-items: center; gap: 8px; }
.breadcrumb a { color: var(--school-sun); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Small text link ---------- */
.text-link {
  color: var(--primary); display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; padding-block: 6px; font-size: 11px; font-weight: 650; text-decoration: none;
}
.text-link svg { width: 15px; height: 15px; transition: transform .16s; }
.text-link:hover svg { transform: translateX(2px); }
.school-life-section .text-link { margin-top: 14px; }

/* ---------- About: alternating story blocks ---------- */
.story-section-tight { padding-top: 0; }
.story-grid-reversed .story-photo-wrap { order: 2; }

/* ---------- Call-to-action band ---------- */
.page-cta { background: var(--school-forest-deep); color: var(--primary-foreground); padding-block: 84px; }
.page-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.page-cta .section-eyebrow { color: var(--school-sun); margin-bottom: 15px; }
.page-cta h2 {
  font-family: var(--font-heading); font-weight: 750; letter-spacing: 0;
  font-size: clamp(28px, 3.4vw, 38px); line-height: 1.2; margin: 0; max-width: 580px;
}
.page-cta p { color: var(--primary-foreground); font-size: 12px; line-height: 1.9; max-width: 460px; margin: 14px 0 0; }
@supports (color: color-mix(in lab, red, red)) {
  .page-cta p { color: color-mix(in oklab, var(--primary-foreground) 76%, transparent); }
}
.page-cta .hero-actions { margin-top: 0; flex-shrink: 0; }

/* ---------- Gallery grid + lightbox ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 12px; }
.photo-item { margin: 0; min-width: 0; overflow: hidden; background: var(--muted); }
.photo-item:first-child { grid-column: span 2; grid-row: span 2; }
.photo-open { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.photo-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-item:hover .gallery-image { transform: scale(1.035); }

.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; justify-items: center;
  padding: 56px 16px 24px; background: var(--school-forest-deep); color: var(--primary-foreground);
}
@supports (color: color-mix(in lab, red, red)) {
  .lightbox { background: color-mix(in oklab, var(--school-forest-deep) 98%, transparent); }
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.lightbox img { display: block; max-width: 100%; max-height: calc(100svh - 140px); object-fit: contain; }
.lightbox figcaption { display: flex; gap: 16px; font-size: 10px; font-weight: 600; text-align: center; }
.lightbox figcaption span:first-child { color: var(--school-sun); }
.lightbox button {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--primary-foreground); border: 1px solid var(--school-line-on-dark);
  transition: background .16s;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgb(255 255 255 / .12); outline: none; }
.lightbox button svg { width: 18px; height: 18px; }
.lightbox-close { position: absolute; top: 14px; right: 16px; }
body.lightbox-open { overflow: hidden; }

/* ---------- Donate: needs list ---------- */
.needs-list { margin-top: 42px; border-top: 1px solid var(--border); }
.need-row {
  display: grid; grid-template-columns: 36px 42px minmax(0, 1fr) 190px; align-items: center; gap: 20px;
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.need-index { color: var(--muted-foreground); font-size: 10px; font-weight: 650; }
.need-copy h3 { margin: 0; color: var(--foreground); font-family: var(--font-heading); font-size: 17px; font-weight: 750; line-height: 1.45; }
.need-copy p { margin: 6px 0 0; max-width: 600px; color: var(--muted-foreground); font-size: 12px; line-height: 1.8; }
.need-figure {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  color: var(--primary); font-family: var(--font-heading); font-size: 20px; font-weight: 750; text-align: right;
}
.need-figure span { color: var(--muted-foreground); font-family: var(--font-body); font-size: 9px; font-weight: 700; }

/* ---------- Contact: details, form and map ---------- */
.contact-row-static { grid-template-columns: 42px minmax(0, 1fr); }
.contact-layout-top { align-items: start; }
.contact-form { display: grid; gap: 16px; margin-top: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label { color: var(--muted-foreground); font-size: 9px; font-weight: 700; }
.form-field input, .form-field textarea {
  font: inherit; font-size: 13px; color: var(--foreground); background: var(--card);
  border: 1px solid var(--input); border-radius: 2px; padding: 12px 14px; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.form-field textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--school-green-soft); }
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--destructive); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 4px; }
.form-actions .hero-primary-button { border: 0; }
.form-note { margin: 0; color: var(--muted-foreground); font-size: 10px; line-height: 1.7; max-width: 300px; }
.form-note.is-error { color: var(--destructive); }
.map-frame { margin-top: 28px; border: 1px solid var(--border); background: var(--muted); height: 260px; }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Responsive ---------- */
@media (width <= 900px) {
  .photo-grid { grid-auto-rows: 170px; }
  .need-row { grid-template-columns: 30px 38px minmax(0, 1fr) 150px; gap: 16px; }
  .page-cta-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
}

@media (width <= 700px) {
  .page-hero { min-height: 400px; }
  .page-hero .hero-content { padding-top: 70px; padding-bottom: 84px; }
  .page-hero .hero-content h1 { font-size: clamp(36px, 10.5vw, 48px); }
  .story-grid-reversed .story-photo-wrap { order: 0; }
  .story-section-tight { padding-top: 0; }
  .page-cta { padding-block: 64px; }
  .page-cta h2 { font-size: 28px; }
  .page-cta p { font-size: 11px; }

  .photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; gap: 9px; }
  .photo-item:last-child { grid-column: span 2; }

  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 60px 12px 20px; gap: 14px; }
  .lightbox figure { grid-column: 1 / -1; grid-row: 1; }
  .lightbox-prev { grid-row: 2; justify-self: end; }
  .lightbox-next { grid-row: 2; justify-self: start; }
  .lightbox img { max-height: calc(100svh - 190px); }

  .need-row { grid-template-columns: 38px minmax(0, 1fr); gap: 6px 14px; padding: 19px 0; align-items: start; }
  .need-index { display: none; }
  .need-copy h3 { font-size: 16px; }
  .need-copy p { font-size: 11px; }
  .need-figure { grid-column: 2; align-items: flex-start; text-align: left; font-size: 17px; }
  .need-figure:empty { display: none; }

  .form-row { grid-template-columns: 1fr; }
  .map-frame { height: 220px; }
}

/* ---------- Larger body text (overrides the small sizes in styles.css) ---------- */
.hero-standfirst { font-size: 18px; }
.story-lede { font-size: 18px !important; }
.story-copy > p { font-size: 15px; }
.purpose-quote p { font-size: 18px; }
.vision-line { font-size: 13px; }
.section-heading-row > p { font-size: 14px; max-width: 340px; }
.priority-item p { font-size: 14px; }
.feeding-copy > p { font-size: 14px; }
.feeding-practical { font-size: 13px; }
.feeding-contact { font-size: 13px; }
.feeding-menu-intro { font-size: 12px; }
.meal-row > span { font-size: 14px; }
.meal-row strong { font-size: 15px; }
.feeding-footnote { font-size: 11px; }
.contact-title > p { font-size: 14px; max-width: 420px; }
.contact-label { font-size: 10px; }
.contact-row strong { font-size: 14px; }
.partnership-note { font-size: 12px; }
.footer-main > p { font-size: 13px; }
.text-link { font-size: 13px; }
.page-cta p { font-size: 14px; }
.need-copy p { font-size: 14px; }
.form-note { font-size: 12px; }
.form-field input, .form-field textarea { font-size: 15px; }

@media (width <= 700px) {
  .hero-standfirst { font-size: 16px; }
  .story-lede { font-size: 17px !important; }
  .story-copy > p { font-size: 14px; }
  .purpose-quote p { font-size: 17px; }
  .section-heading-row > p { font-size: 13px; }
  .priority-item p { font-size: 13px; }
  .feeding-copy > p, .contact-title > p { font-size: 13px; }
  .meal-row > span { font-size: 13px; }
  .meal-row strong { font-size: 14px; }
  .contact-row strong { font-size: 13px; }
  .partnership-note { font-size: 11px; }
  .footer-main > p { font-size: 12px; }
  .page-cta p { font-size: 13px; }
  .need-copy p { font-size: 13px; }
}

/* ---------- Larger navigation links ---------- */
.desktop-nav a { font-size: 14px; }
.mobile-nav a { font-size: 15px; min-height: 50px; }
@media (width <= 900px) {
  .desktop-nav a { font-size: 12.5px; }
}
