/* ═══════════════════════════════════════════════════════════
   FLORA & TOTO — Casamiento
   Hoja de estilos
   ───────────────────────────────────────────────────────────
   Índice rápido:
   1. Variables & reset
   2. Tipografía
   3. Hero
   4. Navegación
   5. Secciones
   6. Cards
   7. Botones
   8. Imágenes
   9. Info items (lugar, rsvp)
   10. Alias / Regalo
   11. RSVP + Modal del formulario
   12. Carrusel
   13. Divider (separador de flores)
   14. Footer
   15. Mobile
═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────
   1. VARIABLES & RESET
─────────────────────────────────────────── */
:root {
  --terracota:      #e76f51;
  --terracota-dark: #c95a3d;
  --terracota-soft: #f4a261;
  --cream:          #fffaf5;
  --cream-mid:      #fdf1e7;
  --cream-dark:     #f1e3d3;
  --brown:          #3a2e2a;
  --brown-mid:      #6b4f3a;
  --brown-light:    #8b6f5e;
  --white:          #ffffff;
  --shadow-sm:      0 4px 16px rgba(58,46,42,0.08);
  --shadow-md:      0 12px 32px rgba(58,46,42,0.12);
  --shadow-lg:      0 20px 48px rgba(58,46,42,0.16);
  --radius-sm:      10px;
  --radius-md:      18px;
  --radius-lg:      28px;
}

html { scroll-behavior: smooth; }

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

@keyframes fadePage {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  animation: fadePage 0.8s ease both;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(160deg, #f7ede3 0%, #ecddd0 100%);
  color: var(--brown);
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

/* ───────────────────────────────────────────
   2. TIPOGRAFÍA
─────────────────────────────────────────── */
h1, h2 { font-family: 'Playfair Display', serif; }

h1 {
  margin: 0;
  font-size: 3em;
  letter-spacing: 1px;
}

h2 {
  font-size: 1.85em;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  color: var(--brown);
}

h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--terracota), var(--terracota-soft));
  margin: 10px auto 18px;
  border-radius: 2px;
  opacity: 0.7;
}

p { line-height: 1.7; color: var(--brown-mid); margin: 0 0 10px; }

/* ───────────────────────────────────────────
   3. HERO
─────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 480px;
  max-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background: url('foto1.jpg') center 38% / cover no-repeat;
  overflow: hidden;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.35) 60%,
    rgba(58,46,42,0.55) 100%
  );
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #f7ede3);
}

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

.hero h1 {
  font-size: clamp(2.4em, 7vw, 4.2em);
  margin: 0;
  letter-spacing: 3px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  opacity: 0;
  animation: heroFadeScale 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.subtitle {
  font-size: clamp(1em, 3vw, 1.3em);
  margin-top: 10px;
  opacity: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
  color: white;
  animation: heroSubtitleFade 1s ease forwards;
  animation-delay: 1s;
}

@keyframes heroFadeScale {
  from { opacity:0; transform:scale(0.88); letter-spacing:10px; }
  to   { opacity:1; transform:scale(1);    letter-spacing:3px; }
}
@keyframes heroSubtitleFade {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes heroCountdownFade {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}

/* countdown */
.countdown-box {
  opacity: 0;
  animation: heroCountdownFade 1s ease forwards;
  animation-delay: 1.6s;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.time {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  min-width: 72px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.time:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.2);
}
.time span {
  display: block;
  font-size: 1.6em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.time small {
  font-size: 0.72em;
  opacity: 0.85;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .countdown-box { gap: 8px; }
  .time { min-width: 56px; padding: 10px 12px; }
  .time span { font-size: 1.2em; }
  .time small { font-size: 0.65em; }
}

/* ───────────────────────────────────────────
   4. NAVEGACIÓN
─────────────────────────────────────────── */
.floating-menu {
  position: sticky;
  top: 0;
  background: rgba(255,250,245,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 20px;
  box-shadow: 0 2px 16px rgba(58,46,42,0.08);
  z-index: 1000;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.floating-menu a {
  text-decoration: none;
  color: var(--brown-mid);
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative; /* asegura que el badge se posicione bien */
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color 0.2s ease, background 0.2s ease;
}

.floating-menu a:hover,
.floating-menu a.active {
  color: var(--terracota);
  background: rgba(231,111,81,0.08);
}

.floating-menu a svg {
  color: var(--terracota);
  transition: transform 0.25s ease;
}
.floating-menu a:hover svg { transform: scale(1.15); }

.floating-menu .nav-label { font-size: 0.72em; }

.nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--terracota);
  color: white;
  font-size: 0.6em;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(231,111,81,0.5);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(231,111,81,0.5); }
  50%       { transform: scale(1.15); box-shadow: 0 2px 10px rgba(231,111,81,0.7); }
}

@media (max-width: 600px) {
  .floating-menu { gap: 2px; padding: 8px 6px; }
  .floating-menu a { font-size: 0.68em; padding: 5px 7px; }
}

/* ───────────────────────────────────────────
   5. SECCIONES
─────────────────────────────────────────── */
.section {
  padding: 80px 20px;
}

.section:nth-of-type(even) { background: var(--cream); }
.section:nth-of-type(odd)  { background: var(--cream); }

/* fade-in al scroll */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───────────────────────────────────────────
   6. CARDS
─────────────────────────────────────────── */
.card {
  max-width: 520px;
  margin: auto;
  padding: 44px 40px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(241,227,211,0.6);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ── Títulos de card ─────────────── */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}
.section-title svg { color: var(--terracota); flex-shrink: 0; }

/* ── Historia section ────────────── */
.historia-section { background: var(--cream); }

/* ───────────────────────────────────────────
   7. BOTONES
─────────────────────────────────────────── */
.btn {
  display: inline-block;
  margin: 10px 6px;
  padding: 13px 26px;
  background: var(--terracota);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92em;
  transition: all 0.25s ease;
  letter-spacing: 0.4px;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}
.btn:hover {
  background: var(--terracota-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231,111,81,0.35);
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--terracota-soft), var(--terracota));
  font-size: 1.1em;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  margin-top: 22px;
  box-shadow: 0 10px 28px rgba(231,111,81,0.38);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--terracota), var(--terracota-dark));
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(231,111,81,0.48);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-icon svg { flex-shrink: 0; }

/* ───────────────────────────────────────────
   8. IMÁGENES
─────────────────────────────────────────── */
img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-top: 20px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.photo-grid {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.photo-grid img {
  width: 50%;
  height: 250px;
  object-fit: cover;
  filter: brightness(0.96) saturate(1.05);
}

/* ── Fecha ───────────────────────── */
.fecha-sub {
  font-size: 0.9em;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 8px;
  font-weight: 500;
}

/* ───────────────────────────────────────────
   9. INFO ITEMS (lugar, rsvp)
─────────────────────────────────────────── */
.info-list { text-align: left; margin-top: 18px; }

.info-item {
  margin: 12px 0;
  font-size: 0.93em;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  transition: background 0.2s ease;
}
.info-item:hover { background: var(--cream-mid); }
.info-item .icon-inline {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--terracota);
}

/* ───────────────────────────────────────────
   10. ALIAS / REGALO
─────────────────────────────────────────── */
.alias-box {
  margin-top: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--cream), var(--cream-mid));
  border-radius: var(--radius-md);
  border: 1px solid var(--cream-dark);
  transition: box-shadow 0.2s ease;
}
.alias-box:hover { box-shadow: var(--shadow-sm); }

.alias-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9em;
  letter-spacing: 0.5px;
  color: var(--brown-mid);
  text-transform: uppercase;
}
.alias-header svg { color: var(--terracota); }

.alias {
  font-size: 1.15em;
  font-weight: 600;
  margin: 8px 0;
  letter-spacing: 1.5px;
  color: var(--brown);
  font-family: 'Playfair Display', serif;
}

.alias-copy-btn {
  background: none;
  border: 1.5px solid var(--terracota);
  color: var(--terracota);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.8em;
  font-weight: 500;
  cursor: pointer;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.3px;
}
.alias-copy-btn:hover {
  background: var(--terracota);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231,111,81,0.3);
}
.alias-copy-btn.copied {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

/* ───────────────────────────────────────────
   11. RSVP + MODAL DEL FORMULARIO
─────────────────────────────────────────── */
.rsvp-section .card {
  border-top: 4px solid var(--terracota);
  background: var(--white);
}

/* Botón "Confirmar que venís" reutiliza .btn-primary.btn-icon,
   pero ahora es un <button> que abre el modal (ver script.js) */

/* ── Modal: fondo oscuro ─────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58,46,42,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal: caja blanca ──────────── */
.modal-box {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cream-dark);
  flex-shrink: 0;
}
.modal-header h3 {
  font-family: 'Playfair Display', serif;
  margin: 0;
  font-size: 1.25em;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-header h3 svg { color: var(--terracota); }

.modal-close {
  background: var(--cream);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--brown-mid);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--terracota);
  color: white;
  transform: rotate(90deg);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 620px;
  border: none;
}

/* ───────────────────────────────────────────
   12. CARRUSEL
─────────────────────────────────────────── */
.carousel {
  position: relative;
  max-width: 620px;
  margin: 24px auto 0;
  overflow: hidden;
  touch-action: pan-y;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.carousel-track {
  display: flex;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--cream-dark);
}

.slide img {
  max-width: 100%;
  max-height: 400px;
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s ease, transform 0.6s ease;
  box-shadow: none;
}
.slide.active img {
  opacity: 1;
  transform: scale(1);
}
.slide img:hover { transform: scale(1.01); }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,250,245,0.88);
  border: none;
  font-size: 1.4em;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  z-index: 10;
  color: var(--brown);
}
.carousel-btn:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%) scale(1.08);
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* puntos indicadores */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}
.carousel-dot.active {
  background: var(--terracota);
  width: 22px;
  border-radius: 4px;
}

/* ───────────────────────────────────────────
   13. DIVIDER (separador de flores)
─────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 110px;
  background-image: url("rosa.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
}
.divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247,237,227,0.12);
}

/* ───────────────────────────────────────────
   14. FOOTER
─────────────────────────────────────────── */
footer {
  margin-top: 0;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream-mid));
  border-top: 1px solid rgba(231,111,81,0.15);
}
footer p {
  margin: 4px 0;
  font-size: 0.9em;
  color: var(--brown-light);
}
footer p:first-child {
  font-family: 'Playfair Display', serif;
  font-size: 1.2em;
  color: var(--brown);
}

/* ───────────────────────────────────────────
   15. MOBILE
─────────────────────────────────────────── */
@media (max-width: 600px) {
  .section { padding: 56px 16px; }

  .hero h1 { font-size: 2.3em; }
  .subtitle { font-size: 1em; }

  .card { padding: 32px 22px; border-radius: var(--radius-md); }
  .card:hover { transform: none; box-shadow: var(--shadow-md); }

  #lugar .card img { display: block; margin-left: auto; margin-right: auto; }

  .photo-grid { flex-direction: column; }
  .photo-grid img { width: 100%; height: 200px; }

  .section-title {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 1.45em;
  }
  .info-list { text-align: left; }
  .info-item { text-align: left; }

  .btn, .btn-primary, .btn-icon {
    display: flex;
    justify-content: center;
    text-align: center;
    margin: 10px auto;
    width: fit-content;
  }

  .divider img { width: 100px; }

  .slide img { height: 260px; }

  /* Modal a pantalla casi completa en mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  .modal-body iframe { min-height: 560px; }
}
