*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@font-face {
  font-family: 'Liana';
  src: url('assets/fonts/Liana Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Great Vibes';
  src: url('assets/fonts/great-vibes-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('assets/fonts/dancing-script-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/playfair-display-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --primary: #757B51;
  --secondary: #B14B61;
  --tertiary: #E8A8B6;
  --bg-color: #FAF9F6;
  --text-color: #61624D;
  --countdown-color: #FAF9F6;
  --accent: #D1D2C6;
}
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  width: 100%;
  margin: 0;
}

/* Bloquea el scroll mientras la pantalla de apertura está visible */
html.splash-active, html.splash-active body {
  overflow: hidden;
  height: 100%;
}

/* ══ SPLASH ══ */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #F0EFEA 0%, #FAF9F6 50%, #E8E8DF 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  overflow-y: auto;
}
#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-names { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--primary); margin-bottom: 0.5rem; }
.splash-date { font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-color); margin-bottom: 2.5rem; }
.btn-open {
  background: transparent; border: 1px solid var(--primary); color: var(--primary);
  padding: 1rem 2rem; border-radius: 50px; font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 10px;
}
.btn-open:hover { background: var(--primary); color: #fff; }

/* Floating Player */
#music-player {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 8888;
  background: #757B51; /* Verde oscuro estilo la imagen */
  border: 1px solid #C9962A; /* Borde dorado */
  border-radius: 50px; padding: 0.8rem 1.2rem;
  display: none; align-items: center; gap: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
#music-player.visible { display: flex; }

.player-btn { background: none; border: none; color: #C9962A; font-size: 1.2rem; cursor: pointer; }

.player-info { display: flex; flex-direction: column; text-align: left; }
.p-title { font-size: 0.85rem; font-weight: 600; color: #E8C55A; } /* Dorado claro */
.p-artist { font-size: 0.7rem; color: #A8A8A8; } /* Gris claro */

/* Barras animadas */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars span { display: block; width: 3px; background: #C9962A; border-radius: 2px; animation: bar 1s ease-in-out infinite; }
.bars span:nth-child(1){height:6px;animation-delay:0s}
.bars span:nth-child(2){height:12px;animation-delay:0.15s}
.bars span:nth-child(3){height:8px;animation-delay:0.3s}
.bars span:nth-child(4){height:14px;animation-delay:0.45s}
.bars.paused span { animation-play-state:paused; }
@keyframes bar { 0%,100%{transform:scaleY(0.4)} 50%{transform:scaleY(1)} }

/* ══ MAIN CONTENT LAYOUT ══ */
.container {
  width: 100%; /* Ocupa el 100% del ancho */
  max-width: 100%; /* Elimina limitación de 600px */
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; margin: 1rem auto; display: block; }

/* Imágenes de título reutilizables (splash, cuenta regresiva, el gran día) */
.splash-monogram { width: min(700px, 60vw, 32vh); margin-bottom: -3rem; margin-top: -1rem; }
.splash-couple { width: min(800px, 75vw, 40vh); margin-bottom: 0.5rem; }
.splash-guest {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--text-color);
  opacity: 0.85;
  line-height: 1.6;
  margin: 0.5rem 0 1.5rem;
}
.titulo-img { width: min(500px, 80vw); }

.countdown-title {
  font-family: 'Liana', cursive;
  font-weight: 400;
  color: var(--countdown-color);
  font-size: clamp(1.6rem, 5.5vw, 3.2rem);
  line-height: 1.35;
  margin: 0 auto 1.2rem;
  max-width: 26ch;
}

h2, h3 { font-family: 'Playfair Display', serif; font-weight: 400; color: var(--primary); }
.subtitle { font-size: clamp(0.75rem, 2vw, 1.1rem); letter-spacing: 2px; text-transform: uppercase; color: var(--text-color); margin-top: 0rem; margin-bottom: 0rem; display: inline-block; }
.serif-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--primary); margin: 0.5rem 0; }
.date-highlight { font-size: 1.2rem; font-weight: 600; letter-spacing: 2px; margin: 0.5rem 0; color: var(--text-color); }
p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 1rem; color: var(--text-color); }

section { padding: 3rem 1rem; border-bottom: 1px solid rgba(117, 123, 81, 0.15); width: 100%; }
section:last-of-type { border-bottom: none; }

#final { background-color: #717847; }

.btn-outline {
  display: inline-block; padding: 0.8rem 1.5rem; border: 1px solid var(--primary);
  color: var(--primary); text-decoration: none; font-size: 0.75rem; letter-spacing: 2px;
  text-transform: uppercase; margin-top: 1rem; transition: 0.3s;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; max-width: 800px; margin-left: auto; margin-right: auto; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1.5rem; text-align: left; max-width: 500px; margin-left: auto; margin-right: auto; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.8rem; border: none; border-bottom: 1px solid var(--primary);
  background: transparent; font-family: 'Montserrat', sans-serif; color: var(--text-color);
  outline: none;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.6rem 2rem;
  background-color: #757B51; /* Color oliva */
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  margin-top: 1rem;
  cursor: pointer;
  transition: background 0.3s, opacity 0.3s;
}
.btn-submit:disabled { cursor: not-allowed; opacity: 0.85; }
.btn-submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
}
.btn-submit.is-loading .btn-submit-text { opacity: 0.75; }
.btn-submit.is-loading .btn-submit-spinner { display: inline-block; animation: btn-submit-spin 0.7s linear infinite; }
@keyframes btn-submit-spin { to { transform: rotate(360deg); } }

/* ══ RSVP / Confirmación por persona ══ */
.rsvp-list { max-width: 480px; margin: 0 auto; text-align: left; }
.rsvp-guest {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.8rem; padding: 1rem 0; border-bottom: 1px solid rgba(117, 123, 81, 0.2);
}
.rsvp-guest:last-child { border-bottom: none; }
.rsvp-name { font-family: 'Playfair Display', serif; color: var(--primary); font-size: 1rem; }
.rsvp-options { display: flex; gap: 0.6rem; }
.rsvp-btn {
  padding: 0.45rem 1.1rem; border-radius: 20px; border: 1px solid var(--primary);
  background: transparent; color: var(--primary); font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.03em; cursor: pointer; transition: 0.25s;
}
.rsvp-btn:hover { background: rgba(117, 123, 81, 0.12); }
.rsvp-btn.selected.rsvp-si { background: var(--primary); color: #fff; }
.rsvp-btn.selected.rsvp-no { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.rsvp-note { margin-top: 1.5rem; }
.rsvp-note textarea { width: 100%; }
.rsvp-message { font-size: 0.8rem; margin-top: 0.6rem; min-height: 1.2em; }
.rsvp-message.error { color: var(--secondary); }
.rsvp-message.success { color: var(--primary); }
.rsvp-thanks { text-align: center; }
.rsvp-thanks h3 { margin-bottom: 0.5rem; }
.rsvp-list-readonly { margin: 1.5rem auto; }
.rsvp-list-readonly .rsvp-guest { justify-content: space-between; }
.rsvp-status-tag {
  padding: 0.35rem 0.9rem; border-radius: 20px; font-size: 0.75rem;
  letter-spacing: 0.03em; font-weight: 600;
}
.rsvp-status-tag.rsvp-status-si { background: var(--primary); color: #fff; }
.rsvp-status-tag.rsvp-status-no { background: var(--secondary); color: #fff; }
.rsvp-contact-note { font-size: 0.85rem; font-style: italic; margin-top: 1rem; }

/* Countdown */
.countdown-wrapper {
  background-image: url('assets/images/fondo-cuenta-regresiva.png');
  background-color: #717847;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: 30vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  border-radius: 0px;
  margin-top: -2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.countdown { display: flex; justify-content: center; gap: clamp(1rem, 5vw, 3rem); flex-wrap: wrap; }
.cd-item { text-align: center; }
.cd-number { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 8vw, 3.5rem); color: var(--countdown-color); }
.cd-label { font-size: clamp(0.6rem, 1.5vw, 0.85rem); letter-spacing: 3px; text-transform: uppercase; color: var(--countdown-color); }

/* Efecto Pulsante para el botón */
.btn-open {
  animation: pulsante 2s infinite;
}

@keyframes pulsante {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(117, 123, 81, 0.7); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(117, 123, 81, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(117, 123, 81, 0); }
}

/* Contenedor de los dos eventos */
.event-grid {
  display: grid;
  /* min(300px, 100%) evita que la columna fuerce overflow en pantallas angostas */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 40px;
  margin-top: -2rem;
  padding: 0 1rem;
}

/* Tarjeta individual - Ajuste para Grid */
.event-card {
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-card img {
  width: 90%;
  height: auto;
  margin-bottom: -2rem;
}

/* Estilo de los textos en la tarjeta */
.event-card .serif-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.event-card p {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 1px;
  line-height: 1.5;
  color: #61624D;
}

/* Botón estilo rústico/dorado de la imagen */
.btn-map {
  display: inline-block;
  padding: 0.6rem 2rem;
  background-color: #757B51; /* Color oliva */
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  margin-top: 1rem;
  transition: background 0.3s;
}

.btn-map:hover {
  background-color: #5a5f3e;
}

/* Cabecera del programa */
.programa-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0rem;
  flex-wrap: wrap;
}

.header-img { width: min(400px, 40vw); margin: 0; }
.header-title { width: min(800px, 40vw); margin: 0; }

/* Grid de eventos */
.eventos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.item { margin-bottom: 2rem; }
.hora { font-size: clamp(0.9rem, 1.8vw, 1.1rem); letter-spacing: 2px; color: var(--text-color); margin-bottom: 0.2rem; }
.lugar { font-size: clamp(0.8rem, 1.5vw, 0.95rem); font-style: italic; color: #61624D; }

/* Ajuste para pantallas pequeñas */
@media (max-width: 600px) {
  .eventos-grid { grid-template-columns: 1fr; gap: 0; text-align: center; }
  .programa-header { flex-direction: column; }
  .header-img, .header-title { width: min(320px, 75vw); }
  .columna:nth-child(2) .item:first-child { margin-top: 0; }
}

/* Para los títulos de los eventos (ej. "Recibimiento", "Ceremonia") */
.serif-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--primary);
}
/* Selecciona la segunda columna y baja su primer elemento (solo en layout de 2 columnas) */
@media (min-width: 601px) {
  .columna:nth-child(2) .item:first-child {
    margin-top: 4.5rem; /* 3 espacios aproximados (1.5rem por espacio) */
  }
}
/* Contenedor principal flex */
.dress-code-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* Imagen a la izquierda */
.dress-code-image { flex: 1; text-align: center; min-width: 0; }
.dress-code-image img { width: 100%; max-width: 350px; }

/* Contenido a la derecha */
.dress-code-content { flex: 1.5; text-align: left; }
.title-serif { font-family: 'Great Vibes', cursive; font-size: 3rem; color: var(--primary); margin-bottom: 1rem; }
.description { margin-bottom: 2rem; font-size: 0.95rem; }

/* Reglas de damas/caballeros */
.dress-rule { margin-bottom: 1.5rem; }
.role { font-family: 'Dancing Script', cursive; font-size: 1.6rem; color: var(--primary); margin-bottom: 0.5rem; }

hr { border: 0; border-top: 1px solid #D1D2C6; margin: 1.5rem 0; }

/* Botón Pinterest */
.btn-pinterest {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: #A33B53; /* Color granate */
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-top: 1rem;
}

/* Adaptación móvil */
@media (max-width: 768px) {
  .dress-code-container { flex-direction: column; text-align: center; }
  .dress-code-content { text-align: center; }
}
.vestimenta-section {
  position: relative;
  padding: 4rem 2rem;
  overflow: hidden;
}

.deco-esquina {
  position: absolute;
  width: 120px;
  height: auto;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 600px) {
  .vestimenta-section { padding: 3rem 0.5rem; }
  .deco-esquina { width: 45px; opacity: 0.6; }
}

/* Posicionamiento en cada esquina */
.top-left { top: 10px; left: 10px; }
.top-right { top: 10px; right: 10px; }
.bottom-left { bottom: 10px; left: 10px; }
.bottom-right { bottom: 10px; right: 10px; }

/* Opcional: Rotar ligeramente las imágenes para que miren hacia afuera */
.top-right { transform: rotate(90deg); }
.bottom-right { transform: rotate(180deg); }
.bottom-left { transform: rotate(270deg); }

.reserved-colors {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.5); /* Ligero fondo para resaltar */
  border-radius: 10px;
  text-align: center;
}

.colors-title {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #333;
  margin-bottom: 1.5rem;
}

.colors-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

.circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.color-item span {
  font-size: 0.65rem;
  text-align: center;
  font-weight: bold;
  color: #555;
}

/* --- SECCIÓN: Melodía de nuestro amor --- */
.melody-banner {
    background-color: #933846;
    color: white;
    width: 100%;
    padding: 50px 0;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.melody-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    padding: 0 calc(180px + 3rem);
    position: relative;
    z-index: 2;
}

/* --- Configuraciones de las Sillas --- */
.chair-img {
    position: absolute;
    width: 180px; 
    opacity: 0.95;
    object-fit: contain;
    top: 50%;
}

.chair-left {
    left: 0;
    transform: translateY(-50%);
}

.chair-right {
    right: 0;
    transform: translateY(-50%) scaleX(-1);
}

.melody-text-container {
    text-align: center;
    max-width: 600px;
    padding: 0 20px;
    z-index: 2;
}

.melody-title {
    font-family: 'Great Vibes', cursive;
    color: white;
    font-size: 4.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.2;
}

.melody-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: white;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    font-weight: 300;
}

/* Adaptación para pantallas de celular */
@media screen and (max-width: 900px) {
    .melody-banner {
        padding: 50px 0;
    }
    .melody-content {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 20px;
    }
    .chair-img {
        position: static;
        width: 110px;
        opacity: 0.95;
        transform: none;
    }
    .chair-left { order: -1; }
    .chair-right { order: 1; transform: scaleX(-1); }

    .melody-title { font-size: clamp(2.2rem, 9vw, 3.5rem); }
    .melody-subtitle { font-size: 0.9rem; }
}

/* ══ ANIMACIONES DE APARICIÓN AL HACER SCROLL ══ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.reveal-left { transform: translateX(-50px); }
.reveal.reveal-right { transform: translateX(50px); }
.reveal.reveal-zoom { transform: scale(0.92); }

.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger automático para tarjetas/items dentro de una grilla revelada en grupo */
.event-grid .event-card:nth-child(1) { --reveal-delay: 0s; }
.event-grid .event-card:nth-child(2) { --reveal-delay: 0.15s; }

.columna .item:nth-child(1) { --reveal-delay: 0s; }
.columna .item:nth-child(2) { --reveal-delay: 0.12s; }
.columna .item:nth-child(3) { --reveal-delay: 0.24s; }
.columna .item:nth-child(4) { --reveal-delay: 0.36s; }

.colors-grid .color-item:nth-child(1) { --reveal-delay: 0s; }
.colors-grid .color-item:nth-child(2) { --reveal-delay: 0.06s; }
.colors-grid .color-item:nth-child(3) { --reveal-delay: 0.12s; }
.colors-grid .color-item:nth-child(4) { --reveal-delay: 0.18s; }
.colors-grid .color-item:nth-child(5) { --reveal-delay: 0.24s; }
.colors-grid .color-item:nth-child(6) { --reveal-delay: 0.3s; }
.colors-grid .color-item:nth-child(7) { --reveal-delay: 0.36s; }

/* Respeta a quienes prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ══ AJUSTES GENERALES PARA MÓVIL ══ */
@media (max-width: 600px) {
  .container { padding: 1.2rem; }
  section { padding: 2.5rem 0.8rem; }
  .event-grid { gap: 24px; padding: 0; }
  .dress-code-container { padding: 0.5rem; gap: 1.5rem; }
  .dress-code-image img { max-width: 300px; }
  .title-serif { font-size: 2.2rem; }
  #music-player { right: 0.8rem; bottom: 0.8rem; padding: 0.6rem 0.9rem; }
  .p-title { font-size: 0.75rem; }
  .p-artist { font-size: 0.62rem; }
}