/*
 * CSS SUITE MAP
 * base.css    Foundation, navigation, and homepage sections
 * events.css  Picnic and Serb Fest sections
 * content.css News, articles, accordions, history, and faith
 * layout.css  Footer, shared page chrome, responsive rules, and motion
 * clergy.css  Clergy page
 *
 * The files are loaded in this order to preserve the original cascade.
 */
:root {
  --navy: #0f1a2e;
  --navy-deep: #0a1220;
  --burgundy: #6b1c2a;
  --gold: #c9a84c;
  --gold-light: #e2c76e;
  --gold-deep: #9a7628;
  --cream: #faf6ee;
  --cream-warm: #f5efe3;
  --stone: #e8e0d0;
  --text-dark: #1a1a1a;
  --text-body: #3d3832;
  --text-muted: #6b6358;
  --white: #ffffff;
  --shadow-soft: 0 4px 24px rgba(15,26,46,0.08);
  --shadow-medium: 0 8px 40px rgba(15,26,46,0.12);
  --nav-height: 64px;
  --focus-ring-dark: 2px solid var(--gold-light);
  --focus-ring-light: 2px solid var(--burgundy);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height, 64px) + 48px); scrollbar-gutter: stable; }
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  background: var(--cream);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 1100;
  display: inline-flex; align-items: center;
  min-height: 44px;
  background: var(--navy-deep);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--gold);
  border-radius: 0 0 4px 4px;
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: var(--focus-ring-dark);
  outline-offset: 2px;
}
/* Screen-reader-only utility (used by latest-news.php Read more link) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main,
section[id],
.info-card[id] {
  scroll-margin-top: calc(var(--nav-height, 64px) + 32px);
}
/* Programmatic focus only (skip-link target via tabindex="-1"); inner content keeps its own :focus-visible rings. */
main:focus { outline: none; }

/* ========== NAVIGATION ========== */
#mainNav {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#mainNav.scrolled {
  background: rgba(10,18,32,0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-inner {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding-left: max(2rem, env(safe-area-inset-left));
  padding-right: max(2rem, env(safe-area-inset-right));
  height: var(--nav-height);
}
.nav-inner > * { min-width: 0; }
.nav-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; white-space: nowrap; justify-self: start; }
.nav-cross { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
.nav-brand-text {
  font-family: 'Cinzel', serif; font-size: 1.1rem; font-weight: 500;
  color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-links { display: flex; list-style: none; gap: 0; flex-wrap: nowrap; min-width: 0; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--gold);
  font-family: 'Cinzel', serif; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  padding: 22px 8px; display: block; transition: color 0.3s ease; position: relative; line-height: 1;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 16px; left: 10px; right: 10px;
  height: 1px; background: var(--gold-light); transform: scaleX(0); transition: transform 0.3s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--gold-light); outline: none; }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

/* Hamburger button */
.nav-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; position: relative; padding: 0;
  align-items: center; justify-content: center;
}
.nav-hamburger span {
  display: block; position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--gold); border-radius: 1px;
  transition: top 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger span:nth-child(1) { top: 12px; }
.nav-hamburger span:nth-child(2) { top: 21px; }
.nav-hamburger span:nth-child(3) { top: 30px; }
.nav-hamburger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ========== LANGUAGE TOGGLE ========== */
.lang-toggle {
  justify-self: end;
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  border: 1px solid rgba(201,168,76,0.28);
  overflow: hidden; z-index: 10;
}
.lang-opt {
  background: none; border: none; cursor: pointer;
  font-family: 'Cinzel', serif; font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  padding: 0 11px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease; line-height: 1;
}
.lang-opt.active {
  background: var(--gold); color: var(--navy-deep);
}
.lang-opt:hover:not(.active) { color: rgba(255,255,255,0.9); }

/* ========== HERO (Iconostasis triptych) ========== */
.hero {
  position: relative; overflow: hidden;
  background: var(--cream);
  padding: calc(var(--nav-height) + 3rem) 2rem 3.5rem;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(201,168,76,0.10), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(15,26,46,0.025) 39px 40px);
}
.hero-trip {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.2fr 1fr;
  gap: 2.5rem; align-items: center;
  max-width: 1280px; margin: 0 auto;
  animation: heroFadeIn 1.4s ease forwards;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-panel { margin: 0; text-align: center; }
.hero-panel--side { padding-top: 2rem; }
.hero-panel--center { padding: 0 1rem; }
.hero-arch {
  width: 100%; aspect-ratio: 3/4; overflow: hidden;
  background: var(--navy);
  box-shadow: 0 18px 60px rgba(15,26,46,0.18), inset 0 0 0 1px rgba(201,168,76,0.4);
  position: relative;
  border-radius: 100% 100% 6px 6px / 38% 38% 6px 6px;
}
.hero-arch::before {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 100% 100% 4px 4px / 38% 38% 4px 4px;
  pointer-events: none; z-index: 2;
}
.hero-arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-panel figcaption {
  font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 1rem;
}
.hero-cross {
  width: 112px; height: 112px; margin: 0 auto 1.4rem; display: block;
  background-color: var(--navy);
  -webkit-mask: url("/assets/images/orthodox-cross-transparent.png") center / contain no-repeat;
          mask: url("/assets/images/orthodox-cross-transparent.png") center / contain no-repeat;
  filter: drop-shadow(0 3px 12px rgba(15,26,46,0.22));
}
.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 700;
  color: var(--navy); letter-spacing: 0.04em; line-height: 1;
  margin: 0 0 0.6rem;
}
.hero-title-sub {
  display: block; font-family: 'Cinzel', serif;
  font-size: 1rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--burgundy); font-weight: 500; margin-top: 1rem;
}
.hero-divider { width: 60px; height: 1px; background: var(--gold); margin: 1.6rem auto 1.4rem; }
.hero-address {
  font-family: 'Cinzel', serif; font-size: 0.78rem;
  letter-spacing: 0.14em; color: var(--text-body); font-weight: 500;
  margin: 0 0 2rem;
}
.hero-cta {
  display: inline-block; font-family: 'Cinzel', serif;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 1rem 2rem; min-height: 44px;
  color: var(--cream); background: var(--burgundy); border: 1px solid var(--burgundy);
  text-decoration: none; cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.hero-cta:hover,
.hero-cta:focus-visible {
  background: var(--navy); border-color: var(--navy); color: var(--cream); outline: none;
}

/* ========== SECTION DEFAULTS ========== */
section { padding: 6rem 2rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-family: 'Cinzel', serif; font-size: 1rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--burgundy); text-align: center; margin-bottom: 1rem; font-weight: 600;
}
.page-hero--dark .section-label { color: var(--gold); }
.section-title {
  font-family: 'Cinzel', serif; font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600;
  color: var(--navy); text-align: center; margin-top: 0; margin-bottom: 1rem; line-height: 1.2;
}
.section-line { width: 60px; height: 2px; background: var(--gold); margin: 0 auto 3rem; }
.section-line--burgundy { background: var(--burgundy); }
/* Replaces inline style="padding: 5rem 2rem" on news list and clergy sections; inherits section padding from responsive rules */
.news-list-section { background: var(--cream); }

/* ========== ABOUT ========== */
.about { background: var(--cream-warm); position: relative; padding: 3.5rem 2rem 5rem; }
.about--iconostasis { text-align: center; }
.about-grb { display: block; width: 72px; height: auto; margin: 0 auto 1.2rem; opacity: 0.6; }
/* Decorative seraphim flanking the heritage emblem (transparent PNG, see assets/images/seraph-trans.png) */
.about-seraph { position: absolute; top: 3.25rem; height: 150px; width: auto; opacity: 0.5; pointer-events: none; z-index: 0; }
.about-seraph--left  { left: 19%; }
.about-seraph--right { right: 19%; transform: scaleX(-1); }
.about-text-full { max-width: 820px; margin: 0 auto; }
.about-text-full h3 {
  font-family: 'Cinzel', serif; font-size: 1.6rem; font-weight: 600;
  color: var(--navy); margin-bottom: 1.5rem; line-height: 1.3; text-align: center;
}
.about-text-full p { font-size: 1.1rem; color: var(--text-body); margin-bottom: 1.2rem; line-height: 1.75; font-weight: 500; }
.about-text-full .about-lead {
  font-size: 1.35rem; font-style: italic; line-height: 1.7;
  color: var(--burgundy); font-weight: 500;
}
/* about-section body links (about.php) */
.about-text-full a { color: var(--burgundy); border-bottom: 1px solid rgba(107,28,42,0.3); text-decoration: none; transition: border-color 0.3s ease; }
.about-text-full a:hover, .about-text-full a:focus-visible { border-color: var(--burgundy); outline: none; }
/* ========== SERVICES ALTAR ========== */
.services-altar {
  position: relative; padding: 4.5rem 2rem 5rem;
  background: var(--navy); color: var(--white); overflow: hidden;
}
.services-altar::before,
.services-altar::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 280px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.services-altar::before { top: 0; }
.services-altar::after { bottom: 0; }
.services-altar-inner { max-width: 1100px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.section-label--altar { color: var(--gold); font-weight: 700; }
.section-title--altar { color: var(--white); }
.section-line--altar { background: var(--gold); width: 60px; height: 2px; margin: 0 auto 2.5rem; }
.services-grid {
  display: flex; align-items: stretch; justify-content: center; gap: 0;
}
.services-door {
  flex: 0 0 260px; background: var(--cream); border: 2px solid var(--gold);
  border-radius: 130px 130px 10px 10px; padding: 3.4rem 1.8rem 2.2rem;
  text-align: center; position: relative;
  display: flex; flex-direction: column; justify-content: center;
}
.services-door-keystone {
  position: absolute; top: -13px; left: 50%; margin-left: -13px;
  width: 26px; height: 26px; background: var(--burgundy); border: 2px solid var(--gold);
  transform: rotate(45deg);
}
.services-door-day {
  font-family: 'Cinzel', serif; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--burgundy); margin-bottom: 0.8rem;
}
.services-door-time {
  font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700;
  color: var(--navy); letter-spacing: 0.02em; line-height: 1;
  margin-bottom: 0.5rem;
}
.services-door-name {
  font-family: 'Cinzel', serif; font-size: 1.05rem;
  letter-spacing: 0.06em; color: var(--navy); margin-bottom: 0.6rem;
}
.services-door-note { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1rem; color: var(--text-muted); }
.services-door-divider {
  flex: 0 0 auto; width: 70px; display: flex; align-items: center; justify-content: center;
}
.services-door-divider span {
  width: 14px; height: 14px; border: 1px solid var(--gold); transform: rotate(45deg); display: block;
}
.services-coda {
  font-style: italic; font-size: 1.2rem; line-height: 1.6;
  color: rgba(255,255,255,0.8); max-width: 640px;
  margin: 2.5rem auto 1.4rem;
}
.services-link {
  display: inline-block; font-family: 'Cinzel', serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding-bottom: 0.3em;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.services-link:hover,
.services-link:focus-visible { color: var(--gold-light); border-color: var(--gold-light); outline: none; }

/* ========== DONATE ALTAR (homepage general donation CTA) ========== */
.donate-altar {
  position: relative; padding: 2.75rem 2rem 3rem;
  background: var(--navy); color: var(--white); overflow: hidden;
}
.donate-altar .section-line--altar { margin-bottom: 1.5rem; }
.donate-altar::before,
.donate-altar::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 280px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.donate-altar::before { top: 0; }
.donate-altar::after { bottom: 0; }
.donate-altar-inner { max-width: 640px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.donate-altar-coda {
  font-style: normal; font-size: 1.2rem; line-height: 1.6;
  color: rgba(255,255,255,0.8); margin: 0 auto 1.75rem;
}


/* ========== INFO CARDS ========== */
.info-section { background: var(--cream); padding: 4.5rem 2rem 5rem; }
.info-section .section-inner { max-width: 1100px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: start; }
.info-card { background: var(--white); border-radius: 0; padding: 2.5rem 2rem; box-shadow: 0 4px 24px rgba(15,26,46,0.06); border-top: 3px solid var(--gold); transition: box-shadow 0.3s ease, transform 0.3s ease; }
@media (hover: hover) {
  .info-card:hover { box-shadow: 0 12px 32px rgba(15,26,46,0.12); transform: translateY(-2px); }
}
.info-card:active { box-shadow: var(--shadow-medium); }
.info-card:focus-visible { outline: var(--focus-ring-light); outline-offset: 2px; }
.info-card h3 { font-family: 'Cinzel', serif; font-size: 1.05rem; font-weight: 600; color: var(--navy); margin-bottom: 1rem; letter-spacing: 0.04em; }
.info-card p { font-size: 1.1rem; color: var(--text-body); line-height: 1.75; font-weight: 500; }
.info-card a { color: var(--burgundy); text-decoration: none; border-bottom: 1px solid rgba(107,28,42,0.3); transition: border-color 0.3s; }
.info-card a:hover,
.info-card a:focus-visible { border-color: var(--burgundy); outline: none; }
/* contact card (info.php) — scoped with .info-card so they beat `.info-card p` */
.info-card-divider { width: 100%; height: 1px; background: var(--stone); margin: 1.2rem 0; }
.info-card .info-contact-name { font-family: 'Cinzel', serif; font-size: 0.8rem; font-weight: 600; color: var(--navy); letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.info-card .info-contact-name-link { color: var(--navy); text-decoration: none; border-bottom: none; }
.info-card .info-contact-name-link:hover, .info-card .info-contact-name-link:focus-visible { color: var(--burgundy); }
.info-card .info-contact-role { font-size: 0.9rem; color: var(--text-muted); font-style: italic; font-weight: 600; margin-bottom: 0.9rem; }
.info-card .info-contact-text { font-size: 0.9rem; color: var(--text-body); font-weight: 500; line-height: 1.65; margin-bottom: 0.9rem; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  font-family: 'Cinzel', serif; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 0.75rem 1.25rem;
  min-height: 44px; border-radius: 2px; text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  background: transparent; cursor: pointer;
}
.contact-btn:hover { border-bottom: 1px solid currentColor; }
.contact-btn--email { color: var(--burgundy); border: 1px solid rgba(107,28,42,0.35); }
.contact-btn--email:hover,
.contact-btn--email:focus-visible { background: rgba(107,28,42,0.08); border-color: var(--burgundy); color: var(--burgundy); outline: none; }
.contact-btn--directions { color: var(--navy); border: 1px solid rgba(15,26,46,0.35); }
.contact-btn--directions:hover,
.contact-btn--directions:focus-visible { background: rgba(15,26,46,0.06); border-color: var(--navy); color: var(--navy); outline: none; }
