/* ========== Design Tokens ========== */
/* Core palette adapted toward original Twenty Seventeen feel (neutral dark, mid gray #767676, subtle accent) */
:root {
  --color-bg: #ffffff;
  --color-surface: #f4f5f6; /* light neutral surface */
  --color-border: #e2e2e2;
  --color-border-soft: #eeeeee;
  --color-text: #222222; /* primary text similar to original nav */
  --color-text-muted: #555555; /* body-muted */
  --color-text-light: #767676; /* legacy mid gray */
  --color-accent: #444b78; /* restrained desaturated indigo/blue */
  --color-accent-alt: #6672a3; /* lighter shade */
  --color-accent-soft: #eef1f8; /* soft background tint */
  --color-accent-gold: #fff; /* white for legibility */
  --color-link: var(--color-accent);
  --color-link-hover: #262d53;

  --font-sans: system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  --font-serif: "Merriweather","Georgia",serif;
  --font-display: "Playfair Display", "Merriweather", serif;
  --font-hero: "RoxboroughCF", "Playfair Display", serif;
  --font-quote: "Sorts Mill Goudy", "Merriweather", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --max-width: 72rem;
}

/* Accessibility: improved focus visibility */
:focus-visible {
  outline: 3px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* Provide a utility class for elements that should have custom focus */
.focus-ring {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Reduce motion for users with preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== Global Reset (Lite) ========== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
}
body.debug-hero .site-header { outline: 3px solid rgba(255,0,0,.6); }
body.debug-hero .hero-banner { outline: 3px dashed rgba(0,128,255,.7); }
body.debug-hero .hero-image img { outline: 2px solid rgba(0,200,0,.7); }
img { max-width: 100%; height: auto; display: block; }
svg { fill: currentColor; }

/* Skip link styling (visible on focus) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: 100;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus-visible {
  top: 8px;
  outline: 3px solid #fff;
}

/* Ensure button and link focus contrast */
button:focus-visible, .btn:focus-visible, a.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--color-accent-gold), 0 0 0 5px #fff;
  outline: none;
}



/* Assign lazy to images not explicitly eager */

/* ========== Typography ========== */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 var(--space-3); font-weight: 600; color: var(--color-text); }

p { margin: 0 0 var(--space-4); }

.lead { font-size: clamp(1.1rem, 1.1rem + 0.6vw, 1.5rem); font-family: var(--font-serif); color: var(--color-text-light); }

small, .small { font-size: 0.8125rem; line-height: 1.4; }

strong { font-weight: 600; }

blockquote { margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-5); background: var(--color-surface); border-left: 4px solid var(--color-accent-gold); font-family: var(--font-serif); font-size: 1.05rem; }

/* ========== Layout Helpers ========== */
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-5); }

/* Ensure better mobile margins */
@media (max-width: 768px) {
  .wrap {
    padding: 0 var(--space-4);
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 var(--space-3);
  }
}
.content {
  padding-top: 110px; /* matches header height incl. margin/pillbox */
}

body.home .content {
  padding-top: 0;
}
.section { padding: var(--space-7) 0; }
.section-tight { padding: var(--space-5) 0; }
.stack > * + * { margin-top: var(--space-4); }
.flow > * + * { margin-top: var(--space-3); }
.grid { display: grid; gap: var(--space-5); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(18rem,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(14rem,1fr)); }

@media (max-width: 600px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
.flex { display: flex; }
.flex.center { justify-content: center; align-items: center; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }

/* ========== Components ========== */
/* Header: fixed transparent container; inner .wrap provides pillbox glass effect */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0; /* spacing handled by inner wrap */
}

.site-header .wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(var(--space-3) + 4px) var(--space-4) calc(var(--space-3) + 2px);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all .3s ease;
  margin: var(--space-3) auto;
  gap: var(--space-6);
}

/* Scrolled state handled later; ensure debug visibility option */
body.nav-debug .site-header { outline: 2px solid magenta; }

.brand-with-logo { display: flex; align-items: center; justify-content: center; gap: var(--space-3); text-decoration: none; }
.brand-with-logo .site-logo { display: block; height: 64px; width: auto; }
/* If the logo is an SVG (class .logo-svg), keep it clean without background or shadow */
.brand-with-logo .logo-svg { background: transparent; border-radius: 0; box-shadow: none; height: 70px; width: auto; display: block; }
/* Fine tune vertical alignment */
.brand-with-logo { align-items: flex-start; }
.branding { gap: 2px; align-items: center; text-align: center; }
.branding .brand-with-logo { margin: 0 auto; }
.branding .tagline { margin-left: auto; margin-right: auto; }

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-display);
}

.tagline {
  font-size: 0.9rem;
  color: #fff;
  font-style: italic;
  margin-top: 4px;
  line-height: 1.15;
  max-width: 240px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.primary-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

@media (max-width: 860px) {
  .primary-nav { width: 100%; }
  .nav-toggle { display: inline-block; position: relative; z-index: 120; }
  .nav-list { 
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) 0;
    display: none;
  /* Default: dark (at top before scroll) for contrast over hero */
  background: linear-gradient(135deg, rgba(30,34,48,0.9), rgba(40,46,64,0.9));
  transition: background .45s ease, border-color .45s ease, box-shadow .45s ease;
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-lg);
    min-width: 260px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 110;
  }
  .nav-list { opacity:0; transform: scale(.96) translateY(4px); pointer-events:none; }
  .nav-list.open { display:flex; opacity:1; transform: scale(1) translateY(0); pointer-events:auto; transition: opacity .35s ease, transform .35s cubic-bezier(.4,.2,.2,1); }
  .nav-list a { width: 100%; padding: var(--space-3) var(--space-5); text-align: left; border-radius: 0; border-top: 1px solid rgba(255,255,255,0.14); color:#fff; text-shadow:0 2px 4px rgba(0,0,0,.55); font-weight:600; transition: background .25s ease, color .4s ease, border-color .4s ease; }
  .nav-list a { display: flex; align-items: center; }
  .nav-list a span { display: inline-block; }
  /* Center second line when wrapping: use pseudo flex container via text-align + padding tweak */
  /* Keep primary text left; for wrapped second line, approximate centering by reducing left padding slightly */
  .nav-list a { text-align: left; justify-content: flex-start; padding-left: var(--space-4); padding-right: var(--space-4); }
  .nav-list a[href*="services"] { white-space: normal; }
  .nav-list a[href*="services"] { word-break: keep-all; }
    .nav-list a .nav-label-services { display:inline-block; }
  .nav-list li:first-child a { border-top: none; }
  .nav-list a:hover, .nav-list a:focus-visible { background: rgba(255,255,255,0.18); }
  .nav-list a:active { background: rgba(255,255,255,0.28); }
  @media (max-width: 540px) { .nav-list { background: linear-gradient(135deg, rgba(24,28,40,0.94), rgba(34,38,52,0.94)); } }

  /* Light variant after scroll */
  body.scrolled .nav-list {
    background: linear-gradient(135deg, rgba(255,255,255,0.87), rgba(246,246,248,0.84));
    border: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
  }
  body.scrolled .nav-list a {
    color:#222;
    text-shadow:none;
    border-top: 1px solid rgba(0,0,0,0.06);
  }
  body.scrolled .nav-list a:hover, body.scrolled .nav-list a:focus-visible { background: rgba(0,0,0,0.06); }
  body.scrolled .nav-list a:active { background: rgba(0,0,0,0.12); }
  /* Donate now follows standard nav link styling; no special sizing */
  .branding { align-items: center; text-align: center; }
  .branding .brand-with-logo { justify-content: center; }
  .branding .tagline { text-align: center; line-height:1.1; }
  .primary-nav { margin-left: auto; margin-right: auto; }
}

/* Active nav link highlight (desktop & dark state) */
.nav-list a.active { position:relative; font-weight:600; }
.nav-list a.active:after { content:""; position:absolute; left:50%; bottom:-6px; width:28px; height:2px; background: currentColor; transform:translateX(-50%); border-radius:2px; }
body.scrolled .nav-list a.active:after { background: var(--color-accent); }

/* Reduced header padding on very small screens */
@media (max-width: 480px) {
  .site-header .wrap { padding: calc(var(--space-2) + 4px) var(--space-3) calc(var(--space-2) + 2px); gap: var(--space-4); }
  .brand-with-logo .site-logo { height:58px; }
}

/* Prefers-reduced-motion: minimize transitions */
@media (prefers-reduced-motion: reduce) {
  .nav-list, .nav-list.open { transition: none !important; transform:none !important; }
  .site-header .wrap, .nav-list a, .hero-banner .hero-text { transition: none !important; }
}

.nav-list a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: transparent;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

/* Prevent wrap of 'What We Offer' on desktop widths */
@media (min-width: 861px) {
  .nav-list a[href*="services"] { white-space: nowrap; }
}

/* Intermediate width: allow centered wrap of services link if it breaks */
@media (max-width: 860px) and (min-width: 520px) {
  .nav-list a .nav-label-services { white-space: nowrap; }
}
@media (max-width: 519px) {
  .nav-list a .nav-label-services { white-space: normal; text-align:center; line-height:1.15; }
}

/* Elevated solid style after scroll */
/* Scrolled: header wrap gets white background for contrast over content */
.site-header.scrolled .wrap {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.site-header.scrolled .nav-list a {
  color: var(--color-text);
  text-shadow: none;
}
.site-header.scrolled .tagline {
  color: var(--color-text-light);
  text-shadow: none;
}

/* Slight text affordance on hero when at very top */
/* At top: nav links already have blur pills, donate button gets accent styling */
/* z-index already defined in primary header block */

/* Provide contrast fallback if no backdrop filter and scrolled */
.no-bf .site-header.scrolled { background: rgba(255,255,255,0.95); }

/* When transparent, ensure logo stands out */
body:not(.scrolled) .branding .site-logo { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }

/* Tagline scrolled styling now handled in unified wrap container */

/* Backdrop-filter fallback */
.no-bf .site-header { background: rgba(255,255,255,0.92); backdrop-filter: none; -webkit-backdrop-filter: none; }
.no-bf .site-header.scrolled { background: #fff; }

.nav-list a:hover,
.nav-list a:focus {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: translateY(-1px);
}
.site-header.scrolled .nav-list a:hover,
.site-header.scrolled .nav-list a:focus {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}



.callout { background: linear-gradient(135deg,#fafbff,#f2f5fb); border: 1px solid var(--color-border); padding: var(--space-6) var(--space-6); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow-md); transition: box-shadow .25s ease; }

.btn { --btn-bg: var(--color-accent); --btn-color: #fff; display: inline-block; background: var(--btn-bg); color: var(--btn-color); text-decoration: none; padding: var(--space-2) var(--space-4); font-weight: 600; border-radius: var(--radius-sm); font-size: .95rem; letter-spacing: .5px; line-height: 1.3; box-shadow: var(--shadow-sm); border: none; cursor: pointer; }
.btn:hover, .btn:focus { background: var(--color-link-hover); }
.btn.outline { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); }
.btn.outline:hover { background: var(--color-accent); color: #fff; }

.badge { display: inline-block; padding: 2px 8px; background: var(--color-accent-alt); color: #fff; border-radius: var(--radius-sm); font-size: .65rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }

.site-footer { background: #111926; color: #c2cad4; margin-top: var(--space-8); padding: var(--space-7) 0 var(--space-6); font-size: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .social { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; gap: var(--space-4); }

/* ========== Forms ========== */
form { display: grid; gap: var(--space-4); max-width: 42rem; }
label { font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: var(--space-1); }
input[type=text], input[type=email], textarea { width: 100%; padding: var(--space-3) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font: inherit; background: #fff; }
textarea { min-height: 8rem; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--color-accent-alt); outline-offset: 1px; }

/* ========== Utilities ========== */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.muted { color: var(--color-text-light); }

/* ========== Page Specific ========== */
.hero-banner {
  position: relative;
  overflow: hidden;
}

/* Hero with text overlay */
.hero-banner { margin: 0; position: relative; }
.hero-banner .hero-media { display: block; }
.hero-banner .hero-media img { width: 100%; height: auto; display: block; }
.hero-banner .hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: 120px; }
.hero-banner .hero-text { 
  color: #fff; /* liturgical white for hero text */
  text-align: center;
  max-width: 700px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: rgba(255,255,255,0.32); /* more opaque glassmorphic overlay for better contrast */
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  margin-top: 2rem;
}
.hero-banner .hero-title { 
  margin: 0 0 1.2rem; 
  font-family: 'RoxboroughCF', var(--font-display); 
  font-size: clamp(1.9rem, 1.3rem + 2.5vw, 3.2rem); 
  line-height: 1.1; 
  letter-spacing: -0.5px; 
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-weight: 400;
  color: #fff;
}
.hero-banner .hero-quote { 
  margin: 0; 
  font-family: 'Sorts Mill Goudy', var(--font-serif); 
   font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem); 
  line-height: 1.4; 
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-style: italic;
}
.hero-banner .hero-quote cite {
  font-style: normal;
  font-weight: 500;
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9em;
}

/* Show full length of banner image without side cropping */
.hero-banner--limited { max-height: clamp(480px, 65vh, 800px); background: #000; }
.hero-banner--limited .hero-media { height: 100%; display: flex; align-items: center; justify-content: center; }
.hero-banner--limited .hero-media img { max-height: 100%; width: 100%; object-fit: contain; object-position: center; }

@media (min-width: 1600px) {
  .hero-banner--limited { max-height: clamp(520px, 60vh, 900px); }
}

@media (max-width: 768px) {
  .hero-banner--limited { max-height: clamp(360px, 55vh, 600px); }
  .hero-banner .hero-overlay { padding-top: 140px; }
  .hero-banner .hero-text { margin-top: 1rem; max-width: 90%; }
}

/* Optional letterbox variant (not applied yet) */
.hero-banner--letterbox { background: #000; }
.hero-banner--letterbox .hero-media { display: flex; justify-content: center; align-items: center; }
.hero-banner--letterbox .hero-media img { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Provide top padding to first content section when header overlays hero edge cases (mobile collapse) */
@media (max-width: 680px) {
  .hero-banner .hero-text { padding-bottom: 2.5rem; }
}

/* Remove intrinsic variant impact now that we reverted */
.hero-banner--intrinsic .hero-image, .hero-banner--intrinsic .hero-image img { all: unset; }

/* Improved hero: maintains image integrity on ultra-wide while avoiding excessive vertical space */
.hero-image {
  position: relative;
  width: 100%;
  min-height: clamp(280px, 38vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate; /* ensure backdrop blur layering works */
}

.hero-image img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain; /* keep full image visible */
  z-index: 2;
}

/* Create a subtle blurred background using same image to fill side space on ultra-wide screens */
.hero-image:before {
  content: "";
  position: absolute;
  inset: 0;
  background: center/cover no-repeat var(--hero-fallback, #000);
  filter: blur(24px) brightness(.65) saturate(0.9);
  transform: scale(1.15);
  z-index: 1;
}

/* Dynamically set background image via data attribute if present */
.hero-image[data-bg]::before {
  background-image: attr(data-bg url);
}

/* Fallback for browsers without attr(url) support: we will also set inline style in markup if needed */
.hero-image.no-attr-before::before { background-image: var(--hero-img-url); }

@media (min-width: 1400px) {
  .hero-image { min-height: clamp(320px, 42vh, 560px); }
}

@media (max-width: 640px) {
  .hero-image { min-height: 240px; }
  .hero-image img { width: 100%; height: auto; }
}

/* Intrinsic (no-crop) variant: shows full image at natural aspect ratio, removes blur layer */
.hero-banner--intrinsic { overflow: visible; }
.hero-banner--intrinsic .hero-image {
  min-height: unset;
  aspect-ratio: auto;
  overflow: visible;
  display: block;
}
.hero-banner--intrinsic .hero-image:before { display: none; }
.hero-banner--intrinsic .hero-image img {
  width: 100%;
  height: auto;
  object-fit: none;
  object-position: top left;
  max-height: none;
}

.hero-banner--slim .hero-image { max-height: 320px; }
.hero-banner--slim .hero-image img { object-position: center top; }

.blog-index { margin-top: 0; }

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

.site-content .wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 968px) {
  .site-content .wrap {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  
  .sidebar {
    order: -1;
  }
}

.content-main {
  min-width: 0;
}

.page-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border);
}

.page-title {
  font-size: 2.5rem;
  font-family: var(--font-display);
  color: var(--color-accent);
  margin: 0;
}

.post-preview {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.post-preview:last-child {
  border-bottom: none;
}

.entry-header {
  margin-bottom: var(--space-4);
}

.entry-meta {
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.entry-title {
  font-size: 1.75rem;
  margin: 0;
}

 .entry-title a {
  color: var(--color-text);
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--color-accent);
}

.entry-content {
  line-height: 1.6;
  color: var(--color-text-light);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.widget {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.25rem;
  margin: 0 0 var(--space-4);
  color: var(--color-accent);
  font-family: var(--font-display);
}


.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts-list li {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.recent-posts-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-posts-list a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
}

.recent-posts-list a:hover {
  color: var(--color-accent);
}

/* Inline search results (sidebar) */

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

/* Thin container border accent */
.wrap:after { content: ""; display: block; height: 0; }

/* Accessibility helpers */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* About page styles */
.mission-statement {
  background: var(--color-light-gray);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

/* About page director card */
.about-director {
  margin: 2rem 0;
}

.director-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.director-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.director-photo {
  flex-shrink: 0;
}

.director-photo img {
  width: 200px;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

.director-content {
  flex: 1;
}

.director-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: var(--color-primary);
}

.director-role {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--color-secondary);
  font-weight: 600;
}

.director-bio {
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  color: var(--color-text);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
}

.small-link-btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
  text-decoration: none;
  line-height: 1.1;
  transition: background .2s ease, transform .2s ease;
}

.small-link-btn:hover,
.small-link-btn:focus {
  background: var(--color-accent-hover, #7a573a);
  transform: translateY(-2px);
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.modal-link-btn {
  background: var(--color-primary);
  color: #fff;
  padding: 0.55rem 0.9rem;
  font-size: 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.modal-link-btn:hover,
.modal-link-btn:focus {
  background: var(--color-primary-dark, #4a3824);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.about-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.about-singers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.member-card, .singer-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  padding: 1.25rem;
  text-align: center;
  border-top: 4px solid var(--color-accent);
}

.member-card:hover, .singer-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.member-photo, .singer-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid var(--color-light-gray);
}

.member-photo img, .singer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.member-content, .singer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.member-name, .singer-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--color-primary);
}

.member-role, .singer-role {
  font-weight: 500;
  color: var(--color-accent);
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
}

/* Bios: clamp to consistent height so Read More aligns across uneven text lengths */
.member-bio, .singer-bio {
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* show ~4 lines, then fade */
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  min-height: calc(1.5em * 4); /* reserve space so cards stay equal */
}

/* subtle fade overlay to indicate more content */
.member-bio:after, .singer-bio:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.2em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.9));
  pointer-events: none;
}

.read-more-btn {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.read-more-btn:hover {
  background: var(--color-link-hover);
  transform: translateY(-1px);
}

/* Bio Modal Styles */
.bio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bio-modal.active {
  opacity: 1;
  visibility: visible;
}

.bio-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bio-modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  max-width: 90vw;
  max-height: 90vh;
  width: 600px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8) translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.bio-modal.active .bio-modal-content {
  transform: scale(1) translateY(0);
}

.bio-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bio-modal-close:hover {
  background: white;
  transform: scale(1.1);
}

.bio-modal-header {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface));
}

.bio-modal-photo {
  flex-shrink: 0;
}

.bio-modal-photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bio-modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bio-modal-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: var(--color-text);
  font-family: var(--font-display);
}

.modal-role {
  font-size: 1.1rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0;
}

.bio-modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-bio {
  line-height: 1.6;
  font-size: 1rem;
  color: var(--color-text-light);
}

.modal-bio p {
  margin: 0 0 1rem 0;
}

.modal-website {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.modal-website .external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.modal-website .external-link:hover {
  background: var(--color-accent);
  color: white;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bio-modal-content {
    width: 95vw;
    max-height: 95vh;
    margin: 2.5vh auto;
  }
  
  .bio-modal-close {
    font-size: 2rem;
    width: 44px;
    height: 44px;
    line-height: 1;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    color: white;
    z-index: 1001;
  }
  
  .bio-modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .bio-modal-photo img {
    width: 100px;
    height: 100px;
  }
  
  .bio-modal-info h2 {
    font-size: 1.5rem;
  }
  
  .bio-modal-body {
    padding: 1.5rem;
  }
}

.singer-website {
  margin: 0.5rem 0 0 0;
  text-align: center;
}

.singer-website .external-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}

.singer-website .external-link:hover {
  text-decoration: underline;
}

.singer-website .external-link::after {
  content: ' ↗';
  font-size: 0.8em;
  opacity: 0.7;
}

/* ========== Blog Index Modern Layout ========== */
.blog-index .blog-hero {
  background: var(--color-accent-soft);
  padding: var(--space-5) var(--space-5) var(--space-4);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin-bottom: var(--space-5);
}

.blog-index .hero-lead { max-width: 60ch; }

.posts-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  margin-bottom: var(--space-5);
}

.post-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease;
  overflow: hidden;
}
.post-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(123,62,240,0.06), rgba(123,62,240,0));
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.post-card:hover {
  border-color: var(--color-accent-alt);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.post-card:hover:before { opacity: 1; }

.post-card-body { padding: var(--space-5); display: flex; flex-direction: column; height: 100%; }

.post-meta { margin-bottom: var(--space-3); }

.date-badge {
  display: inline-block;
  background: linear-gradient(135deg,var(--color-accent-gold), var(--color-accent-alt));
  color: #fff;
  padding: 0.35rem 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.post-title { font-size: 1.05rem; line-height: 1.3; margin: 0 0 var(--space-3); }
.post-title a { text-decoration: none; color: var(--color-text); }
.post-title a:hover { color: #fff; }

.post-excerpt { font-size: 0.9rem; color: var(--color-text-light); line-height: 1.55; margin: 0 0 var(--space-4); }

.post-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.post-footer .author { color: var(--color-text-light); }
.read-more { text-decoration: none; font-weight: 600; font-size: 0.85rem; color: var(--color-accent); }
.read-more:hover { color: var(--color-link-hover); }

/* Tag chips */
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-3) 0 0; }
.tag-chip { --h: var(--color-accent-alt); display: inline-block; padding: 2px 10px; font-size: .6rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; background: var(--color-accent-soft); color: var(--color-text); border-radius: 999px; text-decoration: none; border: 1px solid var(--color-border-soft); transition: all .25s ease; }
.tag-chip:hover { background: #fff; color: var(--color-accent); border-color: #fff; }

/* Featured image block */
.post-card figure.post-thumb { margin: 0; position: relative; aspect-ratio: 16/9; overflow: hidden; background: #ddd; }
.post-card figure.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.post-card:hover figure.post-thumb img { transform: scale(1.035); }
.post-card .post-card-body { padding-top: var(--space-4); }

/* Pagination (Pager) */
.pager { margin-top: var(--space-2); }
.pager-list { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--space-4); justify-content: center; align-items: center; flex-wrap: wrap; }
.pager-btn { display: inline-block; padding: 0.55rem 1.1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); text-decoration: none; font-size: 0.85rem; font-weight: 500; background: #fff; color: var(--color-text); transition: all .2s ease; }
.pager-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pager-btn.disabled { opacity: 0.4; pointer-events: none; }
.page-indicator { color: var(--color-text-light); }

/* Responsive tweaks */
@media (max-width: 768px) {
  .director-card {
    flex-direction: column;
    text-align: center;
  }
  
  .director-photo img {
    width: 150px;
    height: 200px;
  }
}

@media (max-width: 720px) {
  .blog-index .blog-hero { padding: var(--space-5) var(--space-4); }
  .post-card-body { padding: var(--space-4); }
  .posts-grid { gap: var(--space-4); }
}



/* Responsive design for member/singer cards */
/* Post detail styles */
.post-header { margin-bottom: var(--space-6); }
.post-header .post-title { font-size: 2.25rem; line-height: 1.15; margin: 0 0 var(--space-3); font-family: var(--font-display); }
.post-meta-line { margin: 0; font-size: .8rem; letter-spacing: .5px; text-transform: uppercase; display: flex; flex-wrap: wrap; gap: .5ch; align-items: center; color: var(--color-text-light); }
.post-meta-line .meta-item { display: inline-flex; align-items: center; }
.post-meta-line .meta-separator { opacity: .55; }
.tags-inline .tag-inline { text-decoration: none; background: var(--color-accent-soft); color: var(--color-text); padding: 2px 6px; border-radius: 4px; margin-right: 4px; font-size: .6rem; font-weight: 600; letter-spacing: .5px; transition: background .25s ease, color .25s ease; }
.tags-inline .tag-inline:hover { background: var(--color-accent-gold); color: #fff; }
.post-content { line-height: 1.7; font-size: 1.05rem; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.post-content h2, .post-content h3, .post-content h4 { scroll-margin-top: 6rem; }

/* Focus states and accessibility */
a:focus, button:focus, input:focus, textarea:focus, .tag-chip:focus { outline: 2px solid var(--color-accent-gold); outline-offset: 2px; }
.sr-only { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-150%);
  background: var(--color-accent);
  color: #fff;
  padding: 10px 14px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.skip-link:focus, .skip-link:active {
  transform: translateY(0);
  outline: 3px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* Image fallback handling */
img[src*="corpus-christi"] { transition: opacity .3s ease; }
img.fallback-placeholder { background: var(--color-surface); border: 1px dashed var(--color-border); display: flex; align-items: center; justify-content: center; color: var(--color-text-light); font-size: .8rem; }


@media (max-width: 768px) {
  .about-members {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
  }
  
  .about-singers {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
  }
  
  .mission-statement {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .about-members, .about-singers {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .member-card, .singer-card {
    padding: var(--space-4);
  }
  
  .mission-statement {
    padding: var(--space-4);
    margin: var(--space-4) 0;
  }
  
  /* Improve touch targets on mobile */
  .btn, .read-more-btn {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
  }
  
  /* Better modal overlay on small screens */
  .bio-modal-overlay {
    padding: var(--space-2);
  }
  
  .bio-modal-content {
    width: calc(100vw - var(--space-4));
    max-height: calc(100vh - var(--space-4));
    margin: var(--space-2) auto;
  }
}

/* Print adjustments */
@media print {
  .nav-toggle, .primary-nav, .hero .actions { display: none !important; }
  body { font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}
