/* ==========================================================================
   SISTEMA DE DISEÑO & ESTILOS GLOBALES - INVITACIÓN DE BODA
   ========================================================================== */

:root {
  /* Paleta cromática refinada */
  --bg-warm-ivory: #FAF7F2;
  --bg-cream: #F5EFE6;
  --bg-nude-card: rgba(255, 253, 250, 0.94);
  --bg-glass: rgba(255, 255, 255, 0.82);

  /* Tonos de texto suaves y legibles (evitando negro puro) */
  --text-primary: #2D2926;
  --text-secondary: #635E59;
  --text-muted: #8E8882;

  /* Oro champagne & acentos metálicos */
  --gold-primary: #C5A880;
  --gold-light: #EEDBBD;
  --gold-dark: #96784E;
  --gold-gradient: linear-gradient(135deg, #F3E5C8 0%, #D4AF37 50%, #A68038 100%);
  --gold-gradient-subtle: linear-gradient(135deg, #E6D5BD 0%, #C5A880 100%);

  /* Verde salvia & follaje botánico */
  --sage-green: #768875;
  --sage-light: #9BB09A;
  --sage-dark: #4F634E;
  --blush-nude: #F4E4DF;

  /* Sombras etéreas */
  --shadow-soft: 0 10px 30px rgba(50, 40, 30, 0.06);
  --shadow-card: 0 15px 40px rgba(70, 55, 40, 0.08);
  --shadow-gold: 0 8px 25px rgba(197, 168, 128, 0.28);
  --shadow-seal: 0 12px 30px rgba(120, 90, 40, 0.35);

  /* Tipografías */
  --font-serif-titles: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-serif-hero: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Pinyon Script', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Medidas de pantalla y animaciones */
  --slide-max-width: 480px;
  --transition-smooth: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: all 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset y caja base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #EDE7DE;
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografía de acento caligráfico */
.calligraphy-script {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold-primary);
  line-height: 1.1;
  display: block;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   PANTALLA DE APERTURA DE SOBRE (INICIAL)
   ========================================================================== */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-warm-ivory);
  background-image: url('../assets/images/watercolor-bg.svg');
  background-size: cover;
  background-position: center;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}

.envelope-screen.opening {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-screen.hidden {
  display: none;
}

.envelope-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  display: flex;
  justify-content: center;
}

.envelope-letter-card {
  width: 100%;
  background: #FFFDF9;
  background-image: 
    radial-gradient(rgba(197, 168, 128, 0.22) 0.75px, transparent 0.75px),
    linear-gradient(160deg, #FFFFFF 0%, #FAF5EB 45%, #F4EBDC 100%);
  background-size: 16px 16px, 100% 100%;
  border-radius: 20px;
  padding: 44px 22px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: 
    0 28px 65px rgba(55, 38, 14, 0.28),
    0 10px 25px rgba(0, 0, 0, 0.10),
    0 0 0 1px rgba(212, 175, 55, 0.35),
    0 0 0 8px rgba(255, 255, 255, 0.85);
}

/* Solapa triangular superior de sobre clásico */
.envelope-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  pointer-events: none;
  z-index: 3;
}

.flap-triangle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(180deg, #F5ECDD 0%, #EDE1CD 85%, #E5D5BD 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 4px 5px rgba(90, 60, 20, 0.16));
}

.flap-gold-trim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  clip-path: polygon(0 0, 100% 0, 50% 100%, 50% calc(100% - 2.5px), 98% 1.5px, 2% 1.5px);
  background: var(--gold-gradient);
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
}

.flap-gold-crest {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-dark);
  font-size: 0.8rem;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
}

/* Pliegues diagonales del cuerpo del sobre (V-fold auténtico de papelería) */
.envelope-fold-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 80px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14) 0%, rgba(245, 236, 221, 0.05) 75%, transparent 100%);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 2;
  border-bottom-left-radius: 20px;
}

.envelope-fold-right {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50%;
  height: 80px;
  background: linear-gradient(225deg, rgba(212, 175, 55, 0.14) 0%, rgba(245, 236, 221, 0.05) 75%, transparent 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 2;
  border-bottom-right-radius: 20px;
}

.envelope-fold-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(0deg, rgba(235, 220, 198, 0.55) 0%, rgba(245, 236, 221, 0.2) 65%, transparent 100%);
  clip-path: polygon(0 100%, 50% 15%, 100% 100%);
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 -2px 3px rgba(120, 85, 30, 0.08));
}

/* Marco interior de papelería fina */
.letter-inner-border {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  pointer-events: none;
  z-index: 3;
}

.letter-inner-border::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(212, 175, 55, 0.25);
  border-radius: 10px;
}

.letter-corner-accent {
  position: absolute;
  font-size: 0.65rem;
  color: var(--gold-primary);
  line-height: 1;
  filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.6));
}

.letter-corner-accent.tl { top: 6px; left: 7px; }
.letter-corner-accent.tr { top: 6px; right: 7px; }
.letter-corner-accent.bl { bottom: 6px; left: 7px; }
.letter-corner-accent.br { bottom: 6px; right: 7px; }

.envelope-content-body {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.envelope-header-script {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--gold-dark);
  margin-bottom: 4px;
}

.envelope-couple-names {
  font-family: var(--font-serif-titles);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 10px;
}

.envelope-gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 140px;
  margin: 0 auto 10px;
}

.env-divider-line {
  flex: 1;
  height: 1px;
  background: var(--gold-gradient);
}

.env-divider-diamond {
  color: var(--gold-primary);
  font-size: 0.65rem;
}

.envelope-subtitle {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Centro de mesa principal del sobre: Medallón de Foto Romántica */
.envelope-hero-medallion-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: floatMedallion 5s ease-in-out infinite;
}

.envelope-hero-medallion-wrapper:hover {
  transform: scale(1.06);
}

.envelope-hero-medallion-wrapper:active {
  transform: scale(0.97);
}

/* Corona botánica de fondo giratoria */
.env-wreath-backdrop {
  position: absolute;
  inset: -24px;
  pointer-events: none;
  z-index: 1;
}

.env-wreath-img {
  width: 100%;
  height: 100%;
  animation: gentleRotate 45s linear infinite;
  filter: drop-shadow(0 4px 10px rgba(139, 105, 20, 0.2));
}

/* Resplandor dorado pulsante */
.env-medallion-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.38) 0%, rgba(212, 175, 55, 0.08) 55%, transparent 75%);
  animation: pulseMedallionGlow 3s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 2;
}

/* Marco circular con foto romántica de los novios */
.env-photo-frame {
  position: relative;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  box-shadow: 
    0 16px 36px rgba(60, 42, 14, 0.32),
    0 0 0 3.5px #FFFFFF,
    0 0 0 6.5px rgba(212, 175, 55, 0.9),
    0 0 25px rgba(212, 175, 55, 0.4);
}

.env-couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform-origin: 44.5% 64%;
  transform: scale(3.55);
  transition: transform 0.6s ease;
}

.envelope-hero-medallion-wrapper:hover .env-couple-photo {
  transform: scale(3.70);
}

.env-photo-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 245, 220, 0.7);
  pointer-events: none;
  z-index: 4;
}

.env-photo-sheen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 142px 142px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 5;
}

/* Iniciales "A & R" sobre la foto en color blanco puro sin contornos */
.photo-monogram-capsule {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 6;
  white-space: nowrap;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

.photo-monogram-capsule .mono-initial {
  font-family: 'Cormorant Garamond', var(--font-serif-titles), serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #FFFFFF;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #FFFFFF;
  -webkit-text-stroke: 0;
  line-height: 1;
}

.photo-monogram-capsule .mono-amp {
  font-family: 'Pinyon Script', cursive;
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 600;
  color: #FFFFFF;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #FFFFFF;
  -webkit-text-stroke: 0;
  line-height: 1;
  transform: translateY(-2px);
}

/* Botón "ABRIR INVITACIÓN" */
.btn-open-invitation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gold-gradient);
  color: #FFFFFF;
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 260px;
}

.btn-open-invitation:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(197, 168, 128, 0.45);
}

.btn-open-invitation:active {
  transform: translateY(1px);
}

.btn-open-icon {
  transition: transform 0.3s ease;
}

.btn-open-invitation:hover .btn-open-icon {
  transform: translateX(4px);
}

.envelope-music-hint {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   CONTENEDOR DE LA APLICACIÓN / HISTORIAS (STORY-APP)
   ========================================================================== */
.story-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #EBE5DB;
}

/* Fondo difuminado para pantallas de escritorio */
.desktop-ambient-backdrop {
  position: absolute;
  inset: -20px;
  background-image: url('../assets/images/watercolor-bg.svg');
  background-size: cover;
  background-position: center;
  filter: blur(25px) brightness(0.95);
  opacity: 0.8;
  z-index: 1;
}

/* Viewport tipo móvil (Vertical 100dvh) */
.story-viewport {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--slide-max-width);
  height: 100%;
  max-height: 100dvh;
  background-color: var(--bg-warm-ivory);
  background-image: url('../assets/images/watercolor-bg.svg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.15), 0 20px 40px rgba(0, 0, 0, 0.08);
}

@media (min-width: 520px) {
  .story-viewport {
    height: 94vh;
    max-height: 880px;
    border-radius: 36px;
    border: 8px solid #FFFFFF;
    box-shadow: 0 25px 60px rgba(60, 45, 30, 0.2), 0 0 0 1px rgba(197, 168, 128, 0.25);
  }
}

/* Barra superior de historias (Segmentos de progreso tipo Instagram) */
.story-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 14px 16px 8px;
  background: linear-gradient(180deg, rgba(250, 247, 242, 0.85) 0%, rgba(250, 247, 242, 0) 100%);
  pointer-events: none;
}

.story-progress-segments {
  display: flex;
  gap: 5px;
  width: 100%;
  margin-bottom: 10px;
}

.progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(197, 168, 128, 0.25);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.progress-fill.completed {
  width: 100% !important;
}

.story-controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}

.story-monogram-badge {
  font-family: var(--font-serif-titles);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--gold-dark);
  padding: 4px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 243, 230, 0.85) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 4px;
}

.story-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 168, 128, 0.3);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--gold-dark);
  transform: scale(1.05);
}

.icon.hidden {
  display: none !important;
}

/* Animador de ondas de audio */
.audio-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  height: 16px;
}

.wave-bar {
  width: 2px;
  height: 100%;
  background: var(--gold-primary);
  border-radius: 2px;
  animation: audioWave 1.2s infinite ease-in-out;
}

.wave-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.wave-bar:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.wave-bar:nth-child(3) { height: 10px; animation-delay: 0.15s; }
.wave-bar:nth-child(4) { height: 8px; animation-delay: 0.4s; }

.audio-btn.muted .audio-waves {
  display: none;
}

.audio-btn.muted #icon-sound-off {
  display: block !important;
}

/* Zonas de toque para historias */
.story-tap-zone {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 28%;
  z-index: 25;
  cursor: pointer;
}

.tap-left { left: 0; }
.tap-right { right: 0; }

/* Contenedor de diapositivas */
.story-slides-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
}

/* Diapositiva individual */
.story-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(0.96);
  pointer-events: none;
  overflow: hidden;
}

.story-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
  z-index: 20;
}

.slide-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

/* Decoraciones botánicas en esquinas */
.botanical-corner {
  position: absolute;
  width: 150px;
  height: 150px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.9;
  transition: transform 1.8s ease-out;
}

.corner-top-left {
  top: -10px;
  left: -10px;
}

.corner-top-right {
  top: -10px;
  right: -10px;
}

.corner-bottom-left {
  bottom: -10px;
  left: -10px;
}

.corner-bottom-right {
  bottom: -10px;
  right: -10px;
}

.botanical-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: botanicalFloat 6s ease-in-out infinite alternate;
}

.botanical-img.mirror {
  transform: scaleX(-1) scaleY(-1);
}

.botanical-img.flip-h {
  transform: scaleX(-1);
}

.botanical-img.flip-v {
  transform: scaleY(-1);
}

/* ==========================================================================
   SECCIÓN 1 – PORTADA
   ========================================================================== */
.cover-content {
  gap: 16px;
}

.cover-pretitle {
  margin-bottom: -5px;
}

.cover-main-phrase {
  font-family: var(--font-serif-titles);
  font-size: 2.8rem;
  line-height: 1.18;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.phrase-line-1 {
  display: block;
}

.phrase-line-2 {
  display: block;
  font-style: italic;
  color: var(--gold-dark);
}

.cover-accent-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 180px;
  margin: 10px auto;
}

.ornament-line {
  flex: 1;
  height: 1px;
  background: var(--gold-gradient);
}

.ornament-diamond {
  color: var(--gold-primary);
  font-size: 0.65rem;
}

/* ==========================================================================
   PORTADA DE LUJO: MEDALLÓN HERO DE FOTO + CORONA + SELLO DE MONOGRAMA
   ========================================================================== */
.cover-hero-medallion-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 12px;
  z-index: 6;
  animation: floatMedallion 5s ease-in-out infinite;
}

.cover-hero-medallion {
  position: relative;
  width: 176px;
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

/* Corona botánica detrás del círculo */
.medallion-wreath-backdrop {
  position: absolute;
  inset: -28px;
  pointer-events: none;
  z-index: 1;
}

.wreath-img-rotate {
  width: 100%;
  height: 100%;
  animation: gentleRotate 55s linear infinite;
  filter: drop-shadow(0 6px 12px rgba(139, 105, 20, 0.18));
}

/* Resplandor dorado pulsante */
.medallion-glow-halo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, rgba(212, 175, 55, 0.08) 55%, transparent 75%);
  animation: pulseMedallionGlow 3.5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 2;
}

/* Marco circular con la fotografía de la pareja */
.medallion-photo-frame {
  position: relative;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  box-shadow: 
    0 16px 36px rgba(60, 42, 14, 0.28),
    0 0 0 4px #FFFFFF,
    0 0 0 7px rgba(212, 175, 55, 0.8),
    0 0 25px rgba(212, 175, 55, 0.35);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cover-hero-medallion:hover .medallion-photo-frame {
  transform: scale(1.04);
}

.medallion-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 47% 38%;
  display: block;
  transform-origin: 47% 38%;
  transform: scale(2.40);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.cover-hero-medallion:hover .medallion-photo {
  transform: scale(2.55);
}

/* Borde biselado interior de cristal */
.medallion-gold-border {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 245, 220, 0.6);
  pointer-events: none;
  z-index: 4;
}

.medallion-glass-sheen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 154px 154px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 5;
}

/* Sello de cera con monograma superpuesto al pie */
.medallion-seal-badge {
  position: absolute;
  bottom: -14px;
  right: 12px;
  width: 66px;
  height: 66px;
  z-index: 7;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.medallion-seal-badge:hover {
  transform: scale(1.12) rotate(4deg);
}

.medallion-seal-img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 14px rgba(45, 28, 5, 0.45));
}

/* Nombres y fecha en portada */
.cover-names-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 10px auto 4px;
}

.cover-names-text {
  font-family: var(--font-serif-titles);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--text-primary);
  line-height: 1.3;
  text-align: center;
}

.cover-date-badge {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--gold-dark);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 20px;
  padding: 3px 14px;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.1);
  text-transform: uppercase;
}

.swipe-hint {
  position: absolute;
  bottom: -60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.swipe-hint-text {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.swipe-arrow {
  color: var(--gold-primary);
  animation: bounceVertical 2s infinite ease-in-out;
}

/* ==========================================================================
   SECCIÓN 2 – MENSAJE
   ========================================================================== */
.message-content {
  padding: 0 10px;
}

.quote-symbol {
  font-family: var(--font-serif-hero);
  font-size: 4.5rem;
  line-height: 0.8;
  color: var(--gold-light);
  opacity: 0.7;
}

.quote-symbol.closing {
  margin-top: 15px;
  align-self: flex-end;
}

.message-card {
  background: var(--bg-nude-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 168, 128, 0.25);
  border-radius: 20px;
  padding: 34px 26px;
  box-shadow: var(--shadow-card);
  margin: 10px 0;
}

.message-paragraph {
  font-family: var(--font-serif-titles);
  font-size: 1.32rem;
  line-height: 1.68;
  color: var(--text-primary);
  font-weight: 300;
}

.message-paragraph.p2 {
  color: var(--text-secondary);
  font-size: 1.15rem;
}

.message-separator {
  margin: 20px 0;
}

.leaf-icon {
  font-size: 1.2rem;
  color: var(--gold-primary);
  opacity: 0.8;
}

/* ==========================================================================
   SECCIÓN 3 – FOTO Y NOMBRES
   ========================================================================== */
.names-content {
  gap: 22px;
}

.photo-frame-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wreath-ornament-bg {
  position: absolute;
  inset: -38px;
  pointer-events: none;
  z-index: 1;
}

.wreath-svg {
  width: 100%;
  height: 100%;
  animation: gentleRotate 28s linear infinite;
}

.photo-circular-frame {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(60, 42, 14, 0.28), 0 0 0 5px #FFFFFF, 0 0 0 8px rgba(212, 175, 55, 0.75), 0 0 30px rgba(212, 175, 55, 0.35);
  z-index: 2;
}

.couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.story-slide.active .couple-photo {
  transform: scale(1.04);
}

.photo-gold-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  pointer-events: none;
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.35);
}

.couple-names-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.couple-title-main {
  font-family: var(--font-serif-titles);
  font-size: clamp(1.45rem, 4.5vw, 1.95rem);
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--text-primary);
  text-transform: uppercase;
  line-height: 1.25;
}

.names-gold-line {
  width: 70px;
  height: 2px;
  background: var(--gold-gradient);
  margin: 10px auto 12px;
  border-radius: 2px;
}

.couple-tagline {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--gold-dark);
  line-height: 1;
}

/* ==========================================================================
   SECCIÓN 4 – FECHA Y CONTADOR REGRESIVO
   ========================================================================== */
.date-content {
  gap: 20px;
}

.date-header-script {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--gold-dark);
}

.date-hero-card {
  background: var(--bg-nude-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 168, 128, 0.3);
  border-radius: 20px;
  padding: 30px 24px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.day-name {
  font-family: var(--font-serif-titles);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 6px;
}

.date-gold-frame {
  margin: 10px 0 16px;
}

.date-hero-number {
  font-family: var(--font-serif-hero);
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: 1px;
}

.time-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.schedule-times-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 4px;
}

.schedule-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.schedule-label {
  font-size: 0.65rem;
  letter-spacing: 2.2px;
  color: var(--gold-dark);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.schedule-hour {
  font-family: var(--font-serif-titles);
  font-size: 1.32rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.schedule-divider {
  font-size: 1.6rem;
  color: var(--gold-primary);
  opacity: 0.6;
  margin-top: 6px;
}

/* Contador Regresivo */
.countdown-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(197, 168, 128, 0.25);
}

.countdown-title {
  font-size: 0.68rem;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 10px;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.count-value {
  font-family: var(--font-serif-hero);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--gold-dark);
  line-height: 1.1;
}

.count-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.countdown-colon {
  font-family: var(--font-serif-hero);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.btn-subtle-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-dark);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-subtle-gold:hover {
  background: var(--gold-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   SECCIÓN 5 – GALERÍA
   ========================================================================== */
.gallery-content {
  gap: 16px;
}

.gallery-title-script {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--gold-dark);
  margin-bottom: -5px;
}

.gallery-composition {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 10px auto;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-composition:hover {
  transform: scale(1.03);
}

.gallery-circle {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease;
}

.gallery-composition:hover .gallery-circle {
  box-shadow: 0 16px 36px rgba(197, 168, 128, 0.4);
}

.circle-primary {
  width: 185px;
  height: 185px;
  top: 0;
  left: 10px;
  z-index: 2;
}

.circle-secondary {
  width: 170px;
  height: 170px;
  bottom: 0;
  right: 10px;
  z-index: 4;
}

.circle-gold-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid var(--gold-primary);
  z-index: 5;
  pointer-events: none;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.3);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.circle-primary .gallery-img {
  object-position: center center;
}

.circle-secondary .gallery-img {
  object-position: center 30%;
}

.story-slide.active .gallery-img {
  transform: scale(1.05);
}

.gallery-botanical-accent {
  position: absolute;
  width: 130px;
  height: 130px;
  top: 80px;
  left: 75px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
}

.gallery-leaf-img {
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
}

.gold-sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 8px #FFD700;
  z-index: 6;
  animation: sparkleTwinkle 2.5s infinite ease-in-out;
}

.gold-sparkle.sp1 { top: 30px; right: 40px; animation-delay: 0.2s; }
.gold-sparkle.sp2 { bottom: 35px; left: 35px; animation-delay: 0.8s; }
.gold-sparkle.sp3 { top: 140px; right: 10px; animation-delay: 1.4s; }

.gallery-caption {
  font-family: var(--font-serif-titles);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 320px;
  margin-top: 6px;
}

.gallery-btn-wrapper {
  position: relative;
  z-index: 35;
  pointer-events: auto;
  margin-top: 6px;
}

.btn-gallery-trigger {
  position: relative;
  z-index: 35;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 1px;
}

/* ==========================================================================
   SECCIÓN 6 – UBICACIÓN
   ========================================================================== */
.location-content {
  padding: 0 12px;
}

.location-card {
  position: relative;
  background: var(--bg-nude-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gold-primary);
  border-radius: 16px;
  padding: 40px 24px 34px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

/* Bordes geométricos finos dorados */
.card-geometric-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold-dark);
  border-style: solid;
  pointer-events: none;
}

.corner-tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.corner-tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.corner-bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.corner-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.location-icon-wrapper {
  margin-bottom: 12px;
}

.location-subtitle {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 6px;
}

.location-venue-name {
  font-family: var(--font-serif-titles);
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-primary);
  line-height: 1.15;
  text-transform: uppercase;
}

.location-divider {
  width: 50px;
  height: 1.5px;
  background: var(--gold-gradient);
  margin: 16px auto;
  border-radius: 2px;
}

.location-address {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 26px;
}

.btn-gold-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gold-gradient);
  color: #FFFFFF;
  text-decoration: none;
  border: none;
  padding: 13px 26px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-gold-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(197, 168, 128, 0.45);
}

.btn-gold-action:active {
  transform: translateY(1px);
}

/* ==========================================================================
   SECCIÓN 7 – DESPEDIDA Y CONFIRMACIÓN (RSVP)
   ========================================================================== */
.rsvp-content {
  gap: 16px;
}

.chibi-illustration-wrapper {
  width: 220px;
  height: 220px;
  margin-top: -10px;
}

.chibi-couple-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.06));
}

.rsvp-texts-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.farewell-heading {
  font-family: var(--font-serif-titles);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.farewell-subtext {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.dress-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(197, 168, 128, 0.3);
  font-size: 0.85rem;
}

.dress-code-label {
  color: var(--text-muted);
  font-weight: 400;
}

.dress-code-value {
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.rsvp-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.btn-pulse {
  animation: pulseGold 2.8s infinite ease-in-out;
}

.rsvp-deadline-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ==========================================================================
   FLECHAS LATERALES DE NAVEGACIÓN
   ========================================================================== */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(197, 168, 128, 0.5);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.nav-arrow:hover {
  background: #FFFFFF;
  border-color: var(--gold-primary);
  transform: translateY(-50%) scale(1.1);
  color: var(--text-primary);
  box-shadow: 0 6px 22px rgba(197, 168, 128, 0.35);
}

.nav-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.nav-arrow-left { left: 10px; }
.nav-arrow-right { right: 10px; }

/* En pantallas móviles táctiles, mantenemos las flechas semi-transparentes y elegantes */
@media (max-width: 600px) {
  .nav-arrow {
    width: 38px;
    height: 38px;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.9);
  }
}

/* ==========================================================================
   MODAL DE CONFIRMACIÓN RSVP (WHATSAPP)
   ========================================================================== */
.rsvp-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.rsvp-modal.active {
  opacity: 1;
  visibility: visible;
}

.rsvp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 25, 20, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rsvp-modal-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.rsvp-modal.active .rsvp-modal-container {
  transform: translateY(0) scale(1);
}

.rsvp-modal-card {
  background: var(--bg-warm-ivory);
  background-image: url('../assets/images/watercolor-bg.svg');
  background-size: cover;
  border-radius: 24px;
  padding: 36px 26px 30px;
  border: 1px solid rgba(197, 168, 128, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.rsvp-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.rsvp-close-btn:hover {
  color: var(--text-primary);
}

.modal-header-botanical {
  text-align: center;
  margin-bottom: 22px;
}

.modal-script {
  font-size: 2rem;
  color: var(--gold-dark);
}

.modal-title {
  font-family: var(--font-serif-titles);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 2px;
}

.modal-gold-line {
  width: 50px;
  height: 1.5px;
  background: var(--gold-gradient);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Campos de Formulario */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(197, 168, 128, 0.4);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-dark);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.2);
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-card input[type="radio"] {
  display: none;
}

.attendance-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(197, 168, 128, 0.35);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.attendance-icon {
  font-size: 1.3rem;
}

.attendance-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.attendance-card input[type="radio"]:checked + .attendance-box {
  background: #FFFFFF;
  border-color: var(--gold-dark);
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.25);
}

.attendance-card input[type="radio"]:checked + .attendance-box .attendance-text {
  color: var(--gold-dark);
  font-weight: 600;
}

.btn-whatsapp-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 30px;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
  margin-top: 6px;
  transition: all 0.3s ease;
}

.btn-whatsapp-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
}

.rsvp-success-message {
  text-align: center;
  padding: 24px 10px;
}

.success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.rsvp-success-message h4 {
  font-family: var(--font-serif-titles);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.rsvp-success-message p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   MODAL DE GALERÍA DE RECUERDOS (LIGHTBOX INTERACTIVO)
   ========================================================================== */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

.gallery-modal.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gallery-modal-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-modal.active .gallery-modal-container {
  transform: translateY(0) scale(1);
}

.gallery-modal-card {
  background: var(--bg-warm-ivory);
  background-image: url('../assets/images/watercolor-bg.svg');
  background-size: cover;
  border-radius: 24px;
  padding: 24px 18px 20px;
  border: 1.5px solid rgba(197, 168, 128, 0.5);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 20;
}

.gallery-close-btn:hover {
  color: var(--gold-dark);
}

.gallery-header-wrap {
  margin-bottom: 12px;
}

.gallery-modal-title {
  font-family: var(--font-serif-titles);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 2px;
  letter-spacing: 1px;
}

/* Visor principal */
.gallery-viewer-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-active-frame {
  position: relative;
  width: 100%;
  height: 265px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 0 0 3px #FFFFFF, 0 0 0 5px rgba(212, 175, 55, 0.6);
  background: #201D1A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-active-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.22s ease, transform 0.35s ease;
  background: rgba(0, 0, 0, 0.45);
}

.gallery-counter-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(30, 24, 18, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
  z-index: 10;
  pointer-events: none;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--gold-primary);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-nav-btn svg {
  pointer-events: none;
  width: 22px;
  height: 22px;
}

.gallery-nav-btn:hover {
  background: var(--gold-primary);
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 22px rgba(197, 168, 128, 0.6);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.gallery-nav-btn.prev {
  left: 8px;
}

.gallery-nav-btn.next {
  right: 8px;
}

/* Información de pie */
.gallery-caption-box {
  text-align: center;
  margin-bottom: 10px;
  padding: 0 8px;
  min-height: 54px;
}

.gallery-caption-title {
  font-family: var(--font-serif-titles);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.gallery-caption-location {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  font-weight: 600;
  margin-top: 2px;
  margin-bottom: 3px;
}

.gallery-caption-desc {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}

/* Tira de miniaturas */
.gallery-thumbnails-strip {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-primary) transparent;
}

.gallery-thumbnails-strip::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbnails-strip::-webkit-scrollbar-thumb {
  background: var(--gold-primary);
  border-radius: 4px;
}

.gallery-thumb-item {
  position: relative;
  flex: 0 0 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #E0D7CD;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.25s ease;
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb-item .thumb-border {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color 0.25s ease;
}

.gallery-thumb-item:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.gallery-thumb-item.active {
  opacity: 1;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.45);
}

.gallery-thumb-item.active .thumb-border {
  border-color: var(--gold-primary);
  box-shadow: inset 0 0 4px rgba(212, 175, 55, 0.5);
}

@media (max-height: 740px) {
  .gallery-active-frame {
    height: 220px;
  }
  .gallery-modal-card {
    padding: 16px 14px 14px;
  }
  .gallery-header-wrap {
    margin-bottom: 8px;
  }
  .gallery-caption-box {
    min-height: 48px;
    margin-bottom: 6px;
  }
  .gallery-thumb-item {
    flex: 0 0 46px;
    height: 46px;
  }
}
