html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


/* Header: always keep navigation readable.
   The JS adds .nav-scrolled after the hero / while scrolling. */
#navbar { color: #fff; }
#navbar.nav-scrolled { color: #fff; }

    .nav-scrolled {
      background: rgba(11, 22, 48, 0.88);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-menu-open {
      max-height: 560px;
      opacity: 1;
      pointer-events: auto;
    }

    .mobile-menu-closed {
      max-height: 0;
      opacity: 0;
      pointer-events: none;
    }

    /* CARRUSELES CON DEDO + FLECHAS */
    .carousel-wrap {
      position: relative;
      width: 100%;
      overflow: visible;
    }

.mobile-scroll {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  touch-action: auto;
  overscroll-behavior-x: contain;

  padding: 0 2.5rem 1rem 2.5rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  scrollbar-width: none;
}

    .mobile-scroll::-webkit-scrollbar {
      display: none;
    }

    .mobile-card {
      flex: 0 0 54%;
      min-width: 54%;
      max-width: 54%;
      scroll-snap-align: center;
    }

    .video-card {
      flex: 0 0 78%;
      min-width: 78%;
      max-width: 78%;
      scroll-snap-align: center;
    }

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;

  width: 54px;
  height: 54px;

  border-radius: 9999px;

  background: linear-gradient(
    135deg,
    #FF6B6B 0%,
    #8A5CFF 100%
  );

  color: white;

  appearance: none;
  -webkit-appearance: none;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  text-align: center;

  box-shadow:
    0 10px 30px rgba(138,92,255,.35),
    0 6px 18px rgba(255,107,107,.25);

  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 2px;

  transition: all 0.3s ease;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-prev:hover,
.carousel-next:hover {
  transform: translateY(-50%) scale(1.08);
  filter: brightness(1.08);
}

    @media (min-width: 640px) {
      .mobile-card {
        flex-basis: 38%;
        min-width: 38%;
        max-width: 38%;
      }

      .video-card {
        flex-basis: 46%;
        min-width: 46%;
        max-width: 46%;
      }
    }

    @media (min-width: 1024px) {
  .mobile-scroll {
    display: grid;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .mobile-card,
  .video-card {
    flex: initial;
    min-width: 0;
    max-width: none;
  }

  .carousel-prev,
  .carousel-next {
    display: none;
  }
}

    /* FAITH MODAL */
    .faith-modal-open {
      opacity: 1;
      pointer-events: auto;
    }

    .faith-modal-open .faith-modal-panel {
      transform: translateY(0) scale(1);
      opacity: 1;
    }

    .faith-modal-closed {
      opacity: 0;
      pointer-events: none;
    }

    .faith-modal-closed .faith-modal-panel {
      transform: translateY(24px) scale(.98);
      opacity: 0;
    }


    .donaciones-section {
  background: #07142b;
  color: #ffffff;
  padding: 80px 20px;
  text-align: center;
}

.donaciones-section h2 {
  color: #f5f8ff;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 20px;
}

.donaciones-section .versiculo {
  color: #dbe8ff;
  font-size: 20px;
  font-style: italic;
  line-height: 1.7;
  max-width: 850px;
  margin: 0 auto 30px;
}

.donaciones-section .referencia {
  color: #9fc5ff;
  font-weight: 700;
}

.donaciones-section p {
  color: #d0ddf2;
  font-size: 20px;
  line-height: 1.7;
  max-width: 950px;
  margin: 0 auto;
}

.donaciones-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.donacion-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 35px 25px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}

.donacion-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 45px rgba(120, 170, 255, 0.35);
}

@media (max-width: 768px) {
  .donaciones-section {
    padding: 55px 18px;
  }

  .donaciones-section h2 {
    font-size: 30px;
  }

  .donaciones-section .versiculo,
  .donaciones-section p {
    font-size: 17px;
  }

  .donaciones-cards {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .donacion-card {
    padding: 28px 20px;
  }
}

.live-section {
  padding: 80px 20px;
  background: #07142b;
  color: #fff;
  text-align: center;
}

.live-video {
  max-width: 900px;
  margin: 35px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
}

.live-video iframe {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .live-section {
    padding: 55px 16px;
  }

  .live-section h2 {
    font-size: 2rem;
  }
}




/* ==========================================
   DECLARACIÓN DE FE — ACORDEÓN
========================================== */

#faithModal summary {
  list-style: none;
  transition: background-color 0.3s ease;
}

#faithModal summary::-webkit-details-marker {
  display: none;
}

#faithModal summary::marker {
  content: "";
}

#faithModal details {
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

#faithModal details[open] {
  box-shadow: 0 18px 45px rgba(11, 22, 48, 0.08);
}

#faithModal details summary:hover {
  background: rgba(138, 92, 255, 0.04);
}

/* Evita que aparezca el contorno azul predeterminado */
#faithModal summary:focus {
  outline: none;
}

#faithModal summary:focus-visible {
  outline: 2px solid rgba(138, 92, 255, 0.45);
  outline-offset: -2px;
  border-radius: 1.5rem;
}

/* Mejora el desplazamiento dentro del modal */
#faithModal .faith-modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 92, 255, 0.55) transparent;
}

#faithModal .faith-modal-panel::-webkit-scrollbar {
  width: 8px;
}

#faithModal .faith-modal-panel::-webkit-scrollbar-track {
  background: transparent;
}

#faithModal .faith-modal-panel::-webkit-scrollbar-thumb {
  background: rgba(138, 92, 255, 0.45);
  border-radius: 999px;
}

#faithModal .faith-modal-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 92, 255, 0.7);
}


/* Ajustes para móviles */
@media (max-width: 640px) {

  #faithModal .faith-modal-panel {
    max-height: 92vh;
    border-radius: 1.5rem;
  }

  #faithModal summary {
    padding: 18px 20px;
  }

  #faithModal details > div {
    padding-left: 20px;
    padding-right: 20px;
  }
}

    /* ==========================================
   HERO - AJUSTE SOLO PARA MÓVIL
========================================== */

.hero-bautismo-bg{
    background-position:center center;
}

@media (max-width:768px){

    .hero-bautismo-bg{
        background-position:60% center;
        background-size:cover;
    }

}


/* ==========================================
   AJUSTES GENERALES DE CALIDAD
========================================== */
img {
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

section[id] {
  scroll-margin-top: 88px;
}

:focus-visible {
  outline: 3px solid rgba(138, 92, 255, 0.65);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* =========================================================
   CCR 1.1 — PULIDO PREMIUM / MÓVIL / YOUTUBE / GALERÍA
========================================================= */
.visit-card {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
@media (hover: hover) {
  .visit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(11, 22, 48, .09);
    border-color: rgba(138, 92, 255, .20);
  }
}

.youtube-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  border-radius: 2rem;
  background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 24px 70px rgba(0,0,0,.20);
  overflow: hidden;
}
.youtube-status-card.is-live { border-color: rgba(248, 113, 113, .35); }
.youtube-status-card.is-upcoming { border-color: rgba(192, 132, 252, .30); }
.youtube-status-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.youtube-status-badge { display:inline-flex; align-items:center; padding:8px 12px; border-radius:999px; background:rgba(138,92,255,.16); color:#d8c7ff; font-size:11px; font-weight:800; letter-spacing:.18em; }
.is-live .youtube-status-badge { background:rgba(239,68,68,.17); color:#fecaca; }
.youtube-status-eyebrow { margin-top:18px; color:rgba(255,255,255,.52); font-size:13px; font-weight:700; letter-spacing:.08em; }
.youtube-status-title { margin-top:8px; font-size:clamp(1.65rem, 4vw, 2.55rem); line-height:1.05; font-weight:800; letter-spacing:-.03em; }
.youtube-countdown { width:100%; max-width:560px; display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:22px; }
.youtube-countdown > div { text-align:center; padding:13px 8px 11px; border-radius:16px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.08); }
.youtube-countdown strong { display:block; font-size:clamp(1.6rem, 5vw, 2.5rem); line-height:1; }
.youtube-countdown span { display:block; margin-top:7px; color:rgba(255,255,255,.48); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.15em; }
.youtube-status-cta { display:inline-flex; margin-top:22px; padding:13px 22px; border-radius:999px; background:linear-gradient(90deg,#FF6B6B,#8A5CFF); color:#fff; font-size:13px; font-weight:800; transition:transform .25s ease; }
.youtube-status-cta:hover { transform:translateY(-2px); }
.youtube-live-embed { aspect-ratio:16/9; border-radius:1.4rem; overflow:hidden; background:#000; }
.youtube-live-embed iframe { width:100%; height:100%; border:0; }
.sermon-play-icon { width:72px; height:72px; display:flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(255,255,255,.15); backdrop-filter:blur(14px); border:1px solid rgba(255,255,255,.28); font-size:28px; transition:transform .3s ease,background .3s ease; }
.group:hover .sermon-play-icon { transform:scale(1.08); background:rgba(255,255,255,.23); }

@media (min-width: 900px) {
  .youtube-status-card:has(.youtube-live-embed:not(.hidden)) { grid-template-columns:.72fr 1.28fr; align-items:center; }
}

/* Galería dinámica */
.gallery-marquee { width:100%; overflow:hidden; }
.gallery-marquee-track { display:flex; width:max-content; gap:14px; animation:ccrGalleryMarquee 42s linear infinite; }
.gallery-marquee.is-paused .gallery-marquee-track { animation-play-state:paused; }
.gallery-marquee-item { width:260px; height:190px; border-radius:22px; overflow:hidden; flex:none; box-shadow:0 14px 36px rgba(11,22,48,.10); }
.gallery-marquee-item img { width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.gallery-marquee-item:hover img { transform:scale(1.035); }
@keyframes ccrGalleryMarquee { to { transform:translateX(calc(-50% - 7px)); } }
.gallery-header { position:fixed; inset:0 0 auto; z-index:50; background:rgba(11,22,48,.96); backdrop-filter:blur(14px); }
.gallery-back { color:white; font-weight:700; font-size:14px; }
.gallery-filters { display:flex; gap:10px; overflow:auto; padding-bottom:4px; scrollbar-width:none; }
.gallery-filter { flex:none; padding:10px 16px; border-radius:999px; background:#fff; border:1px solid rgba(11,22,48,.08); font-weight:700; font-size:13px; }
.gallery-filter.is-active { color:#fff; background:linear-gradient(90deg,#FF6B6B,#8A5CFF); border-color:transparent; }
.gallery-grid { columns:1; column-gap:16px; }
.gallery-photo { position:relative; display:block; width:100%; margin:0 0 16px; border-radius:22px; overflow:hidden; break-inside:avoid; text-align:left; background:#fff; box-shadow:0 12px 34px rgba(11,22,48,.09); }
.gallery-photo img { width:100%; display:block; transition:transform .45s ease; }
.gallery-photo:hover img { transform:scale(1.025); }
.gallery-photo span { position:absolute; inset:auto 0 0; padding:38px 18px 16px; color:#fff; font-weight:800; background:linear-gradient(transparent,rgba(11,22,48,.84)); }
.gallery-photo small { display:block; margin-bottom:3px; color:rgba(255,255,255,.68); text-transform:uppercase; letter-spacing:.16em; font-size:9px; }
.gallery-photo[hidden] { display:none; }
.gallery-lightbox { position:fixed; inset:0; z-index:100; display:none; align-items:center; justify-content:center; padding:20px; }
.gallery-lightbox.is-open { display:flex; }
.gallery-lightbox-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.88); backdrop-filter:blur(10px); }
.gallery-lightbox figure { position:relative; z-index:1; max-width:min(1100px,95vw); max-height:90vh; }
.gallery-lightbox figure img { max-height:82vh; max-width:100%; object-fit:contain; border-radius:20px; }
.gallery-lightbox figcaption { color:#fff; text-align:center; margin-top:10px; }
.gallery-lightbox-close { position:absolute; right:10px; top:10px; z-index:2; width:42px; height:42px; border-radius:999px; background:rgba(0,0,0,.65); color:#fff; }
.footer-social { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:999px; color:#fff; font-weight:800; transition:transform .25s ease; }
.footer-social:hover { transform:translateY(-2px) scale(1.04); }

@media (min-width: 640px) { .gallery-grid { columns:2; } }
@media (min-width: 1024px) { .gallery-grid { columns:3; } .gallery-marquee-item { width:340px; height:230px; } }

/* Ritmo vertical más compacto en móvil */
@media (max-width: 767px) {
  #nosotros, #visitanos, #reuniones, #predicas, #comunidad, #oracion, #donaciones, #contacto { scroll-margin-top:76px; }
  #nosotros .rounded-\[2\.5rem\], #visitanos .rounded-\[2rem\] { box-shadow:0 14px 36px rgba(11,22,48,.07); }
  .gallery-marquee-item { width:220px; height:160px; border-radius:18px; }
  .youtube-status-card { padding:22px 18px; border-radius:1.5rem; }
  .youtube-countdown > div { padding:12px 4px 10px; border-radius:13px; }
}


/* =========================================================
   CCR 1.2 — AJUSTES APROBADOS
   Ritmo compacto, ondas, menú móvil y galería editorial
========================================================= */

/* Separadores sin añadir altura al documento: se superponen entre secciones. */
.section-wave {
  position: relative;
  height: 0;
  z-index: 8;
  pointer-events: none;
}
.section-wave::after {
  content: "";
  position: absolute;
  left: -2%;
  top: 0;
  width: 104%;
  height: 34px;
  transform: translateY(-49%);
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
}
.section-wave-white::after { background: #ffffff; }
.section-wave-cream::after { background: #FAF8F5; }
.section-wave-navy::after { background: #0B1630; }

/* Galería: fotos limpias; el contexto está en el título de cada colección y en el visor. */
.gallery-collections { display: grid; gap: 52px; }
.gallery-collection[hidden] { display: none; }
.gallery-collection-heading { margin-bottom: 18px; }
.gallery-collection-heading > p {
  color: #8A5CFF; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .34em;
}
.gallery-collection-heading > h2 {
  margin-top: 8px; font-size: clamp(1.75rem, 4vw, 2.7rem); line-height: 1; font-weight: 800; letter-spacing: -.03em;
}
.gallery-collection-heading > span { display: block; margin-top: 8px; color: rgba(11,22,48,.55); font-size: 14px; font-weight: 650; }
.gallery-photo { cursor: zoom-in; }
.gallery-photo-hover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 0; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .08em;
  background: rgba(11,22,48,.34); opacity: 0; transition: opacity .3s ease;
}
@media (hover:hover) {
  .gallery-photo:hover .gallery-photo-hover { opacity: 1; }
}
.gallery-lightbox figure { width: min(1100px, 95vw); display: flex; flex-direction: column; align-items: center; }
.gallery-lightbox figcaption { width: 100%; display: flex; justify-content: space-between; gap: 18px; align-items: center; color:#fff; margin-top: 12px; padding: 0 6px; }
.gallery-lightbox figcaption small { color: rgba(255,255,255,.58); font-weight: 700; white-space: nowrap; }
.gallery-lightbox-prev, .gallery-lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 999px; color: #fff;
  background: rgba(0,0,0,.58); border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 34px; line-height: 1;
}
.gallery-lightbox-prev { left: 10px; }
.gallery-lightbox-next { right: 10px; }

/* El menú móvil se siente más ligero y no ocupa una pantalla completa innecesariamente. */
@media (max-width: 1023px) {
  .mobile-menu-open { max-height: 620px; }
}

@media (max-width: 767px) {
  /* Compactamos el ritmo vertical sin quitar respiración visual. */
  #nosotros, #visitanos, #reuniones, #predicas, #comunidad, #oracion, #contacto {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  #nosotros { padding-top: 3.9rem !important; }
  #comunidad { padding-top: 3.8rem !important; padding-bottom: 3.8rem !important; }

  /* Ondas más pequeñas en móvil. */
  .section-wave::after { height: 24px; }

  /* Tarjetas de primera visita: iguales y compactas. */
  .visit-card { padding: 1rem !important; border-radius: 1.25rem !important; min-height: 0; }
  .visit-card > div { width: 2.25rem !important; height: 2.25rem !important; margin-bottom: .75rem !important; }
  .visit-card h3 { font-size: 1rem !important; line-height: 1.2; }
  .visit-card p { margin-top: .4rem !important; font-size: .84rem !important; line-height: 1.45; }

  .gallery-collections { gap: 38px; }
  .gallery-collection-heading { margin-bottom: 14px; }
  .gallery-lightbox { padding: 12px; }
  .gallery-lightbox figure img { max-height: 78vh; border-radius: 16px; }
  .gallery-lightbox-prev, .gallery-lightbox-next { width: 40px; height: 40px; font-size: 28px; }
  .gallery-lightbox-prev { left: 4px; }
  .gallery-lightbox-next { right: 4px; }
  .gallery-lightbox figcaption { font-size: 12px; }
}


/* Ofrendas ocupa todo el ancho oscuro para integrarse con las transiciones. */
.donaciones-shell {
  background: #0B1630;
  color: #fff;
  padding: 4rem 1.25rem;
  overflow: hidden;
}
.donaciones-inner {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .donaciones-shell { padding-top: 5.5rem; padding-bottom: 5.5rem; }
}
@media (max-width: 767px) {
  .donaciones-shell { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* =========================================================
   GALERÍA 1.3 — ÁLBUM PREMIUM
   Foto principal + cinta de miniaturas
========================================================= */
.gallery-toolbar {
  display: grid;
  gap: 18px;
  align-items: end;
}

.gallery-collection-picker {
  display: grid;
  gap: 8px;
  max-width: 440px;
}

.gallery-collection-picker > span {
  color: rgba(11,22,48,.48);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.gallery-collection-picker select {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(11,22,48,.10);
  border-radius: 16px;
  background:
    linear-gradient(45deg, transparent 50%, #0B1630 50%) calc(100% - 20px) calc(50% - 2px)/6px 6px no-repeat,
    linear-gradient(135deg, #0B1630 50%, transparent 50%) calc(100% - 14px) calc(50% - 2px)/6px 6px no-repeat,
    #fff;
  padding: 13px 44px 13px 16px;
  color: #0B1630;
  font-weight: 750;
  box-shadow: 0 8px 26px rgba(11,22,48,.06);
  outline: none;
}

.gallery-collection-picker select:focus {
  border-color: rgba(138,92,255,.45);
  box-shadow: 0 0 0 4px rgba(138,92,255,.09);
}

.gallery-albums {
  min-height: 520px;
}

.gallery-album[hidden] { display: none !important; }

.gallery-album {
  animation: galleryAlbumIn .35s ease both;
}

@keyframes galleryAlbumIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gallery-album-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.gallery-album-heading p {
  margin: 0 0 5px;
  color: #8A5CFF;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.gallery-album-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: .98;
  font-weight: 850;
  letter-spacing: -.035em;
}

.gallery-album-heading span {
  display: block;
  margin-top: 8px;
  color: rgba(11,22,48,.55);
  font-size: 14px;
  font-weight: 650;
}

.gallery-album-count {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(138,92,255,.08);
  color: #8A5CFF;
  font-size: 12px;
  font-weight: 800;
}

.gallery-stage-wrap {
  position: relative;
}

.gallery-stage {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(360px, 64vw, 720px);
  overflow: hidden;
  border-radius: 28px;
  background: #0B1630;
  box-shadow: 0 22px 60px rgba(11,22,48,.15);
  cursor: zoom-in;
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .18s ease, transform .45s ease;
}

.gallery-stage img.is-changing { opacity: .22; }

.gallery-stage-overlay {
  position: absolute;
  inset: auto 18px 18px auto;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(11,22,48,.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(4px);
  transition: .25s ease;
}

.gallery-stage:hover .gallery-stage-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-stage-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  background: rgba(255,255,255,.90);
  color: #0B1630;
  font-size: 33px;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(11,22,48,.16);
  backdrop-filter: blur(10px);
  transition: transform .2s ease, background .2s ease;
}

.gallery-stage-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.gallery-stage-prev { left: 16px; }
.gallery-stage-next { right: 16px; }

.gallery-stage-meta {
  min-height: 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  padding: 0 3px;
  color: rgba(11,22,48,.60);
  font-size: 13px;
}

.gallery-stage-meta strong {
  flex: none;
  color: #0B1630;
  font-size: 12px;
  font-weight: 800;
}

.gallery-thumbs-shell {
  position: relative;
  margin-top: 16px;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 3px 54px 8px;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex: 0 0 104px;
  height: 76px;
  padding: 0;
  border-radius: 13px;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  opacity: .64;
  scroll-snap-align: center;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover {
  opacity: .9;
  transform: translateY(-2px);
}

.gallery-thumb.is-active {
  opacity: 1;
  border-color: #8A5CFF;
  box-shadow: 0 7px 20px rgba(138,92,255,.18);
}

.gallery-thumbs-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translateY(-58%);
  background: #fff;
  color: #0B1630;
  font-size: 26px;
  box-shadow: 0 8px 22px rgba(11,22,48,.12);
}

.gallery-thumbs-prev { left: 4px; }
.gallery-thumbs-next { right: 4px; }

@media (min-width: 800px) {
  .gallery-toolbar {
    grid-template-columns: 1fr minmax(300px, 420px);
    gap: 26px;
  }
}

@media (max-width: 767px) {
  .gallery-albums { min-height: 0; }
  .gallery-album-heading { align-items: start; margin-bottom: 14px; }
  .gallery-album-count { margin-top: 3px; }

  .gallery-stage {
    height: min(68vh, 520px);
    min-height: 330px;
    border-radius: 20px;
  }

  .gallery-stage-arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
    background: rgba(255,255,255,.86);
  }

  .gallery-stage-prev { left: 8px; }
  .gallery-stage-next { right: 8px; }
  .gallery-stage-overlay { display: none; }

  .gallery-stage-meta {
    margin-top: 10px;
    font-size: 12px;
  }

  .gallery-thumbs {
    gap: 8px;
    padding: 2px 4px 7px;
  }

  .gallery-thumb {
    flex-basis: 78px;
    height: 58px;
    border-radius: 10px;
  }

  .gallery-thumbs-arrow { display: none; }
}


/* =========================================================
   CCR 1.9 — GALERÍA MODAL / POPUP
   Header, footer y "Ver galería" abren la misma experiencia.
========================================================= */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-modal.is-open {
  display: flex;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 15, 33, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: default;
}

.gallery-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #FAF8F5;
  color: #0B1630;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0,0,0,.34);
  padding: 28px;
  animation: ccrGalleryModalIn .28s ease both;
}

@keyframes ccrGalleryModalIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gallery-modal-topbar {
  position: sticky;
  top: -28px;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: -28px -28px 24px;
  padding: 24px 28px 20px;
  background: rgba(250,248,245,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(11,22,48,.07);
}

.gallery-modal-eyebrow {
  margin: 0 0 7px;
  color: #8A5CFF;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.gallery-modal-topbar h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: .98;
  font-weight: 850;
  letter-spacing: -.035em;
}

.gallery-modal-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0B1630;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(11,22,48,.18);
  transition: transform .2s ease, background .2s ease;
}

.gallery-modal-close:hover {
  transform: scale(1.05);
  background: #16264a;
}

.gallery-modal-toolbar {
  display: grid;
  gap: 18px;
  align-items: end;
  margin-bottom: 26px;
}

.gallery-modal-empty {
  padding: 44px 20px 52px;
  text-align: center;
}

.gallery-modal-empty h3 {
  font-size: 1.6rem;
  font-weight: 850;
}

.gallery-modal-empty p {
  margin-top: 8px;
  color: rgba(11,22,48,.62);
}

.gallery-modal .gallery-albums {
  min-height: 0;
}

.gallery-modal .gallery-stage {
  height: clamp(320px, 56vh, 620px);
}

.gallery-modal .gallery-album-heading h3,
.gallery-album-heading h3 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: .98;
  font-weight: 850;
  letter-spacing: -.035em;
}

.gallery-marquee-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

button[data-open-gallery] {
  cursor: pointer;
}

@media (min-width: 800px) {
  .gallery-modal-toolbar {
    grid-template-columns: 1fr minmax(300px, 420px);
    gap: 26px;
  }
}

@media (max-width: 767px) {
  .gallery-modal {
    padding: 0;
    align-items: stretch;
  }

  .gallery-modal-panel {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    padding: 18px 16px 24px;
  }

  .gallery-modal-topbar {
    top: -18px;
    margin: -18px -16px 18px;
    padding: 18px 16px 14px;
  }

  .gallery-modal-topbar h2 {
    font-size: 1.8rem;
  }

  .gallery-modal-close {
    width: 42px;
    height: 42px;
  }

  .gallery-modal .gallery-stage {
    height: min(58vh, 470px);
    min-height: 300px;
  }
}

/* =========================================================
   GALERÍA 1.9.1 — categorías completas en escritorio
   Los filtros saltan de línea antes de invadir el selector.
   En móvil se conserva el desplazamiento horizontal.
========================================================= */
@media (min-width: 768px) {
  .gallery-modal-toolbar > * {
    min-width: 0;
  }

  .gallery-modal .gallery-filters {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
  }

  .gallery-modal .gallery-filter {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .gallery-modal .gallery-collection-picker {
    width: 100%;
    max-width: 440px;
    justify-self: end;
  }
}

@media (max-width: 767px) {
  .gallery-modal .gallery-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================================================
   CCR 1.9.2 — visor individual desde "Nuestra Comunidad"
   Foto seleccionada + CTA a galería completa, responsive.
========================================================= */
.community-gallery-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .86rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF6B6B, #8A5CFF);
  color: #fff;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .01em;
  box-shadow: 0 12px 28px rgba(138,92,255,.20);
  transition: transform .22s ease, box-shadow .22s ease;
  cursor: pointer;
}
.community-gallery-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(138,92,255,.27);
}
.community-gallery-cta span { font-size: 1rem; }

.gallery-marquee-item { cursor: zoom-in; }

.gallery-lightbox figcaption {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.gallery-lightbox-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.gallery-lightbox-gallery-btn {
  display: none;
  align-self: center;
  min-width: 220px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF6B6B, #8A5CFF);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 30px rgba(138,92,255,.28);
  transition: transform .22s ease, box-shadow .22s ease;
}
.gallery-lightbox-gallery-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(138,92,255,.34);
}

/* El CTA solo aparece cuando el visor se abrió desde la cinta de portada. */
.gallery-lightbox.is-single .gallery-lightbox-gallery-btn { display: inline-flex; justify-content: center; }
.gallery-lightbox.is-single .gallery-lightbox-prev,
.gallery-lightbox.is-single .gallery-lightbox-next,
.gallery-lightbox.is-single [data-gallery-count] { display: none; }
.gallery-lightbox.is-single figure img {
  max-height: min(74vh, 760px);
}

@media (max-width: 767px) {
  .community-strip .max-w-7xl { align-items: flex-start; }
  .community-gallery-cta {
    width: 100%;
    max-width: 320px;
    padding: .85rem 1rem;
    font-size: .78rem;
  }

  .gallery-lightbox {
    padding: 10px;
  }
  .gallery-lightbox figure {
    width: 100%;
    max-width: 100%;
    max-height: 96dvh;
  }
  .gallery-lightbox.is-single figure img {
    width: 100%;
    max-height: 68dvh;
    border-radius: 14px;
  }
  .gallery-lightbox-close {
    width: 46px;
    height: 46px;
    right: 8px;
    top: 8px;
    font-size: 19px;
  }
  .gallery-lightbox-meta {
    gap: 10px;
    padding: 0 2px;
  }
  .gallery-lightbox-gallery-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    font-size: 12px;
  }
}


/* =========================================================
   CCR 1.9.4 — descubrimiento de categorías + protección casual
========================================================= */
.gallery-filters-shell {
  position: relative;
  min-width: 0;
}
.gallery-filters-shell .gallery-filters {
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
}
.gallery-filter {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
@media (hover:hover) and (pointer:fine) {
  .gallery-filter:not(.is-active):hover {
    transform: translateY(-3px);
    border-color: rgba(138,92,255,.55);
    background: rgba(138,92,255,.07);
    box-shadow: 0 10px 24px rgba(11,22,48,.14);
  }
}
.gallery-filter-scroll {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(11,22,48,.09);
  border-radius: 999px;
  display: none;
  place-items: center;
  transform: translateY(-55%);
  background: rgba(255,255,255,.96);
  color: #0B1630;
  font-size: 25px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(11,22,48,.13);
  cursor: pointer;
}
.gallery-filter-scroll-prev { left: 2px; }
.gallery-filter-scroll-next { right: 2px; }
.gallery-filters-shell.has-overflow::before,
.gallery-filters-shell.has-overflow::after {
  content: "";
  position: absolute;
  z-index: 5;
  top: 0; bottom: 4px;
  width: 58px;
  pointer-events: none;
}
.gallery-filters-shell.has-overflow::before { left: 0; background: linear-gradient(90deg,#FAF8F5 18%,rgba(250,248,245,0)); }
.gallery-filters-shell.has-overflow::after { right: 0; background: linear-gradient(270deg,#FAF8F5 18%,rgba(250,248,245,0)); }
.gallery-filters-shell.at-start::before, .gallery-filters-shell.at-end::after { display:none; }
.gallery-filters-shell.has-overflow:not(.at-start) .gallery-filter-scroll-prev,
.gallery-filters-shell.has-overflow:not(.at-end) .gallery-filter-scroll-next { display:grid; }
.gallery-filters-shell.has-overflow .gallery-filters { padding-inline: 46px; }
.gallery-filters-shell.has-overflow.at-start .gallery-filters { padding-left: 0; }
.gallery-filters-shell.has-overflow.at-end .gallery-filters { padding-right: 0; }
.gallery-protected-image {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
@media (min-width:768px) {
  /* En escritorio mostramos todos los filtros cuando caben; las flechas aparecen solo si realmente desbordan. */
  .gallery-filters-shell .gallery-filters { flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden !important; }
}
@media (max-width:767px) {
  .gallery-filter-scroll { width:36px; height:36px; }
  .gallery-filters-shell.has-overflow::before, .gallery-filters-shell.has-overflow::after { width:52px; }
  .gallery-filters-shell.has-overflow .gallery-filters { padding-inline: 42px; }
}
