/*
 * Página galería (galeria-venecia.php). Carga tras common.css; usa variables :root del sitio.
 */

/* ——— Hero ——— */
.gv-hero {
  position: relative;
  min-height: min(85vh, 800px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
  background: var(--color-bg-dark);
}

.gv-hero__bg {
  position: absolute;
  inset: 0;
  background: center top / cover no-repeat;
  z-index: 0;
}

.gv-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.gv-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, var(--color-bg-dark));
  z-index: 2;
  pointer-events: none;
}

.gv-hero__inner {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  color: var(--color-white);
}

.gv-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

.gv-hero__intro {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 4rem;
  color: rgba(255, 255, 255, 0.95);
}

.gv-hero-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  border: none;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-bg-dark);
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gv-hero-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

.gv-hero-play svg {
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.2rem;
}

.gv-hero-play:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 4px;
}

/* ——— Secciones galería ——— */
.gv-section {
  --gv-pad-x: clamp(1.25rem, 4vw, 2rem);
}

/*
 * El fondo oscuro no cubre todo el bloque: transición a blanco a mitad del mosaico
 * (comportamiento similar a la web de referencia).
 */
.gv-section--carnival {
  --gv-carnival-dark-end: 64%;
  background: linear-gradient(
    to bottom,
    var(--color-bg-dark) 0,
    var(--color-bg-dark) var(--gv-carnival-dark-end),
    var(--color-white) var(--gv-carnival-dark-end)
  );
  color: rgba(255, 255, 255, 0.88);
  padding: 0 0 2.5rem;
}

@media (min-width: 960px) {
  .gv-section--carnival {
    --gv-carnival-dark-end: 58%;
  }
}

@media (min-width: 1200px) {
  .gv-section--carnival {
    --gv-carnival-dark-end: 68%;
  }
}

.gv-section--city {
  background: var(--color-white);
  color: var(--color-text-emphasis);
  padding: 60px 0 8rem;
}

.gv-section__limit {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gv-pad-x);
  padding-right: var(--gv-pad-x);
}

.gv-section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.gv-section--carnival .gv-section__title {
  color: var(--color-white);
}

.gv-section__lead {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.gv-section--city .gv-section__lead a {
  color: var(--color-link);
  text-decoration: underline;
}

.gv-section--city .gv-section__lead a:hover {
  color: var(--color-white);
  background: var(--color-link);
  text-decoration: none;
}

/* ——— Grid carnaval: fila superior (imagen | imagen | texto) ——— */
.gv-carnival-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding-top: 0;
  margin-top: clamp(-2rem, -5vw, -3.5rem);
  position: relative;
  z-index: 4;
}

@media (min-width: 960px) {
  .gv-carnival-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    align-items: end;
    gap: 1.5rem 2rem;
  }
}

.gv-carnival-intro {
  padding-bottom: 1rem;
}

@media (min-width: 960px) {
  .gv-carnival-intro {
    padding: 0 0 0.5rem 0.5rem;
  }
}

/* ——— Bloque inferior carnaval ——— */
.gv-carnival-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 960px) {
  .gv-carnival-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 1.25rem;
  }
}

.gv-carnival-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gv-carnival-mid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gv-carnival-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .gv-carnival-split {
    grid-template-columns: 1fr 1fr;
  }
}

/* ——— La Ciudad: dos columnas 2fr|1fr (docs/reference/la-ciudad-original.md) ——— */
.gv-city-content {
  width: 100%;
  min-width: 0;
}

.gv-city-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .gv-city-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
  }
}

.gv-city-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.gv-city-head {
  margin: 0;
  padding-top: 0;
  max-width: 38rem;
}

@media (min-width: 768px) {
  .gv-city-main .gv-city-head {
    max-width: none;
    /* El carril de postes arranca arriba; el título baja para no alinear techo con la foto */
    margin-top: 110px;
  }
}

.gv-city-canal,
.gv-city-main .gv-figure {
  min-width: 0;
}

.gv-city-subgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  align-items: start;
}

@media (min-width: 768px) {
  .gv-city-subgrid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1rem 1.25rem;
  }
}

.gv-city-subgrid__wide,
.gv-city-subgrid__narrow {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.gv-city-subgrid__wide .gv-figure,
.gv-city-subgrid__narrow .gv-figure {
  min-width: 0;
}

.gv-city-rail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.gv-city-rail .gv-figure {
  min-width: 0;
}

.gv-city-rail__posts {
  aspect-ratio: 2 / 3;
  max-height: min(72vh, 560px);
}

@media (min-width: 768px) {
  .gv-city-rail__posts {
    max-height: none;
  }
}


/* ——— Lightbox (video + galerías de imágenes) ——— */
.gv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.gv-lightbox.is-open {
  display: block;
}

.gv-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
}

.gv-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(94vw, 1120px);
  margin: 4vh auto;
  padding: 2.75rem 0.75rem 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gv-lightbox__content {
  position: relative;
  width: min(90vw, 1024px);
  height: min(90vh, 1024px);
  max-width: 1024px;
  max-height: 1024px;
  display: grid;
  place-items: center;
}

.gv-lightbox__media {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  /* Límite duro adicional por seguridad */
  max-inline-size: 1024px;
  max-block-size: 1024px;
  object-fit: contain;
  display: block;
}

.gv-lightbox__media--video {
  width: min(100%, 1100px);
  max-height: 100%;
  background: #000;
}

.gv-lightbox__close,
.gv-lightbox__nav {
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.gv-lightbox__close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
}

.gv-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.gv-lightbox__nav--prev {
  left: -3.75rem;
}

.gv-lightbox__nav--next {
  right: -3.75rem;
}

.gv-lightbox__nav.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.gv-lightbox-trigger {
  cursor: zoom-in;
}

.gv-lightbox-trigger img {
  cursor: zoom-in;
}

@media (max-width: 768px) {
  .gv-lightbox__nav--prev {
    left: -0.75rem;
  }

  .gv-lightbox__nav--next {
    right: -0.75rem;
  }

  .gv-lightbox__close {
    top: 0.2rem;
    right: 0.2rem;
  }
}

/* ——— Figuras imagen ——— */
.gv-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.gv-section--city .gv-figure {
  background: rgba(0, 0, 0, 0.04);
}

.gv-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.gv-figure--1-1 {
  aspect-ratio: 1 / 1;
}

.gv-figure--3-2 {
  aspect-ratio: 3 / 2;
}

.gv-figure--2-3 {
  aspect-ratio: 2 / 3;
}

.gv-figure--4-3 {
  aspect-ratio: 4 / 3;
}

.gv-figure--16-9 {
  aspect-ratio: 16 / 9;
}
