/* ==========================================================================
   PREMIUM WEDDING INVITATION STYLES
   ========================================================================== */

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

:root {
  /* Colors */
  --bg-primary: #FDF8F0;
  --bg-secondary: #FAF3E8;
  --bg-tertiary: #F5EDE0;
  --champagne: #C9A96E;
  --gold: #D4AF37;
  --gold-light: #F5E6C8;
  --gold-gradient: linear-gradient(135deg, #C9A96E, #D4AF37, #C9A96E);
  --blush: #F5E1DA;
  --blush-dark: #E8C4B8;
  --text-primary: #2C2C2C;
  --text-secondary: #5A5A5A;
  --text-light: #8A8A8A;
  --white: #FFFFFF;
  
  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;
  --font-script: 'Great Vibes', cursive;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--champagne);
  border-radius: 3px;
}

.section {
  padding: 80px 24px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 40px;
}

.section-divider {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--champagne);
  margin: 16px auto 32px;
  border: none;
}

/* ==========================================================================
   PORTADA SCREEN
   ========================================================================== */
#portada-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
  transition: opacity 0.8s ease;
}

#portada-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.portada-floral-top,
.portada-floral-bottom {
  position: absolute;
  width: clamp(150px, 40%, 300px);
  opacity: 0.8;
  pointer-events: none;
}

.portada-floral-top {
  top: 0;
  left: 0;
}

.portada-floral-bottom {
  bottom: 0;
  right: 0;
}

.portada-content {
  text-align: center;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.couple-names {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.couple-names .ampersand {
  font-family: var(--font-script);
  font-size: 0.7em;
  color: var(--champagne);
  margin: 0 10px;
}

.wedding-date {
  font-family: var(--font-body);
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--champagne);
  margin: 20px 0;
}

.romantic-phrase {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

#open-btn {
  background: transparent;
  border: 2px solid var(--champagne);
  color: var(--champagne);
  padding: 16px 48px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s ease;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

#open-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.2);
  transform: rotate(45deg) translateY(-100%);
  transition: all 0.6s ease;
}

#open-btn:hover {
  background: var(--champagne);
  color: var(--white);
}

#open-btn:hover::after {
  transform: rotate(45deg) translateY(100%);
}

/* ==========================================================================
   INVITATION CONTENT & ANIMATIONS
   ========================================================================== */
#invitation-content {
  display: none;
  opacity: 0;
}

#invitation-content.visible {
  display: block;
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* ==========================================================================
   HISTORIA
   ========================================================================== */
#historia {
  background: var(--bg-secondary);
  background-image: repeating-linear-gradient(45deg, rgba(201,169,110,0.03) 0, rgba(201,169,110,0.03) 1px, transparent 1px, transparent 20px);
}

.historia-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.historia-image-wrapper {
  width: 280px;
  height: 350px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 3px solid var(--gold-light);
  flex-shrink: 0;
}

.historia-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.historia-image-wrapper:hover .historia-image {
  transform: scale(1.05);
}

.historia-text {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.historia-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--champagne);
  margin-top: 24px;
  border-left: 3px solid var(--champagne);
  padding-left: 20px;
  text-align: left;
}

/* ==========================================================================
   GRAN DIA
   ========================================================================== */
.events-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.event-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--champagne);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.event-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--champagne);
  display: inline-block;
}

.event-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.event-venue {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.event-address {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.event-time {
  font-size: 1.1rem;
  color: var(--champagne);
  font-weight: 700;
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
#countdown {
  background: linear-gradient(135deg, #2C2C2C 0%, #1a1a1a 100%);
  color: var(--white);
}

#countdown .section-title {
  color: var(--white);
}

#countdown .section-subtitle {
  color: rgba(255,255,255,0.7);
}

.countdown-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.countdown-box {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  min-width: 75px;
  text-align: center;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--champagne);
  display: block;
}

.countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
  display: block;
}

/* ==========================================================================
   UBICACION
   ========================================================================== */
.location-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.location-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.location-card .location-header {
  padding: 24px;
  text-align: center;
}

.map-container {
  width: 100%;
  height: 250px;
}

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

.directions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--champagne);
  color: var(--white);
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  margin: 20px;
}

.directions-btn:hover {
  background: var(--gold);
  transform: scale(1.05);
}

/* ==========================================================================
   MUSICA
   ========================================================================== */
#musica {
  background: var(--bg-secondary);
}

.music-player {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  max-width: 400px;
  margin: 0 auto;
}

.music-disc {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111, #333);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--gold-light);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.music-disc.playing {
  animation: spin 4s linear infinite;
}

.music-note-icon {
  font-size: 2.5rem;
  color: var(--white);
}

.music-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.music-artist {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

#music-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(201,169,110,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

#music-play-btn:hover {
  transform: scale(1.1);
}

.progress-wrapper {
  flex: 1;
  height: 6px;
  background: var(--gold-light);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

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

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 8px;
}

#floating-music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--champagne);
  color: var(--white);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 900;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#floating-music-btn:hover {
  transform: scale(1.1);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,169,110, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(201,169,110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,110, 0); }
}

#floating-music-btn.playing {
  animation: pulse 2s infinite;
}

/* ==========================================================================
   GALERIA
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

#lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

#lightbox-prev {
  left: 10px;
}

#lightbox-next {
  right: 10px;
}

.lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

/* ==========================================================================
   DRESSCODE
   ========================================================================== */
#dresscode {
  background: var(--bg-secondary);
}

.dresscode-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 500px;
  margin: 0 auto;
}

.dresscode-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.dresscode-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.dresscode-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--champagne);
  margin-bottom: 16px;
}

.dresscode-items {
  list-style: none;
  padding: 0;
}

.dresscode-items li {
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gold-light);
}

.dresscode-items li:last-child {
  border: none;
}

.dresscode-note {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 24px;
  font-style: italic;
}

/* ==========================================================================
   RSVP
   ========================================================================== */
#rsvp {
  background: var(--bg-primary);
  background-image: radial-gradient(var(--gold-light) 1px, transparent 1px);
  background-size: 30px 30px;
}

#rsvp-form {
  max-width: 450px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input[type='text'],
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gold-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9A96E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

.form-group input[type='text']:focus,
.form-group select:focus {
  border-color: var(--champagne);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.radio-option {
  flex: 1;
}

.radio-option input[type='radio'] {
  display: none;
}

.radio-option label {
  display: block;
  padding: 14px;
  text-align: center;
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.radio-option input:checked + label {
  background: var(--champagne);
  color: var(--white);
  border-color: var(--champagne);
}

#send-whatsapp {
  width: 100%;
  padding: 16px;
  background: var(--gold-gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(201,169,110,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#send-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,169,110,0.4);
}

/* ==========================================================================
   REGALOS
   ========================================================================== */
#regalos {
  background: var(--bg-secondary);
}

.gifts-message {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  font-style: italic;
}

.gifts-container {
  display: grid;
  gap: 20px;
  max-width: 450px;
  margin: 0 auto;
}

.gift-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.gift-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--champagne);
  margin-bottom: 12px;
}

.gift-card-detail {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.gift-card-value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin: 8px 0;
  font-family: monospace;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--champagne);
  color: var(--champagne);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.copy-btn:hover {
  background: var(--champagne);
  color: var(--white);
}

.copy-btn.copied {
  background: #4CAF50;
  border-color: #4CAF50;
  color: var(--white);
}

.gift-qr {
  text-align: center;
  margin-top: 8px;
}

.gift-qr img {
  max-width: 200px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   CIERRE
   ========================================================================== */
#cierre {
  background: var(--bg-primary);
  padding-bottom: 120px;
}

.closing-message {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 32px;
}

.closing-names {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--champagne);
}

.closing-hearts {
  font-size: 2rem;
  margin-top: 24px;
  opacity: 0.6;
}

/* ==========================================================================
   SIDE NAVIGATION
   ========================================================================== */
#side-nav {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--champagne);
  opacity: 0.3;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.nav-dot.active {
  opacity: 1;
  transform: scale(1.3);
}

/* ==========================================================================
   MEDIA QUERIES (TABLET+)
   ========================================================================== */
@media (min-width: 768px) {
  .historia-container {
    flex-direction: row;
    text-align: left;
  }
  
  .historia-text {
    text-align: left;
  }
  
  .events-container {
    grid-template-columns: 1fr 1fr;
  }
  
  .location-cards {
    grid-template-columns: 1fr 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .dresscode-container {
    grid-template-columns: 1fr 1fr;
  }

  #countdown .countdown-container {
    gap: 32px;
  }
  
  #side-nav {
    display: flex;
  }

  #lightbox-prev {
    left: -60px;
  }

  #lightbox-next {
    right: -60px;
  }
}

/* ==========================================================================
   MEDIA QUERIES (DESKTOP)
   ========================================================================== */
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
