/* ========== GLOBAL STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #004080 #f1f1f1;
}
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f9f9f9;
  overflow-x: hidden;
}
::selection {
  background: rgba(0, 64, 128, 0.18);
  color: #00264d;
}
:focus-visible {
  outline: 3px solid rgba(0, 64, 128, 0.45);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Merriweather', serif;
  color: #111;
  text-wrap: balance;
}
h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.85rem;
}
h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #004080, #3b82c4);
}
p {
  color: #444;
  margin-bottom: 1rem;
}
a {
  color: #004080;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #555;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #004080, #0058a8);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
}
.btn:hover {
  background: linear-gradient(135deg, #00264d, #004080);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 64, 128, 0.25);
}
.btn:active {
  transform: translateY(0);
}
.btn-secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-secondary:hover {
  background: #fff;
  color: #004080;
}


/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(94%, 1200px);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: box-shadow 0.3s ease, background 0.3s ease, top 0.3s ease;
}
.navbar .container {
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem 0.6rem 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: #004080;
}
.nav-img {
  height: 40px;
  width: auto;
}
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
nav ul li a {
  display: inline-block;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  text-decoration: none;
  color: #004080;
  transition: background 0.3s ease, color 0.3s ease;
}
nav ul li a:hover {
  background: rgba(0, 64, 128, 0.08);
  color: #004080;
}

/* Burger menu (mobile) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin-left: 0.5rem;
  transition: background 0.3s ease;
}
.burger:hover {
  background: rgba(0, 64, 128, 0.08);
}
.burger span {
  width: 20px;
  height: 2px;
  background: #004080;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
@media (max-width: 900px) {
  .navbar {
    top: 0.75rem;
  }
  nav ul {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: #fff;
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    padding: 1rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }
  nav ul li a {
    padding: 0.75rem 1rem;
    text-align: center;
  }
  nav ul.active {
    display: flex;
  }
  .burger {
    display: flex;
  }
}

/* ========== HERO ========== */
.parents-hero {
  background: #004080 url('../assets/school-building.webp') center/cover no-repeat;
  height: 60vh;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
  box-shadow: 0 25px 60px rgba(0, 64, 128, 0.22);
  color: #fff;
}
.parents-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,10,30,0.25) 0%, rgba(0,10,30,0.55) 55%, rgba(0,10,30,0.72) 100%);
}
.parents-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 0 1rem;
}
.parents-hero .hero-content::before {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  margin: 0 auto 1.25rem;
  border-radius: 2px;
  background: #fff;
  opacity: 0;
  animation: heroFadeUp 0.7s ease 0.05s forwards;
}
.parents-hero .hero-content h1 {
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  opacity: 0;
  animation: heroFadeUp 0.8s ease 0.15s forwards;
}
.parents-hero .hero-content p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: heroFadeUp 0.8s ease 0.3s forwards;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CTA BANNER ========== */
.cta-banner {
  position: relative;
  overflow: hidden;
  width: min(94%, 1200px);
  margin: 4rem auto;
  background: linear-gradient(135deg, #004080, #00264d);
  color: #fff;
  text-align: center;
  padding: 4.5rem 2rem;
  border-radius: 32px;
  box-shadow: 0 25px 60px rgba(0, 64, 128, 0.25);
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 65%);
  pointer-events: none;
}
.cta-banner > * {
  position: relative;
  z-index: 1;
}
.cta-banner h2 {
  margin-bottom: 1rem;
  color: #fff;
}
.cta-banner h2::after {
  background: #fff;
}
.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}
.cta-banner .btn {
  background: #fff;
  color: #004080;
}
.cta-banner .btn:hover {
  background: #eef3f9;
  color: #00264d;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

/* ========== FOOTER ========== */
.footer {
  background: #111;
  color: #bbb;
  padding: 3.5rem 0 1rem;
  border-top: 3px solid #004080;
  border-radius: 32px 32px 0 0;
}
.footer p {
  color: #bbb;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.footer h3 {
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.footer ul {
  list-style: none;
}
.footer ul li {
  margin-bottom: 0.5rem;
}
.footer ul li a {
  color: #bbb;
}
.footer ul li a:hover {
  color: #fff;
}
.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #888;
}
.footer-bottom p {
  color: #888;
  margin: 0;
}

/* ========== SCROLL ANIMATIONS ========== */
.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVENESS ========== */
@media (max-width: 900px) {
  .parents-hero .hero-content h1 {
    font-size: 2rem;
  }
  .timeline {
    padding-left: 1.5rem;
  }
  .headteacher-content {
    flex-direction: column;
    text-align: center;
  }
  .headteacher-content img {
    margin-bottom: 1rem;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  .cta-banner {
    border-radius: 24px;
    padding: 3.5rem 1.5rem;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== CURRENT PAGE + FOOTER SOCIAL ========== */
nav ul li a.active {
  background: #004080;
  color: #fff;
}
nav ul li a.active:hover {
  background: #00264d;
  color: #fff;
}
/* .footer ul.reset */
.footer ul {
  list-style: none;
  padding: 0;
}
button.burger {
  background: transparent;
  border: none;
  padding: 0;
}
.footer a {
  color: #bbb;
}
.footer a:hover {
  color: #fff;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 500;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.footer .social-link:hover {
  background: #004080;
  border-color: #004080;
  color: #fff;
}

/* ========== SLIDING NAV PILL ========== */
@media (min-width: 901px) {
  nav ul.has-pill {
    position: relative;
  }
}
.nav-pill,
.nav-hover {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50px;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), width 0.55s cubic-bezier(0.22, 1, 0.36, 1), height 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.nav-pill {
  background: linear-gradient(135deg, #004080, #0058a8);
  box-shadow: 0 6px 16px rgba(0, 64, 128, 0.28);
  view-transition-name: nav-pill;
}
.nav-hover {
  background: rgba(0, 64, 128, 0.08);
}
nav ul.has-pill li a {
  position: relative;
  z-index: 1;
  transition: color 0.4s ease;
}
nav ul.has-pill li a:hover,
nav ul.has-pill li a.active,
nav ul.has-pill li a.active:hover {
  background: transparent;
}
nav ul.has-pill li a.active {
  color: #fff;
}

/* ========== PAGE TRANSITIONS ========== */
@view-transition {
  navigation: auto;
}
.navbar {
  view-transition-name: navbar;
}
::view-transition-group(*) {
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-old(root) {
  animation: pageOut 0.25s ease both;
}
::view-transition-new(root) {
  animation: pageIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
html.page-enter body > *:not(.navbar) {
  animation: pageIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
html.page-leaving body > *:not(.navbar) {
  animation: pageOut 0.3s ease both;
}
@keyframes pageOut {
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .nav-pill,
  .nav-hover {
    transition: none;
  }
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: -4rem auto 4rem;
  position: relative;
  z-index: 3;
}
.action-card {
  display: block;
  background: #fff;
  padding: 1.75rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  color: #222;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s cubic-bezier(.2,.8,.2,1);
}
.action-card:hover {
  color: #222;
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}
.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 64, 128, 0.08);
  margin-bottom: 1rem;
  transition: background 0.35s ease;
}
.action-icon svg {
  width: 22px;
  height: 22px;
  fill: #004080;
  transition: fill 0.35s ease;
}
.action-card:hover .action-icon {
  background: #004080;
}
.action-card:hover .action-icon svg {
  fill: #fff;
}
.action-card h3 {
  color: #004080;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}
.action-card p {
  font-size: 0.92rem;
  margin: 0;
}
.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* ========== TERM DATES ========== */
.term-dates {
  padding: 2rem 0 4rem;
  scroll-margin-top: 100px;
}
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.term-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.term-card h3 {
  color: #004080;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(0, 64, 128, 0.08);
}
.term-card ul {
  list-style: none;
}
.term-card li {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0;
  font-size: 0.95rem;
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.term-card li:last-child {
  border-bottom: none;
}
.term-card li span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c6aa8;
}

/* ========== UNIFORM ========== */
.uniform-section {
  padding: 4rem 0;
  background: #f1f1f1;
  scroll-margin-top: 100px;
}
.uniform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.uniform-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.uniform-card h3 {
  color: #004080;
  margin-bottom: 1rem;
}
.uniform-card ul {
  list-style: none;
  margin-bottom: 1.5rem;
}
.uniform-card li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.6rem;
  color: #444;
}
.uniform-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #004080, #3b82c4);
}

/* ========== LETTERS ========== */
.letters {
  padding: 4rem 0;
  scroll-margin-top: 100px;
}
.letter-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.letter-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #fff;
  padding: 1.1rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  color: #222;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.letter-row:hover {
  color: #222;
  transform: translateX(6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.letter-date {
  min-width: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c6aa8;
}
.letter-title {
  flex: 1;
  font-weight: 600;
  color: #004080;
  display: flex;
  flex-direction: column;
}
.letter-title small {
  font-weight: 400;
  color: #666;
  font-size: 0.82rem;
}
.letter-pdf {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #004080;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
}

/* ========== SEND ========== */
.send-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fa 100%);
  scroll-margin-top: 100px;
}
.send-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.send-grid h2 {
  text-align: left;
}
.send-grid h2::after {
  left: 0;
  transform: none;
}
.send-card {
  background: linear-gradient(135deg, #004080, #00264d);
  color: #fff;
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(0, 64, 128, 0.25);
}
.send-card h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}
.send-card p {
  color: rgba(255, 255, 255, 0.85);
}
.send-card .btn {
  background: #fff;
  color: #004080;
}
.send-link {
  display: block;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.send-link:hover {
  color: #fff;
}
@media (max-width: 800px) {
  .send-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== POLICIES ========== */
.policies {
  padding: 4rem 0;
  scroll-margin-top: 100px;
}
.policy-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}
.policy-grid a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 50px;
  background: #fff;
  border: 1px solid rgba(0, 64, 128, 0.12);
  color: #004080;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.policy-grid a::after {
  content: '\2197';
  font-size: 0.85rem;
}
.policy-grid a:hover {
  background: #004080;
  color: #fff;
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  .letter-row {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .letter-date {
    min-width: 0;
  }
}

/* ========== NAVBAR ON TABLETS / SMALL LAPTOPS ========== */
nav ul li a {
  white-space: nowrap;
}
@media (min-width: 901px) and (max-width: 1180px) {
  nav ul li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.92rem;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .logo {
    font-size: 0;
    gap: 0;
  }
}

/* ========== CENTRED BURGER MENU ========== */
@media (max-width: 900px) {
  nav ul li {
    text-align: center;
  }
  nav ul li a {
    display: inline-block;
  }
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #004080, #0058a8);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 64, 128, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  box-shadow: 0 14px 30px rgba(0, 64, 128, 0.4);
  transform: translateY(-3px);
}
:focus-visible {
  outline: 3px solid rgba(0, 64, 128, 0.45);
  outline-offset: 3px;
}

/* ========== SCHOOL CLOSURES ========== */
.closures {
  padding: 0 0 4rem;
  scroll-margin-top: 100px;
}
.closure-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, #eef3f9, #ffffff);
  padding: 1.75rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.1);
}
.closure-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #004080;
  color: #fff;
  font-size: 1.5rem;
}
.closure-card h3 {
  color: #004080;
  margin-bottom: 0.35rem;
}
.closure-card p {
  margin: 0;
}
.closure-card a,
.section-intro a,
.safeguarding-help a {
  font-weight: 600;
}

/* ========== SAFEGUARDING ========== */
.safeguarding {
  padding: 4rem 0;
  scroll-margin-top: 100px;
}
.dsl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.dsl-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.dsl-card.lead {
  background: linear-gradient(135deg, #004080, #00264d);
  box-shadow: 0 18px 40px rgba(0, 64, 128, 0.25);
}
.dsl-card span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c6aa8;
}
.dsl-card h3 {
  color: #004080;
  margin: 0.35rem 0 0.2rem;
  font-size: 1.1rem;
}
.dsl-card p {
  margin: 0;
  font-size: 0.9rem;
}
.dsl-card.lead span,
.dsl-card.lead p {
  color: rgba(255, 255, 255, 0.8);
}
.dsl-card.lead h3 {
  color: #fff;
}
.safeguarding-help {
  max-width: 900px;
  margin: 2rem auto 0;
  text-align: center;
}
.help-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.help-links a {
  padding: 0.6rem 1.15rem;
  border-radius: 50px;
  background: #fff;
  border: 1px solid rgba(0, 64, 128, 0.12);
  color: #004080;
  font-size: 0.9rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.help-links a:hover {
  background: #004080;
  color: #fff;
}
@media (max-width: 600px) {
  .closure-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
}

/* ========== FOUR-COLUMN FOOTER ========== */
.footer-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1000px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== LUNCH CARD ========== */
.closures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.closures .closure-card {
  max-width: none;
  margin: 0;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .closures {
    grid-template-columns: 1fr;
  }
}

/* ========== FOOTER PRIVACY LINK ========== */
.footer-bottom a {
  color: #888;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom a:hover {
  color: #fff;
}

/* ========== NAVBAR FIT (9 LINKS) ========== */
.logo {
  white-space: nowrap;
}
@media (min-width: 901px) {
  nav ul li a {
    padding: 0.55rem 0.9rem;
  }
}
@media (min-width: 901px) and (max-width: 1280px) {
  nav ul li a {
    padding: 0.5rem 0.7rem;
    font-size: 0.92rem;
  }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .logo {
    font-size: 0;
    gap: 0;
  }
}
@media (min-width: 901px) and (max-width: 1000px) {
  nav ul {
    gap: 0;
  }
  nav ul li a {
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
  }
}

/* ========== DROPDOWN MENU (Parents & Students) ========== */
.has-dropdown {
  position: relative;
}
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
  padding: 0.55rem 0.9rem;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: #004080;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.4s ease;
}
.dropdown-toggle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s ease;
}
.has-dropdown.open .dropdown-toggle::after {
  transform: translateY(1px) rotate(-135deg);
}
.dropdown-toggle.active {
  color: #fff;
}
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  width: 290px;
  padding: 0.5rem;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.08);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.25s;
  z-index: 5;
}
/* invisible bridge so the menu doesn't close while moving the mouse down to it */
.dropdown::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
@media (hover: hover) and (min-width: 901px) {
  .has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}
nav ul li .dropdown a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  text-align: left;
  white-space: normal;
  font-size: 1rem;
  color: #004080;
  background: transparent;
  view-transition-name: none;
}
nav ul li .dropdown a strong {
  font-weight: 600;
}
nav ul li .dropdown a small {
  font-size: 0.8rem;
  color: #666;
}
nav ul.has-pill li .dropdown a:hover,
nav ul.has-pill li .dropdown a.current {
  background: rgba(0, 64, 128, 0.07);
  color: #004080;
}
@media (min-width: 901px) and (max-width: 1280px) {
  .dropdown-toggle {
    padding: 0.5rem 0.7rem;
    font-size: 0.92rem;
  }
}
@media (min-width: 901px) and (max-width: 1000px) {
  .dropdown-toggle {
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
  }
}
/* inside the burger menu the two choices open underneath */
@media (max-width: 900px) {
  .has-dropdown {
    text-align: center;
  }
  .dropdown-toggle {
    padding: 0.75rem 1rem;
  }
  .dropdown {
    position: static;
    width: auto;
    margin: 0.25rem 0 0.5rem;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    transform: none;
    display: none;
  }
  .dropdown::before {
    display: none;
  }
  .has-dropdown.open .dropdown {
    display: block;
    transform: none;
  }
  nav ul li .dropdown a {
    text-align: center;
    align-items: center;
    background: rgba(0, 64, 128, 0.05);
    margin: 0.35rem 0;
  }
}

/* ========== THE SCHOOL DAY ========== */
.school-day {
  padding: 0 0 4rem;
  scroll-margin-top: 100px;
}
.day-card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  padding: 1rem 1.75rem;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06);
}
.day-list {
  list-style: none;
}
.day-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.day-list li:last-child {
  border-bottom: none;
}
.sd-time {
  font-weight: 600;
  color: #004080;
  font-variant-numeric: tabular-nums;
}
.sd-what {
  display: flex;
  flex-direction: column;
  color: #333;
}
.sd-what small {
  color: #666;
  font-size: 0.85rem;
}
.day-list li.break {
  margin: 0.25rem -1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border-bottom: none;
  background: rgba(0, 64, 128, 0.06);
}
.day-list li.break .sd-what {
  font-weight: 600;
  color: #004080;
}
@media (max-width: 560px) {
  .day-card {
    padding: 0.75rem 1.1rem;
  }
  .day-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ========== PRINT TERM DATES ========== */
.print-wrap {
  text-align: center;
  margin: -1rem 0 1.75rem;
}
.print-btn {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 64, 128, 0.2);
  background: #fff;
  color: #004080;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.print-btn:hover {
  background: #004080;
  color: #fff;
}
/* when printed, only the term dates and school day are shown */
@media print {
  body {
    background: #fff;
  }
  body > *:not(#term-dates):not(#school-day) {
    display: none !important;
  }
  #term-dates,
  #school-day {
    opacity: 1 !important;
    transform: none !important;
    padding: 0 0 1rem;
  }
  #term-dates::before {
    content: "Alleyne’s Academy";
    display: block;
    text-align: center;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: #004080;
    margin-bottom: 0.25rem;
  }
  .print-wrap {
    display: none;
  }
  .term-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  .term-card,
  .day-card {
    box-shadow: none;
    border: 1px solid #ccc;
    padding: 0.75rem 1rem;
  }
  .term-card li,
  .day-list li {
    padding: 0.3rem 0;
  }
  .day-list li.break {
    margin: 0;
    padding: 0.3rem 0;
    background: none;
  }
  #school-day {
    break-before: avoid;
  }
  h2::after {
    display: none;
  }
  @page {
    margin: 12mm;
  }
  html {
    font-size: 11px;
  }
  h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0;
  }
  .section-intro {
    margin-bottom: 0.75rem;
  }
  .term-card h3 {
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
  }
  .day-list li {
    padding: 0.2rem 0;
  }
}

/* ========== NOTICE BANNER ========== */
.notice-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.45rem 3rem 0.45rem 1rem;
  background: linear-gradient(90deg, #00264d, #004080);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  view-transition-name: notice-bar;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.notice-bar p {
  margin: 0;
  color: #fff;
}
.notice-bar a {
  margin-left: 0.35rem;
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.notice-bar a::after {
  content: ' \2192';
}
.notice-bar a:hover {
  color: #cfe2f7;
}
.notice-close {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.notice-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.notice-bar.urgent {
  background: linear-gradient(90deg, #7f1d1d, #b3261e);
}
.notice-bar.urgent p::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: #fff;
  vertical-align: middle;
  animation: notice-pulse 1.6s ease-in-out infinite;
}
@keyframes notice-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.notice-bar.closing {
  transform: translateY(-100%);
  opacity: 0;
}
@media print {
  .notice-bar {
    display: none !important;
  }
}

/* ========== QUICK LINKS IN THE MENU ========== */
.dropdown-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.75rem 0.5rem 0.35rem;
  border-top: 1px solid rgba(0, 64, 128, 0.08);
}
.dropdown-quick span {
  width: 100%;
  padding: 0 0.5rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6b6b;
}
nav ul li .dropdown .dropdown-quick a {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  background: rgba(0, 64, 128, 0.06);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
nav ul li .dropdown .dropdown-quick a::after {
  content: '\2197';
  font-size: 0.75rem;
}
nav ul.has-pill li .dropdown .dropdown-quick a:hover {
  background: #004080;
  color: #fff;
}
@media (max-width: 900px) {
  .dropdown-quick {
    justify-content: center;
    border-top: none;
    padding: 0.25rem 0 0.5rem;
  }
  .dropdown-quick span {
    text-align: center;
  }
}

/* ========== SCROLLABLE PHONE MENU ========== */
@media (max-width: 900px) {
  nav ul {
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  html.has-notice nav ul {
    max-height: calc(100vh - 170px);
    max-height: calc(100dvh - 170px);
  }
  nav ul li a,
  .dropdown-toggle {
    padding: 0.6rem 1rem;
  }
  nav ul li .dropdown a {
    padding: 0.6rem 1rem;
  }
}

/* ========== LUNCH MENU ========== */
.lunch-menu {
  padding: 4rem 0;
  text-align: center;
  scroll-margin-top: 100px;
}
.lunch-menu .section-intro strong {
  color: #004080;
}
.menu-tabs {
  display: inline-flex;
  gap: 0.25rem;
  margin: 1.75rem 0 1.5rem;
  padding: 0.3rem;
  border-radius: 50px;
  background: #fff;
  border: 1px solid rgba(0, 64, 128, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}
.menu-tab {
  padding: 0.55rem 1.4rem;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: #004080;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.menu-tab:hover {
  background: rgba(0, 64, 128, 0.07);
}
.menu-tab.active {
  background: linear-gradient(135deg, #004080, #0058a8);
  color: #fff;
}
.menu-week {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  text-align: left;
  animation: menuIn 0.4s ease;
}
.menu-week[hidden] {
  display: none;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-day {
  background: #fff;
  padding: 1.25rem 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.menu-day.today {
  border: 2px solid #004080;
}
.menu-day h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #004080;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.menu-theme {
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #004080;
  background: rgba(0, 64, 128, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}
.menu-day dl {
  margin: 0;
}
.menu-day dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c6aa8;
}
.menu-day dd {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: #333;
}
.menu-day dd:last-child {
  margin-bottom: 0;
}
.menu-daily {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  text-align: left;
}
.menu-daily div {
  padding: 1.25rem 1.5rem;
  border-radius: 20px;
  background: #eef3f9;
}
.menu-daily h3 {
  color: #004080;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.menu-daily p {
  margin: 0;
  font-size: 0.92rem;
}
.tariff-title {
  color: #004080;
  font-size: 1.3rem;
  margin: 3rem 0 1.25rem;
}
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
  text-align: left;
}
.tariff {
  background: #fff;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.tariff h3 {
  color: #004080;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.tariff ul {
  list-style: none;
}
.tariff li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(0, 64, 128, 0.12);
  font-size: 0.9rem;
  color: #444;
}
.tariff li:last-child {
  border-bottom: none;
}
.tariff li span:last-child {
  font-weight: 600;
  color: #004080;
  white-space: nowrap;
}
.tariff-note {
  margin-top: 1rem;
  font-size: 0.88rem;
}
.allergen-card {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  padding: 2rem 2.25rem;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(0, 64, 128, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: left;
  scroll-margin-top: 100px;
}
.allergen-text h3 {
  color: #004080;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.allergen-text ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.allergen-text li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.93rem;
  color: #444;
}
.allergen-text li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #004080;
  font-weight: 700;
}
.allergen-text strong {
  color: #004080;
}
.allergen-text p:last-child {
  margin-bottom: 0;
  font-size: 0.92rem;
}
.allergen-text a,
.tariff-note a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(0, 64, 128, 0.3);
  text-underline-offset: 3px;
}
.allergen-forms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: #eef3f9;
  align-self: start;
}
.allergen-forms span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6b6b;
  margin-bottom: 0.25rem;
}
.allergen-forms a {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
}
.allergen-forms a::after {
  content: ' \2197';
  font-size: 0.75rem;
}
.allergen-forms a:hover {
  background: #004080;
  color: #fff;
}
@media (max-width: 1100px) {
  .menu-week {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .menu-week,
  .tariff-grid {
    grid-template-columns: 1fr 1fr;
  }
  .allergen-card {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}
@media (max-width: 600px) {
  .menu-week,
  .menu-daily,
  .tariff-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== EXTRA SECTIONS ========== */
.x-section {
  padding: 4rem 0;
  scroll-margin-top: 100px;
}
.x-alt {
  background: #f1f1f1;
}
.x-intro {
  max-width: 680px;
  margin: 0 auto 2rem;
  text-align: center;
}
.x-intro a,
.x-note a,
.x-card p a,
.x-list a,
.x-small a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(0, 64, 128, 0.3);
  text-underline-offset: 3px;
}
.x-subhead {
  color: #004080;
  font-size: 1.1rem;
  text-align: center;
  margin: 2.5rem 0 1rem;
}
.x-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #004080;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}
.x-grid {
  display: grid;
  gap: 1.25rem;
}
.x-grid-2 { grid-template-columns: repeat(2, 1fr); }
.x-grid-3 { grid-template-columns: repeat(3, 1fr); }
.x-grid-5 { grid-template-columns: repeat(5, 1fr); }
.x-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 64, 128, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: left;
}
.x-card-lg {
  padding: 2rem;
  border-radius: 24px;
}
.x-card h3 {
  color: #004080;
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}
.x-card-lg h3 {
  font-size: 1.35rem;
}
.x-card p {
  font-size: 0.92rem;
  flex-grow: 1;
}
.x-card-lg p {
  flex-grow: 0;
}
.x-card-lg .x-links {
  margin-top: 0.5rem;
}
.x-card > a {
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.25rem;
  word-break: break-word;
}
.x-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 0.25rem 0 0;
}
.x-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.92rem;
  color: #444;
}
.x-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #004080;
  font-weight: 700;
}
.x-list strong {
  color: #004080;
}
.x-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.x-links a {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: #eef3f9;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.x-links a:hover {
  background: #004080;
  color: #fff;
}
.x-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.x-chips a {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: #fff;
  border: 1px solid rgba(0, 64, 128, 0.12);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.x-chips a::after {
  content: ' \2197';
  font-size: 0.75rem;
}
.x-chips a:hover {
  background: #004080;
  border-color: #004080;
  color: #fff;
}
.x-note,
.x-small {
  font-size: 0.88rem;
}
.x-note {
  text-align: center;
  margin-top: 1.75rem;
}
@media (max-width: 1000px) {
  .x-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .x-grid-2,
  .x-grid-3 { grid-template-columns: 1fr; }
  .x-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .x-card-lg { padding: 1.5rem; }
}
@media (max-width: 480px) {
  .x-grid-5 { grid-template-columns: 1fr; }
}

/* ========== FSM + REPORTS ========== */
.x-feature {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #eef3f9, #ffffff);
  border: 1px solid rgba(0, 64, 128, 0.12);
}
.x-feature h2 {
  text-align: left;
  font-size: 1.6rem;
}
.x-feature h2::after {
  left: 0;
  transform: none;
}
.x-feature p a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.x-feature p:last-child {
  margin-bottom: 0;
}
.x-feature-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.x-feature-actions small {
  color: #666;
}
.atl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.atl-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 20px;
  border-top: 5px solid #004080;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.atl-g { border-top-color: #3b82c4; }
.atl-n { border-top-color: #e0a526; }
.atl-c { border-top-color: #c0392b; }
.atl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #004080;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.atl-g .atl-badge { background: #3b82c4; }
.atl-n .atl-badge { background: #e0a526; }
.atl-c .atl-badge { background: #c0392b; }
.atl-card h3 {
  color: #004080;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.atl-card ul {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}
.atl-card li {
  font-size: 0.86rem;
  color: #444;
}
@media (max-width: 1000px) {
  .atl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .x-feature {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem;
  }
}
@media (max-width: 560px) {
  .atl-grid { grid-template-columns: 1fr; }
}

/* ========== TIMELINE: SCHOOL DAY ========== */
.day-card {
  padding: 1.5rem 2rem;
}
.day-list {
  position: relative;
}
.day-list li {
  grid-template-columns: 120px 22px 1fr;
  gap: 1.25rem;
  border-bottom: none;
  padding: 0.7rem 0;
  transition: opacity 0.3s ease;
}
/* the line running down behind the dots */
.day-list li.sd-rail {
  position: absolute;
  top: 1.4rem;
  bottom: 1.4rem;
  left: 149px;
  width: 4px;
  margin: 0;
  padding: 0;
  display: block;
  border-radius: 4px;
  background: rgba(0, 64, 128, 0.1);
  overflow: hidden;
}
.sd-rail-fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #3b82c4, #004080);
  transition: height 0.6s ease;
}
.sd-time {
  text-align: right;
  font-size: 0.92rem;
}
.sd-dot {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #004080;
}
.day-list li.break {
  margin: 0.25rem 0;
  padding: 0.7rem 0;
  background: none;
}
.day-list li.break .sd-what {
  align-self: center;
  justify-self: start;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  background: rgba(0, 64, 128, 0.08);
}
.day-list li.break .sd-dot {
  border-color: #3b82c4;
}
/* live: earlier parts of today, and what's happening now */
.day-list li.past {
  opacity: 0.5;
}
.day-list li.past .sd-dot {
  background: #004080;
}
.day-list li.now .sd-dot {
  width: 20px;
  height: 20px;
  background: #004080;
  border-color: #fff;
  box-shadow: 0 0 0 4px #004080;
  animation: sdPulse 2s ease-in-out infinite;
}
.day-list li.now .sd-what {
  font-weight: 600;
  color: #004080;
}
.day-list li.now .sd-what::after {
  content: 'Now';
  align-self: flex-start;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #004080;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
}
@keyframes sdPulse {
  0%, 100% { box-shadow: 0 0 0 4px #004080, 0 0 0 4px rgba(0, 64, 128, 0.3); }
  50% { box-shadow: 0 0 0 4px #004080, 0 0 0 12px rgba(0, 64, 128, 0); }
}
@media (max-width: 560px) {
  .day-card {
    padding: 1rem 1.1rem;
  }
  .day-list li {
    grid-template-columns: 22px 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.1rem;
  }
  .day-list li.sd-rail {
    left: 9px;
  }
  .sd-time {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    font-size: 0.85rem;
  }
  .sd-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .sd-what {
    grid-column: 2;
    grid-row: 2;
  }
}
@media print {
  .sd-rail,
  .sd-dot {
    display: none !important;
  }
}

/* ========== LINE ICONS ========== */
.e-icon, .value-icon, .req-icon, .doc-icon, .fact-icon, .quick-icon, .club-icon, .course-emoji {
  background: #eef3f9;
  color: #004080;
  font-size: 0;
  transition: background 0.3s ease, color 0.3s ease, transform 0.35s ease;
}
.e-icon svg, .value-icon svg, .req-icon svg, .doc-icon svg, .fact-icon svg, .quick-icon svg, .club-icon svg, .closure-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}
.value-icon svg,
.club-icon svg {
  width: 26px;
  height: 26px;
}
.course-emoji svg {
  display: block;
  width: 34px;
  height: 34px;
}
.e-card:hover .e-icon,
.value-card:hover .value-icon,
.doc-card:hover .doc-icon,
.club-card:hover .club-icon,
.quick-card:hover .quick-icon {
  background: #004080;
  color: #fff;
}
.req-card:last-child .req-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.future-card h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 0.35rem;
  border-radius: 10px;
  background: #eef3f9;
  color: #004080;
  vertical-align: middle;
}
.future-card h3 span svg {
  display: block;
  width: 20px;
  height: 20px;
}
