
/* =================================
   CONFIGURACIÓN GENERAL
================================= */

:root {
  --verde: #4b593f;
  --crema: #f8f0d7;
  --blanco: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--crema);
  color: var(--verde);
  font-family: 'Cormorant Garamond', serif;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}


/* =================================
   SECCIÓN 01 - PORTADA
================================= */

.portada {
  position: relative;
  width: 100%;
  text-align: center;
  background: var(--crema);
  overflow: visible;
}

/* LISTÓN VERDE CONTINUO */

.portada::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 710px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(84%, 460px);
  background: var(--verde);
}


/* =================================
   FOTOGRAFÍA
================================= */

.portada-foto {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 550px;
  height: 850px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0 0 50% 50% / 0 0 12% 12%;
}

.portada-foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* =================================
   TEXTOS SOBRE LA FOTOGRAFÍA
================================= */

.portada-contenido {
  position: relative;
  z-index: 1;
  padding: 55px 15px 0;
  color: var(--verde);
}

.frase {
  font-size: 17px;
  line-height: 1.05;
  margin-bottom: 0;
}

.portada h1 {
  font-size: clamp(65px, 14vw, 100px);
  font-weight: 400;
  line-height: .72;
  letter-spacing: -5px;
}

.portada h1 span {
  display: block;
  margin-left: 30px;
}


/* NOMBRES SVG */

.portada-nombres {
  display: block;
  position: relative;
  width: 90%;
  max-width: 430px;
  margin: 65px auto 0;
}

.portada-nombres img {
  display: block;
  width: 100%;
  height: auto;
}


/* =================================
   FECHA
================================= */

.fecha {
  display: table;
  margin: 250px auto 0;
  padding: 7px 12px;
  border-top: 1px solid var(--verde);
  border-bottom: 1px solid var(--verde);
  font-size: 24px;
}


/* =================================
   MENSAJE DE BIENVENIDA
================================= */

.portada-mensaje {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 65px 20px 35px;
  background: transparent;
  color: var(--crema);
  font-size: 22px;
  line-height: 1.2;
}


/* =================================
   FECHA SVG INFERIOR
================================= */

.portada-fecha-svg {
  width: 85%;
  max-width: 300px;
  margin: 35px auto 0;
}

.portada-fecha-svg img {
  display: block;
  width: 100%;
  height: auto;
}


/* =================================
   SECCIÓN 02 - CONTADOR
================================= */

.contador {
  position: relative;
  z-index: 1;
  width: min(84%, 460px);
  margin: 0 auto;
  padding: 35px 15px 50px;
  text-align: center;
  background-color: var(--verde);
  color: var(--crema);
  font-family: 'Cormorant Garamond', serif;
}

.contador-titulo {
  font-size: 22px;
  margin: 0 0 10px;
}

.contador-tiempo {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.contador-unidad {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 55px;
}

.contador-unidad span {
  font-size: 38px;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.contador-unidad small {
  font-size: 11px;
  letter-spacing: 1.5px;
  margin-top: 8px;
}


/* =================================
   SECCIÓN 03 - RELICARIO
================================= */

.relicario {
  position: relative;
  z-index: 1;
  width: min(84%, 460px);
  margin: 0 auto;
  padding: 35px 15px;
  text-align: center;
  background-color: var(--verde);
  color: var(--crema);
}

.relicario img {
  display: block;
  width: 80%;
  max-width: 380px;
  height: auto;
  margin: 0 auto;
}


/* =================================
   SECCIÓN 04 - REPRODUCTOR
================================= */

.reproductor {
  position: relative;
  z-index: 2;

  /* Siempre dentro del listón verde */
  width: min(calc(84% - 30px), 420px);
  height: 145px;

  margin: 75px auto 45px;
  padding: 0px 0px 10px;

  font-family: 'Cormorant Garamond', serif;
  background: transparent;
}


/* INFORMACIÓN DE LA CANCIÓN */

.reproductor-pista {
  position: absolute;
  top: -85px;
  left: 15px;
  right: 15px;
  height: 85px;

  padding: 10px 15px 10px 145px;

  background: var(--crema);
  color: var(--verde);

  border-radius: 15px 15px 0 0;

  opacity: 0;
  transform: translateY(15px);
  transition: .35s ease;
}

.reproductor.activo .reproductor-pista {
  opacity: 1;
  transform: translateY(0);
}

.reproductor-etiqueta {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
}

.reproductor-titulo {
  font-size: 20px;
  line-height: 1.1;
  margin-top: 3px;
}

.reproductor-artista {
  font-size: 14px;
  opacity: .75;
}


/* TARJETA PRINCIPAL */

.reproductor-cuerpo {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;

  width: 100%;
  height: 100%;

  background: var(--crema);
  border-radius: 15px;

  box-shadow: 0 15px 35px rgba(0,0,0,.16);
}


/* PORTADA CIRCULAR */

.reproductor-disco {
  position: absolute;
  top: 50%;
  left: 25px;

  width: 110px;
  height: 110px;

  transform: translateY(-50%);

  border-radius: 50%;
  overflow: hidden;

  background: var(--crema);
  border: 7px solid var(--crema);

  box-shadow: 0 5px 18px rgba(0,0,0,.15);

  z-index: 3;
}

.reproductor-disco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.reproductor.activo .reproductor-disco img {
  animation: girarDisco 5s linear infinite;
}

@keyframes girarDisco {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


/* CONTROLES */

.reproductor-controles {
  display: flex;
  align-items: center;
  gap: 15px;

  width: 100%;
  padding: 0 20px 0 155px;
}

.play-button {
  flex-shrink: 0;

  width: 48px;
  height: 48px;

  border: none;
  border-radius: 50%;

  background: var(--verde);
  color: var(--crema);

  font-size: 19px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: .2s ease;
}

.play-button:hover {
  transform: scale(1.08);
}


/* BARRA DE PROGRESO */

.reproductor-progreso {
  flex: 1;
  min-width: 0;
}

.barra-fondo {
  width: 100%;
  height: 4px;

  background: rgba(75,89,63,.2);
  border-radius: 10px;

  cursor: pointer;
  overflow: hidden;
}

.barra-avance {
  width: 0%;
  height: 100%;

  background: var(--verde);
  border-radius: 10px;
}

.reproductor-tiempos {
  display: flex;
  justify-content: space-between;

  margin-top: 7px;

  font-size: 12px;
  color: var(--verde);
}


/* =================================
   CORRECCIÓN DEL FONDO VERDE
================================= */

.portada {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* Un solo listón verde detrás de todas las secciones */
.portada::before {
  content: "";
  position: absolute;
  z-index: -1;

  top: 710px;
  bottom: 0;

  left: 50%;
  transform: translateX(-50%);

  width: min(84%, 460px);

  background: var(--verde);
}

/* Secciones integradas al listón */
.contador,
.relicario {
  position: relative;
  z-index: 0;
  background: var(--verde);
}

/* Reproductor sobre el listón */
.reproductor {
  position: relative;
  z-index: 1;
  width: min(calc(84% - 30px), 420px);
  margin: 75px auto 45px;
  background: transparent;
}

/* La tarjeta conserva su color crema */
.reproductor-cuerpo,
.reproductor-pista {
  background: var(--crema);
}
.foto-sobresaliente {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 520px;
  margin: 40px 0;
  left: 50%;
  transform: translateX(-50%);
}

.foto-sobresaliente img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
}

.frase-ceremonia {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: var(--crema);
  text-align: center;
  max-width: 40%;
  margin: 10px auto;
}

/* CONTENEDOR UNIVERSAL DE UBICACIONES */
.ubicacion {
  position: relative;
  z-index: 2;
  width: 80%;
  max-width: 460px;
  margin: 50px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

/* IMAGEN */
.ubicacion-imagen {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  object-fit: contain;
  margin-bottom: 15px;
}

/* BOTÓN */
.boton-mapa {
  display: inline-block;
  padding: 11px 35px;
  border: 1px solid var(--crema);
  border-radius: 30px;
  background: var(--crema);
  color: var(--verde);
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.boton-mapa:hover {
  background: transparent;
  color: var(--crema);
}

/* CONTENEDOR DEL ADORNO */
.adorno {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  margin: 35px 0;
  margin-left: 50%;
  transform: translateX(-50%);
  background: transparent;
  padding: 15px 0;
  box-sizing: border-box;
}

.adorno-imagen {
  display: block;
  width: 129%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0px 10px 5px rgba(2, 2, 2, 0.18));
}

/* ITINERARIO */
.itinerario {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  margin: 35px 0 35px 50%;
  transform: translateX(-57%);
  background: transparent;
  padding: 15px 0;
  box-sizing: border-box;
}

.itinerario-imagen {
  display: block;
  width: 50%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* AVISO ADULTOS */
.aviso-adultos {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 70%;
  max-width: 300px;
  margin: 35px auto;
  padding: 14px 20px;
  box-sizing: border-box;

  border: 1px solid var(--crema);
  border-radius: 30px;
  background: transparent;
  color: var(--crema);

  font-family: 'Cormorant Garamond', serif;
  text-align: center;
}

.aviso-titulo {
  font-size: 19px;
  line-height: 1.3;
}

.aviso-subtitulo {
  margin-top: 3px;
  font-size: 15px;
  font-style: italic;
  opacity: 0.85;
}

/* SECCIÓN FOTOS DE LA BODA */
.fotos-boda {
  position: relative;
  z-index: 2;
  width: 80%;
  max-width: 400px;
  margin: 45px auto;
  padding: 25px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--crema);
  font-family: 'Cormorant Garamond', serif;
}

.fotos-titulo {
  font-size: 25px;
  margin: 0 0 10px;
  font-weight: 500;
}

.fotos-texto {
  font-size: 19px;
  line-height: 1.4;
  max-width: 340px;
  margin: 0 auto 20px;
}

.fotos-qr {
  width: 155px;
  height: 155px;
  border: 1px solid var(--crema);
  background: var(--crema);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--verde);
  font-size: 18px;
  letter-spacing: 0px;
}

.fotos-subtexto {
  font-size: 15px;
  font-style: italic;
  margin: 12px 0 0;
  opacity: 0.85;
}

.regalo {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 25px 45px;
  box-sizing: border-box;
  background: transparent;
  color: var(--crema);
  font-family: 'Cormorant Garamond', serif;
  text-align: center;
}

.regalo-titulo {
  font-size: 24px;
  line-height: 1;
  margin: 0 auto 65px;
}

.regalo-texto {
  font-size: 14px;
  line-height: 1;
  margin: 0 auto 40px;
  width: 60%;  
}

.regalo-datos {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.regalo-datos img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0px 10px 5px rgba(2, 2, 2, 0.18));
}

/* Foto de portada */
.portada-foto img {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.3s ease, transform 1.3s ease;
}

.portada-foto.entrada-visible img {
  opacity: 1;
  transform: translateY(0);
}

/* Foto sobresaliente */
.foto-sobresaliente img {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.3s ease, transform 1.3s ease;
}

.foto-sobresaliente.entrada-visible img {
  opacity: 1;
  transform: translateY(0);
}

/* Foto de portada */
.portada-foto img,
.foto-sobresaliente img,
.adorno-imagen {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.3s ease, transform 1.3s ease;
}

/* Cuando aparecen */
.portada-foto.entrada-visible img,
.foto-sobresaliente.entrada-visible img,
.adorno.entrada-visible .adorno-imagen {
  opacity: 1;
  transform: translateY(0);
}

.texto-especial {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 420px;
  margin: 35px auto;
  color: var(--crema);
  font-family: 'Cormorant Garamond', serif;
  text-align: center;
}

.texto-especial p {
  width: 100%;
  font-size: 21px;
  line-height: 1.5;
  margin: 0;
  text-align: center;
}


.texto-especial .texto-destacado {
  margin-top: 12px;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.3;
}

.formulario-boda {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 480px;
  margin: 35px auto 50px;
  padding: 8px;
  box-sizing: border-box;
  background: var(--crema);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.formulario-boda iframe {
  display: block;
  width: 100%;
  height: 950px;
  border: none;
  border-radius: 8px;
  background: var(--crema);
}

/* GALERÍA */
.galeria {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 12px;
  color: var(--crema);
  font-family: 'Cormorant Garamond', serif;
  text-align: center;

  border-radius: 18px;
  box-sizing: border-box;
}

.galeria-encabezado {
  width: 85%;
  max-width: 350px;
  margin: 0 auto 25px;
}

.galeria-encabezado img {
  display: block;
  width: 80%;
  height: auto;
  margin: 0 auto;
}

/* CARRUSEL */
.carrusel {
  position: relative;
  width: 100%;
  padding: 0 38px;
  box-sizing: border-box;
}

.carrusel-contenedor {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  padding: 6px;
  box-sizing: border-box;
}

.carrusel-pista {
  display: flex;
  align-items: center;
  transition: transform 0.7s ease;
}

.carrusel-pista img {
  flex: 0 0 100%;
  width: 100%;
  height: 390px;
  object-fit: cover;
  display: block;
  border-radius: 7px;
  transform: scale(0.90);
  opacity: 0.75;
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.carrusel-pista img.foto-activa {
  transform: scale(1);
  opacity: 1;
}

/* FLECHAS */
.carrusel-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--verde);
  color: var(--crema);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.carrusel-flecha:hover {
  background: var(--crema);
  color: var(--verde);
}

.carrusel-flecha.anterior { left: 0; }
.carrusel-flecha.siguiente { right: 0; }

/* INDICADORES */
.carrusel-indicadores {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
}

.carrusel-punto {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--crema);
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carrusel-punto.activo {
  opacity: 1;
  transform: scale(1.4);
}


.carrusel-pista {
  display: flex;
  transition: transform 0.6s ease;
}

.carrusel-pista img {
  flex: 0 0 100%;
  width: 100%;
  height: 390px;
  object-fit: cover;
  transform: scale(0.90);
  opacity: 0.75;
  transition:
    transform 0.6s ease,
    opacity 0.6s ease;
}

.carrusel-pista img.foto-activa {
  transform: scale(1);
  opacity: 1;
}

@media (max-width: 600px) {
  .carrusel-pista img {
    height: 330px;
  }
}


/* MÓVIL */
@media (max-width: 480px) {
  .galeria {
    margin: 0 auto;
  }

  .carrusel {
    padding: 0 32px;
  }

  .carrusel-pista img {
    height: 330px;
  }

  .carrusel-pista img:first-child {
    height: 380px;
  }
}


/* VISTA AMPLIADA DE GALERÍA */

.galeria-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.94);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.galeria-lightbox.activo {
  opacity: 1;
  visibility: visible;
}

.galeria-lightbox img {
  display: block;
  max-width: 95%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  transform: scale(0.94);
  transition: transform 0.35s ease;
}

.galeria-lightbox.activo img {
  transform: scale(1);
}

.lightbox-cerrar {
  position: absolute;
  top: 20px;
  right: 25px;
  border: none;
  background: transparent;
  color: var(--crema);
  font-family: Arial, sans-serif;
  font-size: 42px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  padding: 5px 10px;
}

body.lightbox-abierto {
  overflow: hidden;
}

.carrusel-pista img {
  cursor: zoom-in;
}


/* FLECHAS DE IMAGEN AMPLIADA */

.lightbox-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--crema);
  font-size: 32px;
  font-weight: 300;
  padding: 15px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.lightbox-flecha:hover {
  opacity: 0.55;
}

.lightbox-flecha.anterior {
  left: 15px;
}

.lightbox-flecha.siguiente {
  right: 15px;
}

@media (max-width: 600px) {
  .lightbox-flecha {
    font-size: 25px;
    padding: 10px;
  }

  .lightbox-flecha.anterior {
    left: 3px;
  }

  .lightbox-flecha.siguiente {
    right: 3px;
  }

  .galeria-lightbox {
    padding: 35px;
  }

  .galeria-lightbox img {
    max-width: 100%;
    max-height: 78vh;
  }
}


.footer {
  position: relative;
  z-index: 10;
  display: block;
  width: 100%;
  min-height: 60px;
  margin: 40px auto 0;
  margin-top: 0;
  padding: 25px 10px;
  box-sizing: border-box;
  text-align: center;
  color: var(--verde);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  letter-spacing: 1px;
  background: var(--crema);
}

.footer p {
  display: block;
  margin: 0;
  color: var(--cerde);
}

.footer span {
  font-weight: 800;
}

@media (max-width: 480px) {
  .galeria {
    margin: 40px auto;
  }

  .galeria-titulo {
    font-size: 29px;
  }

  .carrusel {
    padding: 0 32px;
  }
}

/* Ajuste móvil */
@media (max-width: 480px) {
  .portada::before {
    top: 650px;
    width: 84%;
  }

  .reproductor {
    width: calc(84% - 25px);
  }
}

/* =================================
   RESPONSIVE - TABLET Y MÓVIL
================================= */

@media (max-width: 480px) {

  .portada-foto {
    height: 780px;
  }

  .portada::before {
    top: 650px;
    width: 84%;
  }

  .portada-contenido {
    padding-top: 45px;
  }

  .frase {
    margin-bottom: 60px;
  }

  .portada-mensaje {
    font-size: 19px;
    padding: 55px 20px 40px;
  }

  .contador {
    width: 84%;
  }

  .relicario {
    width: 84%;
  }

  /* REPRODUCTOR MÓVIL */

  .reproductor {
    width: calc(84% - 25px);
    height: 130px;
    margin-top: 75px;
  }

  .reproductor-disco {
    width: 90px;
    height: 90px;
    left: 15px;
  }

  .reproductor-controles {
    padding-left: 115px;
    padding-right: 12px;
    gap: 10px;
  }

  .play-button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .reproductor-pista {
    padding-left: 115px;
  }

    .texto-especial {
    width: 60%;
  }
}


/* =================================
   PANTALLAS PEQUEÑAS
================================= */

@media (max-width: 380px) {

  .contador-tiempo {
    gap: 10px;
  }

  .contador-unidad {
    min-width: 48px;
  }

  .contador-unidad span {
    font-size: 32px;
  }

  .contador-unidad small {
    font-size: 9px;
  }

  .reproductor {
    width: calc(84% - 20px);
  }

  .reproductor-titulo {
    font-size: 18px;
  }

  .reproductor-artista {
    font-size: 13px;
  }

  .reproductor-controles {
    gap: 8px;
    padding-left: 108px;
    padding-right: 10px;
  }

  .reproductor-disco {
    width: 85px;
    height: 85px;
  }

  .play-button {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .texto-especial {
    width: 80%;
  }
}
