/* Basic CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ---- Brand (constant across themes) ---- */
  --brand-purple: #5A4A72;
  --brand-purple-light: #8E7DAA;

  /* ---- Semantic tokens: LIGHT theme (default) ---- */
  --primary-color: #5A4A72;
  --primary-color-light: #8E7DAA;
  --primary-color-hover: #7A6699;
  --on-primary: #ffffff;

  --bg: #ffffff;
  --bg-raised: #ffffff;        /* cards, header, footer nav */
  --bg-sunken: #f4f4f4;        /* subtle fills, tinted blocks */
  --neutral-light: #f4f4f4;
  --neutral-dark: #333333;

  --text: #333333;
  --text-muted: #5f5f6b;
  --heading: #5A4A72;
  --border: #e2e2e8;
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* Footer is a dark panel in both themes */
  --footer-bg: #333333;
  --footer-text: #f4f4f4;
  --footer-muted: #cccccc;
  --footer-faint: #aaaaaa;

  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- Semantic tokens: DARK theme ---- */
:root[data-theme="dark"] {
  /* lifted so purple stays legible on a dark ground */
  --primary-color: #B9A9D6;
  --primary-color-light: #8E7DAA;
  --primary-color-hover: #CDBFE6;
  --on-primary: #1E1A26;

  --bg: #15121C;
  --bg-raised: #1E1A26;
  --bg-sunken: #262030;
  --neutral-light: #262030;
  --neutral-dark: #E9E6F0;

  --text: #E9E6F0;
  --text-muted: #B0AABF;
  --heading: #C9BCE4;
  --border: #332C40;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --footer-bg: #0F0D14;
  --footer-text: #E9E6F0;
  --footer-muted: #B0AABF;
  --footer-faint: #8B8598;
}

/* Follow the OS when the visitor has not chosen explicitly */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-color: #B9A9D6;
    --primary-color-light: #8E7DAA;
    --primary-color-hover: #CDBFE6;
    --on-primary: #1E1A26;
    --bg: #15121C;
    --bg-raised: #1E1A26;
    --bg-sunken: #262030;
    --neutral-light: #262030;
    --neutral-dark: #E9E6F0;
    --text: #E9E6F0;
    --text-muted: #B0AABF;
    --heading: #C9BCE4;
    --border: #332C40;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --footer-bg: #0F0D14;
    --footer-text: #E9E6F0;
    --footer-muted: #B0AABF;
    --footer-faint: #8B8598;
  }
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden; /* Prevents horizontal page scroll */
  word-wrap: break-word; /* Forces long text to wrap */
}

/* --- Header & Navigation --- */

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

header {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--neutral-light);
  padding: 1rem 0;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styling */

/* New Logo Structure Styling */
.logo-link {
          display: flex;
          align-items: center;
          text-decoration: none; /* Removed !important */
        }

.emblem-img {
          height: 50px; /* Base size for the emblem */
          width: auto;
          margin-right: 12px; /* Increased margin for better separation */
          margin-left: -5px; /* Pulls the logo slightly to the left edge */
        }

/* To make the logo text appear on ONE horizontal line: */
/* Change the .logo-text flex-direction property to 'row' */
.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text-1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.1;
}

.logo-text-2 {
  font-size: 0.9rem;
  color: var(--neutral-dark);
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}



/* Main Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0; /* MAXIMIZED SPACE: Remove internal gap */
  align-items: center;
  flex-wrap: nowrap; 
  overflow-x: auto; /* Keeps horizontal scroll as a fallback */
  padding-bottom: 0.5rem; 
}

.main-nav li {
  padding: 0 0.5rem; /* FINAL MINIMAL PADDING */
  border-right: 1px solid var(--neutral-light); 
  white-space: nowrap; 
}

.main-nav li:last-child {
  border-right: none; 
  margin-right: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--neutral-dark);
  font-weight: 600;
  transition: color 0.3s ease;
  font-size: 0.9rem; /* FINAL OPTIMIZED SIZE */
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-color);
}

/* Portal Button */
.nav-button {
  background: var(--primary-color);
  color: var(--on-primary) !important;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  text-decoration: none; /* ADDED: Ensures no underline */
}

.nav-button:hover {
  background: var(--primary-color-hover);
  color: var(--on-primary) !important;
}

/* --- Reusable Button --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-color-hover);
  transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
  background-color: var(--neutral-light);
  padding: 3rem 0;
}

/* We will add a hero-container class here later, 
  but for now let's make the hero full-width.
  This will be updated when we build the carousel.
*/
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  min-height: 500px; /* MODIFIED: Set to a stable pixel height */
}

.hero-content {
  flex: 1;
  max-width: 500px;
  padding-left: 5%; /* Use percentage for some responsiveness */
}

.hero-content h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* --- Hero Carousel --- */
.hero-carousel {
  flex: 1;
  max-width: 600px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  /* Reverting to original shadow/no border for maximized image fit */
  box-shadow: 0 5px 15px var(--shadow-color);
  height: 500px; /* FIXED: Matches the 500px stable height */
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%; /* ADDED: Inherit the 400px height */
}

.carousel-slide {
  min-width: 100%;
  display: none;
  height: 100%; /* ADDED: Ensure slide inherits height */
}

.carousel-slide.active-slide {
  display: block; /* Show only the active one */
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* ADDED: Prioritizes the top of the image (faces) */
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--bg-raised);
  opacity: 0.85;
  border: none;
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background-color: var(--bg-raised);
}

.btn-prev {
  left: 1rem;
}

.btn-next {
  right: 1rem;
}

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid white;
  background-color: var(--bg-raised);
  opacity: 0.6;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: var(--primary-color);
}

/* --- Welcome Section --- */
.welcome-section {
  padding: 4rem 0;
  text-align: center;
}

.welcome-section .container {
  max-width: 800px;
}

.welcome-section h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.welcome-section p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* --- Why Choose Us Section --- */
.why-choose-us {
  padding: 4rem 0;
  background-color: var(--neutral-light);
}

.why-choose-us h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item {
  background: var(--bg-raised);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.feature-item h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--neutral-dark);
}

/* --- Home Grid Section --- */
.home-grid {
  padding: 4rem 0;
}

.home-grid .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr; /* Main story is twice as wide */
  gap: 2rem;
}

.home-grid h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color-light);
  padding-bottom: 0.5rem;
}

/* Top Story */
.top-story-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.top-story-card h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.top-story-card p {
  margin-bottom: 1rem;
}

.text-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

/* Ensure Top Story image uses full width */
.top-story-card img {
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

/* News & Announcements */
.scroll-box {
  height: 300px; /* Fixed height to enable scrolling */
  overflow-y: auto;
  border: 1px solid var(--neutral-light);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg-sunken);
}

.event-item, .announcement-item {
  border-bottom: 1px dashed #ccc;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.event-item:last-child, .announcement-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.event-item h5 {
  font-size: 1.1rem;
  color: var(--neutral-dark);
  margin-bottom: 0.25rem;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding-top: 4rem;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-column h5 {
  font-size: 1.2rem;
  color: var(--footer-text);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column p {
  color: var(--footer-muted);
  line-height: 1.7;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--footer-muted);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
  color: var(--footer-text);
  padding-left: 5px;
}

.footer-donation .btn {
  margin-top: 1rem;
  background: var(--primary-color-hover);
  color: var(--footer-text);
}

.footer-donation .btn:hover {
  background: var(--footer-text);
  color: #5A4A72;
}

.footer-sub {
  border-top: 1px solid #444;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--footer-faint);
  font-size: 0.9rem;
}

/* --- Page Header --- */
.page-header {
  background-color: var(--primary-color-light);
  padding: 2rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  color: var(--footer-text);
  font-size: 2.5rem;
}

/* --- Sidebar Layout --- */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 3fr; /* 25% sidebar, 75% content */
  gap: 3rem;
  padding-bottom: 4rem;
}

/* Grid items default to min-width:auto, so a wide table inside the content
   column would stretch the whole layout past the viewport on phones. */
.sidebar-layout > * {
  min-width: 0;
}

.sidebar-nav ul {
  list-style: none;
  position: sticky; /* Makes sidebar "stick" on scroll */
  top: 2rem;
  background-color: var(--bg-raised); /* ADDS CLEAR BACKGROUND */
  border-radius: 8px;
  padding: 1rem; /* ADDS INNER SPACE */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* ADDS SHADOW */
}

.sidebar-nav a {
  display: block;
  text-decoration: none;
  color: var(--neutral-dark);
  font-size: 1.1rem;
  padding: 0.75rem 0.5rem;
  border-radius: 4px;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover {
  background-color: var(--neutral-light);
  border-left: 4px solid var(--primary-color-light);
}

.sidebar-nav a.active-sidebar-link {
  background-color: var(--neutral-light);
  border-left: 4px solid var(--primary-color);
  font-weight: 700;
  color: var(--primary-color);
}

/* Sidebar Content */
.content-section {
  animation: fadeIn 0.5s ease-in-out;
}

.content-section h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--neutral-light);
  padding-bottom: 0.5rem;
}

.content-section h3 {
  font-size: 1.5rem;
  color: var(--neutral-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-section p, .content-section li {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 1.1rem;
}

.content-section ul {
  list-style-position: inside;
  padding-left: 1rem;
}

/* Welcome Section */
.welcome-signature {
  margin-top: 1.5rem;
  text-align: right;
}

/* Required Documents List */
.required-docs-header {
  margin-top: 2rem;
  font-size: 1.8rem;
  border-bottom: 2px solid var(--primary-color-light);
  padding-bottom: 0.5rem;
}

.documents-list {
  padding-left: 2rem;
  list-style-type: disc;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Contact Page Layout --- */
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
}

.contact-form-container h2,
.contact-info-container h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info-container h3 {
  font-size: 1.5rem;
  color: var(--neutral-dark);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.contact-form-container p,
.contact-info-container p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Contact Form */
.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 1rem;
}

.contact-form .form-group textarea {
  resize: vertical;
}



/* --- Portal Login Page --- */
.portal-page {
  background-color: var(--neutral-light);
  padding: 4rem 0;
}

.portal-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.portal-notice {
  width: 100%;
}

.login-box {
  width: 100%;
  max-width: 450px;
  background: var(--bg-raised);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* To keep the toggle buttons contained */
}

.login-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.toggle-btn {
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  background: var(--bg-sunken);
  color: var(--neutral-dark);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-btn:hover {
  background: var(--border);
}

.toggle-btn.active-toggle {
  background: var(--footer-text);
  color: #5A4A72;
  border-bottom: 2px solid var(--primary-color);
}

/* Login Form */
.login-form {
  padding: 2.5rem;
  animation: fadeIn 0.5s ease-in-out; /* Reuse fade-in from about page */
}

.login-form h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.login-form .form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 1rem;
}

.forgot-pass {
  display: block;
  text-align: right;
  font-size: 0.9rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
}

.forgot-pass:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 1.1rem;
}

/* --- Careers Page --- */
.job-openings-list {
  margin-top: 2rem;
}

.job-listing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--neutral-light);
  border-radius: 8px;
  background: var(--bg-sunken);
  transition: box-shadow 0.3s ease;
}

.job-listing:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.job-listing h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.job-listing .btn {
  white-space: nowrap; /* Prevents button text from wrapping */
  margin-left: 1rem;
}
/* --- Responsive Design --- */

/* Mobile Nav Toggle (Hamburger) */
.mobile-nav-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001; /* On top of other header content */
}

.mobile-nav-toggle .hamburger-bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* New large screen breakpoint styling for header components */
@media (min-width: 1200px) {


}

/* --- Mobile Styles (max-width: 900px) --- */
@media (max-width: 900px) {

  .header-right {
    flex-direction: row; /* Stack search and nav button */
    align-items: center;
  }

  /* Show the hamburger button */
  .mobile-nav-toggle {
    display: block;
  }

  /* Hide the desktop nav */
  .main-nav {
    display: none;
    position: fixed; /* Full-screen overlay */
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1000;
  }

  /* Animate the nav when it's opened */
  .main-nav[data-visible="true"] {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    /* Mobile Menu Panel */
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-raised);
    padding: 5rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-in-out;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--neutral-light);
  }

  .nav-button {
    padding: 0.75rem 1.25rem;
    text-align: center;
    margin-top: 1rem;
  }
  
  /* Hamburger "X" animation when open */
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  @keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }
}

/* --- General Mobile Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  /* Ensure header stays a row to keep logo and header-right aligned */
  .header-container {
    /* REMOVED: flex-direction: column; */
    flex-wrap: wrap; /* Allows wrapping if necessary */
    gap: 1rem;
  }
  
  .header-right {
    width: auto; /* Allow header-right to size to its content */
    justify-content: flex-end; /* Push content to the right */
    gap: 0; /* Minimize gap for tight placement */
  }
  
  .logo {
    align-self: flex-start; /* Aligns logo to the left */
  }
  
  /* Stack footer columns */
  .footer-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links li {
    text-align: center;
  }
}
/* --- Homepage Responsive Styles --- */

 @media (max-width: 900px) {
  /* Stack the hero section */
  .hero {
    flex-direction: column-reverse;
    padding: 2rem 0;
    min-height: auto;
    text-align: center;
  }
  
  .hero-content {
    padding-left: 0;
    max-width: 90%;
  }
  
  .hero-carousel {
    margin-right: 0;
    max-width: 90%;
    width: 100%;
    height: 350px; /* MODIFIED: Stable, shorter height for mobile screens */
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }

  /* Stack the home grid */
  .home-grid .container {
    grid-template-columns: 1fr;
  }
  
  .scroll-box {
    height: 250px; /* Make scroll boxes a bit smaller on tablet */
  }
}

 @media (max-width: 768px) {
  .welcome-section {
    padding: 2rem 0;
  }

  .why-choose-us {
    padding: 2rem 0;
  }
  
  .home-grid {
    padding: 2rem 0;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .welcome-section h2,
  .why-choose-us h2 {
    font-size: 2rem;
  }
}
/* --- Other Page Responsive Styles --- */

 @media (max-width: 900px) {
  /* Stack the Sidebar Layout */
  .sidebar-layout {
    grid-template-columns: 1fr; /* Stack into a single column */
    gap: 1rem;
  }
  
  .sidebar-nav ul {
    position: relative; /* Un-stick the sidebar on mobile */
    top: 0;
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--neutral-light);
  }
  
  .sidebar-nav a {
    /* white-space: nowrap; was removed to allow wrapping */
    border-bottom: 4px solid transparent;
    border-left: none;
  }

  .sidebar-nav a:hover {
    border-left: none;
    border-bottom: 4px solid var(--primary-color-light);
  }
  
  .sidebar-nav a.active-sidebar-link {
    border-left: none;
    border-bottom: 4px solid var(--primary-color);
  }
  
  /* Stack the Contact Layout */
  .contact-layout {
    grid-template-columns: 1fr;
  }
  
  /* Stack the Job Listings */
  .job-listing {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .job-listing .btn {
    width: 100%;
    text-align: center;
  }
}
/* --- News Page --- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Tighter gap for a list */
}

.news-item {
  border-bottom: 2px solid var(--neutral-light);
  padding-bottom: 2rem;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.news-item .news-date {
  display: block;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.news-item p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* News Category Tag */
.news-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  color: var(--footer-text);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.news-category.events {
  background-color: #1F6F8B; /* Teal - 5.67:1 on white */
}

.news-category.academics {
  background-color: #5A4A72; /* Brand purple - 7.90:1 on white */
}

.news-category.announcements {
  background-color: #A2541A; /* Burnt orange - 5.50:1 on white */
}
/* --- Leadership Cards --- */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.leader-card {
  text-align: center;
  background: var(--neutral-light);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px var(--shadow-color);
}

.leader-photo-placeholder {
  width: 150px;
  height: 150px;
  background: var(--border);
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  overflow: hidden;
}

.leader-photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-card h4 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.leader-card p {
  font-size: 1rem;
  color: var(--neutral-dark);
  font-weight: 500;
  margin-top: 0;
}
/* --- NEW: Mobile Fixed Footer Navigation --- */
.mobile-fixed-footer-nav {
  display: none; /* Hidden by default */
}

 @media (max-width: 900px) {
  .mobile-fixed-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-raised);
    box-shadow: 0 -2px 10px var(--shadow-color);
    padding: 0.75rem 1rem;
    z-index: 900;
  }
  
  .mobile-fixed-footer-nav button {
    flex: 1 1 0;
    min-width: 0; /* lets long section titles shrink instead of widening the bar */
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.25rem;
    padding: 0.75rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
  }

  /* Keep the bar one line tall whatever the section title length */
  .mobile-fixed-footer-nav button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .mobile-fixed-footer-nav button.nav-btn-prev {
    justify-content: flex-start;
    background: var(--neutral-light);
    color: var(--primary-color);
  }

  .mobile-fixed-footer-nav button.nav-btn-next {
    justify-content: flex-end;
    background: var(--primary-color);
    color: var(--on-primary);
  }
  
  .mobile-fixed-footer-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .mobile-fixed-footer-nav button:not(:disabled):hover {
    filter: brightness(1.1);
  }

  /* Prevent the page (including the site footer, which sits outside
     .page-content) from hiding behind the fixed nav. Scoped via the body class
     so contact.html and portal.html get no dead space at the bottom. */
  body.has-section-nav {
    padding-bottom: 5rem;
  }
}

/* Respect a reduced-motion preference: keep state changes, drop the movement. */
@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;
  }

  .btn-primary:hover,
  .info-card:hover {
    transform: none;
  }
}
/* ============================================================
   SUNSET Core Values — inline acrostic
   The enlarged initial IS the first letter of each value, so the
   letters column reads SUNSET downward at any width.
   ============================================================ */
.values-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.value-card {
  background: none;
  border: none;
  padding: 0;
}

.value-card h4 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.85rem;
  /* keeps every initial on the same left edge */
  text-indent: 0;
}

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

.value-initial {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  /* optical: pull the rest of the word snug against the initial */
  letter-spacing: -0.01em;
}

@media (max-width: 480px) {
  .value-card h4 { font-size: 1.25rem; margin-bottom: 0.7rem; }
  .value-initial { font-size: 2.15rem; }
}

/* --- Vision / Mission --- */
.statement-block {
  margin: 2rem 0;
}

.statement-block h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.statement-block .statement {
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--heading);
  margin: 0;
  max-width: 34em;
}

/* --- The Sunset Creed --- */
blockquote.creed {
  margin: 1.25rem 0 2rem;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 40em;
}

blockquote.creed p { margin-bottom: 0.9rem; }
blockquote.creed p:last-child { margin-bottom: 0; }
blockquote.creed strong { color: var(--heading); font-weight: 700; }

blockquote.creed .creed-close {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* ============================================================
   Theme toggle
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  background: var(--bg-sunken);
  color: var(--primary-color);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.theme-toggle:hover { background: var(--border); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

:root[data-theme="dark"] .carousel-slide img,
:root[data-theme="dark"] .top-story-card img { filter: brightness(0.88); }

@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;
  }
}

.news-empty {
  padding: 2rem 1.5rem;
  background: var(--bg-sunken);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   ADDED: shared components for the legal, calendar, FAQ and
   gallery pages, plus site-wide accessibility helpers.
   ============================================================ */

/* --- Skip to main content --- */
.skip-link {
  position: absolute;
  left: 0;
  top: -100px;
  z-index: 2000;
  padding: 0.85rem 1.5rem;
  background: var(--primary-color);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom-right-radius: 6px;
  transition: top 0.15s ease-in-out;
}
.skip-link:focus {
  top: 0;
}

/* --- Footer: address, socials, legal bar --- */
.main-footer address {
  font-style: normal;
  color: var(--footer-muted);
  line-height: 1.8;
}
.main-footer address a {
  color: var(--footer-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.main-footer address a:hover,
.main-footer address a:focus-visible {
  border-bottom-color: currentColor;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin-top: 1.25rem;
  padding: 0;
}
.social-links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--footer-text);
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-links a:hover,
.social-links a:focus-visible {
  background: var(--primary-color-light);
  transform: translateY(-2px);
}
.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-legal a {
  color: var(--footer-faint);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--footer-text);
  text-decoration: underline;
}

/* --- Policy / long-form page helpers --- */
.page-intro {
  max-width: 70ch;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: center;
}
.policy-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1.5rem !important;
}
.lead-statement {
  border-left: 4px solid var(--primary-color);
  background: var(--bg-sunken);
  padding: 1.25rem 1.5rem;
  border-radius: 0 6px 6px 0;
  font-size: 1.08rem;
  margin-bottom: 1.5rem;
}
.statement-block-plain {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.numbered-steps {
  margin: 1rem 0 1.5rem 1.25rem;
}
.numbered-steps li {
  margin-bottom: 0.75rem;
  padding-left: 0.35rem;
}
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1em 0.45em;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-sunken);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* --- Named-role cards (safeguarding) --- */
.role-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg-raised);
}
.role-card h4 {
  color: var(--primary-color);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.role-card .role-holder {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem !important;
}
.role-card p:last-child {
  margin-bottom: 0 !important;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Helplines --- */
.helpline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.helpline-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--bg-raised);
}
.helpline-card h4 {
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.helpline-card p {
  margin-bottom: 0.5rem !important;
  font-size: 0.95rem;
}
.helpline-card p:last-child {
  margin-bottom: 0 !important;
}
.helpline-number {
  font-size: 1.15rem !important;
  font-weight: 700;
}
.helpline-number a {
  color: var(--primary-color);
  text-decoration: none;
}
.helpline-number a:hover,
.helpline-number a:focus-visible {
  text-decoration: underline;
}
.helpline-note {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}
.helpline-urgent {
  border-color: #c0392b;
  border-left: 4px solid #c0392b;
}
.helpline-urgent h4 {
  color: #c0392b;
}
:root[data-theme="dark"] .helpline-urgent {
  border-color: #ff8a75;
  border-left-color: #ff8a75;
}
:root[data-theme="dark"] .helpline-urgent h4 {
  color: #ff8a75;
}

/* --- FAQ accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading);
  position: relative;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  content: "\2212";
}
.faq-item summary:hover {
  color: var(--primary-color-hover);
}
.faq-item summary:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 4px;
}
.faq-answer {
  padding: 0 2.5rem 1.35rem 0;
}
.faq-answer p {
  margin-bottom: 0 !important;
  color: var(--text-muted);
}

/* --- Tables (calendar) --- */
.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 26rem;
}
.calendar-table th,
.calendar-table td {
  text-align: left;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}
.calendar-table thead th {
  background: var(--bg-sunken);
  color: var(--heading);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.calendar-table tbody th {
  font-weight: 600;
  color: var(--text);
}
.calendar-table tbody tr:last-child th,
.calendar-table tbody tr:last-child td {
  border-bottom: none;
}
.calendar-table .tbc {
  color: var(--text-muted);
  font-style: italic;
}
.news-item ul {
  margin: 0 0 1rem 1.25rem;
}
.news-item li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

/* Term activity tables: two columns so they fit a phone without scrolling */
.calendar-month {
  margin-top: 2rem;
  margin-bottom: 0;
  font-size: 1.15rem;
  color: var(--heading);
}
.term-table {
  min-width: 0;
}
.term-table th[scope="row"] {
  width: 38%;
  vertical-align: top;
}
.cal-week,
.cal-purpose {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}
.term-table tr.is-past th,
.term-table tr.is-past td {
  opacity: 0.55;
}
.term-table tr.is-next th,
.term-table tr.is-next td {
  background: var(--bg-sunken);
}
.cal-next-label {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-color);
}
@media (max-width: 480px) {
  .term-table th,
  .term-table td {
    padding: 0.75rem 0.8rem;
    font-size: 0.92rem;
  }
}
.portal-form-status {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text);
}

.calendar-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Gallery --- */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.gallery-filter {
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gallery-filter:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.gallery-filter:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.gallery-filter.is-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--on-primary);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery-item {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-sunken);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: scale(1.05);
}
.gallery-item[hidden] {
  display: none;
}
.gallery-consent-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
}
.lightbox[hidden] {
  display: none;
}
.lightbox-img {
  grid-column: 2;
  grid-row: 1;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-caption {
  grid-column: 1 / -1;
  grid-row: 2;
  text-align: center;
  color: #f4f4f4;
  font-size: 0.95rem;
}
.lightbox button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.lightbox button:hover,
.lightbox button:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}
.lightbox button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.lightbox-prev { grid-column: 1; grid-row: 1; }
.lightbox-next { grid-column: 3; grid-row: 1; }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.75rem !important;
}

@media (max-width: 768px) {
  .footer-sub {
    flex-direction: column;
    align-items: flex-start;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .lightbox {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  .lightbox button {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .gallery-item img,
  .social-links a {
    transition: none;
  }
  .gallery-item:hover img,
  .gallery-item:focus-within img {
    transform: none;
  }
}

/* --- Print --- */
@media print {
  header, .main-footer, .skip-link, .mobile-fixed-footer-nav,
  .sidebar-nav, .gallery-filters, .theme-toggle, .lightbox {
    display: none !important;
  }
  .content-section {
    display: block !important;
    page-break-inside: avoid;
  }
  body {
    background: #fff;
    color: #000;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}

/* --- Form helpers (contact + admissions enquiry) --- */
.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9em;
}
.form-privacy-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.contact-form .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-raised);
  color: var(--text);
}
.enquiry-form {
  max-width: 34rem;
  margin-bottom: 2rem;
}
.contact-address {
  font-style: normal;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --- Contact: support / donations --- */
.support-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.support-section h2 {
  color: var(--heading);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.support-section h3 {
  color: var(--primary-color);
  margin: 1.5rem 0 0.75rem;
}
.support-section p,
.support-section li {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.support-section ul {
  margin-left: 1.25rem;
  margin-bottom: 1.25rem;
}

/* --- Portal: pre-launch notice --- */
.portal-notice {
  max-width: 420px;
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  background: var(--bg-sunken);
}
.portal-notice p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.portal-notice p:last-child {
  margin-bottom: 0;
}
.portal-warning {
  font-weight: 600;
  color: var(--text) !important;
}

/* --- Inline links in body copy -------------------------------------------
   Without this, links inside prose fall back to the browser's default blue,
   which fails contrast against the dark theme's near-black background. */
.content-section a,
.not-found-links a,
.page-intro a,
.news-item a,
.support-section a,
.faq-answer a,
.gallery-consent-note a,
.portal-notice a,
.calendar-note a,
.contact-info-container a,
.form-privacy-note a,
.lead-statement a,
.helpline-card a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}
.content-section a:hover,
.not-found-links a:hover,
.page-intro a:hover,
.news-item a:hover,
.support-section a:hover,
.faq-answer a:hover,
.gallery-consent-note a:hover,
.portal-notice a:hover,
.calendar-note a:hover,
.contact-info-container a:hover,
.form-privacy-note a:hover,
.lead-statement a:hover,
.helpline-card a:hover {
  color: var(--primary-color-hover);
  text-decoration-thickness: 2px;
}

/* A visible focus ring everywhere, for keyboard users. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Buttons already carry their own colour - don't underline them. */
.content-section a.btn,
.support-section a.btn,
.page-intro a.btn {
  text-decoration: none;
  color: var(--on-primary);
}
