@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,600&family=Inter:wght@400;500&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 --- */
  --color-primary: #1F1D1A;
  /* Deep Soil — main text color and dark backgrounds */
  --color-primary-dark: #111010;
  /* Even darker shade for emphasis */
  --color-accent: #5A554D;
  /* Warm Stone — used for hover states, links (6:1 contrast on surface) */
  --color-accent-dark: #3E3B36;
  /* Darker accent for stronger emphasis */
  --color-surface: #FAFAF8;
  /* Clean Linen — main page background */
  --color-surface-alt: #F0EDE7;
  /* Warm Mist — alternate section backgrounds */
  --color-border: rgba(31, 29, 26, 0.15);
  /* Semi-transparent border for subtle dividers */
  --color-ink: #1F1D1A;
  /* Text color (same as primary) */
  --color-muted: #6B665E;
  /* Muted text for captions, metadata (4.8:1 contrast) */
  --color-maroon: #8B0000;
  /* Liturgical Crimson — top menubar, buttons, accents (9.5:1 on parchment) */
  --color-navy: #1F1D1A;
  /* Navy alias — currently matches primary */
  --color-warm-gold: rgba(212, 175, 55, 0.15);
  /* Gold tint for icon backgrounds */

  /* --- 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: 1100px;
  /* Max width for main content container */
  --max-width-read: 75ch;
  /* Optimal reading width (~75 characters) */

  /* --- Spacing Scale (4px base, compressed at larger values) --- */
  --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 (section inner spacing) */
  --space-6: 40px;
  /* XL gap (grid gaps, major spacing) */
  --space-8: 56px;
  /* 2XL gap (footer grid gap) */
  --space-10: 72px;
  /* Section padding (top/bottom) */
  --space-12: 80px;
  /* Hero content padding */
  --space-16: 96px;
  /* Page hero padding, large vertical space */
  --space-20: 104px;
  /* Extra large spacing */
  --space-32: 112px;
  /* Maximum spacing */

  /* --- Typography --- */
  --font-heading: "Cormorant Garamond", "EB Garamond", "Georgia", serif;
  /* Sacred editorial display serif */
  --font-sc:      "Cormorant SC", "EB Garamond", "Georgia", serif;
  /* Small-caps serif for labels and eyebrows */
  --font-body:    "Newsreader", "Georgia", serif;
  /* Refined reading serif for body 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 — applied when data-theme="dark" is set on <html> */
[data-theme="dark"] {
  color-scheme: dark;
  --color-primary: #E8E5DE;
  /* Light text on dark background */
  --color-primary-dark: #F5F3EF;
  /* Brighter for emphasis */
  --color-accent: #B8B2A8;
  /* Warm Stone — 7:1 contrast on dark surface */
  --color-accent-dark: #D0CBC3;
  /* Lighter accent for hover states */
  --color-surface: #161412;
  /* Deep Dark — main page background */
  --color-surface-alt: #211F1C;
  /* Slightly lighter for alternate sections */
  --color-border: rgba(232, 229, 222, 0.12);
  /* Subtle light borders */
  --color-ink: #E8E5DE;
  /* Main text color in dark mode */
  --color-muted: #9A958B;
  /* Muted text — 5:1 contrast on dark surface */
  --color-maroon: #E05050;
  /* Lighter crimson for dark mode — 5.2:1 on #161412 surface (WCAG AA) */
  --color-navy: #E8E5DE;
  /* Navy alias in dark mode */
  --color-warm-gold: rgba(200, 168, 80, 0.12);
  /* Subtle gold tint */
}

/* ══════════════════════════════════════════
   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.75;
  /* Generous line height for readability */
  -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 0.3s ease;
}

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

a:focus-visible {
  outline: 2px solid #B8903C;
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid #B8903C;
  outline-offset: 2px;
}

/* Footer-specific link styles (no underline, color change on hover) */
.footer-linklist a {
  color: var(--color-muted);
  transition: color 0.2s ease;
  text-decoration: none;
}

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

/* --- 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-primary);
  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 */
.section {
  padding: var(--space-10) 0;
  /* 72px top and bottom padding */
}

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

/* Parchment-toned section (warm, paper-like background) */
.section-parchment {
  background: #FDFCF8;
}

/* Dark mode override for parchment sections */
[data-theme="dark"] .section-parchment {
  background: #1F1D1A;
}

/* Slate/mist section background */
.section-slate {
  background: #F2F0EB;
}

[data-theme="dark"] .section-slate {
  background: #23211E;
}

/* Dark inverted section (dark bg, light text) — used for CTAs and emphasis blocks.
   Uses hardcoded colors (not theme variables) so it stays dark in both light and dark modes. */
.section-dark {
  background: #33312E;
  /* Always dark, regardless of theme */
  color: #F2F0EB;
  /* Always light 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: #F2F0EB;
}

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

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

/* Default paragraph styling */
p {
  margin: 0 0 var(--space-4);
  /* Bottom margin only */
  text-align: justify;
  /* Justified text for editorial look */
}

/* Lead paragraph — larger, lighter text for intro paragraphs */
.lead {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--color-muted);
}

/* 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(51, 49, 46, 0.55), rgba(94, 75, 72, 0.45)),
    url("../../img/the_header.png") center center/cover no-repeat;
  color: #fff;
  padding: var(--space-16) 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(198, 164, 74, 0.15), transparent 40%);
  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.75rem, 5.5vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-wrap: balance;
}

/* Slim rule below the page-hero h1 — matches homepage eyebrow rule aesthetic */
.page-hero h1::after {
  display: block;
  content: "";
  width: 32px;
  height: 1px;
  background: rgba(245, 241, 235, 0.45);
  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-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-maroon);
  margin-bottom: 1rem;
}

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

/* Centred variant for dark sections */
.eyebrow-center {
  justify-content: center;
  color: rgba(245, 241, 235, 0.7);
}
.eyebrow-center::before {
  background: rgba(245, 241, 235, 0.4);
}

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

/* Heading size variants (responsive with clamp) */
.h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-5);
}

.h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-bottom: var(--space-4);
}

/* --- 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);
}

.topbar {
  display: none;
}

.topbar-links,
.topbar-social {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.topbar a {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.topbar a:hover {
  color: #e6d6a6;
}

.topbar .btn-small {
  background: #fff;
  color: var(--color-primary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ══════════════════════════════════════════
   Top Menubar
   ══════════════════════════════════════════ */

.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 0.2s ease;
  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;
  }
}

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

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

/* Site header — sticks to top of viewport on scroll */
.site-header {
  position: sticky;
  /* Stays visible while scrolling */
  top: 0;
  /* Sticks to the very top */
  z-index: 100;
  /* Above all page content */
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

/* Header inner layout — logo left, nav right */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

/* Right-side header actions (theme toggle, etc.) */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Dark/Light theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--color-ink);
  cursor: pointer;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  /* Subtle by default */
  transition: opacity 0.3s ease;
}

.theme-toggle:hover {
  opacity: 1;
  /* Full opacity on hover */
}

/* Theme toggle icon visibility — toggled via .is-dark class on the button */
/* Both spans use display:flex so the SVG is centred identically in both states */
.theme-toggle .theme-icon-light { display: flex; }
.theme-toggle .theme-icon-dark  { display: none; }
.theme-toggle.is-dark .theme-icon-light { display: none; }
.theme-toggle.is-dark .theme-icon-dark  { display: flex; }

/* --- Logo Grid (used for affiliations section) --- */

.logo-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: 8px;
  transition: background 0.3s ease;
  text-decoration: none;
}

.logo-grid a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.logo-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-2);
}

/* --- Site Brand (Logo + Name) --- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex-shrink: 1;
  text-decoration: none !important;
}

/* Church logo image (circular) */
.brand-logo {
  height: 44px;
  width: auto;
  border-radius: 50%;
  /* Makes logo circular */
  flex-shrink: 0;
}

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

/* Church name text */
.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Subtitle under church name (e.g. "Malankara Orthodox Syrian Church") */
.brand-subtitle {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-muted);
  font-weight: 300;
}

/* --- Desktop Navigation Links --- */
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: 0.03em;
  font-weight: 400;
  color: var(--color-muted);
}

.nav-list a,
.nav-list button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-list .active {
  color: var(--color-primary);
  opacity: 1;
}

.nav-item {
  position: relative;
}

/* Nav trigger buttons are hover-only labels — not interactive targets */
.nav-item > button {
  pointer-events: none;
}

/* --- Dropdown Menus (appear on hover/focus of nav items) --- */
.dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  /* Positioned below the nav item */
  background: var(--color-surface);
  min-width: 240px;
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  /* Hidden by default */
  transform: translateY(4px);
  /* Slight slide-down animation */
  transition: all 0.3s ease;
  z-index: 1000;
  /* Above everything else */
}

/* Show dropdown on hover only */
.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  /* Slide into position */
}

/* Individual dropdown link items */
.dropdown a {
  display: block;
  padding: 12px 16px;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 400;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border);
}

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

.dropdown a:hover {
  background: var(--color-surface-alt);
  color: var(--color-primary);
}

/* ══════════════════════════════════════════
   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;
}

/* 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 — using church maroon for main actions */
.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--color-maroon);
  color: white;
  border: 1px solid var(--color-maroon);
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  touch-action: manipulation;
}

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

/* Glowing variant — softened for spiritual minimalism */
.btn-glow {
  box-shadow: 0 10px 20px -10px rgba(128, 56, 48, 0.4);
}

.btn-glow:hover {
  box-shadow: 0 15px 30px -10px rgba(128, 56, 48, 0.5);
}

/* Outline button — sophisticated transparent style */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: var(--space-2) var(--space-5);
  background: transparent;
  color: var(--color-maroon);
  border: 1px solid var(--color-maroon);
  cursor: pointer;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
  background: var(--color-maroon);
  color: white;
  transform: translateY(-1px);
}

/* Hero buttons - theme aware visibility */
.hero .btn-primary {
  background: var(--color-maroon);
  color: #FFFFFF;
  border-color: var(--color-maroon);
}

.hero .btn-primary:hover {
  background: transparent;
  color: var(--color-maroon);
  border-color: var(--color-maroon);
}

.hero .btn-outline {
  color: var(--color-maroon);
  border-color: var(--color-maroon);
  background: transparent;
}

.hero .btn-outline:hover {
  background: var(--color-maroon);
  color: #FFFFFF;
}

/* On dark theme, or specifically in dark mode hero, ensure white contrast */
[data-theme="dark"] .hero .btn-primary {
  background: var(--color-maroon);
  color: #FFFFFF;
  border-color: var(--color-maroon);
}

[data-theme="dark"] .hero .btn-outline {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

[data-theme="dark"] .hero .btn-outline:hover {
  background: #FFFFFF;
  color: var(--color-maroon);
}

[data-theme="dark"] .hero .btn-primary:hover {
  background: transparent;
  color: #FFFFFF;
  border-color: #FFFFFF;
}

/* Secondary button — soft surface background */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: var(--space-2) var(--space-5);
  background: var(--color-surface-alt);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-surface);
}

/* --- 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 0.3s ease;
}

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

/* Dark mode button overrides */
[data-theme="dark"] .btn-primary {
  background: var(--color-surface-alt);
  color: var(--color-primary);
  border-color: var(--color-surface-alt);
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(221, 217, 208, 0.06);
  border-color: rgba(221, 217, 208, 0.08);
}

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

/* Hamburger menu button — hidden on desktop, shown via media query */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  padding: var(--space-1);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-toggle i {
  width: 22px;
  height: 22px;
}


/* Mobile Navigation Drawer */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-surface);
  color: var(--color-primary);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 120;
  padding: 0;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

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

.mobile-nav-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-ink);
  padding: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-nav-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

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

.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-4) var(--space-6);
  width: 100%;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

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

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

/* 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 0.3s ease;
}

.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-3) var(--space-6) var(--space-3) 68px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  min-height: 48px;
  align-items: center;
}

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

.mobile-accordion-content a:active {
  background: rgba(0, 0, 0, 0.03);
  color: var(--color-maroon);
}

.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 0.3s ease, visibility 0.3s ease;
  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 (used for highlighted cards) */
.card-surface {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-1);
}

.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(198, 164, 74, 0.2);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.6rem;
  text-transform: none;
  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 */
.form-grid {
  display: grid;
  gap: var(--space-6);
}

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

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

.required-star {
  color: #c0392b;
  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 outline */
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(198, 164, 74, 0.45);
  border-color: transparent;
}

.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: #fff;
  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-accent);
  color: #1e1b16;
  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-accent);
  color: #1e1b16;
}

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

.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 0;
}

.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
   4-column grid with brand, links, contact, map
   ══════════════════════════════════════════ */

/* Footer container */
.footer {
  padding: var(--space-10) 0;
  background: var(--color-surface);
  color: var(--color-primary);
  border-top: 1px solid var(--color-border);
}

/* 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 */
.footer h4 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-primary);
  text-transform: none;
  letter-spacing: normal;
}

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

/* Footer brand text color */
.footer-brand {
  color: var(--color-primary);
}

.footer-muted {
  color: var(--color-muted);
}

/* Spacing below footer brand block (logo + name) */
.footer-brand-block {
  margin-top: 6px;
  margin-bottom: var(--space-4);
}

/* Footer logo (smaller than header logo) */
.footer-logo {
  height: 40px;
  width: auto;
  border-radius: 50%;
}

/* 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-muted);
}

/* Footer bottom bar — copyright notice */
.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
}

.footer-bottom p {
  text-align: center;
}

/* 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;
  background: var(--color-surface-alt);
}

/* Google Maps embed container — responsive 16:9 aspect ratio */
.map-placeholder {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

/* Map iframe fills container absolutely */
.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);
}


/* 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-8);
}

/* ══════════════════════════════════════════
   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-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-maroon);
  font-weight: 600;
  margin-bottom: var(--space-1);
  text-align: center;
}

.ch-name,
.ch-title,
.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-text);
  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-text);
  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: 36px;
    min-height: 36px;
  }

  .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: hide desktop nav, show hamburger --- */
@media (max-width: 1024px) {
  .nav-list {
    display: none;
    /* Hide desktop navigation links */
  }

  .mobile-toggle {
    display: inline-flex;
    /* Show hamburger menu button */
  }

  .topbar {
    display: none;
    /* Hide topbar on tablets */
  }

  .hero {
    min-height: 100dvh;
  }

  /* Allow the brand name to wrap to two lines */
  .brand-name {
    white-space: normal;
  }
}

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

/* --- Mobile breakpoint: adjust spacing, fonts, grids --- */
@media (max-width: 768px) {
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

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

  /* Main title text wraps fluidly without clipping */
  .brand-name {
    font-size: 0.82rem;
    line-height: 1.3;
    white-space: normal !important;
    text-overflow: clip !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .site-header .container {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: var(--space-2);
  }

  .section {
    padding: var(--space-6) 0;
  }

  .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);
  }

  .brand-subtitle {
    display: none;
  }

  /* 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 {
    width: min(100% - 1.5rem, var(--container-width));
    /* Slightly tighter side padding */
  }

  /* 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-primary);
  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: white;
  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(--bg-primary);
  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-primary);
  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 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .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);
  white-space: pre-wrap;
}

.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) {

  /* Tighten container padding */
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* 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 — no fade-in animation */
  .reveal {
    opacity: 1 !important;
    transform: none !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(--border-color);
  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;
  }
}
