/* =======================================================
   MIS QUINCE AÑOS - ESTILOS ELEGANTES (VERDE ESMERALDA & ORO)
   ======================================================= */

:root {
  --primary-emerald: #053b27;
  --dark-emerald: #022417;
  --light-emerald: #0b593c;
  --accent-gold: #d4af37;
  --gold-glow: #fbf5b7;
  --gold-dark: #996515;
  --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
  --gold-metallic: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #aa771c);
  --bg-cream: #faf7f2;
  --card-bg: rgba(255, 255, 255, 0.96);
  --text-main: #2b3a33;
  --text-muted: #5e6d65;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-gold: 0 8px 25px rgba(212, 175, 55, 0.25);
  --border-radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--dark-emerald);
  background-image: 
    radial-gradient(circle at 50% 0%, #0d4a34 0%, var(--dark-emerald) 80%),
    radial-gradient(#d4af37 0.75px, transparent 0.75px);
  background-size: 100% 100%, 30px 30px;
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

/* Floating Sparkles Canvas */
#sparkles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Main Container (Styled like a luxury mobile/tablet card) */
.invitation-container {
  width: 100%;
  max-width: 540px;
  background: var(--bg-cream);
  min-height: 100vh;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.3);
  border-left: 2px solid rgba(212, 175, 55, 0.4);
  border-right: 2px solid rgba(212, 175, 55, 0.4);
  overflow: hidden;
}

/* ================= EFECTOS DE SCROLL ================= */
.scroll-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal-zoom {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Estado activo cuando entra al viewport */
.scroll-reveal.is-visible,
.scroll-reveal-zoom.is-visible,
.scroll-reveal-left.is-visible,
.scroll-reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ================= MUSIC WIDGET ================= */
.audio-control-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99;
}

.music-btn {
  background: var(--gold-gradient);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--dark-emerald);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-gold);
}

.music-btn i {
  font-size: 1.2rem;
}

.music-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  position: absolute;
  bottom: 6px;
}

.music-wave span {
  width: 2.5px;
  background-color: var(--dark-emerald);
  height: 4px;
  border-radius: 2px;
}

.music-btn.playing .music-wave span:nth-child(1) {
  animation: waveAnim 0.7s infinite alternate ease-in-out;
}
.music-btn.playing .music-wave span:nth-child(2) {
  animation: waveAnim 0.9s infinite alternate ease-in-out 0.2s;
}
.music-btn.playing .music-wave span:nth-child(3) {
  animation: waveAnim 0.6s infinite alternate ease-in-out 0.4s;
}

@keyframes waveAnim {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* ================= HERO HEADER ================= */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, var(--dark-emerald) 0%, var(--primary-emerald) 75%, #0a4f35 100%);
  color: #fff;
  text-align: center;
  padding: 60px 24px 45px;
  border-bottom: 3px solid var(--accent-gold);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.monogram-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed var(--accent-gold);
  margin-bottom: 20px;
  position: relative;
  background: rgba(2, 36, 23, 0.7);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.monogram-letter {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle-tag {
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-glow);
  margin-bottom: 8px;
  font-weight: 500;
}

.hero-script {
  font-family: 'Alex Brush', cursive;
  font-size: 3.2rem;
  font-weight: normal;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-name {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 15px auto 20px;
  width: 70%;
}

.gold-divider::before,
.gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.gold-divider i {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.hero-date {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--gold-glow);
}

/* ================= GENERAL SECTIONS ================= */
.section {
  padding: 45px 22px;
  position: relative;
  text-align: center;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
  color: var(--primary-emerald);
  margin-bottom: 8px;
  position: relative;
  letter-spacing: 1px;
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 25px;
  font-style: italic;
}

/* ================= PORTRAIT FRAME ================= */
.portrait-section {
  padding-top: 40px;
}

.frame-container {
  position: relative;
  max-width: 380px;
  margin: 0 auto 25px;
  padding: 10px;
}

.golden-border-outer {
  padding: 8px;
  background: var(--gold-gradient);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), var(--shadow-gold);
}

.golden-border-inner {
  border: 3px solid #ffffff;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.portrait-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portrait-img:hover {
  transform: scale(1.03);
}

.corner-ornament {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent-gold);
}

.corner-ornament.top-left {
  top: 0; left: 0;
  border-right: none; border-bottom: none;
}
.corner-ornament.top-right {
  top: 0; right: 0;
  border-left: none; border-bottom: none;
}
.corner-ornament.bottom-left {
  bottom: 0; left: 0;
  border-right: none; border-top: none;
}
.corner-ornament.bottom-right {
  bottom: 0; right: 0;
  border-left: none; border-top: none;
}

.poetic-phrase {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--primary-emerald);
  padding: 0 15px;
  position: relative;
}

.poetic-phrase::before,
.poetic-phrase::after {
  content: '“';
  font-size: 2rem;
  color: var(--accent-gold);
  line-height: 0;
  vertical-align: -0.3em;
  font-family: 'Playfair Display', serif;
}
.poetic-phrase::after {
  content: '”';
}

/* ================= COUNTDOWN ================= */
.countdown-section {
  background: linear-gradient(180deg, rgba(5, 59, 39, 0.05) 0%, rgba(5, 59, 39, 0.12) 100%);
  border-top: 1px dashed rgba(212, 175, 55, 0.4);
  border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0 12px;
}

.countdown-item {
  background: linear-gradient(145deg, #094730, var(--dark-emerald));
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 12px 10px;
  min-width: 65px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-item .number {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-glow);
  line-height: 1;
}

.countdown-item .label {
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  margin-top: 5px;
}

.countdown-divider {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.countdown-date-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ================= FAMILY SECTION ================= */
.family-section {
  padding-bottom: 30px;
}

.ornament-leaf {
  font-size: 1.6rem;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.family-blessing {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.family-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
}

.family-role {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--primary-emerald);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.family-role i {
  color: var(--accent-gold);
  margin-right: 6px;
}

.family-names {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 1.5;
  font-weight: 600;
}

/* ================= EVENTS SECTION ================= */
.event-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(212, 175, 55, 0.35);
  position: relative;
  overflow: hidden;
}

.event-card.highlight-card {
  border: 2px solid var(--accent-gold);
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.event-image-preview {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.event-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold-gradient);
  color: var(--dark-emerald);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.event-card.highlight-card .event-icon {
  margin-top: 18px;
}

.event-icon {
  width: 50px;
  height: 50px;
  background: rgba(5, 59, 39, 0.08);
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary-emerald);
  margin-bottom: 12px;
}

.event-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--primary-emerald);
  margin-bottom: 6px;
}

.event-time {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

.event-time i {
  color: var(--accent-gold);
}

.event-place {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.event-address {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  padding: 0 10px;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-gold {
  background: linear-gradient(135deg, #094730 0%, var(--primary-emerald) 100%);
  color: #fff;
  border: 1px solid var(--accent-gold);
  box-shadow: 0 4px 15px rgba(5, 59, 39, 0.2);
}

.btn-gold:hover {
  background: var(--gold-gradient);
  color: var(--dark-emerald);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

/* ================= TIMELINE ================= */
.timeline {
  position: relative;
  max-width: 440px;
  margin: 25px auto 0;
  padding-left: 30px;
  text-align: left;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), var(--primary-emerald));
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  position: absolute;
  left: -30px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--dark-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-content {
  background: var(--card-bg);
  padding: 14px 18px;
  border-radius: 12px;
  border-left: 3px solid var(--accent-gold);
  box-shadow: var(--shadow-soft);
}

.timeline-hour {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--primary-emerald);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ================= PHOTO GALLERY ================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 140px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.5);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 59, 39, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ================= DETAILS / DRESS CODE ================= */
.detail-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.detail-icon {
  font-size: 1.8rem;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.detail-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--primary-emerald);
  margin-bottom: 8px;
}

.detail-highlight {
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--dark-emerald);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.detail-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.detail-note i {
  color: #c98822;
  margin-right: 4px;
}

/* ================= RSVP SINGLE BUTTON CARD ================= */
.rsvp-section {
  background: linear-gradient(180deg, rgba(5, 59, 39, 0.04) 0%, rgba(5, 59, 39, 0.12) 100%);
  border-top: 2px solid rgba(212, 175, 55, 0.3);
}

.rsvp-action-box {
  background: #ffffff;
  border-radius: var(--border-radius);
  padding: 35px 22px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  position: relative;
}

.rsvp-icon-ring {
  width: 65px;
  height: 65px;
  background: #e7f9ee;
  border: 2px solid #25D366;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #25D366;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
  animation: gentlePulse 2.5s infinite;
}

.rsvp-action-box h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  color: var(--primary-emerald);
  margin-bottom: 10px;
}

.rsvp-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-whatsapp-confirm {
  width: 100%;
  padding: 16px 22px;
  font-size: 1.02rem;
  font-weight: 600;
  background: #25D366;
  color: #ffffff;
  border-radius: 35px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.38);
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-whatsapp-confirm i {
  font-size: 1.35rem;
}

.btn-whatsapp-confirm:hover {
  background: #1eb956;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.55);
}

.rsvp-deadline-badge {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #f5f2ea;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.rsvp-deadline-badge i {
  color: var(--accent-gold);
  margin-right: 5px;
}

@keyframes gentlePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ================= FOOTER ================= */
.invitation-footer {
  background: linear-gradient(180deg, var(--primary-emerald) 0%, var(--dark-emerald) 100%);
  color: #fff;
  text-align: center;
  padding: 40px 20px 50px;
  border-top: 3px solid var(--accent-gold);
}

.footer-heart {
  color: var(--accent-gold);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-thanks {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-glow);
  margin-bottom: 8px;
}

.footer-sign {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
}

/* ================= LIGHTBOX MODAL ================= */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(2, 36, 23, 0.95);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: var(--gold-glow);
  font-size: 38px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

.lightbox-modal img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  border: 3px solid var(--accent-gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.3s ease;
}

.lightbox-caption {
  color: var(--gold-glow);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-top: 15px;
  text-align: center;
}

@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .hero-script {
    font-size: 2.8rem;
  }
  .hero-name {
    font-size: 1.7rem;
  }
  .countdown-item {
    min-width: 55px;
    padding: 10px 6px;
  }
  .countdown-item .number {
    font-size: 1.5rem;
  }
  .btn-whatsapp-confirm {
    font-size: 0.92rem;
    padding: 14px 16px;
  }
}
