/* --- NAV BAR ESTILO BODAS.NET --- */
header {
  background: #fff;
  padding: 30px 20px 15px 20px;
  border-bottom: 1px solid #eee;
}

/* --- Estructura header flexible --- */
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: 36px;
  font-weight: 400;
  margin: 0;
  color: #111;
}

h2 { 
  color:#b74d4d;
  text-align:center;
}

.lead {
  font-family: "Inter", sans-serif;
  color: #666;
  font-size: 14px;
  margin-top: 4px;
  text-align: center;
}

/* --- Botón menú móvil --- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #111;
  transition: transform 0.3s ease;
}

.menu-toggle.active {
  transform: rotate(90deg);
}

/* --- Navegación --- */
nav.nav-links {
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

nav a {
  text-decoration: none;
  color: #111;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

nav a:hover {
  border-color: #111;
}

nav a.active {
  border-color: #111;
  font-weight: 500;
}

/* --- FOOTER LIMPIO --- */
footer {
  text-align: center;
  padding: 30px 0;
  color: #777;
  font-size: 14px;
  background: #fafafa;
  margin-top: 60px;
  border-top: 1px solid #eee;
}

/* --- CONTENIDO GENERAL --- */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Playfair Display", serif;
  color: #222;
  background: #fffdfc;
  line-height: 1.6;
}

main.container {
  max-width: 1000px;
  margin: 0 auto;
}

.intro {
  text-align:center;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  padding: 0 20px;
  margin: 0;
  margin-bottom: 20px;
}

/* --- GALERÍA POLAROID --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

.polaroid {
  width: 260px;
  height: 300px;
  perspective: 1000px;
  cursor: pointer;
}

.polaroid-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
  transform-origin: center center;
}

.polaroid.flipped .polaroid-inner {
  transform: rotateY(180deg);
}

.polaroid-front,
.polaroid-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.polaroid-front img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
}

.caption {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin: 0;
  line-height: 1;
}

.polaroid-back {
  transform: rotateY(180deg);
  background: #fafafa;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: #444;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-sizing: border-box;
}

/* --- TAB PROGRAMA --- */
.program-container {
  opacity: 0; /* inicial invisible */
  transition: opacity 0.5s ease;
}

.program-container.page-enter {
  opacity: 1;
}

.program-container.page-leave {
  opacity: 0;
}

/* --- HEADER MEDIA --- */
.header-media {
  position: relative;
  width: 100%;
  margin-top: 20px;
}

/* --- ESTILO TEXTO PRINCIPAL (FÁTIMA & DIEGO) --- */
.header-media .initials {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Parisienne', cursive;
  font-size: clamp(6px, 6vw, 150px);
  letter-spacing: 2px;
  font-weight: 400;
  color: #fff;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
  text-align: center;
  white-space: nowrap;
}


/* --- EFECTO FADE ENTRE PÁGINAS --- */
.page-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.page-content {
  margin: 0 auto;
  width: 100%;
  position: relative;
  opacity: 0;               /* Comienza invisible */
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-content.page-enter {
  opacity: 1;               /* Al cargar, se vuelve visible */
}

.page-content.page-leave {
  opacity: 0;               /* Al salir, se desvanece */
}

.content-wrapper {
  width: 100%;
  max-width: 900px;
  padding: 40px 20px;
  box-sizing: border-box;
  text-align: center;
}


/* --- MENÚ RESPONSIVE --- */
@media (max-width: 600px) {
  nav.nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding: 15px 0;
    animation: fadeDown 0.3s ease;
  }

  nav.nav-links.open {
    display: flex;
  }

  nav a {
    margin: 10px 0;
    font-size: 16px;
  }

  .menu-toggle {
    display: block;
  }
}

/* --- Animación suave del menú móvil --- */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* --- CRONÓMETRO PROPORCIONAL --- */
#countdown {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: "DM Serif Display", serif;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  background: rgba(0, 0, 0, 0.1); /* Fondo semitransparente */
  padding: clamp(6px, 1.5vw, 15px);       /* tamaño proporcional */
  border-radius: clamp(12px, 2vw, 20px);  /* bordes proporcionales */
  backdrop-filter: blur(4px); /* efecto de desenfoque de fondo */
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.countdown-box {
  display: flex;
  gap: clamp(8px, 2vw, 15px); /* separación proporcional */
  justify-content: center;
  align-items: center;
  font-size: 1rem;
}

.countdown-box div {
  text-align: center;
}

.countdown-box span {
  font-size: clamp(1rem, 3vw, 3rem); /* números escalables */
  font-weight: 400;
  display: block;
}

.countdown-box small {
  font-size: clamp(0.7rem, 1.5vw, 1.5rem); /* etiquetas escalables */
  opacity: 0.5;
}

/* --- HEADER MÁS COMPACTO SOLO EN MÓVIL --- */
@media (max-width: 600px) {
  header {
    padding: 10px 15px 8px 15px;
  }

  h1 {
    font-size: 22px;
  }

  .lead {
    font-size: 11px;
    margin-top: 2px;
  }

  .header-media {
    margin-top: 5px;
  }
}

.bank-info {
  background-color: #fff4e6;
  border: 2px solid #b74d4d;
  padding: 8px;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.2);
  max-width: 500px;
}

.iban {
  font-size: 1.4em;
  font-family: 'DM Serif Display', serif;
  font-weight: bold;
  letter-spacing: 1px;
  color: #333;
  white-space: nowrap;
}

#buscar,#enviar {
  background: #b74d4d;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

#buscar:hover {
  background: #9c3f3f;
}

#mensajeError {
  white-space: pre-line;
}

#nombre {
  padding: 1¡0x 20px;
}

/* Ajusta el tamaño en pantallas pequeñas */
@media (max-width: 600px) {
  .iban {
    font-size: 1.2em; /* Reduce tamaño en móviles */
  }
}

/* Ajuste del contador en pantallas pequeñas */
@media (max-width: 600px) {
  #countdown {
    padding: 2px 10px;
    border-radius: 10px;
  }

  .countdown-box {
    font-size: 0.8rem;
  }

  .countdown-box span {
    font-size: 1rem; /* tamaño de los números */
  }

  .countdown-box small {
    font-size: 0.5rem; /* etiquetas "días", "horas", etc. */
    margin-top: -2px;  /* acerca más la etiqueta al número */
    display: block;
  }
}