/* ── Hero Carousel ─────────────────────────────────────── */
.hero-carousel {
  position: relative;
  overflow: hidden;
  height: min(100vh, 680px);
  min-height: 520px;
  max-height: 680px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: absolute;
}

.hero-carousel .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(30, 30, 36, 0.8), rgba(44, 44, 54, 0.56), rgba(30, 30, 36, 0.72));
}

.hero-carousel .hero-content {
  position: relative;
  z-index: 1;
  padding: 232px 0 24px;
}

.hero-carousel .hero-content .subtitle {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.hero-carousel .hero-content h1 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.1;
  margin: 1rem 0;
}

.hero-carousel .hero-content p {
  font-size: 1.1rem;
  max-width: 720px;
  margin: 1rem auto 1.4rem;
}

.hero-carousel .hero-cta .btn { margin: 0.25rem; }

/* Prev / Next arrows */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 102, 0.2);
  border: 1px solid rgba(0, 0, 102, 0.34);
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.carousel-prev { left: 1.25rem; }
.carousel-next { right: 1.25rem; }

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(var(--accent-rgb), 0.32);
}

/* Dot indicators */
.carousel-dots {
  position: absolute;
  bottom: clamp(1.35rem, 3.2vh, 2.2rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .hero-carousel {
    height: min(74vh, 560px);
    max-height: 560px;
    min-height: 390px;
  }

  .hero-carousel .hero-content {
    padding: 86px 0 78px;
  }

  .hero-carousel .hero-content h1 { font-size: 2rem; }
  .hero-carousel .hero-content p  { font-size: 1rem; }
  .hero-carousel .hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
  }
  .hero-carousel .hero-cta .btn { width: min(290px, 100%); margin: 0; text-align: center; }
  .carousel-prev { left: 0.5rem; }
  .carousel-next { right: 0.5rem; }
}
/* ── End Hero Carousel ─────────────────────────────────── */

/* ── Welcome feature row ──────────────────────────────── */
.welcome-feature {
  padding: 48px 0 12px;
}

.welcome-feature__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 380px;
}

.welcome-feature__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-feature__text h2 {
  margin: 0;
}

.welcome-feature__text > p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.welcome-feature__text .btn {
  align-self: flex-start;
}

.welcome-feature__visual {
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  min-height: 360px;
  box-shadow: 0 12px 28px rgba(0, 18, 71, 0.16);
}

@media (max-width: 860px) {
  .welcome-feature__inner {
    grid-template-columns: 1fr;
  }

  .welcome-feature__visual {
    min-height: 240px;
  }
}

.service-schedule,
.contact-summary,
.deferred-features {
  padding: 56px 0;
}

.quick-actions {
  margin-top: 20px;
  position: relative;
  z-index: 4;
}

.home-leadership-wrapper {
  padding-top: 77px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.quick-action-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 102, 0.14);
  border-radius: 16px;
  padding: 1.15rem;
  box-shadow: 0 14px 24px rgba(0, 18, 71, 0.11);
}

.quick-action-card h3 {
  margin: 0.3rem 0 0.45rem;
  color: var(--text-main);
}

.quick-action-card p {
  margin: 0;
  color: var(--text-muted);
}

.quick-action-card a {
  font-weight: 700;
  color: var(--accent);
}

.quick-action-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.quick-action-link:hover {
  text-decoration: underline;
}

.service-schedule h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.service-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.service-item,
.contact-grid > div,
.feature-placeholder {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 102, 0.14);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 12px 22px rgba(0, 18, 71, 0.1);
}

.service-item h3,
.contact-grid h3,
.feature-placeholder h3 {
  color: var(--text-main);
}

.service-item p,
.contact-grid p,
.feature-placeholder p {
  color: var(--text-muted);
}

.language-fallback-notice {
  margin: 16px 0;
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  background: rgba(0, 0, 102, 0.08);
  color: var(--brand-navy);
}

.contact-summary a {
  color: var(--brand-blue);
}

.deferred-features .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.sermon-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.featured-sermon {
  grid-column: span 1;
}

.sermon-date {
  font-weight: 700;
  color: var(--accent);
  margin: 0.3rem 0;
}

.sermon-card__media-link {
  display: block;
}

.sermon-card__media-link img,
.sermon-layout .card img,
.sermon-layout .placeholder {
  width: calc(100% + 2.2rem);
  height: 220px;
  object-fit: cover;
  display: block;
  margin: -1.1rem -1.1rem 1rem;
  border-radius: 16px 16px 14px 14px;
}

.sermon-watch-btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
}

/* Override event card CTA on home page only — keep btn-secondary look */
.events-preview .event-card__cta {
  background: rgba(0, 0, 102, 0.08);
  color: var(--brand-navy);
  border: 1px solid rgba(0, 0, 102, 0.24);
  box-shadow: none;
}

.events-preview .event-card__cta:hover {
  background: rgba(0, 0, 102, 0.14);
}

.sermon-layout .card {
  display: flex;
  flex-direction: column;
}

.sermon-layout .placeholder {
  position: relative;
  place-items: end start;
  padding: 1rem;
  /* Placeholder shown when sermon has no featured image. Set a WP featured image to override. */
  background: linear-gradient(180deg, rgba(30, 30, 36, 0.5), rgba(30, 30, 36, 0.8));
  background-color: var(--color-dark, #1e1e24);
}

.sermon-layout .placeholder span {
  display: inline-flex;
  align-items: center;
  z-index: 1;
  background: rgba(237, 232, 223, 0.92);
  color: #1E1E24;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.connect-rail {
  padding: 18px 0 8px;
}

.connect-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.connect-links a {
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-navy));
  border: 1px solid rgba(0, 18, 71, 0.24);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(0, 18, 71, 0.2);
}

.connect-links a:hover {
  background: linear-gradient(180deg, #000099, var(--brand-blue));
}

/* ── Events section heading with inline View All ─── */
.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading-row h2 {
  margin: 0;
}

.giving-cta {
  padding: 50px 0 60px;
}

.giving-cta .section-heading {
  margin-bottom: 1rem;
}

.giving-cta .section-heading p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .service-schedule,
  .contact-summary,
  .deferred-features {
    padding: 44px 0;
  }

  .quick-actions {
    margin-top: 14px;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quick-action-card {
    padding: 1rem;
  }

  .sermon-layout {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .connect-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .connect-links a {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .connect-links {
    grid-template-columns: 1fr;
  }
}
