/* General */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  color: #222;
  background: #f9f5f2;
  scroll-behavior: smooth;
}

@font-face {
  font-family: 'High Empathy';
  src:url('HighEmpathy.otf') format('opentype'),
    url('HighEmpathy.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}



/* Navbar con efecto moderno */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f9f5f2;
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 10px 20px;
}
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}
.navbar a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s;
}
.navbar a:hover {
  color: #f9f5f2;
}

/* Hero con foto */
.hero {
  background: url('manosbn.JPG') no-repeat center center/cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  color: #f9f5f2;
  transition: opacity 0.5s ease;
}
.hero .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #f9f5f2(0,0,0,0.4);
}
.hero-text {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero h1 {
  font-size: 8rem;
  font-family: 'High Empathy', serif;
  margin: 0;
}
.hero p {
  font-size: 1.5rem;
  margin-top: 10px;
}
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  border-radius: 30px;
  background: #f9f5f2;
  color: #3d3b3a;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}
.btn:hover {
  background: #9c7448;
}

/* Secciones en cajas */
section {
  padding: 80px 20px;
}
.box {
  max-width: 900px;
  margin: 80px auto;
  background: #f9f5f2;
  border-radius: 15px;
  padding: 50px 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
}

/* Invitación */
.invitacion {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 20px;
  background: #f9f5f2;
  overflow: hidden;
  text-align: center;
}

.invitacion .content {
  max-width: 600px;
  z-index: 2;
}

.subtitulo {
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 45px;
  font-weight: 300;
  text-transform: uppercase;
  color: #3d3b3a;
}

.nombres {
  font-family: 'High Empathy', serif;
  font-size: 8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #3d3b3a;
}

.nombres span {
  color: #3d3b3a; 
}

.boda-texto {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 20px;
}

.fecha {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 4px;
  color: #3d3b3a;
}
/* Imágenes laterales */
.side-images {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 100px;
  z-index: 1;
}

.side-images img {
  width: 230px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.side-images.left { left: 100px; }
.side-images.right { right: 100px; }

.side-images img:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Responsivo */
@media (max-width: 768px) {
  .side-images { display: none; }
  .invitacion { padding: 80px 20px; }
}

/* Para pantallas pequeñas */
/* APLICA ESTO EN TU BLOQUE @media (max-width: 768px) o 820px */
@media (max-width: 768px) {
  /* ... tus otras reglas de corrección ... */

  /* --- Corrección de la Sección Invitación --- */
  .invitacion {
    /* Desactivamos el flexbox si lo tienes en escritorio para una mejor columna */
    flex-direction: column;
    padding: 40px 20px; /* Ajustamos el padding para móvil */
  }

  /* 1. MOSTRAR las Imágenes y Alinear */
  .side-images {
    display: flex !important; /* Forzamos a que se muestren */
    position: relative; /* Cambiamos a posicionamiento relativo para que fluyan en el documento */
    flex-direction: row; /* Las mostramos una al lado de la otra */
    justify-content: center; /* Centramos las imágenes */
    gap: 15px; /* Reducimos el espacio entre ellas */
    margin: 30px auto; /* Agregamos margen vertical */
    left: auto; /* Anulamos left: 100px */
    right: auto; /* Anulamos right: 100px */
  }

  /* 2. Ajustar el Tamaño de las Fotos para Móvil */
  .side-images img {
    width: 120px; /* Tamaño de imagen más pequeño para no desbordar */
    height: 120px; /* Aseguramos que sean cuadradas o ajustadas */
    object-fit: cover;
    gap: 10px;
  }

  /* 3. Ajuste Final de la Animación de Imagen */
  .side-images.left, 
  .side-images.right {
    /* Apilamos las imágenes una después de la otra sin alineaciones laterales */
    flex-direction: row;
    gap: 15px;
  }
}

/* Ubicación */
.ubicacion h2 {
  font-size: 1.8rem;
  color: #b38b59;
}
.mapa {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}


/* Contador */
#timer {
  font-size: 2rem;
  font-weight: bold;
  margin: 20px 0;
  color: #b38b59;
}
.contador h2 span {
  color: #b33;
}
.contador .aviso {
  margin-top: 15px;
  font-style: italic;
}

/* Programa */
.programa h2 {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: #b38b59;
}
.programa ul {
  list-style: none;
  padding: 0;
}
.programa li {
  margin: 15px 0;
  font-size: 1.2rem;
  background: #fffdf8;
  padding: 10px;
  border-left: 4px solid #b38b59;
  display: inline-block;
}

/* ===== RSVP (Formulario) ===== */
#rsvp {
  max-width: 600px;
  margin: 50px auto;
  padding: 50px 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  text-align: center;
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

#rsvp h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 25px;
  color: #3d3b3a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#rsvp form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#rsvp input,
#rsvp select,
#rsvp textarea {
  display: block;
  width: 100%;            /* todos ocupan el mismo ancho */
  box-sizing: border-box; /* incluye padding/borde en el ancho */
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  outline: none;
  background: #fff;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  appearance: none;       /* quita estilos raros en select */
  -webkit-appearance: none;
  -moz-appearance: none;
}

#rsvp textarea {
  resize: none;
  min-height: 120px;
}

#rsvp input:focus,
#rsvp select:focus,
#rsvp textarea:focus {
  border-color: #3d3b3a;
  box-shadow: 0 0 6px #3d3b3a;
}

#rsvp textarea {
  resize: none;
  min-height: 100px;
}

#rsvp button {
  padding: 14px;
  background: linear-gradient(135deg, #3d3b3a, #817c7a);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

#rsvp button:hover {
  background: linear-gradient(135deg, #948e8c, #3d3b3a);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

#form-status {
  margin-top: 18px;
  font-size: 1rem;
  color: #555;
  font-style: italic;
  min-height: 22px; /* para que no brinque al aparecer */
}
/* Footer */
footer {
  padding: 20px;
  background: #222;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}

/* Animaciones */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Timeline con fotos (6 eventos) ===== */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 40px auto 10px;
  padding: 10px 0 0;
}

/* columna central */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: linear-gradient(180deg, #3d3b3a, #3d3b3a);
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 18px 34px;
  box-sizing: border-box;

  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.timeline-item.show { opacity: 1; transform: translateY(0); }

.timeline-item.left  { left: 0;   text-align: right; }
.timeline-item.right { left: 50%; text-align: left;  }

/* punto que toca la línea central */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background: #3d3b3a;       /* dorado suave */
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #3d3b3a;
}
.timeline-item.left::before  { right: -7px; }
.timeline-item.right::before { left:  -7px; }

/* tarjeta + foto */
.timeline-card {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  max-width: 250px;
}

.timeline-photo {
  flex: 0 0 auto;
  width: 76px; height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.timeline-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.timeline-info h3 {
  margin: 2px 0 6px;
  font-size: 1.15rem;
  color: #3d3b3a;
}
.timeline-info .time {
  display: inline-block;
  font-weight: 600;
  letter-spacing: .5px;
  font-size: .95rem;
  color: #555;
  margin-bottom: 6px;
}
.timeline-info p {
  margin: 0;
  color: #555;
  font-size: .95rem;
  line-height: 1.45;
}

/* responsive */
@media (max-width: 820px) {
 .timeline::before {
    left: 28px; /* Mueve la línea central a la izquierda */
  }

  .timeline-item {
    width: 100%; /* Ocupa todo el ancho */
    left: 0; /* Asegura que el contenedor esté al inicio */
    padding: 18px 16px 18px 60px; /* Suficiente espacio para que la tarjeta no choque con la línea */
    text-align: left; /* Todo alineado a la izquierda */
  }

  /* Anclaje de los puntos del timeline a la nueva posición de la línea */
  .timeline-item.left::before,
  .timeline-item.right::before {
    left: 22px; /* Ancla los puntos sobre la línea vertical */
    right: auto;
  }

  /* Forzamos que los ítems del lado "izquierdo" se alineen a la izquierda en móvil */
  .timeline-item.left {
    text-align: left; /* ANULA el text-align: right; del CSS de escritorio */
  }

  .timeline-card {
    max-width: 100%; /* La tarjeta ocupa todo el espacio disponible */
    flex-direction: row; /* Mantenemos la foto junto al texto */
  }
}

/* --- Sección Regalo --- */
.regalo-section {
  background: #fafafa;
  border-radius: 16px;
  padding: 40px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  margin-top: 40px;
}

.section-title {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 30px;
  color: #000000;
  font-family: 'High Empathy', serif;
}

.regalo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.regalo-img-container {
  width: 100%;
  max-width: 450px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.regalo-img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.regalo-img:hover {
  transform: scale(1.05);
}

.regalo-text {
  text-align: center;
  max-width: 600px;
}

.regalo-text h3 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.regalo-text .mensaje {
  font-size: 1rem;
  color: #555;
  margin-bottom: 12px;
}

.regalo-text .nota {
  font-size: 0.95rem;
  font-style: italic;
  color: #777;
}

/* --- Hero Section sin imagen extra --- */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: rgb(0, 0, 0);
  background: #f9f5f2;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #f9f5f2;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}


/* --- Animación Fade In con Scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Dress Code Mejorado ===== */
#dresscode {
  background: #f9f5f2;
  padding: 60px 20px;
  text-align: center;
  border-radius: 20px;
  max-width: 700px;
  margin: 40px auto;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  backdrop-filter: blur(6px);
}

.dresscode-container h2 {
  font-size: 1.5rem;
  color: #555;
  margin: 10px 0 10px;
  font-weight: 400;
}

.dresscode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #3d3b3a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(to right, #5a5756, #3d3b3a);
  border-radius: 2px;
}

.dresscode-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dresscode-icon img {
  width: 350px;
  height: auto;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0px 3px 6px rgba(0,0,0,0.2));
}
.dresscode-text h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.dresscode-text p {
  font-size: 1rem;
  color: #444;
  margin: 0;
  line-height: 1.5;
}

.dresscode-text strong {
  font-weight: 600;
  color: #333;
}

.note {
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
  margin-top: 10px;
}

/* Animación flotante para el ícono */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

#form-status {
  margin-top: 20px;
  font-size: 1rem;
  color: #555;
  font-style: italic;
  min-height: 24px; /* espacio reservado para que no brinque */
  text-align: center; /* centrado */
  display: block;
}

/* Mensajes de éxito y error diferenciados */
#form-status.success {
  color: #2e7d32; /* verde */
  font-weight: 500;
}

#form-status.error {
  color: #c62828; /* rojo */
  font-weight: 500;
}

.fade-up, .fade-left, .fade-right {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease-out;
}

/* Direcciones diferentes */
.fade-left {
  transform: translateX(-50px);
}

.fade-right {
  transform: translateX(50px);
}

/* Cuando entran en pantalla */
.show {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- Corrección de desplazamiento lateral --- */
html, body {
  width: 100%;
  overflow-x: hidden; /* evita el scroll lateral */
}

/* Ajuste para centrar todo correctamente en móvil */
.hero, 
section, 
.invitacion, 
header, 
footer {
  max-width: 100vw;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Navbar más fluida en pantallas pequeñas */
@media (max-width: 768px) {
  header {
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 10px;
  }
  .navbar ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  .navbar a {
    font-size: 0.9rem;
  }
}
