@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500;1,9..144,600&family=Inter:wght@400;500;600&display=swap');

/* ══════════════════════════════════════════════════════════════════════════════
   SGIOC Melbourne — Design System Stylesheet
   ══════════════════════════════════════════════════════════════════════════════
   This stylesheet powers the entire SGIOC Melbourne website. It is organized as:

   1. DESIGN TOKENS (CSS Variables) — Colors, spacing, fonts, shadows, radii
   2. GLOBAL RESETS — Box-sizing, body, links, images
   3. LAYOUT — Container, sections, grids
   4. TYPOGRAPHY — Headings, text utilities, liturgical styles
   5. TOP MENUBAR — Maroon bar with E-Parish login button
   6. HEADER & NAVIGATION — Logo, nav links, dropdowns, mobile menu
   7. HERO SECTIONS — Homepage hero, page hero banners, contemplative heroes
   8. BUTTONS — Primary, outline, secondary, ghost styles
   9. CARDS & COMPONENTS — Cards, profiles, timelines, forms, galleries
   10. FOOTER — Footer grid, links, social icons, map, copyright
   11. DASHBOARD & PORTAL — Admin panel specific styles
   12. RESPONSIVE BREAKPOINTS — Tablet (1024px), mobile (768px, 480px)
   ══════════════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════
   1. DESIGN TOKENS — Light Theme (Default)
   These CSS custom properties define the visual language of the site.
   All components reference these tokens for consistency.
   ══════════════════════════════════════════ */
:root {
  color-scheme: light;
  /* Tells the browser we're using a light color scheme */

  /* --- Color Palette — "Indigo & Gold" (per design spec) --- */
  /* Canonical tokens */
  --color-indigo:        #1B2A4A;
  /* Deep indigo navy — nav, primary buttons, footer, headings */
  --color-indigo-dark:   #101A30;
  /* Darkest indigo — hover states, deepest sections */
  --color-gold:          #C9A369;
  /* Warm muted gold — DECORATIVE only on light bg (dividers, tags, icons); AA-safe as text on indigo */
  --color-gold-light:    #E4CFA0;
  /* Subtle gold — highlights, hover underlines */
  --color-bg:            #FAF7F1;
  /* Warm ivory/cream — main page background */
  --color-bg-alt:        #F1EAD9;
  /* Soft parchment — alternating section background */
  --color-text:          #221F1A;
  /* Primary body text on light backgrounds (15.3:1 on ivory) */
  --color-text-inverse:  #F7F3EA;
  /* Text on indigo/dark backgrounds (13:1 on indigo) */
  --color-text-muted:    #5C5648;
  /* Secondary/supporting text (6.8:1 on ivory) */
  --color-border-line:   #DCD3BE;
  /* Hairline borders, card dividers */

  /* AA-safe gold for TEXT on light backgrounds (4.8:1 on ivory) —
     bright --color-gold (2.2:1) fails AA as text on ivory, so eyebrow labels,
     links and "Details →" on light surfaces use this deeper antique gold. */
  --color-accent-text:   #856A2C;

  /* --- Legacy aliases — map the old token names onto Indigo & Gold so every
     existing component restyles automatically. No maroon anywhere. --- */
  --color-primary:      var(--color-indigo);
  --color-primary-dark: var(--color-indigo-dark);
  --color-accent:       var(--color-accent-text); /* links/hover/labels on light: AA-safe gold */
  --color-accent-dark:  var(--color-indigo-dark);
  --color-surface:      var(--color-bg);
  --color-surface-alt:  var(--color-bg-alt);
  --color-border:       var(--color-border-line);
  --color-ink:          var(--color-text);
  --color-muted:        var(--color-text-muted);
  --color-maroon:       var(--color-indigo); /* brand action colour → indigo (replaces maroon) */
  --color-navy:         var(--color-indigo);
  --color-warm-gold:    rgba(201, 163, 105, 0.15);
  /* Gold tint for icon backgrounds */

  /* --- Motion Tokens --- */
  --transition-fast: 160ms ease-out;
  --transition-base: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  /* --- Shadows (set to none for flat, minimalist aesthetic) --- */
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;

  /* --- Border Radii (set to 0 for sharp, editorial look) --- */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-pill: 0;

  /* --- Layout Constraints --- */
  --container-width: 1320px;
  /* Max width for main content container */
  --max-width-read: 75ch;
  /* Optimal reading width (~75 characters) */

  /* --- Spacing Scale ---
     Core steps follow the spec's 4 / 8 / 16 / 24 / 32 / 48 / 64 ramp;
     larger steps (80–160) drive section/hero vertical rhythm. */
  --space-1: 4px;
  /* Tiny gap (icon padding, inline spacing) */
  --space-2: 8px;
  /* Small gap (between icon and text) */
  --space-3: 16px;
  /* Medium gap (form fields, list items) */
  --space-4: 24px;
  /* Standard gap (card padding, paragraph margin) */
  --space-5: 32px;
  /* Large gap (block spacing) */
  --space-6: 48px;
  /* XL gap (grid gaps, major spacing) */
  --space-8: 64px;
  /* 2XL gap (footer grid gap) */
  --space-10: 80px;
  /* Section padding (min) */
  --space-12: 96px;
  /* Hero content padding */
  --space-16: 112px;
  /* Section padding (max), page hero */
  --space-20: 128px;
  /* Extra large spacing */
  --space-32: 160px;
  /* Maximum spacing */

  /* --- Typography (per design spec: editorial serif headings + humanist sans body) --- */
  --font-heading: "Fraunces", "Cormorant Garamond", "Georgia", serif;
  /* Editorial display serif — headings, hero titles, italic gold accent words */
  --font-sc:      "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Eyebrow/section labels — uppercase, letter-spaced */
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Clean humanist sans for body & UI text */

  /* --- Theme Transition (smooth switch between light/dark) --- */
  --theme-transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Dark Theme Override — Indigo & Gold, dark variant.
   Applied when data-theme="dark" is set on <html>. Deep indigo surfaces,
   ivory text, warm gold accents (gold reads 7:1 on the dark indigo bg). */
[data-theme="dark"] {
  color-scheme: dark;
  /* Canonical tokens — dark variant */
  --color-indigo:        #2A3C63;
  /* Lifted indigo for surfaces (header/footer/buttons) on dark bg */
  --color-indigo-dark:   #1B2A4A;
  --color-gold:          #CFAE75;
  /* Slightly brighter gold for dark surfaces */
  --color-gold-light:    #E4CFA0;
  --color-bg:            #0F1626;
  /* Deep indigo-black page background */
  --color-bg-alt:        #16203A;
  /* Slightly lifted alternate section background */
  --color-text:          #ECE7DB;
  /* Ivory body text (13:1 on bg) */
  --color-text-inverse:  #F7F3EA;
  --color-text-muted:    #A7A091;
  /* Muted ivory (5.4:1 on bg) */
  --color-border-line:   rgba(207, 174, 117, 0.22);
  /* Warm gold-tinted hairline borders */

  /* AA-safe gold text on dark: bright gold already passes on dark bg */
  --color-accent-text:   #D8BC82;

  /* Legacy aliases — dark variant */
  --color-primary:      var(--color-text);        /* primary was mostly text → ivory in dark */
  --color-primary-dark: var(--color-text-inverse);
  --color-accent:       var(--color-accent-text); /* links/labels: bright gold on dark */
  --color-accent-dark:  var(--color-gold-light);
  --color-surface:      var(--color-bg);
  --color-surface-alt:  var(--color-bg-alt);
  --color-border:       var(--color-border-line);
  --color-ink:          var(--color-text);
  --color-muted:        var(--color-text-muted);
  --color-maroon:       var(--color-gold);        /* brand action on dark → gold accent */
  --color-navy:         var(--color-text);
  --color-warm-gold:    rgba(207, 174, 117, 0.14);
}

/* ══════════════════════════════════════════
   2. GLOBAL RESETS
   Normalize browser defaults for consistent rendering
   ══════════════════════════════════════════ */

/* Include padding/border in element width calculations */
* {
  box-sizing: border-box;
}

/* Enable smooth scrolling when clicking anchor links (e.g. #services) — respects motion preferences */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Base body styles */
body {
  margin: 0;
  /* Remove default browser margin */
  font-family: var(--font-body);
  /* Newsreader serif font */
  color: var(--color-ink);
  /* Default text color */
  background: var(--color-surface);
  /* Page background */
  line-height: 1.7;
  /* Generous line height for humanist sans body (per spec 1.6–1.7) */
  -webkit-font-smoothing: antialiased;
  /* Smoother font rendering on Mac/iOS */
  -moz-osx-font-smoothing: grayscale;
  /* Added for cross-browser font smoothing */
  transition: var(--theme-transition);
  /* Smooth light/dark theme switching */
  overflow-x: hidden;
  /* Prevent horizontal scroll from offscreen elements */
}



/* --- Link Styles --- */
a {
  color: inherit;
  /* Links inherit parent text color */
  text-decoration: underline;
  /* Subtle underline by default */
  text-decoration-thickness: 1px;
  /* Thin underline */
  text-underline-offset: 4px;
  /* Space between text and underline */
  text-decoration-color: var(--color-border);
  /* Light underline color */
  transition: text-decoration-color var(--transition-base);
}

a:hover {
  text-decoration-color: var(--color-accent);
  /* Underline becomes visible on hover */
}

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Footer-specific link styles (no underline, gold on hover) */
.footer-linklist a {
  color: rgba(247, 243, 234, 0.82);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-linklist a:hover {
  color: var(--color-gold);
}

/* --- Image Defaults --- */
img {
  max-width: 100%;
  /* Prevent images from overflowing */
  display: block;
  /* Remove inline spacing below images */
  filter: sepia(8%) contrast(92%) saturate(90%);
  /* Warm, muted photo treatment */
}

/* Lucide icon default size (used throughout for nav, cards, buttons) */
i[data-lucide] {
  width: 18px;
  height: 18px;
}

/* Buttons inherit parent font instead of browser default */
button {
  font: inherit;
}

/* Keyboard focus indicator — gold ring for accessibility */
:focus-visible {
  outline: 3px solid rgba(198, 164, 74, 0.5);
  outline-offset: 2px;
}

/* Skip-to-content link for screen readers — hidden off-screen until focused */
.skip-link {
  position: absolute;
  left: -999px;
  /* Hidden off-screen */
  top: 0;
  background: var(--color-indigo);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 200;
}

/* When skip link receives keyboard focus, slide it into view */
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* ══════════════════════════════════════════
   3. LAYOUT — Container & Section Wrappers
   ══════════════════════════════════════════ */

/* Main content container — centered with max-width and side padding */
.container {
  width: min(100% - 2rem, var(--container-width));
  /* Responsive: full width with 1rem padding, max 1100px */
  margin: 0 auto;
  /* Center horizontally */
}

/* Standard section spacing — fluid editorial rhythm (48px mobile → 112px desktop) */
.section {
  padding: clamp(var(--space-6), 8vw, var(--space-16)) 0;
}

/* Alternate background section (slightly warmer tone) */
.section-alt {
  background: var(--color-surface-alt);
}

/* Parchment-toned section (warm, paper-like background) */
.section-parchment {
  background: var(--color-bg-alt);
}

/* Slate/mist section background */
.section-slate {
  background: var(--color-bg-alt);
}

/* Dark inverted section (indigo bg, ivory text) — used for CTAs and emphasis blocks.
   Uses the indigo brand surface so it reads as a deep panel in both light and dark modes. */
.section-dark {
  background: var(--color-indigo);
  /* Indigo brand surface */
  color: var(--color-text-inverse);
  /* Ivory text */
}

/* Muted text in dark sections needs lighter color for readability */
.section-dark .text-muted,
.section-dark .eyebrow {
  color: rgba(242, 240, 235, 0.75);
}

/* Light text variant for dark sections — high contrast */
.section-dark .text-light {
  color: rgba(242, 240, 235, 0.85);
}

/* Headings in dark sections should always be white/light */
.section-dark h2,
.section-dark h3 {
  color: var(--color-text-inverse);
}

.section-dark .text-center p {
  text-align: center;
}

/* .btn-outline sets its own (dark-ink) color, which doesn't inherit the
   section's ivory text — nearly invisible on the indigo .section-dark
   background. Match the gold-accent-on-dark treatment used elsewhere. */
.section-dark .btn-outline {
  color: var(--color-text-inverse);
}
.section-dark .btn-outline:hover {
  background: var(--color-gold);
  color: var(--color-indigo-dark);
  border-color: var(--color-gold);
}

/* ══════════════════════════════════════════
   4. TYPOGRAPHY — Headings, Text Utilities, Liturgical
   ══════════════════════════════════════════ */

/* Default paragraph styling — capped at a comfortable reading width even
   inside the wider container; harmless where a grid/flex column is already
   narrower than this (grid-2, cards, footer), only matters for full-width
   single-column prose blocks. */
p {
  margin: 0 0 var(--space-5);
  /* Bottom margin only */
  text-align: justify;
  /* text-align-last intentionally left at its default (auto): per spec, auto
     already start-aligns (left) the last line of justified text without
     stretching it — no need to force text-align-last:left explicitly. Doing
     so was a bug: text-align-last isn't reset by a more specific rule that
     only overrides text-align, so it silently forced every single-line (or
     last-line) paragraph with its own text-align:center override — schedule
     times, the vicar's name, pull-quote leads, etc. — flush left instead. */
  max-width: var(--max-width-read);
}

/* Lead paragraph — larger, lighter text for intro paragraphs */
.lead {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--color-muted);
  /* Follow the container's alignment (usually centered hero/intro text)
     instead of the base p { text-align: justify } default. */
  text-align: inherit;
}

/* Text overlay — subtle frosted-glass background for text on images */
.text-overlay {
  position: relative;
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(28, 27, 25, 0.05);
  backdrop-filter: blur(4px);
  /* Glassmorphism blur effect */
  border-left: 1px solid var(--color-border);
}

[data-theme="dark"] .text-overlay {
  background: rgba(224, 221, 213, 0.05);
}

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

/* ══════════════════════════════════════════
   7. HERO SECTIONS
   Page banners and homepage full-screen hero
   ══════════════════════════════════════════ */

/* Page hero — used on subpages (e.g. Faith, Parish History) with background image */
.page-hero {
  background: linear-gradient(120deg, rgba(16, 26, 48, 0.72), rgba(27, 42, 74, 0.55)),
    url("../../img/the_header.png") center center/cover no-repeat;
  color: var(--color-text-inverse);
  padding: var(--space-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle gold radial glow overlay on page heroes */
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(201, 163, 105, 0.18), transparent 42%);
  pointer-events: none;
}

/* Ensure hero content sits above the overlay */
.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.04;
  text-wrap: balance;
  color: var(--color-text-inverse);
}

/* Slim gold rule below the page-hero h1 */
.page-hero h1::after {
  display: block;
  content: "";
  width: 40px;
  height: 2px;
  background: var(--color-gold);
  margin: var(--space-4) auto 0;
}

/* Contemplative hero — softer, blurred background for reflective pages */
.hero-contemplative {
  position: relative;
  min-height: 35vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--color-surface-alt);
  padding: var(--space-12) 0;
}

/* Blurred background image layer behind contemplative hero text */
.hero-contemplative-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) sepia(20%) opacity(0.35);
  transform: scale(1.1);
  /* Scaled up to prevent blur edges showing */
  z-index: 0;
}

[data-theme="dark"] .hero-contemplative-bg {
  filter: blur(8px) sepia(10%) opacity(0.2);
}

.hero-contemplative .container {
  position: relative;
  z-index: 1;
}

/* Eyebrow — small-caps label with leading rule, matches homepage eyebrow pattern */
/* Eyebrow / section label — uppercase, letter-spaced, gold, with a short rule */
.eyebrow,
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: var(--space-4);
}

/* Auto-rule before eyebrow text — no HTML span required */
.eyebrow::before,
.section-eyebrow::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--color-gold);
  flex-shrink: 0;
}

/* Centred variant */
.eyebrow-center {
  justify-content: center;
}

/* On indigo/dark sections the eyebrow uses the brighter gold */
.section-dark .eyebrow,
.section-dark .section-eyebrow,
.hero .eyebrow,
.eyebrow-center {
  color: var(--color-gold);
}
.section-dark .eyebrow::before,
.hero .eyebrow::before,
.eyebrow-center::before {
  background: var(--color-gold);
}

/* Display heading — large serif for hero titles */
.display {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.12;
  color: var(--color-ink);
}

/* Heading size variants (responsive with clamp) */
.h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.06;
  margin-bottom: var(--space-5);
  text-wrap: balance;
  color: var(--color-primary);
}

.h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  text-wrap: balance;
  color: var(--color-primary);
}

.h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

/* Base heading tags — most content pages use bare <h1>–<h4> (not .h1/.h2
   classes), so they need the editorial serif + hierarchy applied directly. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 4.2vw, 3.5rem); line-height: 1.08; margin: 0 0 var(--space-4); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin: 0 0 var(--space-3); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500; margin: 0 0 var(--space-3); }
h4 { font-size: 1.1rem; font-weight: 600; margin: 0 0 var(--space-2); }

/* Italic gold accent word inside headings (per spec) */
.display em, .h1 em, .h2 em, .h3 em,
h1 em, h2 em, h3 em,
.display .accent-word, .h1 .accent-word, .h2 .accent-word, .h3 .accent-word,
h1 .accent-word, h2 .accent-word, h3 .accent-word {
  font-style: italic;
  font-weight: inherit;
  color: var(--color-accent-text);
}
.section-dark :is(.display, .h1, .h2, .h3, h1, h2, h3) em,
.hero :is(.display, .h1, .h2, .h3, h1, h2, h3) em,
.section-dark :is(.display, .h1, .h2, .h3, h1, h2, h3) .accent-word,
.hero :is(.display, .h1, .h2, .h3, h1, h2, h3) .accent-word {
  color: var(--color-gold);
}

/* --- Text Color Utilities --- */
.text-muted {
  color: var(--color-muted);
}

/* Subdued text */
.text-center,
.text-center p {
  text-align: center;
}

.text-white {
  color: #fff;
}

/* White text (for dark sections) */
.text-light {
  color: rgba(255, 255, 255, 0.85);
}

/* Semi-transparent white */
.text-gold {
  color: var(--color-accent);
}

/* Accent/gold text */
.text-maroon {
  color: var(--color-maroon);
}

/* Maroon/red text */
.text-navy {
  color: var(--color-navy);
}

/* Navy text */
.italic {
  font-style: italic;
}

/* Italic utility */

/* Liturgical text — styled for prayers, hymns, and liturgical content */
.liturgical {
  font-style: italic;
  opacity: 0.8;
  font-size: 1.1em;
  font-weight: 300;
  display: block;
  margin-bottom: var(--space-4);
}

/* Small caps with accent color — used for labels and decorative text */
.small-caps-accent {
  font-variant: all-small-caps;
  letter-spacing: 0.12em;
  font-weight: 400;
  color: var(--color-accent);
}

/* ══════════════════════════════════════════
   Top Menubar (legacy static .html pages only —
   Astro pages use .topbar, defined in the HEADER section below)
   ══════════════════════════════════════════ */

.top-menubar {
  background: var(--color-maroon);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0;
}

.top-menubar-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.top-menubar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  transition: background var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.top-menubar-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .top-menubar {
    padding: 0.15rem 0;
  }

  .top-menubar-content {
    justify-content: center;
    padding: 0 8px;
  }

  .top-menubar-btn {
    display: none;
  }

  p {
    text-align: left;
  }
}

/* ══════════════════════════════════════════
   Header
   ══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   6. HEADER & NAVIGATION
   Site logo, nav bar, dropdown menus, mobile hamburger
   ══════════════════════════════════════════ */

/* Top utility bar — slim strip above the main header (worship line + E-Parish login) */
.topbar {
  background: var(--color-indigo);
  color: var(--color-text-inverse);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 36px;
  padding: 6px 0;
}

.topbar-msg {
  margin: 0;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-login {
  flex-shrink: 0;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-inverse);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.topbar-login:hover {
  opacity: 1;
  color: var(--color-gold-light);
}

/* Site header — sticks to top of viewport on scroll */
.site-header {
  position: relative;
  width: 100%;
  z-index: 100;
  border-bottom: none;
  background: none;
  transition: none;
}

/* ROW A: BRAND & PORTAL ACTIONS
   Light mode: white/ivory background with dark ink text.
   Dark mode: solid indigo background with ivory text (unchanged from before). */
.header-row-a {
  background-color: var(--color-bg);
  color: var(--color-primary); /* dark ink on white (light) / ivory (dark, via token flip) */
  border-bottom: 1px solid var(--color-border);
  width: 100%;
}

[data-theme="dark"] .header-row-a {
  background-color: var(--color-indigo);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-row-a-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 10px 0;
}

/* Brand area layout */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none !important;
  min-width: 0;
}

/* Brand crest: the church's real circular seal/logo (img/sgioc_logo.png).
   filter:none overrides the global img sepia treatment so the crest keeps
   its true colours; contain preserves the emblem's aspect ratio. */
.brand-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  filter: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis; /* safety net: truncate rather than overlap .header-actions
                              if the full title is ever shown somewhere too narrow */
}

/* Row A brand text and the mobile drawer's brand text sit on backgrounds that
   flip with the theme (white/indigo, ivory/near-black) — use the adaptive
   ink token so the text always contrasts. Footer brand stays ivory via
   .footer-brand below (footer background is always solid indigo). */
.header-row-a .brand-name,
.mobile-nav-header .brand-name {
  color: var(--color-primary);
}

/* Slightly smaller than the shared 1.5rem default so the church name sits
   comfortably alongside the crest, portal button, and theme toggle instead
   of dominating the row. */
.header-row-a .brand-name {
  font-size: 1.2rem;
}

/* Full church name vs. short "SGIOC Melbourne" — the full name fits on one
   line with room to spare at every width down to the mobile collapse, so the
   swap to the short form happens at the same ≤1023px breakpoint as the rest
   of the mobile header layout (see that media query below) rather than a
   separate, earlier one. */
.brand-name-short {
  display: none;
}

.brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  /* AA-safe gold text token — adapts automatically: dark gold #856A2C on the
     light-mode white Row A background, bright gold #D8BC82 on dark-mode indigo. */
  color: var(--color-accent-text);
  white-space: nowrap;
  letter-spacing: 0.02em;
  margin-top: 3px;
}

/* Header Actions container */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

/* Parish Portal button: gold background, dark indigo label (dark label stays
   dark in both themes → 6.1:1 light / 6.8:1 dark on the gold fill = AA). */
.header-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  background-color: var(--color-gold);
  color: var(--color-indigo-dark) !important; /* #101A30 light / #1B2A4A dark — both dark on gold */
  font-family: var(--font-sc);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: none;
  border-radius: 4px;
  transition: background-color var(--transition-base), transform var(--transition-fast);
}

.header-portal-btn:hover {
  background-color: var(--color-gold-light);
  transform: translateY(-1px);
}

/* Circular theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(27, 42, 74, 0.25);
  border-radius: 50%;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  transition: border-color var(--transition-base), background-color var(--transition-base);
}

[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-toggle:hover {
  border-color: var(--color-gold);
  background-color: var(--color-surface-alt);
}

.theme-toggle i[data-lucide] {
  width: 18px;
  height: 18px;
}

/* Single-icon toggle: show ONE icon representing the mode you'd switch TO.
   site.js injects .theme-icon-light (sun) + .theme-icon-dark (moon).
   Light mode → show moon ("tap for dark"); dark mode → show sun ("tap for light"). */
.theme-icon-light,
.theme-icon-dark {
  align-items: center;
  justify-content: center;
}
.theme-icon-light { display: none; }               /* hide sun in light mode */
.theme-icon-dark  { display: inline-flex; }        /* show moon in light mode */
[data-theme="dark"] .theme-icon-light { display: inline-flex; } /* show sun in dark mode */
[data-theme="dark"] .theme-icon-dark  { display: none; }        /* hide moon in dark mode */

/* Mobile Hamburger Toggle (hidden by default on desktop) */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary); /* adapts: dark ink on white Row A (light) / ivory (dark) */
  cursor: pointer;
  padding: var(--space-1);
}

/* ROW B: NAV LINKS ROW (Sticky on desktop, hidden on mobile)
   Tokenised: light --color-indigo-dark #101A30 → dark #1B2A4A. */
.header-row-b {
  background-color: var(--color-indigo-dark);
  position: sticky;
  top: 0;
  z-index: 99;
  width: 100%;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Add subtle shadow and gold bottom border when Row B is scrolled/pinned */
.header-row-b.is-pinned {
  box-shadow: 0 4px 20px rgba(16, 26, 48, 0.25);
  border-bottom: 1px solid rgba(201, 163, 105, 0.2);
}

.header-row-b-inner {
  display: flex;
  justify-content: center; /* Centre-aligned nav links */
  align-items: center;
  min-height: 54px;
}

/* Navigation List */
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-5); /* 32px — generous spacing to match mockup */
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: none; /* Title Case per mockup (not uppercase) */
  letter-spacing: 0.01em;
  font-weight: 500;
  color: rgba(247, 243, 234, 0.88); /* Ivory/white text with slight opacity */
}

.nav-list a,
.nav-list button {
  background: none;
  border: none;
  padding: 16px 0 13px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-list a:hover,
.nav-list button:hover {
  color: var(--color-gold);
}

/* Active page link styling (Gold text + Gold underline) */
.nav-list a.active {
  color: var(--color-gold) !important;
  border-bottom-color: var(--color-gold);
}

/* Dropdown parent whose current page is one of its children: gold text, no underline */
.nav-list button.active {
  color: var(--color-gold);
}

.chevron-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.nav-item {
  position: relative;
}

/* --- Dropdown Menus (appear on hover of nav items) --- */
.dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  top: calc(100% + 4px);
  background: var(--color-indigo-dark); /* matches Row B, both themes */
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid var(--color-gold); /* Gold accent top border */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base),
              visibility var(--transition-base),
              transform var(--transition-base);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Invisible bridge covers the gap so hover is never lost */
.dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  padding: 12px 18px;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: rgba(247, 243, 234, 0.85); /* Ivory text */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-gold);
}

/* Active dropdown child (current page) — gold, so it's distinguishable */
.dropdown a.active {
  color: var(--color-gold);
}

/* ══════════════════════════════════════════
   RESPONSIVE LAYOUT BREAKPOINTS FOR HEADER
   ══════════════════════════════════════════ */

@media (max-width: 1023px) {
  /* Entire site header becomes sticky on mobile/tab view */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 18px rgba(16, 26, 48, 0.15);
  }

  .header-row-a {
    border-bottom: none;
  }

  .header-row-a-inner {
    min-height: 64px;
    padding: 8px 0;
    gap: var(--space-2);
    flex-wrap: nowrap;
  }

  .brand {
    gap: var(--space-3);
    flex: 1 1 auto; /* shrink so the long title wraps instead of pushing actions off-screen */
    min-width: 0;
  }

  .brand-text {
    min-width: 0;
    flex: 1 1 auto;
  }

  .header-actions {
    flex-shrink: 0; /* icons keep their size; brand yields space */
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  /* Swap to the short brand name and hide the subtitle the moment the header
     collapses into mobile/hamburger mode — the full name fits fine on one
     line above this breakpoint, so there's no need to swap any earlier. */
  .brand-name-full { display: none; }
  .brand-name-short { display: block; }
  .brand-subtitle { display: none; }

  /* Handle scaling down at mid-screen widths — allow the long title to wrap
     (rather than overflow under the action buttons) since it can't fit on one
     line on phones. */
  .brand-name {
    font-size: clamp(0.82rem, 2.8vw, 1.1rem);
    white-space: normal;
  }

  /* Portal button is smaller on mobile to fit nicely */
  .header-portal-btn {
    padding: 8px 14px;
    font-size: 0.72rem;
  }

  .header-portal-btn span {
    display: none; /* Hide text on small screens, keep only user icon */
  }

  /* Hide Row B on mobile (links move to hamburger drawer) */
  .header-row-b {
    display: none !important;
  }

  /* Show mobile hamburger toggle. Scoped to .site-header (specificity 0,2,0)
     so it reliably beats the base .mobile-toggle{display:none} and any stray
     0,1,0 rule later in the sheet — the hamburger always appears <1024px. */
  .site-header .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Below ~540px (very narrow phones, or a normal phone zoomed in a lot) even
   the short "SGIOC Melbourne" no longer reliably fits on one line next to
   the crest + portal/theme/hamburger icons. white-space:normal lets it wrap,
   but text-overflow:ellipsis only truncates single-line (nowrap) text — a
   wrapped second line has no ellipsis fallback, so it silently overflows and
   gets hard-clipped by overflow:hidden mid-word (e.g. "Melbourne" cut to
   "Melbourr"). Rather than chase an exact-fit width (fragile across fonts/
   browsers/zoom levels), just drop the brand text entirely at this tier and
   show the crest logo alone — .brand-text is only used in this Row A block
   (the mobile drawer's own brand text is a plain span, not wrapped in
   .brand-text, so it's unaffected). Confirmed via screenshot sweep 320-600px:
   short name renders complete only from ~480px, so 540px keeps a safety
   margin above that boundary instead of cutting it exactly at the edge. */
@media (max-width: 540px) {
  .brand-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-actions {
    gap: var(--space-2);
  }

  /* Shrink text for extra narrow devices */
  .brand-name {
    font-size: 0.82rem;
    line-height: 1.2;
  }
}

/* ══════════════════════════════════════════
   MINISTRY PAGES — shared layout components
   ══════════════════════════════════════════ */

/* Lead paragraph — large serif with maroon left rule */
.ministry-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-ink);
  border-left: 3px solid var(--color-maroon);
  padding-left: var(--space-5);
  margin: 0;
  text-wrap: balance;
}

/* Constrained body paragraph */
.ministry-body {
  max-width: 680px;
}

/* Centers a plain single-column ministry page (heading + a paragraph or two)
   within the wide .container — without this, the base p { max-width: 75ch }
   rule caps the text well short of 1320px but leaves it flush left, since a
   bare <p> has no margin:auto of its own (only .container does). Matches the
   max-width:860px + centering convention already used by the longer-form
   *-article page wrappers (faith-article, saints-article, history-article). */
.ministry-content {
  max-width: 860px;
  margin: 0 auto;
}
/* The wrapper's own 860px is already a comfortable reading measure, so drop
   the base p { max-width: 75ch } cap here — otherwise a paragraph that hits
   the 75ch limit hugs the left of this (now-centered) box instead of filling it. */
.ministry-content p {
  max-width: none;
}

/* Motto block — left-bordered highlight */
.ministry-motto {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-maroon);
  padding: var(--space-5) var(--space-6);
}

.ministry-motto-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-maroon);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.ministry-motto-text {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-ink);
  margin: 0 0 var(--space-1);
  text-wrap: balance;
}

.ministry-motto-sub {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

/* Focus pillars grid */
.ministry-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.ministry-pillar {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-maroon);
  background: var(--color-surface-alt);
}

.ministry-pillar-icon {
  display: flex;
  align-items: center;
  color: var(--color-maroon);
  margin-bottom: var(--space-3);
}

.ministry-pillar-icon svg,
.ministry-pillar-icon i {
  width: 20px;
  height: 20px;
}

.ministry-pillar-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-ink);
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

.ministry-pillar-text {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.65;
}

/* Office bearers section */
.ministry-bearers {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-8);
  margin-top: var(--space-4);
}

.ministry-bearers-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-maroon);
  margin: 0 0 var(--space-5);
}

.ministry-bearers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.ministry-bearers-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}

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

.ministry-bearers-role {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-maroon);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 160px;
}

.ministry-bearers-name {
  color: var(--color-ink);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .ministry-pillars { grid-template-columns: 1fr; }
  .ministry-bearers-item { flex-direction: column; gap: var(--space-1); }
  .ministry-bearers-role { min-width: 0; }
}

/* ══════════════════════════════════════════
   8. BUTTONS
   Primary, outline, secondary, ghost variants
   ══════════════════════════════════════════ */

/* Primary button — solid indigo, ivory text, gold border on hover (per spec) */
.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--color-indigo);
  color: var(--color-text-inverse);
  border: 1px solid var(--color-indigo);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sc);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 44px;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  text-decoration: none;
  touch-action: manipulation;
}

.btn-primary:hover {
  background: var(--color-indigo-dark);
  border-color: var(--color-gold);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}

/* Glowing variant — soft indigo lift */
.btn-glow {
  box-shadow: 0 10px 20px -10px rgba(27, 42, 74, 0.4);
}

.btn-glow:hover {
  box-shadow: 0 15px 30px -10px rgba(27, 42, 74, 0.5);
}

/* Secondary / outline button — gold outline, indigo text; fills indigo on hover */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sc);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-5);
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-gold);
  cursor: pointer;
  border-radius: 4px;
  min-height: 44px;
  text-decoration: none;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.btn-outline:hover {
  background: var(--color-indigo);
  color: var(--color-text-inverse);
  border-color: var(--color-indigo);
  transform: translateY(-1px);
}

/* Hero buttons — sit on the dark indigo image overlay (theme-independent) */
.hero .btn-primary {
  background: var(--color-gold);
  color: var(--color-indigo-dark);
  border-color: var(--color-gold);
}

.hero .btn-primary:hover {
  background: var(--color-gold-light);
  color: var(--color-indigo-dark);
  border-color: var(--color-gold-light);
}

.hero .btn-outline {
  color: var(--color-text-inverse);
  border-color: rgba(247, 243, 234, 0.7);
  background: transparent;
}

.hero .btn-outline:hover {
  background: var(--color-text-inverse);
  color: var(--color-indigo-dark);
  border-color: var(--color-text-inverse);
}

/* Secondary button — soft parchment fill, indigo text; fills indigo on hover */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sc);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface-alt);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: var(--color-indigo);
  border-color: var(--color-indigo);
  color: var(--color-text-inverse);
}

/* --- Custom Scrollbar Styling --- */
body {
  scrollbar-width: thin;
  /* Firefox thin scrollbar */
  scrollbar-color: var(--color-accent) var(--color-surface-alt);
  /* Thumb / track colors */
}

/* Page load fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body {
  animation: fadeIn 0.4s ease-in;
}

/* Ghost button — text-only, no background or border */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  transition: color var(--transition-base);
}

.btn-ghost:hover {
  color: var(--color-primary);
}

/* Dark mode button overrides — indigo tokens already lift in dark mode,
   so primary/outline need no override. Secondary gets a faint fill. */
[data-theme="dark"] .btn-secondary {
  background: rgba(236, 231, 219, 0.06);
  border-color: rgba(236, 231, 219, 0.10);
}

/* ══════════════════════════════════════════
   Mobile Navigation
   Full-screen slide-out menu for tablets/phones
   ══════════════════════════════════════════ */

/* Hamburger icon sizing (the .mobile-toggle button itself is defined in the
   two-row header section above — ivory on the indigo Row A, shown ≤1023px). */
.mobile-toggle i {
  width: 22px;
  height: 22px;
}


/* Mobile Navigation Drawer — flat indigo scrim, no blur (avoids a "hazy photo"
   bleed-through effect over hero imagery); solid enough to fully recede the page. */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 26, 48, 0.72);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.mobile-nav.is-open~.mobile-overlay {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: var(--color-surface);
  color: var(--color-primary);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  z-index: 120;
  padding: 0;
  box-shadow: -16px 0 40px rgba(16, 26, 48, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav-header {
  padding: var(--space-4) var(--space-5);
  padding-top: max(var(--space-4), env(safe-area-inset-top));
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Clear close (X) affordance — bordered circle, gold on hover */
.mobile-nav-close {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-primary);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.mobile-nav-close:hover {
  color: var(--color-indigo-dark);
  border-color: var(--color-gold);
  background: var(--color-surface-alt);
}

.mobile-nav-close i {
  width: 20px;
  height: 20px;
}

.mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.mobile-nav-list {
  list-style: none;
  padding: var(--space-4) 0;
  margin: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-item,
.mobile-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  width: 100%;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  min-height: 52px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-nav-item span,
.mobile-accordion summary span {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.mobile-nav-item i[data-lucide],
.mobile-accordion summary i[data-lucide]:not(.chevron) {
  width: 20px;
  height: 20px;
  color: var(--color-accent-text);
}

.mobile-nav-item:hover,
.mobile-accordion summary:hover,
.mobile-nav-item:active,
.mobile-accordion summary:active {
  background: var(--color-surface-alt);
  color: var(--color-indigo-dark);
}

/* Accordion Specifics */
.mobile-accordion summary {
  list-style: none;
}

.mobile-accordion summary::-webkit-details-marker {
  display: none;
}

.mobile-accordion .chevron {
  width: 16px;
  height: 16px;
  opacity: 0.5;
  transition: transform var(--transition-base);
}

.mobile-accordion[open] .chevron {
  transform: rotate(180deg);
}

.mobile-accordion-content {
  background: var(--color-surface-alt);
  display: flex;
  flex-direction: column;
}

.mobile-accordion-content a {
  display: flex;
  width: 100%;
  padding: var(--space-2) var(--space-5) var(--space-2) 56px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast), color var(--transition-fast);
  min-height: 46px;
  align-items: center;
}

.mobile-accordion-content a:last-child {
  border-bottom: none;
}

.mobile-accordion-content a:hover,
.mobile-accordion-content a:active {
  background: var(--color-bg);
  color: var(--color-accent-text);
}

.mobile-nav-footer {
  padding: var(--space-6);
  padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   Homepage Hero — Full-viewport church image
   ══════════════════════════════════════════ */

/* Homepage hero — full-viewport height with church background image */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  color: var(--color-primary);
  overflow: hidden;
  background: var(--color-surface);
}

/* Background image layer (the_church.jpg) with subtle filter */
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../../img/the_church.jpg") center/cover no-repeat;
  background-attachment: fixed;
  /* Parallax */
  filter: grayscale(10%) sepia(8%) opacity(0.35) contrast(1.1);
  transition: opacity 2s ease;
}

[data-theme="dark"] .hero-bg {
  filter: grayscale(10%) sepia(8%) opacity(0.25) contrast(1.1);
}

/* Gradient overlay for better text readability */
.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(245, 243, 238, 0.7) 0%, rgba(245, 243, 238, 0.85) 100%);
  pointer-events: none;
}

[data-theme="dark"] .hero-overlay-gradient {
  background: linear-gradient(to bottom, rgba(33, 31, 28, 0.7) 0%, rgba(33, 31, 28, 0.85) 100%);
}

/* Hero text content — positioned over the background */
.hero-content {
  position: relative;
  padding: var(--space-16) 0;
  max-width: 1000px;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

/* Centered hero variant */
.hero-centered .hero-content {
  text-align: center;
  margin: 0 auto;
}

.hero-centered .hero-badge {
  justify-content: center;
}

.hero-centered .hero-actions {
  justify-content: center;
}

/* Service Timing Grid */
#service-timings {
  scroll-margin-top: 100px;
}

.service-timing {
  display: grid;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.hero-tagline {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-primary);
  text-align: center;
}

.hero-subtitle {
  margin-top: var(--space-3);
  margin-bottom: var(--space-8);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-maroon);
  font-style: italic;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
}

/* Scroll Arrow Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  opacity: 0.8;
  animation: bounceIndicator 2s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: 10;
  pointer-events: none;
}

.hero-scroll-indicator i[data-lucide] {
  width: 24px;
  height: 24px;
}

.hero-scroll-indicator.is-hidden {
  opacity: 0;
  visibility: hidden;
}

@keyframes bounceIndicator {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translate(-50%, 0);
  }

  40% {
    transform: translate(-50%, -10px);
  }

  60% {
    transform: translate(-50%, -5px);
  }
}

/* Mobile adjustments for hero tagline and subtitle */
@media (max-width: 768px) {
  .hero-tagline {
    font-size: 1.125rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* Badge/label above hero heading */
.hero-badge {
  display: block;
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  text-transform: none;
  letter-spacing: normal;
}

/* Hero CTA buttons row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.hero-actions .btn-primary,
.hero-actions .btn-outline {
  min-width: 150px;
  justify-content: center;
}

/* Scroll-down indicator arrow at bottom of hero */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  opacity: 0.3;
}

.scroll-indicator i[data-lucide] {
  width: 28px;
  height: 28px;
}

/* ══════════════════════════════════════════
   9. GRIDS & LAYOUT COMPONENTS
   Reusable grid systems for content layout
   ══════════════════════════════════════════ */

/* Simple vertical stack layout */
.stack {
  display: grid;
  gap: var(--space-4);
}

/* 2-column responsive grid — auto-fits columns at 260px minimum */
.grid-2 {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

/* Generic card grid container */
.card-grid {
  display: grid;
  gap: var(--space-5);
}

/* 3-column card grid variant */
.card-grid.columns-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Split layout — used for side-by-side content */
.split {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.split-two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ══════════════════════════════════════════
   CARDS & COMPONENTS
   Card styles, profiles, icons, timelines
   ══════════════════════════════════════════ */

/* Base card styles — minimal, no border/shadow for flat aesthetic */
.card,
.card-muted,
.card-surface {
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

/* Card icon container — gold-tinted square with icon */
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--color-warm-gold);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.card-icon i[data-lucide] {
  width: 22px;
  height: 22px;
}

/* Center utility for cards/content */
.centered {
  margin-left: auto;
  margin-right: auto;
}

/* Card with surface background (highlighted cards) — ivory, hairline border,
   gold top accent (per spec) */
.card-surface {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-gold);
  padding: var(--space-5);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card-surface:hover {
  box-shadow: 0 10px 30px -18px rgba(16, 26, 48, 0.28);
  transform: translateY(-2px);
}

.creed-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(201, 163, 105, 0.18);
  color: var(--color-accent-text);
  border-radius: var(--radius-pill);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
  color: var(--color-muted);
}

.list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

/* --- Profile Component (Vicar/Leader profiles) --- */

/* Profile layout — image on left, bio on right */
.profile {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: minmax(240px, 320px) 1fr;
  align-items: start;
}

.profile-card img {
  width: 100%;
  border-radius: var(--radius-lg);
}

.profile-card .profile-body {
  margin-top: var(--space-6);
  text-align: center;
}

.profile-card h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  color: var(--color-ink);
}

/* Profile subtitle (title/role) */
.profile-card .subtitle {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6rem;
  color: var(--color-accent);
  font-weight: 700;
}

/* CTA buttons row — centered with wrapping */
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* --- Timeline Component --- */

/* Timeline container with left border line */
.timeline {
  display: grid;
  gap: var(--space-4);
  border-left: 2px solid var(--color-border);
  padding-left: var(--space-6);
}

.timeline-item {
  position: relative;
}

/* Timeline dot marker */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* --- Form Components --- */

/* Form grid layout — 2 columns at desktop (fields opt into a full-width row
   via inline style="grid-column:1/-1"), collapses to 1 column ≤768px. */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

/* Individual form field */
.field {
  display: grid;
  gap: var(--space-2);
}

/* Form label styling — small caps, indigo */
.field label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
}

.required-star {
  color: var(--color-accent-text);
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

/* Form inputs — underline-only style (no box border) */
.field input,
.field textarea,
.field select {
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
  font: inherit;
  background: none;
}

/* Form input focus state — gold underline */
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--color-gold);
  box-shadow: 0 1px 0 0 var(--color-gold);
}

.gallery-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-6);
  align-items: center;
}

.logo-grid a {
  display: flex;
  justify-content: center;
}

.logo-grid img {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 16px;
  background: var(--color-surface);
  padding: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.gallery-card,
.media-card {
  border: none;
  box-shadow: none;
  filter: sepia(10%) contrast(90%);
}

.news-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.news-card {
  background: none;
  border: none;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto 1fr;
}

.news-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--color-gold);
  color: var(--color-text);
  padding: 6px 10px;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.news-tag.gold,
.news-tag.navy {
  background: var(--color-gold);
  color: var(--color-text);
}

.news-body {
  padding: var(--space-5);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--color-muted);
  font-weight: 700;
}

.stats {
  display: grid;
  gap: var(--space-4);
}

.stat-item {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.stat-icon {
  display: none;
}

.stat-icon.maroon {
  background: rgba(122, 59, 51, 0.2);
  color: var(--color-maroon);
}

.service-timing span {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-muted);
}

.service-timing p {
  margin: 4px 0 0;
  font-weight: 400;
  color: var(--color-ink);
}

.content {
  display: grid;
  gap: var(--space-4);
}

.content h2,
.content h3,
.content h4 {
  margin: var(--space-6) 0 var(--space-3);
}

.divider {
  width: 80px;
  height: 3px;
  background: var(--color-accent);
  margin: var(--space-4) auto;
  border-radius: var(--radius-pill);
}

.blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-4);
  font-style: italic;
  color: var(--color-muted);
}

/* ══════════════════════════════════════════
   10. FOOTER
   3-column grid — brand, links, contact (map lives inside contact)
   ══════════════════════════════════════════ */

/* Footer container — solid indigo panel, ivory text, gold top accent (per spec) */
.footer {
  padding: var(--space-10) 0;
  background: var(--color-indigo);
  color: var(--color-text-inverse);
  border-top: 3px solid var(--color-gold);
}

/* Footer 4-column grid — Brand | Quick Links | Contact | Map */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 4 equal columns */
  gap: var(--space-8);
  align-items: start;
}

/* Footer: 3 columns at 1024px (before collapsing to 2 at 768px) */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

/* Footer section headings — gold */
.footer h4 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-family: var(--font-sc);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Parallax elements — disabled in current design */
.parallax-placeholder,
.parallax-overlay {
  display: none;
}

/* Footer brand text color. Also overrides .brand-name's white-space:nowrap
   (needed in the header so it hugs the crest on one line) — nowrap here forced
   this whole church name onto one unbreakable line, whose min-content width
   made the grid award column 1 far more than its fair 1fr share, breaking the
   3-equal-column footer. Wrapping normally lets it share the column fairly. */
.footer-brand {
  color: var(--color-text-inverse);
  white-space: normal;
}

.footer-muted {
  color: rgba(247, 243, 234, 0.7);
}

/* Footer brand block: just the church name (no logo) — overrides .brand's
   horizontal logo+name row used in the header. */
.footer-brand-block {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: 6px;
  margin-bottom: var(--space-4);
}

/* Auth/Login page logo */
.auth-logo {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto var(--space-4, 16px);
}

/* Footer link lists — vertical list of links with icons */
.footer-linklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.875rem;
}

.footer-linklist li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.5;
}

.footer-linklist li a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Footer link icons (chevrons, map pin, phone, etc.) */
.footer-linklist li i,
.footer-linklist li svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-gold);
}

/* Footer bottom bar — copyright notice.
   .footer-bottom is a full-bleed strip (border-top spans edge to edge);
   .footer-bottom-inner is the actual .container so the text lines up with
   the footer-grid columns above it instead of centering against the full
   viewport width (visibly off from the rest of the page on wide screens). */
.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(247, 243, 234, 0.15);
  font-size: 0.8rem;
  color: rgba(247, 243, 234, 0.6);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  /* Overrides the base p { text-align: left; max-width: 75ch } rule, which
     otherwise wins over the flex parent's inherited centering (a direct
     declaration on the element always beats an inherited one). */
  text-align: center;
  max-width: none;
}

/* Social media icon links (Facebook, YouTube, Instagram) */
.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--color-text-inverse);
  background: rgba(247, 243, 234, 0.10);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.social-links a:hover {
  background: var(--color-gold);
  color: var(--color-indigo-dark);
}

/* Google Maps embed container — responsive 16:9 aspect ratio */
/* Live map embed — used on the dedicated Location page (full width, no clip). */
.map-placeholder {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.map-placeholder iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.map-placeholder.light {
  border-color: var(--color-border);
  color: var(--color-muted);
}

/* Live Google Maps embed in the footer's "Our Location" column. */
.footer-map-embed {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(247, 243, 234, 0.18);
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}
.footer-map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


/* Scroll-reveal: data-reveal attribute (used on sections in Astro pages) */
[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal elements - visible by default for better mobile compatibility */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utility Spacing Classes --- */
.no-margin {
  margin-top: 0;
  margin-bottom: 0;
}

.mb-12 {
  margin-bottom: var(--space-12);
}

.mt-6 {
  margin-top: var(--space-6);
}

/* Section header — flex layout for heading + action button */
.section-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-10);
}

/* ══════════════════════════════════════════
   Auth/Login Page Styles
   ══════════════════════════════════════════ */

/* Full-page centered login shell */
.auth-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: var(--space-16) 0;
}

/* Login card container */
.auth-card {
  width: min(520px, 100%);
  background: none;
  padding: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}

/* Info note box on auth pages */
.auth-note {
  background: var(--color-surface-alt);
  padding: var(--space-4);
  font-size: 0.9rem;
  color: var(--color-muted);
}

.portal-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(198, 164, 74, 0.2);
  color: var(--color-primary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.post-grid {
  display: grid;
  gap: var(--space-6);
}

.post-card {
  background: none;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: background 0.3s ease;
}

.post-card:hover {
  background: var(--color-surface-alt);
}

.post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-body {
  padding: var(--space-8);
  display: grid;
  gap: var(--space-4);
}

.bio-label,
.section-label,
.s-label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  font-weight: 600;
  margin-bottom: var(--space-2);
  /* Inherit the section's alignment instead of forcing center — keeps the
     eyebrow aligned with its heading (left on article pages, centered in
     centered sections). */
}

.cp-name,
.cp-title,
.saint-name,
.leader-name,
.leader-title,
.leader-desc {
  text-align: center;
}

.post-meta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* List-style layout for posts, documents, resources */
.post-list,
.document-list,
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-list-item,
.document-list-item,
.resource-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  transition: background 200ms;
  position: relative;
}

.post-list-item:hover,
.document-list-item:hover,
.resource-list-item:hover {
  background: var(--color-surface-alt);
}

.post-list-item-checkbox,
.document-list-item-checkbox,
.resource-list-item-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-maroon);
}

/* Drag handle for reordering resources - improved size for touch devices */
.drag-handle {
  flex-shrink: 0;
  width: 40px;
  /* Increased from 24px for better touch target */
  min-height: 40px;
  /* Ensure minimum hit area */
  color: var(--color-muted);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  /* Increased padding for larger hit area */
  margin-right: var(--space-2);
  opacity: 0.6;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.drag-handle:hover {
  opacity: 1;
  background: var(--color-surface-alt);
}

.drag-handle:active {
  cursor: grabbing;
  background: var(--color-border);
}

/* Larger icon within drag handle */
.drag-handle svg,
.drag-handle i {
  width: 20px !important;
  height: 20px !important;
}

/* Dragging state */
.resource-list-item.dragging {
  opacity: 0.5;
  background: var(--color-surface-alt);
  border: 2px dashed var(--color-maroon);
}

.resource-list-item[draggable="true"] {
  cursor: move;
  transition: background 0.2s, opacity 0.2s;
}

.post-list-item-image {
  flex-shrink: 0;
  width: 160px;
  height: 90px;
  /* 16:9 ratio */
  object-fit: cover;
  border-radius: 4px;
  background: var(--color-surface-alt);
}

.post-list-item-content,
.document-list-item-content,
.resource-list-item-content {
  flex: 1;
  min-width: 0;
}

.post-list-item-title,
.document-list-item-title,
.resource-list-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 var(--space-1) 0;
  line-height: 1.4;
}

.post-list-item-meta,
.document-list-item-meta,
.resource-list-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Resource tags - improved contrast for accessibility (WCAG AA) */
.resource-list-item-meta .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--color-maroon);
  color: var(--color-surface);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

[data-theme="dark"] .resource-list-item-meta .tag {
  background: var(--color-maroon);
  color: var(--color-ink);
}

.post-list-item-actions,
.document-list-item-actions,
.resource-list-item-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Bulk action bar */
.bulk-action-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: none;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-maroon);
  color: white;
  border-radius: 6px;
  margin-bottom: var(--space-4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bulk-action-bar.is-visible {
  display: flex;
}

.bulk-action-bar-count {
  font-weight: 600;
}

.bulk-action-bar-actions {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

.bulk-action-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bulk-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.bulk-action-btn--danger {
  background: rgba(220, 38, 38, 0.8);
  border-color: rgba(220, 38, 38, 1);
}

.bulk-action-btn--danger:hover {
  background: rgba(185, 28, 28, 1);
}

/* Form validation styles */
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field-error {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
}

/* Icon button for actions */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 150ms;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--color-surface-alt);
  color: var(--color-primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ═══ SECTION TOOLBAR — Posts / Documents page header ═══ */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.section-toolbar-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-ink);
  white-space: nowrap;
}

.section-toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.section-toolbar-actions input[type="text"],
.section-toolbar-actions input[type="search"] {
  width: 200px;
}

/* Section filter row (visibility pills, etc.) */
.section-filters {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.section-filters-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  white-space: nowrap;
  font-weight: 500;
}

/* Blog controls (sorting, pagination, per-page) */
.blog-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.blog-controls-left,
.blog-controls-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.blog-controls label {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 500;
}

.blog-controls select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 150ms;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  appearance: menulist;
}

.blog-controls select:hover {
  border-color: var(--color-accent);
}

.blog-controls select:focus {
  outline: 2px solid rgba(128, 56, 48, 0.5);
  outline-offset: 1px;
  border-color: var(--color-maroon);
  box-shadow: 0 0 0 3px rgba(128, 56, 48, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 150ms;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 40px;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--color-surface-alt);
  border-color: var(--color-accent);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.is-active {
  background: var(--color-maroon);
  color: white;
  border-color: var(--color-maroon);
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--color-muted);
  padding: 0 var(--space-3);
}

/* Dark mode support for blog controls */
[data-theme="dark"] .blog-controls select {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-border);
}

[data-theme="dark"] .blog-controls select:hover {
  border-color: var(--color-accent);
}

[data-theme="dark"] .pagination-btn {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-border);
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
  background: var(--color-surface-alt);
}

[data-theme="dark"] .pagination-btn.is-active {
  background: var(--color-maroon);
  color: white;
}

[data-theme="dark"] .post-list-item:hover,
[data-theme="dark"] .document-list-item:hover,
[data-theme="dark"] .resource-list-item:hover {
  background: var(--color-surface-alt);
}

[data-theme="dark"] .post-list-item-image,
[data-theme="dark"] .document-list-item-image,
[data-theme="dark"] .resource-list-item-image {
  background: var(--color-surface-alt);
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {

  /* Section toolbar: stack title above actions on mobile */
  .section-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .section-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .section-toolbar-actions input[type="text"],
  .section-toolbar-actions input[type="search"] {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Blog controls - stack vertically */
  .blog-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .blog-controls-left,
  .blog-controls-right {
    width: 100%;
    flex-direction: row;
    gap: var(--space-2);
  }

  .blog-controls label {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .blog-controls select {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    padding: 10px 8px;
  }

  /* Post list items - mobile optimized */
  .post-list-item,
  .document-list-item,
  .resource-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: var(--space-2);
    padding: var(--space-3);
    align-items: start;
  }

  /* Checkbox */
  .post-list-item-checkbox,
  .document-list-item-checkbox,
  .resource-list-item-checkbox {
    grid-column: 1;
    grid-row: 1;
    margin-top: 4px;
  }

  /* Image */
  .post-list-item-image {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: 140px;
    height: 78.75px;
    /* Maintain 16:9 */
  }

  /* Content */
  .post-list-item-content,
  .document-list-item-content,
  .resource-list-item-content {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }

  .post-list-item-title,
  .document-list-item-title,
  .resource-list-item-title {
    font-size: 0.875rem;
    line-height: 1.3;
    margin-bottom: var(--space-1);
  }

  .post-list-item-meta,
  .document-list-item-meta,
  .resource-list-item-meta {
    font-size: 0.7rem;
    gap: var(--space-2);
    flex-wrap: wrap;
  }

  /* Actions */
  .post-list-item-actions,
  .document-list-item-actions,
  .resource-list-item-actions {
    grid-column: 3;
    grid-row: 1 / 3;
    flex-direction: column;
    gap: var(--space-1);
    align-items: center;
  }

  /* Bulk action bar - mobile optimized */
  .bulk-action-bar {
    position: sticky;
    top: 0;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .bulk-action-bar label {
    font-size: 0.85rem;
  }

  .bulk-action-bar-count {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
  }

  .bulk-action-bar-actions {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }

  .bulk-action-btn {
    padding: 12px 10px;
    font-size: 0.85rem;
    justify-content: center;
    white-space: nowrap;
  }

  .bulk-action-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Pagination - mobile optimized */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: var(--space-4) var(--space-2);
  }

  .pagination-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    min-width: 40px;
    min-height: 40px;
    /* Larger touch target */
  }

  .pagination-btn svg {
    width: 14px;
    height: 14px;
  }

  .pagination-info {
    width: 100%;
    text-align: center;
    padding: var(--space-2) 0 var(--space-3);
    order: -1;
    /* Move info to top */
    font-size: 0.85rem;
    font-weight: 600;
  }

  /* Filter bar - horizontal scroll on mobile */
  .filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    flex-wrap: nowrap;
    gap: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  .filter-btn {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  /* Toast - adjust position on mobile */
  .toast {
    bottom: var(--space-3);
    right: var(--space-3);
    left: var(--space-3);
    max-width: none;
    font-size: 0.85rem;
  }

  /* Badge sizing */
  .badge {
    font-size: 0.65rem;
    padding: 4px 8px;
    white-space: nowrap;
  }

  /* Icon buttons - larger touch targets */
  .icon-btn {
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
  }

  .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Hide some less important metadata on mobile */
  .post-list-item-meta>span:nth-child(n+4) {
    display: none;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .post-list-item-image {
    width: 100px;
    height: 56.25px;
    /* Maintain 16:9 */
  }

  .post-list-item-title,
  .document-list-item-title,
  .resource-list-item-title {
    font-size: 0.85rem;
  }

  .post-list-item-meta,
  .document-list-item-meta,
  .resource-list-item-meta {
    font-size: 0.7rem;
  }

  .bulk-action-btn {
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  .pagination-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
    min-width: 32px;
  }
}

/* Interactive Timeline */
.interactive-timeline {
  display: grid;
  gap: var(--space-8);
  position: relative;
  margin: var(--space-8) 0;
}

.interactive-timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-event {
  position: relative;
  padding-left: var(--space-16);
}

.timeline-event::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: var(--color-accent);
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(198, 164, 74, 0.15);
}

.timeline-event h3 {
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  font-family: var(--font-heading);
}

/* Pull Quotes */
.pullquote {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  line-height: 1.4;
  color: var(--color-primary);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-4) var(--space-8);
  margin: var(--space-10) 0;
  font-style: italic;
  position: relative;
  background: var(--color-surface-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pullquote::before {
  content: "\201C";
  position: absolute;
  left: 10px;
  top: -10px;
  font-size: 4rem;
  opacity: 0.1;
  color: var(--color-primary);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  flex: 0 0 auto;
}

/* ══════════════════════════════════════════
   12. RESPONSIVE BREAKPOINTS
   Adapts layout for tablets and mobile devices
   ══════════════════════════════════════════ */

/* --- Hero responsive (Mobile) --- */
@media (max-width: 768px) {
  .hero {
    min-height: 450px;
    padding: var(--space-16) 0 var(--space-12);
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    line-height: 1.2;
    text-wrap: balance;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary,
  .hero-actions .btn-outline {
    width: auto;
    justify-content: center;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* --- Tablet breakpoint adjustments --- */
@media (max-width: 1023px) {
  .hero {
    min-height: 100dvh;
  }
}

/* Profile stacks vertically on narrower screens */
@media (max-width: 900px) {
  .profile {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile breakpoint: adjust spacing, fonts, grids ---
   Single source of truth for the mobile container gutter (20px each side).
   Previously three separate !important rules at 768/768(dup)/400px set
   12px/12px/10px — inconsistent and shrinking on the smallest phones, the
   opposite of what you want. This one rule now covers the whole <=768px
   range; the duplicate and the 400px override below have been removed. */
@media (max-width: 768px) {
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* .section padding handled by the fluid clamp() on the base rule */

  .hero-content {
    padding: var(--space-12) 0 var(--space-10);
  }

  .card {
    padding: var(--space-5);
  }

  .news-body {
    padding: var(--space-4);
  }

  .page-hero {
    padding: var(--space-10) 0;
  }

  .footer {
    padding: var(--space-8) 0;
  }

  /* Footer becomes 2 columns on tablet, 1 column on phone (see 480px below) */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Hide Quick Links in footer on mobile */
  .footer-grid>div:nth-child(2) {
    display: none;
  }

  /* Grids collapse to single column on mobile */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .split-two {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .news-grid {
    grid-template-columns: 1fr;
    /* Stack news cards vertically */
  }

  .h1 {
    font-size: 1.7rem;
    margin-bottom: var(--space-4);
    line-height: 1.3;
  }

  .h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-3);
  }

  .news-grid {
    gap: var(--space-5);
  }

  /* Fix reveal elements not showing on mobile */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

}

/* --- Small Phone breakpoint --- */
@media (max-width: 480px) {
  .hero {
    min-height: 100dvh;
    /* Full screen hero on phones — dvh adjusts for mobile browser chrome */
  }

  /* .container gutter comes from the <=768px padding-left/right rule
     (20px !important) above. This used to ALSO shrink .container's width
     by 1.5rem here, stacking a second margin on top of that padding and
     making the total edge gutter inconsistent across breakpoints. */

  /* Footer collapses to single column on small phones */
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

/* ═══ CONTACT PAGE LAYOUT (GLOBAL) ═══ */
.contact-page .grid-2 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: var(--space-10);
  max-width: 650px;
  margin: 0 auto;
  width: 100%;
}

.contact-page .page-hero {
  text-align: center;
}

.contact-page .stack {
  align-items: flex-start;
}

.contact-page .card-surface {
  padding: var(--space-10) var(--space-8);
}

.contact-page .stack .h2 {
  text-align: left;
}

.contact-page .list {
  text-align: left;
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
}

.contact-page .list li {
  justify-content: flex-start;
}

/* --- Mobile specific tweaks --- */
@media (max-width: 768px) {
  .contact-page .page-hero {
    padding: var(--space-6) 0;
  }

  .contact-page .section {
    padding: var(--space-4) 0;
  }

  .contact-page .grid-2 {
    gap: var(--space-8);
  }

  .contact-page .card-surface {
    padding: var(--space-8) var(--space-4);
  }

  .g-recaptcha {
    transform: scale(0.88);
    transform-origin: center;
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .vicar-photo {
    width: 100px !important;
  }
}

/* ========================================
   Dashboard & Portal Styles
   ======================================== */

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Stat cards */
.stat-card {
  background: var(--color-surface-alt);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-2);
}

.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-primary);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 400;
}

/* Activity timeline */
.activity-timeline {
  display: grid;
  gap: var(--space-3);
  border-left: 2px solid var(--color-border);
  padding-left: var(--space-4);
}

.activity-item {
  position: relative;
  padding: var(--space-2) 0;
}

.activity-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4) - 5px);
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.activity-item .activity-time {
  font-size: 0.7rem;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

.activity-item .activity-text {
  font-size: 0.9rem;
  color: var(--color-ink);
}

/* Category breakdown */
.category-list {
  display: grid;
  gap: var(--space-3);
}

.category-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.category-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  background: var(--color-accent);
  transition: width 0.6s ease;
}

.category-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  min-width: 100px;
}

.category-count {
  font-size: 0.8rem;
  color: var(--color-ink);
  font-weight: 400;
  min-width: 24px;
  text-align: right;
}

/* Quick actions */
.quick-actions {
  display: grid;
  gap: var(--space-3);
}

.quick-action {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-alt);
  color: var(--color-ink);
  text-decoration: none;
  transition: background 0.3s ease;
  font-size: 0.9rem;
}

.quick-action:hover {
  background: var(--color-border);
}

/* Post filters */
.post-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.filter-btn {
  background: none;
  border: 1px solid var(--color-border);
  padding: var(--space-1) var(--space-3);
  font: inherit;
  font-size: 0.8rem;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Trash icon colors - Active only (red when active, default white when inactive) */
.filter-btn.is-active[data-doc-filter="trash"] i,
.filter-btn.is-active[data-filter="trash"] i,
.filter-btn.is-active[data-resource-filter="trash"] i {
  color: #dc2626 !important;
  /* Red when active */
}

.filter-btn.active,
.filter-btn:hover {
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
}

.top-menubar-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.top-menubar-btn i {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .top-menubar-text {
    font-size: 0.75rem;
  }

  .top-menubar-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
  }
}

/* ══════════════════════════════════════════
   Page Fade-In Animation
   ══════════════════════════════════════════ */

body {
  animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Dashboard section headers */
.dashboard-section-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 400;
  margin-bottom: var(--space-3);
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  background: #1F1D1A !important;
  /* Dark background for light mode */
  color: #FFFFFF !important;
  /* White text for light mode */
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
  border-radius: 6px;
  border: 2px solid var(--color-maroon) !important;
  /* Maroon border for visibility */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  max-width: 400px;
  font-weight: 500;
}

.toast.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Dark mode toast */
[data-theme="dark"] .toast {
  background: #F0EDE7 !important;
  /* Light background for dark mode */
  color: #1F1D1A !important;
  /* Dark text for dark mode */
  border: 1px solid rgba(31, 29, 26, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

/* Modal overlay for edit forms */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(51, 49, 46, 0.5);
  z-index: 150;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease-out, visibility 200ms ease-out;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.is-visible .modal-card {
  animation: modalSlideIn 300ms ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-card {
  background: var(--color-surface);
  padding: 0;
  width: min(560px, 90vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-10) var(--space-5);
  color: var(--color-muted);
}

.empty-state i[data-lucide] {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: var(--space-4);
}

/* Login error feedback */
.login-error {
  color: var(--color-maroon);
  font-size: 0.85rem;
  padding: var(--space-2) 0;
  display: none;
}

.login-error.is-visible {
  display: block;
}

/* Session expiry warning */
.session-warning {
  background: rgba(198, 164, 74, 0.12);
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  color: var(--color-accent);
  text-align: center;
}

.blur-active {
  filter: blur(8px) !important;
  pointer-events: none;
  transition: filter 0.3s ease;
}

.timeout-modal {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.timeout-modal .modal-card {
  max-width: 400px;
  text-align: center;
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  filter: none !important;
  /* Ensure modal card itself is never blurred */
}

.timeout-graphic {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  background: var(--color-warm-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-maroon);
  position: relative;
}

.timeout-timer-circle {
  position: absolute;
  inset: -4px;
  border: 4px solid var(--color-maroon);
  border-radius: 50%;
  border-right-color: transparent;
  animation: rotateTimer 1s linear infinite;
}

@keyframes rotateTimer {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.timeout-countdown {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 300;
  margin: var(--space-4) 0;
  color: var(--color-maroon);
}

.timeout-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  margin-top: var(--space-4);
  border-radius: 2px;
  overflow: hidden;
}

.timeout-progress-fill {
  height: 100%;
  background: var(--color-maroon);
  width: 100%;
  transition: width 1s linear;
}

.session-warning-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-maroon);
  color: white;
  padding: var(--space-2) var(--space-4);
  text-align: center;
  font-size: 0.875rem;
  z-index: 9999;
  display: none;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   GO TO TOP BUTTON
   Floating button in bottom-right corner to scroll to top
   ═══════════════════════════════════════════════════════════════ */

[data-go-to-top] {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-maroon);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

[data-go-to-top].is-visible {
  opacity: 1;
  visibility: visible;
}

[data-go-to-top]:hover {
  background: var(--color-indigo);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

[data-go-to-top]:active {
  transform: translateY(-2px);
}

[data-go-to-top] i {
  width: 24px;
  height: 24px;
}

/* Dark mode styling */
[data-theme="dark"] [data-go-to-top] {
  background: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] [data-go-to-top]:hover {
  background: var(--color-maroon);
}

/* Mobile responsive */
@media (max-width: 768px) {
  [data-go-to-top] {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
  }

  [data-go-to-top] i {
    width: 20px;
    height: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   VICAR'S LETTER CARD - Modern letter-style design
   ═══════════════════════════════════════════════════════════════ */

.vicar-letter-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: var(--space-8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .vicar-letter-card {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.vicar-letter-content {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
}

.vicar-photo-frame {
  flex-shrink: 0;
  text-align: center;
  max-width: 200px;
}

.vicar-photo {
  width: 100%;
  aspect-ratio: 3/4;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  padding: var(--space-1);
  background: var(--color-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.vicar-photo:hover {
  transform: scale(1.02);
}

.vicar-name {
  margin-top: var(--space-4);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.vicar-message {
  flex: 1;
}

.vicar-greeting {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-maroon);
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-weight: 300;
}

.vicar-message p {
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.vicar-read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--color-maroon);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(94, 75, 72, 0.2);
}

.vicar-read-more:hover {
  background: var(--color-indigo);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(94, 75, 72, 0.3);
}

.vicar-read-more i {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.vicar-read-more:hover i {
  transform: translateX(4px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .vicar-letter-card {
    padding: var(--space-6);
  }

  .vicar-letter-content {
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
  }

  .vicar-photo {
    width: 150px;
    aspect-ratio: 3/4 !important;
    height: auto !important;
  }

  .vicar-message {
    text-align: center;
  }

  .vicar-greeting {
    text-align: center;
  }
}

/* ═══ GLOBAL MOBILE REFINEMENTS ═══ */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
  }

  /* .container gutter is set once, at the top of the file's mobile
     breakpoint (20px each side) — removed this duplicate. */

  .hero-bg {
    background-attachment: fixed !important;
  }

  .hero-actions .btn {
    width: 100%;
    min-width: 100% !important;
  }

  .contact-form {
    text-align: justify;
  }
}

/* ═══ VICAR'S DESK SECTION ═══ */
.section-parallax-vicar {
  position: relative;
  background-image: url("../../img/the_header.png");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  padding: var(--space-16) 0;
}

@media (max-width: 768px) {
  .section-parallax-vicar {
    background-attachment: fixed !important;
    padding: var(--space-10) 0;
  }
}

.section-parallax-vicar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 250, 0.9);
  z-index: 0;
}

[data-theme="dark"] .section-parallax-vicar::before {
  background: rgba(31, 29, 26, 0.94);
}

.section-parallax-vicar .container {
  position: relative;
  z-index: 1;
}

.vicar-label-main {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-maroon);
  margin-bottom: var(--space-10);
  width: 100%;
}

.vicar-label-main::after,
.vicar-label-main::before {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--color-border);
  opacity: 0.6;
}

.vicar-letter-card {
  background: var(--color-surface) !important;
  padding: var(--space-12);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-maroon);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .vicar-letter-card {
    padding: var(--space-6);
    text-align: center;
  }

  .vicar-photo-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .vicar-label-main {
    font-size: 1.25rem;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
  }
}

/* ═══ NEWS MODAL STYLES ═══ */
.post-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-modal-overlay.is-visible {
  display: flex !important;
  opacity: 1;
}

.post-modal {
  background: var(--color-surface);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.post-modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-modal-close {
  background: var(--color-surface-alt);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  transition: all 0.2s ease;
}

.post-modal-close:hover {
  background: var(--color-maroon);
  color: white;
}

.post-modal-body {
  padding: var(--space-8);
  overflow-y: auto;
}

.post-modal-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: var(--space-6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-modal-meta {
  display: flex;
  gap: var(--space-4);
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-modal-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-ink);
}
.post-modal-content h2,
.post-modal-content h3 { margin-top: 1.2em; }
.post-modal-content ul,
.post-modal-content ol { padding-left: 1.5em; }
.post-modal-content a { color: var(--color-maroon); text-decoration: underline; }

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
}

/* ══════════════════════════════════════════
   MOBILE REFINEMENTS
   Additional targeted improvements for phone-size screens
   ══════════════════════════════════════════ */

/* Prevent iOS from auto-zooming inputs (font-size must be ≥ 16px globally, not just on mobile) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  font-size: max(16px, 1em);
}

@media (max-width: 768px) {

  /* Minimum 44px touch targets for nav buttons */
  .theme-toggle,
  .mobile-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* Post/news modal: compact body padding on mobile */
  .post-modal-body {
    padding: var(--space-5);
  }

  .post-modal-header {
    padding: var(--space-4) var(--space-5);
  }

  /* Footer map iframe: keep aspect ratio but cap height */
  .map-placeholder iframe {
    height: 200px;
  }

  /* Page hero: reduce vertical padding on mobile */
  .page-hero {
    padding: var(--space-8) 0;
  }

  /* News card: tighter image on mobile */
  .news-image {
    height: 200px;
  }

  /* Card link and hub card: reduce padding at 768px */
  .card-link,
  .card-surface {
    padding: var(--space-5);
  }

  /* Liturgical section headings: smaller on mobile */
  .liturgical-title {
    font-size: 1.25rem;
  }

  /* Timeline: reduce padding on mobile */
  .timeline-item {
    padding-left: var(--space-6);
  }
}

/* Very small phones: 360px breakpoint */
@media (max-width: 400px) {

  /* Container gutter stays at the 20px set for the whole <=768px range —
     the smallest phones need MORE breathing room, not less. (Previously
     10px here, tighter than every larger mobile size — inverted.) */

  /* Hero content: reduce padding */
  .hero-content {
    padding: var(--space-8) 0 var(--space-6);
  }

  /* Reduce section spacing */
  .section {
    padding: var(--space-5) 0;
  }

  /* Logo grid: 2 columns on very small screens */
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Page hero: minimal padding */
  .page-hero {
    padding: var(--space-6) 0;
  }

  /* H1 sizing for very small screens */
  h1,
  .h1 {
    font-size: 1.5rem;
  }

  h2,
  .h2 {
    font-size: 1.25rem;
  }

  /* Post modal: full width, full height */
  .post-modal {
    max-height: 96vh;
    border-radius: 8px;
  }

  /* Footer: more compact */
  .footer {
    padding: var(--space-6) 0;
  }
}

/* ══════════════════════════════════════════
   REDUCED MOTION — WCAG AA accessibility
   Disable animations for users with vestibular/motion sensitivity
   ══════════════════════════════════════════ */
@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;
  }

  /* Keep reveal elements visible immediately — no animation */
  .reveal,
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition-delay: 0ms !important;
  }
}

/* ═══ DIRECTORY — Member Card ═══ */
.dir-member-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.dir-member-photo {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  display: block;
}
@media (max-width: 768px) {
  .dir-member-row {
    flex-direction: column;
    gap: var(--space-3);
  }
  .dir-member-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    flex-shrink: unset;
  }
}
