/* RISR theme layer — loaded last, after Bootstrap and the migrated style.css.
 *
 * The site is a faithful port: 28 generated page templates carrying the old
 * markup. They are Bootstrap 5.3, so the look can be moved without touching a
 * single .gen.ts. Delete the <link> in layout.tsx to revert.
 *
 * ponytail: 719 inline style="" attributes in the generated pages outrank a
 * stylesheet. The ones worth winning are forced below; the rest stay as-is.
 * Upgrade path: strip inline styles from a .gen.ts when a page needs more.
 */

:root {
  --risr-navy: #1c355e;
  --risr-blue: #416ba9;
  --risr-sand: #f6f4ef; /* warm page ground, replaces the cool grey */
  --risr-ink: #22303f;
  --risr-line: #e3ded3;

  /* Bootstrap reads these, so buttons/links/borders follow without extra CSS */
  --bs-primary: var(--risr-navy);
  --bs-primary-rgb: 28, 53, 94;
  --bs-link-color: var(--risr-blue);
  --bs-link-hover-color: var(--risr-navy);
  --bs-body-color: var(--risr-ink);
  --bs-border-color: var(--risr-line);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.7;
}

body {
  background: #fff;
  letter-spacing: 0.005em;
}

/* ── Type: bigger, tighter headlines; the main visual gap vs a modern site ── */
h1, h2, h3, .display-1, .display-2 {
  color: var(--risr-navy);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
h1 {
  font-size: clamp(2.4rem, 5vw, 4rem) !important;
  font-weight: 700;
}
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 600; }

/* ── Air. Generous section rhythm is most of what reads as "modern". ── */
section, .welcome, .value, .outcome, .campus {
  padding-block: clamp(3rem, 7vw, 6rem);
}
.container_bg { background: var(--risr-sand); }

/* ── Header: full-width, sticky, quiet ── */
.nav-bg {
  background: var(--risr-navy) !important;
}
.nav-bg .nav-link,
.nav-bg .nav-link1 {
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-bg .nav-link:hover, .nav:not(.nav-bg) .nav-link:hover { color: #fff !important; }

/* The header keeps its navy composition — the logo tile is positioned against
   it, so recolouring the second row clips the logo. Type and rhythm only. */
.nav:not(.nav-bg) .nav-link {
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
  padding-block: 1.1rem;
}
/* Underline that grows on hover — cheap, and reads as considered. */
.nav:not(.nav-bg) .nav-link::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.7rem;
  height: 2px;
  background: var(--risr-blue);
  transform: scaleX(0);
  transition: transform 0.18s ease;
}
.nav:not(.nav-bg) .nav-link:hover::after { transform: scaleX(1); }

/* ── Buttons: pill, generous hit area ── */
.btn, .blue-btn, .white-btn {
  border-radius: 999px !important;
  padding: 0.85rem 2rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover, .blue-btn:hover, .white-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(28, 53, 94, 0.18);
}

/* ── Cards: flat, hairline, no chrome ── */
.card {
  border: 1px solid var(--risr-line) !important;
  border-radius: 12px !important;
  box-shadow: none;
  overflow: hidden;
}
.swiper .card { height: auto !important; min-height: 420px; }

/* The navy value panel: keep the colour, drop the fixed 75% width so it
   breathes on every screen. */
.values {
  width: min(100%, 1100px) !important;
  border-radius: 16px;
  padding: clamp(2rem, 4vw, 3.5rem);
}

/* ── Images: consistent radius, never stretched ── */
.welcome img, .outcome img, .campus img, .card img {
  border-radius: 10px;
  object-fit: cover;
}

/* ── Footer: dark band, calm spacing ── */
footer {
  background: var(--risr-navy);
  color: rgba(255, 255, 255, 0.82);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
footer a { color: rgba(255, 255, 255, 0.82) !important; text-decoration: none; }
footer a:hover { color: #fff !important; }

@media (prefers-reduced-motion: reduce) {
  .btn, .blue-btn, .white-btn, .nav-link::after { transition: none; }
}

/* ═══ Homepage (src/app/(site)/page.tsx) ═══════════════════════════════════
   Structure sections only — every string and image inside them comes from the
   CMS, so the school edits this page exactly as before. */

.risr-home section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.risr-home .section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--risr-navy);
}
.risr-home .section-lead {
  max-width: 62ch;
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 1.1rem;
  color: #4a5a6b;
}

/* Hero: full-bleed video, dark veil, copy over the top. */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: grid;
  place-items: center;
  padding-block: 0 !important;
  overflow: hidden;
  background: var(--risr-navy);
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 24, 45, 0.55) 0%,
    rgba(12, 24, 45, 0.35) 45%,
    rgba(12, 24, 45, 0.75) 100%
  );
}
.hero-inner { position: relative; text-align: center; color: #fff; }
.hero-title {
  color: #fff !important;
  font-size: clamp(2.6rem, 6.5vw, 5rem) !important;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-lead {
  max-width: 56ch;
  margin: 1.25rem auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255, 255, 255, 0.92);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2.25rem;
}
.btn-hero-primary { background: #fff; color: var(--risr-navy) !important; border: 0; }
.btn-hero-ghost {
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, 0.75);
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* Accreditation strip — the school's real badges, in place of invented stats. */
.creds { background: var(--risr-sand); padding-block: clamp(2rem, 4vw, 3rem) !important; }
.creds-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: #7a8797;
  margin-bottom: 1.5rem;
}
.creds-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  justify-content: center;
}
.creds-logo { height: clamp(40px, 6vw, 64px); width: auto; object-fit: contain; }

/* Four pillars — Care / Community / Compassion / Connection */
.pillar {
  background: #fff;
  border: 1px solid var(--risr-line);
  border-radius: 14px;
  padding: 1.75rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pillar:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28, 53, 94, 0.1); }
.pillar-img { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; }
.pillar-title { color: var(--risr-navy); margin-bottom: 0.6rem; }
.pillar-body { color: #4a5a6b; font-size: 0.98rem; }

.values-block { background: var(--risr-sand); }
.vm-card {
  background: var(--risr-navy);
  color: #fff;
  border-radius: 16px;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  height: 100%;
}
.vm-card h3 { color: #fff; margin-bottom: 0.9rem; }

.split-img { width: 100%; height: 320px; object-fit: cover; border-radius: 12px; }

/* News cards */
.news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.news-all { color: var(--risr-blue) !important; font-weight: 600; white-space: nowrap; }
.news-card {
  display: block;
  border: 1px solid var(--risr-line);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  color: inherit !important;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28, 53, 94, 0.1); }
.news-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.news-body { padding: 1.25rem 1.35rem 1.6rem; }
.news-meta {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: #7a8797;
}
.news-title { font-size: 1.15rem; margin: 0.5rem 0 0.5rem; color: var(--risr-navy); }
.news-summary {
  color: #4a5a6b;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767px) {
  .hero { min-height: 70vh; }
  .split-img { height: 220px; }
}

/* Header/content alignment.
   style.css caps both .container-fluid and .w-100 at max-width: 2000px. The
   content is a normal-flow block, so Bootstrap's margin-inline:auto centres it;
   the header is position:absolute, where auto margins only resolve when both
   left and right are set — so it stayed flush left and sat 179px out of line
   with everything below it on windows wider than 2000px.
   Offset it by hand instead. max() keeps it at 0 below the cap. */
.w-100.d-none.d-md-block { left: max(0px, calc((100vw - 2000px) / 2)); }

/* ── Sticky admissions CTA ────────────────────────────────────────────────
   Booking a tour is the decision step, so it is pinned rather than left to be
   found in a menu. Bottom-right on a desktop; a full-width bar on a phone,
   where a floating pill would cover content and be easy to mis-tap.
   The footer gets bottom padding on small screens so the bar never sits on
   top of the last line of it. */
.risr-cta {
  position: fixed;
  z-index: 1030; /* above Bootstrap's fixed navbar (1030) siblings, below modals */
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  gap: 0.5rem;
}
.risr-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(28, 53, 94, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.risr-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(28, 53, 94, 0.34);
  text-decoration: none;
}
.risr-cta-primary {
  background: var(--risr-navy);
  color: #fff;
}
.risr-cta-primary:hover { color: #fff; }
.risr-cta-ghost {
  background: #fff;
  color: var(--risr-navy);
  border: 2px solid var(--risr-navy);
}
.risr-cta-ghost:hover { color: var(--risr-navy); }

@media (max-width: 819px) {
  .risr-cta {
    right: 0;
    left: 0;
    bottom: 0;
    gap: 0;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.16);
  }
  .risr-cta-btn {
    flex: 1 1 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0.9rem 0.5rem;
  }
  .risr-cta-btn:hover { transform: none; box-shadow: none; }
  .risr-cta-ghost { border-width: 0; border-top: 2px solid var(--risr-navy); }
  /* The ported pages have no <footer> element — the footer is .container_food —
     so reserve the space on the body instead of guessing at the markup. */
  body { padding-bottom: 4.5rem; }
}

/* Printing a policy page should not carry the buttons onto the paper. */
@media print { .risr-cta { display: none; } }

/* ── Homepage pop-up ──────────────────────────────────────────────────────
   The announcement pop-up is an image, usually a tall portrait poster. The
   dialog is deliberately transparent and sized to the picture: a fixed-width
   white modal leaves big empty gutters beside a portrait image, which is what
   the school's own memorial notice never had. */
.risr-popup .modal-dialog {
  max-width: min(94vw, 620px);
}
.risr-popup .modal-content {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.risr-popup-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.risr-popup-img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* With more than one slide the box is fixed, because posters are not all the
   same shape: letting each slide size itself made the panel jump by hundreds
   of pixels every rotation, moved the close button out from under the pointer,
   and cancelled the hover-pause by firing mouseleave. A single slide keeps
   hugging its picture, which is the nicer result when there is nothing to
   rotate to. */
.risr-popup-multi { width: 100%; }
.risr-popup-multi .carousel-inner { height: 72vh; }
.risr-popup-multi .carousel-item { height: 100%; }
.risr-popup-multi .carousel-item > a,
.risr-popup-multi .carousel-item > img,
.risr-popup-multi .carousel-item > a > img {
  display: block;
  width: 100%;
  height: 100%;
}
.risr-popup-multi .risr-popup-img {
  max-height: none;
  object-fit: contain;
}

.risr-popup-close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1c355e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.risr-popup-close:hover { transform: scale(1.06); }
.risr-popup-close:focus-visible { outline: 3px solid #416ba9; outline-offset: 2px; }

/* Controls sit under the picture. Overlaid arrows covered about a third of a
   poster that is itself a link, and the dots were an 11px tap target on top of
   the artwork. */
.risr-popup-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-top: .6rem;
}
.risr-popup-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #1c355e;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.risr-popup-nav:hover { background: #fff; }
.risr-popup-nav:focus-visible { outline: 3px solid #416ba9; outline-offset: 2px; }

/* Static row, not Bootstrap's absolutely-positioned overlay. */
.risr-popup-dots {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}
/* 12px dot inside a 44px target: the visible mark stays small, the thing a
   thumb has to hit does not. */
.risr-popup-dots [data-bs-target] {
  width: 44px;
  height: 44px;
  padding: 16px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  opacity: 1;
  box-sizing: border-box;
  background-clip: content-box;
  background-color: rgba(255, 255, 255, .55);
  text-indent: 0;
}
.risr-popup-dots [data-bs-target]::before,
.risr-popup-dots [data-bs-target]::after { content: none; }
.risr-popup-dots .active { background-color: #fff; }
.risr-popup-dots [data-bs-target]:focus-visible { outline: 3px solid #416ba9; outline-offset: -4px; }

/* Belt and braces on top of the real scroll lock (see globals.css): stops a
   flick inside the pop-up chaining to the page behind it. */
.risr-popup { overscroll-behavior: contain; }

@media (max-width: 575.98px) {
  .risr-popup .modal-dialog { max-width: 100%; margin: 0 auto; padding: 0 14px; }
  .risr-popup-img { max-height: 68vh; }
  .risr-popup-multi .carousel-inner { height: 62vh; }
  /* Inside the corner on a phone — an off-image button would be clipped. */
  .risr-popup-close { top: 8px; right: 8px; width: 38px; height: 38px; }
}
