/* =========================
   GLOBAL + LAYOUT + SIDEBAR
   ========================= */

:root {
  --sidebar-bg: #00BFFF;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #001f4d;
  background-color: #f5f5f5;
}

/* Wrapper stays but does NOT control layout */
.site-wrapper {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--sidebar-bg);
  color: #fff;
  overflow-y: auto;
  padding: 20px 14px;
  z-index: 1000;
}

.sidebar-logo {
  display: block;
  margin: 0 auto 16px;
  max-width: 180px;
}

.sidebar-logo-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Navigation */
.side-nav ul {
  list-style: none;
  padding: 0;
}

.side-nav li {
  margin-bottom: 10px;
}

.nav-tab {
  display: block;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  transition: transform .12s, box-shadow .12s, opacity .12s;
}

/* Pill colours (match page accents) */
.nav-tab.home { background: #4caf50; }
.nav-tab.eotas { background: #ff9800; }
.nav-tab.about { background: #2196f3; }
.nav-tab.policies { background: #9c27b0; }
.nav-tab.referral { background: #ff5722; }
.nav-tab.contact { background: #607d8b; }
.nav-tab.schools { background: #009688; }
.nav-tab.staff { background: #545AA7; }
.nav-tab.treverno { background: #3f51b5; }
.nav-tab.safeguarding { background: #f44336; }

.nav-tab:hover,
.nav-tab[aria-current="page"] {
  opacity: .95;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

.nav-tab[aria-current="page"] {
  transform: translateX(6px) scale(1.06);
}

/* ---------------- Main Content Column ---------------- */
.content-column {
  margin-left: var(--sidebar-width);
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* ---------------- Main Content ---------------- */
.main-content {
  padding: 20px;
  min-height: 100vh;
  width: 100%;
}
/* ============================================================
   STAFF QUICK LINK PILL BOXES
   ============================================================ */

.pill-box-section {
  margin-bottom: 24px;
}

.staff-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

/* Individual pill colours */
.pill-blue {
  background-color: #1976d2 !important;
  color: #fff !important;
}
.pill-green {
  background-color: #c8f1d6;
  color: #0b4a2b;
}
.pill-green {
  background-color: #388e3c !important;
  color: #fff !important;
}

.pill-orange {
  background-color: #f57c00 !important;
  color: #fff !important;
}

/* Protected notice */
.protected-notice p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.bg-purple-soft {
  background-color: #f3e5f5;
  border-radius: 12px;
  padding: 20px;
}


/* ---------------- Main Content ---------------- */

.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding: 20px;
  min-height: 100vh;
}
/* =========================
   MAIN CONTENT + PAGE HEADER
   ========================= */

/* Page header (accent colours come from body class) */
.page-header {
  background: url('BG.png') no-repeat center/cover;
  color: #001f4d;
  text-align: center;
  padding: 40px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-header p {
  margin-top: 8px;
  color: #073155;
}

/* Accent classes (match pill colours) */
.accent-home { border: 4px solid #4caf50; }
.accent-eotas { border: 4px solid #ff9800; }
.accent-about { border: 4px solid #2196f3; }
.accent-policies { border: 4px solid #9c27b0; }
.accent-referral { border: 4px solid #ff5722; }
.accent-contact { border: 4px solid #607d8b; }
.accent-schools { border: 4px solid #009688; }
.accent-staff { border: 4px solid #545AA7; }
.accent-treverno { border: 4px solid #3f51b5; }
.accent-safeguarding { border: 4px solid #f44336; }

/* =========================
   WRAP SECTIONS
   ========================= */

.wrap {
  max-width: 1100px;
  margin: 18px auto;
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* =========================
   VALUES GRID
   ========================= */

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.value-pill h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.value-pill p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* =========================
   MISSION SECTION
   ========================= */

.main-content h2 {
  margin-bottom: 12px;
  font-size: 1.6rem;
}

.main-content h3 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.main-content ul {
  margin-left: 20px;
  margin-top: 10px;
}

.main-content ul li {
  margin-bottom: 6px;
  font-size: 1rem;
}
/* ============================================================
   CAROUSEL — FINAL, STABLE, ONE IMAGE AT A TIME
   Compatible with existing HTML + script.js
   ============================================================ */

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  min-height: 360px;
}

.carousel-inner {
  position: relative;
  width: 100%;
  min-height: 360px;
}

/* Each slide controls visibility */
.carousel-slide {
  display: none;
  width: 100%;
}

.carousel-slide.active {
  display: block;
}

/* Images inside slides */
.carousel-slide img,
.mp-carousel-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Prev / Next buttons */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.4rem;
  z-index: 10;
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(0,0,0,0.55);
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
}

.carousel-dots button.active {
  background: #001f4d;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
}

.carousel-dots button.active {
  background: #001f4d;
}
.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  display: block;
  opacity: 1;
}


/* =========================
   FUNDRAISING GRID
   ========================= */

.fundraising-strip {
  padding: 40px 20px;
  background: #f4f6f8;
  border-radius: 12px;
  margin-top: 20px;
}

.fundraising-strip h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #1f4f5f;
}

.fundraising-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.fundraising-card {
  color: #ffffff;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.fundraising-card img {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  margin: 0 auto 15px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
}

.fundraising-card h3 {
  margin: 10px 0 6px;
  font-size: 1.2rem;
}

.fundraising-card p {
  font-size: 0.95rem;
  line-height: 1.4;
}

.fundraising-card a {
  margin-top: 15px;
  padding: 10px 18px;
  background: rgba(0,0,0,0.25);
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.fundraising-card a:hover {
  background: rgba(0,0,0,0.4);
}

/* Card colours */
.fundraising-card.blue { background: #3ea0f0; }
.fundraising-card.purple { background: #8e67c7; }
.fundraising-card.red { background: #ff5c5c; }
.fundraising-card.blue-light { background: #5f8ee8; }
.fundraising-card.green { background: #4caf7a; }

/* =========================
   STAFF CARDS
   ========================= */

.staff-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin: 16px auto;
  max-width: 500px;
  text-align: center;
}

.staff-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
}

/* =========================
   CONTACT CARDS
   ========================= */

.contact-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.contact-card {
  border-radius: 12px;
  padding: 18px;
  max-width: 420px;
  display: flex;
  gap: 14px;
  align-items: center;
  color: #fff;
}

.card-michelle {
  background: linear-gradient(180deg, #64b5f6 0%, #42a5f5 100%);
}
.card-zoe {
  background: linear-gradient(180deg, #ffb74d 0%, #ffa726 100%);
}

.contact-card img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

/* =========================
   FORMS
   ========================= */

form,
.form {
  background: linear-gradient(135deg, #E8F2F8 0%, #7EAFD3 100%); /* Bright Gray → Iceberg */
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  color: #001f4d; /* ensures text is readable on gradient */
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid #ccc;
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: 1rem;
  background: #fff; /* input boxes remain white for readability */
}

textarea {
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #1976d2;
}


/* =========================
   PDF SCROLL BOX
   ========================= */

.pdf-scroll-box {
  height: 620px;
  overflow-y: auto;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

/* =========================
   UTILITIES
   ========================= */

.hidden {
  display: none;
}
/* =========================
   FOOTER (UNDER MAIN CONTENT)
   ========================= */

.site-footer {
  background: url('BG.png') no-repeat center/cover;
  color: #001f4d;
  text-align: center;
  padding: 20px;
  border-top: 4px solid #001f4d;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  box-sizing: border-box;
}

.site-footer p {
  margin-bottom: 6px;
}

.site-footer address {
  font-style: normal;
  margin-top: 4px;
}

.footer-icap {
  width: auto;
  max-width: 140px; /* slightly larger but not stretched */
  height: auto;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
}

.pill-tc {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 12px;
}

/* =========================
   BACK TO TOP BUTTON
   ========================= */

#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1976d2;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#back-to-top.show {
  display: flex;
}

#back-to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* =========================
   RESPONSIVE RULES
   ========================= */

@media (max-width: 880px) {

  /* Sidebar becomes top bar */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 16px;
  }

  .sidebar-logo {
    max-width: 140px;
    margin-bottom: 8px;
  }

  .nav-tab {
    display: inline-block;
    margin: 6px 6px 6px 0;
  }

  /* Main content full width */
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }

  /* Footer full width */
  .site-footer {
    margin-left: 0;
    width: 100%;
  }
  /* PDF box */
  .pdf-scroll-box {
    height: 500px;
  }

  /* Fundraising */
  .fundraising-card {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .page-header h1 {
    font-size: 1.6rem;
  }

  .sidebar-logo {
    max-width: 120px;
  }
   /* ============================================================
   SAFEGUARDING IMAGE GRID — REFINED SIZE & STYLE
   ============================================================ */

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: center;
}

.image-grid img {
  max-width: 280px;        /* keeps images modest */
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  background: #ffffff;
  padding: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.image-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

}
/* === FIX: Featured policy grid spacing === */
.featured-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
/* === FIX: Policy buttons consistency === */
.featured-btn,
.policy-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: #1976d2;
  color: #fff;
  margin-right: 8px;
  margin-top: 8px;
  transition: background 0.3s ease;
}
.policy-btn.outline {
  background: transparent;
  border: 2px solid #1976d2;
  color: #1976d2;
}
/* === Safeguarding coloured policy cards === */
.sg-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sg-card {
  padding: 20px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Colour themes */
.sg-blue { background: #2196f3; }
.sg-purple { background: #9c27b0; }
.sg-green { background: #4caf50; }
.sg-orange { background: #ff9800; }
.sg-red { background: #f44336; }

/* ============================================================
   UNIVERSAL VIEW / DOWNLOAD BUTTONS FOR ALL POLICY CARDS
   ============================================================ */

.sg-actions a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  margin-right: 8px;
  margin-top: 10px;
  transition: background 0.25s ease, transform 0.15s ease;
}

.sg-actions a:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}

/* Images inside cards */
.sg-card img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.2);
  padding: 6px;
}
.icap-img {
  width: 120px;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
}
/* === News Reel Ticker === */
.news-reel {
  overflow: hidden;
  position: relative;
  height: 2.2em;
  font-weight: 600;
  font-size: 1rem;
  color: #050372;
}

.news-track {
  display: flex;
  white-space: nowrap;
  animation: scroll-news 28s linear infinite;
}

.news-content {
  padding-left: 100%;
}

@keyframes scroll-news {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}


/* ============================================================
   SECTION BACKGROUNDS (soft colour blocks)
   ============================================================ */

.bg-blue-soft {
  background-color: #e3f2fd;
  border-radius: 12px;
  padding: 20px 24px;
}
/* Pale blue for Support Offer section */
.bg-blue-light-soft {
  background-color: #E8F2F8;  /* Bright Gray / pale blue */
  border-radius: 12px;
  padding: 20px 24px;
}
.bg-green-soft {
  background-color: #e8f5e9;
  border-radius: 12px;
  padding: 20px 24px;
}
.bg-yellow-soft {
  background-color: #fff9c4;
  border-radius: 12px;
  padding: 20px 24px;
}

.bg-pink-soft {
  background-color: #fce4ec;
  border-radius: 12px;
  padding: 20px 24px;
}

.bg-purple-soft {
  background-color: #f3e5f5;
  border-radius: 12px;
  padding: 20px 24px;
}
.bg-purple-soft {
  background-color: #f7edf9;
  border-radius: 12px;
  padding: 20px;
}
.bg-teal-soft {
  background-color: #e0f2f1;
  border-radius: 12px;
  padding: 20px 24px;
}

.bg-orange-soft {
  background-color: #fff3e0;
  border-radius: 12px;
  padding: 20px 24px;
}

.bg-red-soft {
  background-color: #ffebee;
  border-radius: 12px;
  padding: 20px 24px;
}

/* ============================================================
   SG POLICY CARD COLOURS — DARK, READABLE, ACCESSIBLE
   ============================================================ */

.sg-blue    { background-color: #1976d2; color: #fff; }
.sg-green   { background-color: #388e3c; color: #fff; }
.sg-orange  { background-color: #f57c00; color: #fff; }
.sg-red     { background-color: #d32f2f; color: #fff; }
.sg-purple  { background-color: #7b1fa2; color: #fff; }
.sg-teal    { background-color: #00897b; color: #fff; }
.sg-pink    { background-color: #c2185b; color: #fff; }
.sg-yellow  { background-color: #f9a825; color: #fff; }
.sg-navy    { background-color: #283593; color: #fff; }
.sg-grey    { background-color: #455a64; color: #fff; }


/* ============================================================
   SG POLICY CARD LAYOUT
   ============================================================ */

.sg-policy-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 16px;
}

.sg-card {
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.sg-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.sg-card p {
  margin-bottom: 14px;
  line-height: 1.45;
}


/* ============================================================
   UNIVERSAL VIEW / DOWNLOAD BUTTONS FOR ALL SG CARDS
   ============================================================ */

.sg-actions a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  margin-right: 8px;
  margin-top: 10px;
  transition: background 0.25s ease, transform 0.15s ease;
}

.sg-actions a:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}


/* ============================================================
   REFERRAL BOX (Contact page)
   ============================================================ */

.contact-referral-box {
  background-color: #fff3e0;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin-top: 18px;
}


/* ============================================================
   SEND BUTTON (Contact form)
   ============================================================ */

.pill-send {
  background-color: #1976d2 !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  text-align: center;
}


/* ============================================================
   FOOTER IMAGE (ICAP badge clarity)
   ============================================================ */

.site-footer img {
  width: auto;
  max-width: 140px;
  height: auto;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
}
/* ============================================================
   PILL BOX FIX — RESTORE ROUNDED BUTTONS
   ============================================================ */

/* Generic pill links & buttons */
.pill,
.pill-box,
.quick-link,
.resource-link,
.download-pill,
a.pill-link {
  border-radius: 999px !important;
}
.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 50px; /* rounded pill shape */
  text-decoration: none;
  font-weight: 500;
  color: #fff;
  margin: 4px 4px 4px 0;
  transition: background 0.3s ease;
}

.pill-blue { background-color: #001f4d; }
.pill-green { background-color: #006644; }
.pill-orange { background-color: #ff6600; }
.pill-tc { background-color: #555; }

.pill:hover {
  opacity: 0.85;
}

/* Ensure padding remains pill-shaped */
.pill,
.pill-box,
.quick-link,
.resource-link,
.download-pill {
  padding: 12px 20px;
  display: inline-block;
}

/* Prevent flex/grid squashing */
.pill-box,
.quick-link {
  white-space: nowrap;
}

/* Hover safety */
.pill:hover,
.quick-link:hover,
.resource-link:hover {
  transform: translateY(-1px);
}
/* === Pill buttons (fix transparent submit buttons) === */
button.pill {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  background-color: inherit;
}
/* Pill style for referral button if pill-referral class is used */
.pill-referral {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
/* Slightly larger, fully visible safeguarding image cards */
.wrap.bg-purple-soft .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
  justify-items: center;
  margin-top: 8px;
  padding: 6px;
}

.wrap.bg-purple-soft .image-grid img {
  width: 100%;
  max-width: 360px;      /* slightly larger on desktop */
  height: auto;          /* preserve natural aspect ratio */
  max-height: 300px;     /* prevents overly tall images */
  object-fit: contain;   /* show the whole image inside the frame */
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  background: #ffffff;
  padding: 10px;         /* white frame around the image */
  display: block;
  border: 1px solid rgba(0,0,0,0.06);
  background-clip: padding-box;
}

@media (max-width: 520px) {
  .wrap.bg-purple-soft .image-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 4px;
  }
  .wrap.bg-purple-soft .image-grid img {
    max-width: 320px;
    max-height: 240px;
    padding: 8px;
  }
}
/* ------------------------------------------------------ */
/* Professional Cards — Brand Palette + Soft Backgrounds  */
/* ------------------------------------------------------ */

/* Base card styling (already used) */
.pro-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform .25s ease, box-shadow .25s ease;
  opacity: 0;
  transform: translateY(20px);
}

/* Hover lift */
.pro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

/* Scroll-in reveal */
.pro-card.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease, transform .6s ease;
}

/* Icon styling */
.pro-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  color: #073155;
  display: inline-block;
}

/* Brand‑tinted backgrounds for pro-cards */
.pro-card {
  background: var(--pro-bg, #ffffff) !important;
  border-left: 6px solid var(--pro-accent, #ccc);
}

/* Assign brand colours */
.pro-card:nth-child(1) {
  --pro-bg: #f4f8f5;      /* soft green */
  --pro-accent: #bcd3c2;
}

.pro-card:nth-child(2) {
  --pro-bg: #f5f8fc;      /* soft blue */
  --pro-accent: #c7d8f5;
}

.pro-card:nth-child(3) {
  --pro-bg: #fdf7fa;      /* soft pink */
  --pro-accent: #f7d7e8;
}

.pro-card:nth-child(4) {
  --pro-bg: #fdfaf2;      /* soft warm yellow */
  --pro-accent: #f5e6b3;
}

.pro-card:nth-child(5) {
  --pro-bg: #f8f5fc;      /* soft lavender */
  --pro-accent: #d8c7f5;
}
/* Fix Support Offer header visibility */
.bg-green-soft h2,
.bg-yellow-soft h2 {
  color: #073155; /* deep professional blue */
  font-weight: 700;
}
/* School Referral Form contrast */
.bg-purple-soft .contact-form form {
  background: #ffffff;
  padding: 22px;
  border-radius: 12px;
  border-left: 6px solid #4a6fa5; /* professional blue */
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}
/* Contact Us (Schools Only) form contrast */
.bg-orange-soft .contact-form form {
  background: #ffffff;
  padding: 22px;
  border-radius: 12px;
  border-left: 6px solid #6aa57a; /* soft professional green */
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}
.bg-green-soft h2#inclusion-heading {
  border-bottom: 3px solid #4a6fa5;
  padding-bottom: 6px;
  display: inline-block;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width, 260px);
  z-index: 10;
}
/* ============================================================
   SAFEGUARDING IMAGE GRID — FINAL WORKING STYLE
   ============================================================ */
.wrap.bg-purple-soft .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  justify-items: center;
  align-items: start;
  margin-top: 8px;
  padding: 6px;
}

.wrap.bg-purple-soft .image-grid figure,
.wrap.bg-purple-soft .sg-figure {
  margin: 0;
  text-align: center;
  max-width: 360px;
}

.wrap.bg-purple-soft .image-grid img,
.wrap.bg-purple-soft .sg-figure img {
  width: 100%;
  max-width: 360px;       /* desktop max width */
  max-height: 300px;      /* prevents overly tall images */
  height: auto;           /* maintain aspect ratio */
  object-fit: contain;    /* ensures full image fits */
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  background: #ffffff;
  padding: 10px;          /* white frame around image */
  display: block;
  border: 1px solid rgba(0,0,0,0.06);
  background-clip: padding-box;
  cursor: pointer;        /* indicates clickable/lightbox */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wrap.bg-purple-soft .image-grid img:hover,
.wrap.bg-purple-soft .sg-figure img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.wrap.bg-purple-soft .image-grid figcaption,
.wrap.bg-purple-soft .sg-figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #5a6f86;        /* soft, professional caption colour */
  line-height: 1.4;
  opacity: 0.85;
}

/* =========================
   RESPONSIVE ADJUSTMENTS
   ========================= */
@media (max-width: 520px) {
  .wrap.bg-purple-soft .image-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 4px;
  }

  .wrap.bg-purple-soft .image-grid img,
  .wrap.bg-purple-soft .sg-figure img {
    max-width: 320px;
    max-height: 240px;
    padding: 8px;
  }
}
/* ============================================================
   SAFEGUARDING IMAGES — GRID, SIZING, HOVER, CAPTIONS & LIGHTBOX
   ============================================================ */

.wrap.bg-purple-soft .image-grid,
.sg-figure {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
  justify-items: center;
  margin-top: 8px;
  padding: 6px;
}

.wrap.bg-purple-soft .image-grid img,
.sg-figure img {
  width: 100%;
  max-width: 360px;        /* Desktop max width */
  height: auto;            /* preserve aspect ratio */
  max-height: 300px;       /* prevent overly tall images */
  object-fit: contain;     /* ensures full image is visible */
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  background: #ffffff;
  padding: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background-clip: padding-box;
  cursor: pointer;         /* indicates clickable for lightbox */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wrap.bg-purple-soft .image-grid img:hover,
.sg-figure img:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

.wrap.bg-purple-soft .image-grid figcaption,
.sg-figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #5a6f86;          /* soft professional colour */
  line-height: 1.4;
  opacity: 0.85;
  text-align: center;
}

/* ----------------- Responsive adjustments ----------------- */
@media (max-width: 520px) {
  .wrap.bg-purple-soft .image-grid,
  .sg-figure {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 4px;
  }

  .wrap.bg-purple-soft .image-grid img,
  .sg-figure img {
    max-width: 320px;
    max-height: 240px;
    padding: 8px;
  }
}

/* ============================================================
   LIGHTBOX OVERLAY FOR SAFEGUARDING IMAGES
   ============================================================ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 40, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  background: #fff;
  padding: 12px;
}

/* Click anywhere to close the lightbox */
.lightbox-overlay:after {
  content: '✕';
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  pointer-events: auto;
}
/* ============================================================
   RESPONSIVE DESIGN — TABLETS & MOBILE DEVICES
   Add to bottom of style.css
   ============================================================ */

/* ---------- Tablet Devices (up to 900px) ---------- */
@media (max-width: 900px) {

  /* Sidebar becomes a top header */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 14px 16px;
  }

  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
  }

  /* Main content full width */
  .content-column,
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px;
  }

  /* Footer full width */
  .site-footer {
    margin-left: 0;
    width: 100%;
  }

  /* Navigation pills wrap */
  .side-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .nav-tab {
    padding: 8px 14px;
    font-size: 0.95rem;
  }

  /* Cards stay proportional */
  .staff-card,
  .contact-card,
  .fundraising-card,
  .pro-card {
    max-width: 100%;
  }

  /* Carousel scales nicely */
  .carousel-container {
    padding: 8px;
  }

  .carousel-slide img,
  .mp-carousel-img {
    height: 240px;
  }

  /* Safeguarding images scale */
  .wrap.bg-purple-soft .image-grid img,
  .sg-figure img {
    max-width: 300px;
    max-height: 240px;
  }
}

/* ---------- Mobile Devices (up to 480px) ---------- */
@media (max-width: 480px) {

  /* Page header balance */
  .page-header {
    padding: 28px 14px;
  }

  .page-header h1 {
    font-size: 1.55rem;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  /* Content spacing */
  .wrap {
    margin: 14px 8px;
    padding: 14px;
  }

  /* Contact cards stack */
  .contact-card {
    flex-direction: column;
    text-align: center;
  }

  .contact-card img {
    margin-bottom: 10px;
  }

  /* Fundraising cards adjustments */
  .fundraising-card {
    min-height: auto;
    padding: 18px;
  }

  /* Buttons & pills tap-friendly */
  .pill,
  .policy-btn,
  .featured-btn {
    padding: 12px 18px;
    font-size: 1rem;
  }

  /* Safeguarding images scale for small screens */
  .wrap.bg-purple-soft .image-grid img,
  .sg-figure img {
    max-width: 220px;
    max-height: 180px;
  }
}

/* ---------- Extra small phones (up to 360px) ---------- */
@media (max-width: 360px) {
  .page-header h1 {
    font-size: 1.4rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .nav-tab {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .wrap {
    padding: 12px;
  }

  .pill,
  .policy-btn,
  .featured-btn {
    padding: 10px 14px;
    font-size: 0.95rem;
  }
}
/* ============================================================
   UNIFIED RESPONSIVE IMAGES & CARDS — CAROUSEL, CARDS, SAFEGUARDING
   Ensures all visuals scale proportionally on all devices
   ============================================================ */

/* Carousel images scale proportionally */
.carousel-slide img,
.mp-carousel-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Info cards (Pro cards, Staff, Contact, Fundraising) scale */
.staff-card,
.contact-card,
.fundraising-card,
.pro-card {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Safeguarding images already handled, but reinforce scaling */
.wrap.bg-purple-soft .image-grid img,
.sg-figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-width: 100%;
}

/* ---------- Tablet Devices (up to 900px) ---------- */
@media (max-width: 900px) {
  .carousel-slide img,
  .mp-carousel-img {
    height: auto;
  }
  .staff-card,
  .contact-card,
  .fundraising-card,
  .pro-card {
    max-width: 100%;
  }
  .wrap.bg-purple-soft .image-grid img,
  .sg-figure img {
    max-width: 300px;
    max-height: 240px;
  }
}

/* ---------- Mobile Devices (up to 480px) ---------- */
@media (max-width: 480px) {
  .carousel-slide img,
  .mp-carousel-img {
    height: auto;
  }
  .staff-card,
  .contact-card,
  .fundraising-card,
  .pro-card {
    max-width: 100%;
  }
  .wrap.bg-purple-soft .image-grid img,
  .sg-figure img {
    max-width: 220px;
    max-height: 180px;
  }
}

/* ---------- Extra small phones (up to 360px) ---------- */
@media (max-width: 360px) {
  .carousel-slide img,
  .mp-carousel-img {
    height: auto;
  }
}
/* ============================================================
   DESKTOP/LAPTOP CAROUSEL HEIGHT ADJUSTMENT
   Keeps carousel proportional on larger screens
   ============================================================ */

@media (min-width: 1025px) {
  .carousel-slide img,
  .mp-carousel-img {
    max-height: 400px;  /* Adjust as needed */
    width: auto;
    object-fit: contain;
  }
}
