/* ==========================================================================
   Invitación de Boda: Carlos Coreas & Stephany Aguirre
   Theme: minimalism-red (Burgundy & Warm Ivory)
   Fidelidad 100% al diseño original de ChungDoi
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=The+Nautigal:wght@400;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --color-primary: #7C151A;
  --color-primary-dark: #5a0e12;
  --color-primary-deep: #3d090d;
  --color-primary-light: #9B1B21;
  --color-accent: #B52028;
  --color-gold: #D4AF37;
  --color-bg-ivory: #FFFAF7;
  --color-text-dark: #2A1810;
  --color-text-muted: rgba(124, 21, 26, 0.85);
  --color-border: rgba(124, 21, 26, 0.18);
  --font-script: "The Nautigal", cursive;
  --font-serif-display: "Playfair Display", Georgia, serif;
  --font-serif-body: "Lora", "Times New Roman", serif;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: #5a0e12;
  color: var(--color-text-dark);
  font-family: var(--font-serif-body);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ==========================================================================
   1. PANTALLA INICIAL: SOBRE DE BIENVENIDA (LANDING ENVELOPE)
   ========================================================================== */
#envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 30%, #7C151A 0%, #5a0e12 55%, #300609 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1200px;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s ease, transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#envelope-overlay.opening {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

#envelope-overlay.hidden-envelope {
  display: none !important;
}

/* Ambient Floating Hearts */
.ambient-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  top: -40px;
  opacity: 0.65;
  animation-name: ambient-fall;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes ambient-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) translateX(var(--sway, 20px)) rotate(360deg);
    opacity: 0;
  }
}

/* 3D Envelope Card Container */
.envelope-3d-wrapper {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 440px;
  perspective: 1000px;
}

.envelope-card {
  position: relative;
  width: 100%;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.55), 0 0 40px rgba(124, 21, 26, 0.35);
  text-align: center;
  padding: 65px 28px 36px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
}

@media (min-width: 640px) {
  .envelope-card {
    padding: 72px 42px 40px;
  }
}

/* Corner Heart Swirl Vectors (Screenshot 1) */
.corner-swirl {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
}

.corner-swirl.top-left {
  top: 8px;
  left: 8px;
  width: 140px;
  height: 95px;
}

.corner-swirl.bottom-right {
  bottom: 8px;
  right: 8px;
  width: 140px;
  height: 95px;
}

/* Wax Seal Badge on top edge */
.wax-seal {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a71d24, #7C151A 55%, #4a060a 100%);
  box-shadow: 0 8px 24px rgba(124, 21, 26, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: seal-pulse 2.2s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

@keyframes seal-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 8px 24px rgba(124, 21, 26, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 30px rgba(181, 32, 40, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  }
}

.wax-seal-icon {
  width: 32px;
  height: 32px;
  background-color: #FFFFFF;
  opacity: 0.95;
  -webkit-mask-image: url('assets/images/chinese_happiness.webp');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url('assets/images/chinese_happiness.webp');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.envelope-names {
  font-family: var(--font-serif-display);
  color: var(--color-primary);
  font-size: 30px;
  line-height: 1.18;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.envelope-names span {
  display: block;
}

.envelope-names .ampersand {
  font-size: 21px;
  font-style: italic;
  font-family: var(--font-serif-body);
  margin: 2px 0;
  opacity: 0.9;
}

.envelope-divider-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 14px;
  color: var(--color-primary);
  opacity: 0.75;
}

.envelope-divider-flourish .line {
  width: 38px;
  height: 1px;
  background: var(--color-primary);
  opacity: 0.5;
}

.envelope-divider-flourish .fleuron {
  font-size: 14px;
}

.envelope-date {
  font-family: var(--font-serif-body);
  color: var(--color-text-muted);
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 500;
}

.envelope-tagline {
  font-family: var(--font-serif-body);
  color: var(--color-text-muted);
  font-size: 15px;
  font-style: italic;
  margin-bottom: 24px;
}

/* Pulsing Open Button */
.btn-open {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8B1A20, #670E13);
  color: #FFFFFF;
  font-family: var(--font-serif-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 12px 42px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(124, 21, 26, 0.45);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(124, 21, 26, 0.6);
}

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

.btn-open .btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: shine 2.6s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  35% { left: 160%; }
  100% { left: 160%; }
}

/* ==========================================================================
   2. CONTENEDOR PRINCIPAL
   ========================================================================== */
.invitation-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background-color: #ece4db;
}

.invitation-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  background-color: var(--color-bg-ivory);
  color: var(--color-primary);
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .invitation-sheet {
    max-width: 680px;
    margin: 20px auto;
    border-radius: 12px;
    border: 1px solid rgba(124, 21, 26, 0.15);
  }
}

/* Top Accent Bar */
.top-accent-bar {
  width: 100%;
  height: 70px;
  background-color: var(--color-primary);
}

@media (min-width: 640px) {
  .top-accent-bar { height: 95px; }
}

/* Header Floral Graphics & Names */
.invitation-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 20px;
}

.header-top-art {
  width: 100%;
  max-width: 320px;
  margin-top: 24px;
  margin-bottom: 20px;
  display: block;
}

@media (min-width: 640px) {
  .header-top-art {
    max-width: 480px;
    margin-top: 35px;
    margin-bottom: 25px;
  }
}

.couple-title-script {
  font-family: var(--font-script);
  color: #111111;
  text-align: center;
  margin: 10px 0;
  line-height: 1.05;
}

.couple-title-script .name-line {
  font-size: 64px;
  display: block;
}

.couple-title-script .amp-line {
  font-size: 46px;
  display: block;
  margin: -6px 0;
}

@media (min-width: 640px) {
  .couple-title-script .name-line { font-size: 84px; }
  .couple-title-script .amp-line { font-size: 56px; }
}

.header-bottom-art {
  width: 100%;
  max-width: 320px;
  margin-top: 15px;
  margin-bottom: 10px;
  transform: scaleX(-1);
  display: block;
}

@media (min-width: 640px) {
  .header-bottom-art {
    max-width: 480px;
  }
}

/* Section Shared */
.section {
  position: relative;
  z-index: 10;
  padding: 36px 24px;
  text-align: center;
}

@media (min-width: 640px) {
  .section { padding: 48px 36px; }
}

.section-title {
  font-family: var(--font-serif-display);
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.section-title.white {
  color: #FFFFFF;
}

/* Announcement */
.announcement-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.announcement-text {
  font-family: var(--font-serif-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  max-width: 520px;
  white-space: pre-line;
}

@media (min-width: 640px) {
  .announcement-text { font-size: 16px; }
}

.full-names-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.full-name {
  font-family: var(--font-serif-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}

.full-name-amp {
  font-size: 16px;
  font-style: italic;
  color: var(--color-primary);
  opacity: 0.8;
}

/* ==========================================================================
   3. GALERÍA DE FOTOS 3D EN BUCLE AUTOMÁTICO (Screenshot 3)
   ========================================================================== */
.gallery-section-wrapper {
  background-color: var(--color-primary);
  padding: 45px 0 55px;
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.gallery-3d-viewport {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 380px;
  margin: 0 auto;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .gallery-3d-viewport {
    height: 480px;
    max-width: 620px;
  }
}

.gallery-3d-track {
  position: relative;
  width: 240px;
  height: 330px;
  transform-style: preserve-3d;
}

@media (min-width: 640px) {
  .gallery-3d-track {
    width: 290px;
    height: 420px;
  }
}

.gallery-card-3d {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.65s ease, filter 0.65s ease;
  will-change: transform, opacity;
  background-color: #2b0608;
}

.gallery-card-3d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3D Positions relative to active slide */
.gallery-card-3d.active {
  transform: translateX(0) translateZ(0) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 10;
  filter: brightness(1);
}

.gallery-card-3d.prev-1 {
  transform: translateX(-56%) translateZ(-90px) rotateY(26deg) scale(0.88);
  opacity: 0.78;
  z-index: 5;
  filter: brightness(0.8);
}

.gallery-card-3d.next-1 {
  transform: translateX(56%) translateZ(-90px) rotateY(-26deg) scale(0.88);
  opacity: 0.78;
  z-index: 5;
  filter: brightness(0.8);
}

.gallery-card-3d.prev-2 {
  transform: translateX(-102%) translateZ(-180px) rotateY(38deg) scale(0.72);
  opacity: 0.4;
  z-index: 2;
  filter: brightness(0.6);
}

.gallery-card-3d.next-2 {
  transform: translateX(102%) translateZ(-180px) rotateY(-38deg) scale(0.72);
  opacity: 0.4;
  z-index: 2;
  filter: brightness(0.6);
}

.gallery-card-3d.hidden {
  transform: translateX(0) translateZ(-300px) scale(0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* Slider Controls (Circular Dark Buttons as in Screenshot 3) */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20, 5, 6, 0.7);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-nav-btn:hover {
  background: rgba(20, 5, 6, 0.95);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn.prev { left: 16px; }
.gallery-nav-btn.next { right: 16px; }

/* ==========================================================================
   4. DETALLES DE LA CEREMONIA & CALENDARIO & CUENTA REGRESIVA (Screenshot 4)
   ========================================================================== */
.ceremony-details-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reception-heading {
  font-family: var(--font-serif-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.reception-time {
  font-family: var(--font-serif-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
}

/* Date Display: DOMINGO / 15 / NOVIEMBRE */
.date-highlight-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-serif-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #111111;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.date-highlight-row .slash {
  color: #c9b9b0;
  font-weight: 300;
}

.date-highlight-row .day-big-red {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

/* Cuenta Regresiva Textual (Screenshot 4: "16 días 19 h 21 min 6 seg") */
.countdown-section-heading {
  font-family: var(--font-serif-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.countdown-live-string {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 26px;
}

/* Calendario Box Noviembre 2026 (Screenshot 4) */
.calendar-card-box {
  background: #FFFAF7;
  border: 1px solid rgba(124, 21, 26, 0.22);
  border-radius: 14px;
  padding: 18px 20px 20px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.calendar-card-header {
  font-family: var(--font-serif-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.calendar-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: #888888;
  margin-bottom: 8px;
}

.calendar-days-matrix {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-cell {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #333333;
}

/* Day 15 with solid wine-red heart badge (Screenshot 4) */
.cal-day-cell.wedding-heart {
  position: relative;
  color: #FFFFFF !important;
  font-weight: 700;
  z-index: 1;
}

.cal-day-cell.wedding-heart::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  background-color: var(--color-primary);
  border-radius: 50%;
  z-index: -1;
  box-shadow: 0 2px 6px rgba(124, 21, 26, 0.4);
}

/* Underlined "Añadir al Calendario" Link (Screenshot 4) */
.link-add-calendar {
  display: inline-block;
  font-family: var(--font-serif-body);
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  margin-bottom: 18px;
  transition: opacity 0.2s ease;
}

.link-add-calendar:hover {
  opacity: 0.8;
}

/* Solid Burgundy Button "CONFIRMAR ASISTENCIA" (Screenshot 4) */
.btn-confirm-rsvp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(124, 21, 26, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-confirm-rsvp:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(124, 21, 26, 0.45);
}

/* ==========================================================================
   5. LUGAR & CÓMO LLEGAR
   ========================================================================== */
.venue-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.venue-name {
  font-family: var(--font-serif-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.venue-address {
  font-family: var(--font-serif-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 420px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.map-container {
  width: 100%;
  max-width: 420px;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   6. TIPO DE VESTIMENTA (DRESS CODE)
   ========================================================================== */
.dresscode-box {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px 20px;
  max-width: 360px;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(124, 21, 26, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dresscode-icon-svg {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
}

.dresscode-text-style {
  font-family: var(--font-serif-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ==========================================================================
   7. MUESTRAS DE CARIÑO (Screenshot 5 - Red 3D Envelopes)
   ========================================================================== */
.gift-interactive-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.gift-envelopes-wrapper {
  position: relative;
  width: 250px;
  height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  margin: 0 auto;
}

/* Sparkles around envelopes */
.sparkle {
  position: absolute;
  color: var(--color-gold);
  pointer-events: none;
  animation: sparkle-float 2.5s ease-in-out infinite alternate;
}

.sparkle.s1 { top: 8%; left: 14%; font-size: 20px; animation-delay: 0s; }
.sparkle.s2 { top: 16%; right: 10%; font-size: 15px; animation-delay: 0.6s; }
.sparkle.s3 { top: 38%; left: 6%; font-size: 14px; animation-delay: 1.2s; }
.sparkle.s4 { top: 28%; right: 5%; font-size: 14px; animation-delay: 1.8s; }

@keyframes sparkle-float {
  0% { transform: scale(0.8) translateY(0); opacity: 0.7; }
  100% { transform: scale(1.2) translateY(-6px); opacity: 1; }
}

/* Envelope Shadow & Stack */
.envelopes-stack {
  position: relative;
  width: 190px;
  height: 275px;
}

.envelope-shadow-base {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 125px;
  height: 11px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  filter: blur(4px);
  z-index: 0;
}

.ienv-back-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: 50% 100%;
  transform: translateX(20%) translateY(-10%) scale(-0.8, 0.8) rotate(-15deg);
  z-index: 1;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
  transition: transform 0.5s ease;
}

.ienv-front-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: 50% 100%;
  transform: rotate(-10deg);
  z-index: 2;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
  transition: transform 0.5s ease;
}

.gift-envelopes-wrapper:hover .ienv-front-img {
  transform: rotate(-14deg) translateY(-8px);
}

.gift-envelopes-wrapper:hover .ienv-back-img {
  transform: translateX(25%) translateY(-14%) scale(-0.8, 0.8) rotate(-18deg);
}

.gift-tap-hint {
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 26px;
}

/* Exact Red Banner Box Below Envelopes (Screenshot 5) */
.gift-message-burgundy-box {
  width: 100%;
  background-color: var(--color-primary);
  color: #FFFFFF;
  padding: 24px 20px;
  margin-top: 10px;
  font-family: var(--font-serif-body);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.gift-brand-footer {
  padding: 16px 0 30px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #888888;
  text-align: center;
}

/* ==========================================================================
   8. REPRODUCTOR DE MÚSICA FLOTANTE (Screenshot 4 & 5)
   ========================================================================== */
.music-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.music-toggle-btn:hover {
  transform: scale(1.08);
  background: var(--color-primary-light);
}

/* Sound Wave Equalizer Bars */
.sound-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
}

.sound-bar {
  width: 3.5px;
  height: 100%;
  background-color: #FFFFFF;
  border-radius: 2px;
  animation: bar-dance 0.9s ease-in-out infinite alternate;
}

.sound-bar:nth-child(1) { animation-delay: 0.1s; height: 50%; }
.sound-bar:nth-child(2) { animation-delay: 0.4s; height: 100%; }
.sound-bar:nth-child(3) { animation-delay: 0.2s; height: 75%; }

@keyframes bar-dance {
  0% { height: 4px; }
  100% { height: 18px; }
}

.music-toggle-btn.paused .sound-bars .sound-bar {
  animation-play-state: paused;
  height: 4px;
}

/* ==========================================================================
   9. MODAL LIGHTBOX & RSVP MODAL
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

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

.lightbox-img-wrapper {
  max-width: 90%;
  max-height: 85vh;
  position: relative;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close { top: 20px; right: 20px; width: 42px; height: 42px; font-size: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 24px; }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.4); }

/* Modal RSVP */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-content {
  background: #FFFFFF;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f0ebe6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  font-size: 16px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd2ca;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #333;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
}

/* Toast Notice */
.toast-notice {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(30, 30, 30, 0.95);
  color: #FFFFFF;
  padding: 10px 22px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   MODAL MUESTRAS DE CARIÑO (Screenshot 3 - Exact Fidelity)
   ========================================================================== */

/* ==========================================================================
   MODAL MUESTRAS DE CARIÑO (Screenshot 3 - Bulletproof display)
   ========================================================================== */
.gift-envelopes-wrapper, .gift-tap-hint {
  cursor: pointer !important;
}

.envelopes-stack, .ienv-back-img, .ienv-front-img, .sparkle {
  pointer-events: none !important;
}

.gift-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.gift-modal-overlay.active {
  display: flex !important;
}

.gift-modal-card {
  width: 100% !important;
  max-width: 440px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background-color: #FFFAF7 !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.55), 0 0 35px rgba(124, 21, 26, 0.25) !important;
  animation: giftModalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes giftModalPop {
  0% { transform: scale(0.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.gift-modal-header {
  position: relative !important;
  background-color: #7C151A !important;
  padding: 22px 24px 18px !important;
  text-align: center !important;
}

.gift-modal-title {
  font-family: var(--font-serif-display) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: #FFFFFF !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.gift-modal-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
  background: rgba(0, 0, 0, 0.25) !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

.gift-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.06) !important;
}

.gift-modal-body {
  padding: 32px 24px 36px !important;
  text-align: center !important;
  background-color: #FFFAF7 !important;
}

.gift-modal-inner-title {
  font-family: var(--font-serif-display) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #7C151A !important;
  margin-bottom: 14px !important;
}

.gift-modal-inner-text {
  font-family: var(--font-serif-body) !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: #7C151A !important;
  max-width: 340px !important;
  margin: 0 auto !important;
}
