/* Fondo audiovisual controlado por el desplazamiento */
html {
  background: #061f39;
}

body {
  position: relative;
  background: transparent;
}

.scroll-video-bg {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #061f39;
  pointer-events: none;
}

.scroll-video-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.scroll-video-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 22, 39, 0.7), rgba(4, 22, 39, 0.32) 52%, rgba(4, 22, 39, 0.55)),
    linear-gradient(0deg, rgba(4, 22, 39, 0.38), rgba(4, 22, 39, 0.16));
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  z-index: 20;
}

.hero > img {
  display: none;
}

.hero-overlay {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(4, 27, 49, 0.88) 0%, rgba(4, 27, 49, 0.5) 48%, rgba(4, 27, 49, 0.16) 82%),
    linear-gradient(0deg, rgba(4, 27, 49, 0.72) 0%, transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.welcome,
.history,
.communion,
.mission,
.ministries,
.gallery,
.contact {
  background: rgba(251, 248, 241, 0.84);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.communion,
.gallery {
  background: rgba(234, 246, 252, 0.84);
}

.city-ministry,
.activities {
  background: rgba(6, 31, 57, 0.88);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.timeline-item,
.mission-card,
.ministry-card,
.contact-card {
  background: rgba(255, 255, 255, 0.94);
}

.timeline-item.featured {
  background: rgba(11, 49, 88, 0.96);
}

.site-footer {
  background: rgba(6, 31, 57, 0.96);
}

/* Galería ampliada */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 235px;
  grid-auto-flow: dense;
  gap: 18px;
}

.gallery-item,
.gallery-item img {
  min-height: 0;
}

.gallery-item {
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-wide {
  grid-column: span 2;
}

.gallery-tall,
.pastor-photo {
  grid-row: span 2;
}

.pastor-photo img {
  object-position: center top;
}

@media (max-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 230px;
  }

  .gallery-feature,
  .gallery-wide {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .scroll-video-bg video {
    object-position: center center;
  }

  .welcome,
  .history,
  .communion,
  .mission,
  .ministries,
  .gallery,
  .contact {
    background: rgba(251, 248, 241, 0.9);
  }

  .communion,
  .gallery {
    background: rgba(234, 246, 252, 0.9);
  }

  .city-ministry,
  .activities {
    background: rgba(6, 31, 57, 0.92);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 285px;
  }

  .gallery-feature,
  .gallery-wide,
  .gallery-tall,
  .pastor-photo {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img {
    transition: none;
  }
}
