/* =============================================
   COMMISSIONED CITY CHURCH — SHARED STYLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Source+Sans+Pro:wght@400;600&family=Cormorant+Garamond:ital,wght@1,400&display=swap');

/* ---------- DESIGN TOKENS ---------- */
:root {
  --navy:       #112E53;
  --red:        #D5393B;
  --white:      #FFFFFF;
  --gray-bg:    #F4F5F7;
  --charcoal:   #30343B;
  --muted-blue: #5C718E;

  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  80px;
  --space-xxl: 120px;

  --max-content: 1280px;
  --max-text:    760px;

  --radius-card: 14px;
  --shadow-card: 0 4px 20px rgba(0,0,0,.08);
  --transition:  0.2s ease;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- BASE TYPOGRAPHY ---------- */
body {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  color: var(--navy);
  line-height: 1.15;
}
h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
h4 { font-size: 24px; font-weight: 600; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: var(--space-sm);
}

.scripture, blockquote, .pull-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
}

small, .small { font-size: 14px; color: var(--muted-blue); }

/* ---------- LAYOUT ---------- */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-block {
  max-width: var(--max-text);
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

.section { padding: var(--space-xxl) var(--space-lg); }
.section-sm { padding: var(--space-xl) var(--space-lg); }

.section--navy   { background: var(--navy); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 { color: var(--white); }
.section--navy .eyebrow { color: var(--red); }

.section--gray   { background: var(--gray-bg); }
.section--charcoal { background: var(--charcoal); color: var(--white); }
.section--charcoal h1, .section--charcoal h2, .section--charcoal h3 { color: var(--white); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 16px 32px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: #0c2040;
  border-color: #0c2040;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17,46,83,.25);
}
.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-red:hover {
  background: #b82f31;
  border-color: #b82f31;
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-group { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

/* ---------- CARDS ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.card-body { padding: var(--space-md) var(--space-lg); }

/* ---------- NAVIGATION ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,.08);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.1); }

.nav-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 120px;
  gap: var(--space-md);
}

.nav-logo img {
  height: 100px;
  width: auto;
  display: block;
}
.nav-logo-placeholder {
  height: 100px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-placeholder .logo-mark {
  width: 44px;
  height: 44px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-placeholder .logo-mark svg { width: 24px; height: 24px; }
.nav-logo-placeholder .logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav-links a {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 18px;
  font-weight: 550;
  color: var(--charcoal);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover { color: var(--navy); border-bottom-color: var(--red); }
.nav-links a.active { color: var(--navy); border-bottom-color: var(--red); }

.nav-cta { margin-left: var(--space-sm); }

/* ── NAV DROPDOWN ───────────────────────────────────────────────── */
.nav-has-dropdown { position: relative; }

/* Caret — rotates up on hover */
.nav-has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -2px;
  transition: transform var(--transition), top var(--transition);
}
.nav-has-dropdown:hover > a::after,
.nav-has-dropdown:focus-within > a::after {
  transform: rotate(-135deg);
  top: 1px;
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(17,46,83,0.14), 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  min-width: 196px;
  padding: 6px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
  pointer-events: none;
}
/* Invisible bridge so hovering into the panel doesn't close it */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown li { list-style: none; }

.nav-dropdown a {
  display: block;
  padding: 9px 18px !important;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  border-bottom: none !important;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown li + li { border-top: 1px solid rgba(0,0,0,0.05); }
.nav-dropdown a:hover { background: var(--gray-bg); color: var(--navy); }
.nav-dropdown a.active { background: var(--gray-bg); color: var(--navy); }

/* ── MOBILE NAV GROUPS ──────────────────────────────────────────── */
.nav-mobile-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.nav-mobile-sub {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.nav-mobile-group.open .nav-mobile-sub {
  display: flex;
}

/* Group header: parent link + chevron toggle side by side */
.nav-mobile-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-mobile-toggle {
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  padding: 4px 2px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, color var(--transition);
}
.nav-mobile-toggle:hover { color: var(--red); }
.nav-mobile-group.open .nav-mobile-toggle { transform: rotate(180deg); }
.nav-mobile-sub a {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--muted-blue) !important;
  border-bottom: 2px solid transparent;
}
.nav-mobile-sub a:hover { color: var(--red) !important; }
.nav-mobile-sub a.active {
  color: var(--navy) !important;
  border-bottom-color: var(--red);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 101;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-md);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 80px 24px 56px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--navy);
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.nav-mobile a:hover { color: var(--red); }
.nav-mobile a.active { border-bottom-color: var(--red); }
.nav-mobile-close {
  position: fixed;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--navy);
  z-index: 102;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-xl) var(--space-lg) var(--space-md);
}
.footer-grid {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-logo img { height: 56px; filter: brightness(0) invert(1); margin-bottom: var(--space-md); }
.footer-logo-placeholder .logo-mark { background: rgba(255,255,255,.12); margin-bottom: var(--space-md); }
.footer-tagline {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}
.footer-social { display: flex; gap: var(--space-sm); }
.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--red); }
.footer-social svg { width: 18px; height: 18px; fill: white; }

.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: white; }
.footer-contact p { font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.8; }
.footer-contact a { color: rgba(255,255,255,.7); transition: color var(--transition); }
.footer-contact a:hover { color: white; }

.footer-bottom {
  max-width: var(--max-content);
  margin: 0 auto;
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---------- PAGE HEROES ---------- */
.page-hero {
  padding: var(--space-xxl) var(--space-lg);
  text-align: center;
}
.page-hero--navy { background: var(--navy); }
.page-hero--navy h1, .page-hero--navy .page-hero-sub { color: var(--white); }
.page-hero--charcoal { background: var(--charcoal); }
.page-hero--charcoal h1, .page-hero--charcoal .page-hero-sub { color: var(--white); }
.page-hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,.75);
  margin-top: var(--space-sm);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- FULL-VIEWPORT HERO ---------- */
.hero-full {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--charcoal) 100%);
}
.hero-full-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}
.hero-full-content h1 { color: var(--white); margin-bottom: var(--space-md); }
.hero-full-content .hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 26px;
  color: rgba(255,255,255,.88);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}
.hero-scroll svg { width: 28px; height: 28px; stroke: white; opacity: .7; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---------- SECTION HEADING STYLE ---------- */
.section-heading { margin-bottom: var(--space-lg); }
.section-heading h2 { margin-bottom: var(--space-sm); }
.section-heading p { font-size: 18px; color: var(--muted-blue); }
.section--navy .section-heading p { color: rgba(255,255,255,.7); }

/* ---------- DOCTRINE ITEMS ---------- */
.doctrine-item {
  border-left: 4px solid var(--red);
  padding-left: 20px;
  margin-bottom: var(--space-xl);
}
.doctrine-item h3 { margin-bottom: var(--space-sm); }
.doctrine-item p { color: var(--charcoal); }

/* ---------- ANIMATIONS ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.30s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.60s; }

/* ---------- GRIDS ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* ---------- MISSION CARDS ---------- */
.mission-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}
.mission-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.mission-icon {
  width: 56px; height: 56px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-md);
}
.mission-icon svg { width: 26px; height: 26px; stroke: white; fill: none; }

/* ---------- COMMUNITY CARDS ---------- */
.community-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: transform var(--transition);
}
.community-card:hover { transform: translateY(-4px); }
.community-card-bg {
  position: absolute;
  inset: 0;
}
.community-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,46,83,.9) 0%, rgba(17,46,83,.3) 70%, rgba(0,0,0,0) 100%);
}
.community-card-content {
  position: relative;
  z-index: 3;
  padding: var(--space-lg);
  color: white;
}
.community-card-content h3 { color: white; margin-bottom: 8px; }
.community-card-content p  { font-size: 15px; color: rgba(255,255,255,.8); margin-bottom: var(--space-md); }
.community-card-content .btn-outline-white { font-size: 14px; padding: 10px 24px; }

/* ---------- SERMON CARD ---------- */
.sermon-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.sermon-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.sermon-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--muted-blue) 100%);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  display: flex;
  align-items: flex-start;
  padding: var(--space-sm);
}
.sermon-series-badge {
  background: var(--navy);
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.sermon-body { padding: var(--space-md); }
.sermon-reference { margin-bottom: 4px; }
.sermon-title { font-size: 20px; margin-bottom: var(--space-xs); }
.sermon-meta { font-size: 14px; color: var(--muted-blue); margin-bottom: var(--space-sm); }
.sermon-listen { font-size: 14px; font-weight: 600; color: var(--navy); }
.sermon-listen:hover { color: var(--red); }

/* ---------- TEAM CARDS ---------- */
.team-card {
  background: var(--navy);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.team-avatar {
  width: 100%; height: 320px;
  background: var(--navy);
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  margin: 0;
  position: relative;
  overflow: hidden;
}
.team-avatar span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: rgba(255,255,255,0.4);
}
.team-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.82));
  padding: 48px var(--space-md) var(--space-md);
  text-align: left;
}
.team-overlay h4 { font-size: 18px; color: white; margin-bottom: 2px; }
.team-overlay .team-role { font-size: 13px; color: rgba(255,255,255,0.72); font-weight: 600; display: block; margin-bottom: 4px; }
.team-overlay .team-email { font-size: 12px; color: rgba(255,190,190,0.9); word-break: break-all; }
.team-overlay .team-email:hover { color: white; text-decoration: underline; }

/* ---------- PARTNER CARDS ---------- */
.partner-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  text-align: center;
  border: 1px solid rgba(0,0,0,.06);
  transition: transform var(--transition);
}
.partner-card:hover { transform: translateY(-4px); }
.partner-card h4 { font-size: 16px; margin-bottom: 6px; }
.partner-card .partner-sub { font-size: 13px; font-style: italic; color: var(--muted-blue); margin-bottom: var(--space-sm); }
.partner-card a { font-size: 13px; color: var(--red); font-weight: 600; }
.partner-card a:hover { text-decoration: underline; }

/* ---------- PULL QUOTE ---------- */
.pull-quote {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.4;
  text-align: center;
  color: var(--navy);
  max-width: 760px;
  margin: 0 auto;
}
.section--navy .pull-quote { color: var(--white); }
.section--gray .pull-quote { color: var(--navy); }
.quote-attr { text-align: center; font-size: 16px; color: var(--muted-blue); margin-top: var(--space-sm); }
.section--navy .quote-attr { color: rgba(255,255,255,.65); }

/* ---------- INFO CARDS ---------- */
.info-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  text-align: center;
}
.info-card .info-icon { font-size: 36px; margin-bottom: var(--space-sm); }
.info-card h4 { margin-bottom: 8px; }
.info-card p { font-size: 16px; color: var(--muted-blue); }

/* ---------- WHAT TO EXPECT LIST ---------- */
.expect-list { display: flex; flex-direction: column; gap: var(--space-md); }
.expect-item { display: flex; gap: var(--space-md); align-items: flex-start; }
.expect-icon {
  width: 48px; height: 48px; min-width: 48px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.expect-icon svg { width: 22px; height: 22px; stroke: white; fill: none; }
.expect-text h4 { font-size: 20px; margin-bottom: 4px; }
.expect-text p { font-size: 16px; color: var(--muted-blue); }

/* ---------- CONTACT FORM ---------- */
.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 16px;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition);
  margin-bottom: var(--space-md);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ---------- MAP EMBED ---------- */
.map-wrapper {
  width: 100%;
  height: 400px;
  overflow: hidden;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- SPLIT SECTION ---------- */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.split-pane {
  padding: var(--space-xxl) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-pane--navy { background: var(--navy); }
.split-pane--navy h2, .split-pane--navy h3, .split-pane--navy p { color: var(--white); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* =============================================
   MEDIA ARCHITECTURE SYSTEM
   ============================================= */

/* ── MEDIA CONTAINER BASE ─────────────────────────────────────── */
.media-container {
  position: relative;
  overflow: hidden;
}

/* All direct children of media-container stack above the bg layers and overlay */
.media-container > *:not(.media-bg):not(.media-overlay):not(.team-overlay):not(.slideshow-dots) {
  position: relative;
  z-index: 3;
}

/* Team avatar: hide initials once a real photo loads */
.team-avatar.media-container > span {
  display: none;
}

/* ── BACKGROUND LAYER (image + slideshow + video) ─────────────── */
.media-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* ── SLIDESHOW ────────────────────────────────────────────────── */
.media-slideshow { /* wrapper — position:absolute inset:0 from .media-bg */ }

.slide-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition-property: opacity;
  transition-timing-function: ease-in-out;
  /* transition-duration set inline by JS */
}
.slide-layer.is-active { opacity: 1; }

.slideshow-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.slideshow-dot.is-active { background: white; border-color: white; }

/* ── VIDEO BACKGROUND ─────────────────────────────────────────── */
.media-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  object-position: center center;
}

/* ── OVERLAY ──────────────────────────────────────────────────── */
.media-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;   /* above iframe (0) and yt-poster (1) */
  pointer-events: none;
}

/* ── RESPONSIVE: hide video on small screens (poster remains) ─── */
@media (max-width: 480px) {
  .media-video { display: none; }
}

/* ── YOUTUBE HERO PLAYER ─────────────────────────────────────────── */

.yt-iframe-container {
  /* position: absolute; inset: 0 inherited from .media-bg */
  overflow: hidden;      /* crops out YT controls + letterboxing */
  pointer-events: none;  /* hero content stays clickable */
}

.yt-iframe-container iframe {
  /* Oversized so YouTube UI chrome at all edges is clipped */
  position: absolute;
  top:    50%;
  left:   50%;
  width:  calc(100% + 160px);   /* +80px each side */
  height: calc(100% + 160px);   /* +80px top and bottom */
  transform: translate(-50%, -50%);
  border: none;
  pointer-events: none;
  background: transparent;
}

/* Poster sits above iframe during load, fades out on play */
.yt-poster {
  z-index: 1;   /* above iframe (z:0), below overlay (z:2) */
  transition: opacity 1.2s ease;
}

/* Black background hides letterbox bars on tall viewports */
.yt-iframe-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  z-index: -1;
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

@media (max-width: 768px) {
  :root {
    --space-xl:  56px;
    --space-xxl: 80px;
  }
  .container { padding: 0 var(--space-md); }
  .section, .section-sm { padding: var(--space-xl) var(--space-md); }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .grid-3  { grid-template-columns: 1fr; }
  .grid-4  { grid-template-columns: 1fr; }
  .grid-2  { grid-template-columns: 1fr; }
  .split-section { grid-template-columns: 1fr; }
  .split-pane { padding: var(--space-xl) var(--space-md); }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-bottom { flex-direction: column; text-align: center; }

  .hero-full-content .hero-sub { font-size: 20px; }
  .btn-group { flex-direction: column; align-items: flex-start; }
  .btn-group.centered { align-items: center; }

  .community-card { min-height: 320px; }
  .sermon-grid { grid-template-columns: 1fr; }
}

/* ── SERMON RSS FEED ─────────────────────────────────────────────── */

/* Live grid layout */
.sermon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

/* Loading spinner */
.sermon-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  color: var(--muted-blue);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.sermon-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-bg);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error fallback */
.sermon-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  color: var(--muted-blue);
  text-align: center;
  margin-top: var(--space-lg);
}

/* Gradient fallback when no episode artwork exists */
.sermon-thumb-gradient {
  background: linear-gradient(135deg, var(--navy) 0%, var(--muted-blue) 100%);
}

/* Episode description excerpt */
.sermon-excerpt {
  font-size: 14px;
  color: var(--muted-blue);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
