/* Iglesia Ríos de Agua Viva · galería, video y carrusel V12.14 */

.home-gallery-grid.home-gallery-carousel-host-v12-14 {
  display: block;
  min-height: 520px;
}

.home-gallery-carousel-v12-14 {
  position: relative;
  min-height: 520px;
  border-radius: 26px;
  overflow: hidden;
  background: #031522;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.home-gallery-carousel-stage-v12-14 {
  position: relative;
  min-height: 520px;
}

.home-gallery-slide-v12-14 {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.018);
  transition: opacity .7s ease, transform 1.1s ease, visibility 0s linear .7s;
  background: #031522;
  color: #fff;
}

.home-gallery-slide-v12-14.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
  transition-delay: 0s;
}

.home-gallery-slide-v12-14 > img,
.home-gallery-slide-v12-14 > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #031522;
}

.home-gallery-slide-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(2, 17, 29, .86) 0%, rgba(2, 17, 29, .48) 45%, rgba(2, 17, 29, .12) 76%), linear-gradient(0deg, rgba(2, 17, 29, .55), transparent 55%);
}

.home-gallery-slide-copy {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 5vw, 72px);
  bottom: clamp(42px, 7vw, 78px);
  width: min(650px, calc(100% - 120px));
  display: grid;
  gap: 8px;
  color: #fff;
}

.home-gallery-slide-copy small {
  color: #a7e4e5;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.home-gallery-slide-copy b {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: .98;
  text-wrap: balance;
}

.home-gallery-slide-copy em {
  font-style: normal;
  color: #e8f5f6;
  font-size: .88rem;
  font-weight: 750;
}

.home-gallery-video-badge {
  position: absolute;
  z-index: 3;
  right: clamp(26px, 5vw, 68px);
  bottom: clamp(40px, 6vw, 72px);
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 4px;
  background: rgba(4, 26, 42, .65);
  box-shadow: 0 18px 42px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
}

.home-gallery-carousel-nav-v12-14 {
  position: absolute;
  z-index: 5;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(3, 21, 34, .58);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.home-gallery-carousel-nav-v12-14:hover,
.home-gallery-carousel-nav-v12-14:focus-visible {
  background: var(--teal);
  outline: 3px solid rgba(255,255,255,.45);
}

.home-gallery-carousel-nav-v12-14.prev { left: 18px; }
.home-gallery-carousel-nav-v12-14.next { right: 18px; }

.home-gallery-carousel-dots-v12-14 {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  display: flex;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(3, 21, 34, .56);
  backdrop-filter: blur(8px);
}

.home-gallery-carousel-dots-v12-14 button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}

.home-gallery-carousel-dots-v12-14 button.is-active {
  width: 28px;
  background: var(--gold);
}

.gallery-premium-card > .gallery-card-video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #031522;
  pointer-events: none;
  transition: transform .45s ease;
}

.gallery-premium-card.gallery-video-live:hover .gallery-card-video-preview,
.gallery-premium-card.gallery-video-live:focus-visible .gallery-card-video-preview {
  transform: scale(1.035);
}

.gallery-premium-card.gallery-video-live::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(2,17,29,.04), rgba(2,17,29,.5));
  pointer-events: none;
}

.gallery-lightbox-video {
  width: 100%;
  max-height: min(72vh, 780px);
  display: block;
  object-fit: contain;
  background: #000;
}

.gallery-auto-toggle-v12-14 {
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(3,21,34,.75);
  color: #fff;
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.gallery-video-editor-v12-14 {
  grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
}

.gallery-video-editor-v12-14 .admin-editor-preview-media {
  min-height: 440px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(20,144,157,.18), transparent 44%), #031522;
}

.gallery-video-editor-v12-14 .admin-editor-preview-media video {
  width: 100%;
  height: 100%;
  min-height: 440px;
  max-height: 620px;
  object-fit: contain;
  background: #031522;
}

.gallery-featured-hint-v12-14 {
  display: none;
  margin-left: 3px;
  color: var(--teal);
  font-size: .62rem;
  font-weight: 800;
}

.gallery-video-editor-v12-14 .admin-check:has([data-check="featured"]:checked) {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 10%, var(--surface));
}

.gallery-video-editor-v12-14 .admin-check:has([data-check="featured"]:checked) .gallery-featured-hint-v12-14 {
  display: inline;
}

.gallery-video-linked-v12-14 .admin-media-field-help {
  border-left-color: #1a936f;
  background: color-mix(in srgb, #1a936f 9%, transparent);
}

.gallery-remove-thumbnail-v12-14 {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .home-gallery-grid.home-gallery-carousel-host-v12-14,
  .home-gallery-carousel-v12-14,
  .home-gallery-carousel-stage-v12-14 { min-height: 460px; }
  .gallery-video-editor-v12-14 { grid-template-columns: minmax(230px, 38%) minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .home-gallery-grid.home-gallery-carousel-host-v12-14,
  .home-gallery-carousel-v12-14,
  .home-gallery-carousel-stage-v12-14 { min-height: 430px; }
  .home-gallery-slide-shade { background: linear-gradient(0deg, rgba(2,17,29,.9) 0%, rgba(2,17,29,.36) 66%, rgba(2,17,29,.08)); }
  .home-gallery-slide-copy { left: 22px; right: 22px; bottom: 52px; width: auto; }
  .home-gallery-slide-copy b { font-size: clamp(2rem, 11vw, 3.15rem); }
  .home-gallery-video-badge { right: 20px; top: 20px; bottom: auto; width: 52px; height: 52px; }
  .home-gallery-carousel-nav-v12-14 { width: 42px; height: 42px; }
  .home-gallery-carousel-nav-v12-14.prev { left: 10px; }
  .home-gallery-carousel-nav-v12-14.next { right: 10px; }
  .gallery-video-editor-v12-14 { grid-template-columns: 1fr; }
  .gallery-video-editor-v12-14 .admin-editor-preview-media,
  .gallery-video-editor-v12-14 .admin-editor-preview-media video { min-height: 360px; max-height: 560px; }
  .gallery-featured-hint-v12-14 { display: block; width: 100%; margin: 2px 0 0 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-gallery-slide-v12-14,
  .gallery-card-video-preview { transition: none; }
}

/* V12.16 · corrección de especificidad del carrusel público.
   styles.css declara .home-gallery-grid a { position: relative; } con mayor
   especificidad que la clase del slide. Esta regla obliga a los slides a
   ocupar el escenario completo y evita el carrusel vacío. */
.home-gallery-grid .home-gallery-slide-v12-14 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
