/* ================================
   Navidad 2026 - Grupo FINSI
   Estilos Navideños
   ================================ */

/* Fuentes navideñas elegantes */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Raleway:wght@300;400;500;600&family=Cinzel:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

/* 
  Great Vibes - Script elegante para títulos destacados (muy navideño)
  Cinzel - Serif clásico/majestuoso para títulos de tarjetas
  Cormorant Garamond - Serif elegante para subtítulos
  Raleway - Sans-serif moderno para textos secundarios
  Lora - Serif legible para cuerpo de texto
*/

:root {
  --christmas-red: #c41e3a;
  --christmas-red-dark: #8b1429;
  --christmas-green: #165b33;
  --christmas-green-light: #1e7b47;
  --gold: #d4af37;
  --gold-light: #f4d03f;
  --snow-white: #f8f9fa;
  --cream: #fef9e7;
  --deep-burgundy: #722f37;
  --midnight: #1a1a2e;
}

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

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: linear-gradient(135deg, var(--midnight) 0%, var(--christmas-red-dark) 50%, var(--deep-burgundy) 100%);
  min-height: 100vh;
  color: var(--snow-white);
  overflow-x: hidden;
  position: relative;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Fondo de estrellas */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--gold-light), transparent),
    radial-gradient(2px 2px at 40px 70px, var(--snow-white), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--gold), transparent),
    radial-gradient(2px 2px at 130px 80px, var(--snow-white), transparent),
    radial-gradient(1px 1px at 160px 120px, var(--gold-light), transparent),
    radial-gradient(2px 2px at 200px 50px, var(--snow-white), transparent),
    radial-gradient(1px 1px at 250px 160px, var(--gold), transparent),
    radial-gradient(2px 2px at 300px 90px, var(--snow-white), transparent),
    radial-gradient(1px 1px at 350px 200px, var(--gold-light), transparent),
    radial-gradient(2px 2px at 400px 130px, var(--snow-white), transparent);
  background-size: 400px 250px;
  animation: twinkle 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

/* Copos de nieve */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.snowflake {
  position: absolute;
  top: -20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  animation: fall linear infinite;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 12s; animation-delay: 0s; font-size: 1.2rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 15s; animation-delay: 2s; font-size: 0.9rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 10s; animation-delay: 4s; font-size: 1.4rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 18s; animation-delay: 1s; font-size: 1rem; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 14s; animation-delay: 3s; font-size: 1.6rem; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 11s; animation-delay: 5s; font-size: 0.8rem; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 16s; animation-delay: 0.5s; font-size: 1.3rem; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 13s; animation-delay: 2.5s; font-size: 1.1rem; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 17s; animation-delay: 4.5s; font-size: 0.9rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 9s; animation-delay: 1.5s; font-size: 1.5rem; }

@keyframes fall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0.3;
  }
}

/* Pantalla de bienvenida */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--midnight) 0%, var(--christmas-red-dark) 50%, var(--deep-burgundy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 1.5rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.1);
}

.welcome-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 28px;
  padding: 3rem 2.5rem;
  max-width: 580px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: welcomeCardIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes welcomeCardIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.welcome-overlay.hidden .welcome-card {
  animation: welcomeCardOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes welcomeCardOut {
  0% {
    opacity: 1;
    transform: scale(1) rotateX(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.7) rotateX(20deg) translateY(-50px);
  }
}

.welcome-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 175, 55, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--christmas-red), var(--gold), var(--christmas-green), var(--gold), var(--christmas-red));
  background-size: 200% 100%;
  animation: shimmerBorder 3s linear infinite;
}

@keyframes shimmerBorder {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* Efecto de brillo que recorre la tarjeta */
.welcome-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shineEffect 4s ease-in-out infinite;
}

@keyframes shineEffect {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

.welcome-decoration {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
}

.welcome-title {
  font-family: 'Great Vibes', cursive;
  font-size: 2.8rem;
  font-weight: 400;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.welcome-subtitle {
  font-size: 1.15rem;
  color: var(--cream);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.welcome-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.welcome-message {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.welcome-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.welcome-cta-text {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 500;
}

.welcome-pulse .geo-dot {
  background: var(--gold-light);
}

.welcome-pulse .geo-wave {
  border-color: var(--gold-light);
}

.welcome-logo {
  margin-bottom: 1.5rem;
}

.welcome-logo .logo-img {
  max-height: 60px;
  width: auto;
  filter: brightness(1.1);
}

.welcome-footer {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Bolas de navidad realistas */
.ornament-group {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
}

.christmas-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: relative;
  cursor: default;
  animation: gentleSway 3s ease-in-out infinite;
}

.christmas-ball.small {
  width: 20px;
  height: 20px;
}

/* Gancho superior */
.christmas-ball::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: linear-gradient(145deg, #c9a227 0%, #8b7015 100%);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.christmas-ball.small::before {
  top: -6px;
  width: 6px;
  height: 6px;
}

/* Cordón */
.christmas-ball::after {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 8px;
  background: linear-gradient(to bottom, rgba(139, 112, 21, 0.3), rgba(139, 112, 21, 0.8));
}

.christmas-ball.small::after {
  top: -10px;
  height: 5px;
}

/* Bola roja */
.christmas-ball.red {
  background: radial-gradient(circle at 30% 30%, #ff6b6b 0%, #c41e3a 40%, #8b1429 100%);
  box-shadow: 
    inset -4px -4px 10px rgba(0, 0, 0, 0.4),
    inset 4px 4px 10px rgba(255, 255, 255, 0.2),
    0 4px 15px rgba(196, 30, 58, 0.5),
    0 0 20px rgba(196, 30, 58, 0.2);
}

/* Reflejo de luz */
.christmas-ball.red .shine,
.christmas-ball.red > span {
  display: none;
}

/* Bola dorada */
.christmas-ball.gold {
  background: radial-gradient(circle at 30% 30%, #fff4c4 0%, #d4af37 35%, #8b7015 100%);
  box-shadow: 
    inset -4px -4px 10px rgba(0, 0, 0, 0.3),
    inset 4px 4px 10px rgba(255, 255, 255, 0.4),
    0 4px 15px rgba(212, 175, 55, 0.5),
    0 0 20px rgba(212, 175, 55, 0.3);
}

/* Bola verde */
.christmas-ball.green {
  background: radial-gradient(circle at 30% 30%, #4ade80 0%, #165b33 40%, #0d3d22 100%);
  box-shadow: 
    inset -4px -4px 10px rgba(0, 0, 0, 0.4),
    inset 4px 4px 10px rgba(255, 255, 255, 0.2),
    0 4px 15px rgba(22, 91, 51, 0.5),
    0 0 20px rgba(22, 91, 51, 0.2);
}

/* Animación de balanceo suave */
@keyframes gentleSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.christmas-ball:nth-child(2) { animation-delay: 0.5s; }
.christmas-ball:nth-child(3) { animation-delay: 1s; }
.christmas-ball:nth-child(4) { animation-delay: 1.5s; }
.christmas-ball:nth-child(5) { animation-delay: 2s; }

@media (max-width: 600px) {
  .welcome-card {
    padding: 2rem 1.5rem;
  }
  
  .welcome-title {
    font-size: 1.4rem;
  }
  
  .welcome-intro {
    font-size: 0.95rem;
  }
  
  .welcome-message {
    font-size: 0.95rem;
  }
}

/* Contenedor principal */
.nm-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  position: relative;
  z-index: 2;
}

/* Encabezado */
header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-20px);
  animation: headerFadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-play-state: paused;
}

.cards-visible ~ .nm-footer,
header {
  animation-play-state: paused;
}

body.content-visible header {
  animation-play-state: running;
}

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

header::before {
  content: '❄';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 2rem;
  opacity: 0.5;
  animation: float 4s ease-in-out infinite;
}

header::after {
  content: '❄';
  position: absolute;
  bottom: 10px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.5;
  animation: float 4s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(180deg); }
}

header h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 3.2rem;
  font-weight: 400;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1.1;
}

header .subtitle {
  font-size: 1.2rem;
  margin: 1rem 0;
  color: var(--cream);
  font-style: italic;
}

header .intro {
  max-width: 700px;
  margin: 1.5rem auto 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

/* Decoración de acebo */
.holly-decoration {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 0.5rem;
}

/* Grid de tarjetas */
.cards {
  display: grid;
  gap: 1.8rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Contenedor de tarjeta con perspectiva 3D */
.card-container {
  perspective: 1500px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: cardFadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-play-state: paused;
}

/* Animación escalonada para cada tarjeta */
.cards-visible .card-container {
  animation-play-state: running;
}

.card-container:nth-child(1) { animation-delay: 0.1s; }
.card-container:nth-child(2) { animation-delay: 0.2s; }
.card-container:nth-child(3) { animation-delay: 0.3s; }
.card-container:nth-child(4) { animation-delay: 0.4s; }
.card-container:nth-child(5) { animation-delay: 0.5s; }
.card-container:nth-child(6) { animation-delay: 0.6s; }
.card-container:nth-child(7) { animation-delay: 0.7s; }
.card-container:nth-child(8) { animation-delay: 0.8s; }
.card-container:nth-child(9) { animation-delay: 0.9s; }
.card-container:nth-child(10) { animation-delay: 1s; }

@keyframes cardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Tarjeta con efecto flip */
.card {
  position: relative;
  width: 100%;
  min-height: 200px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 20px;
}

.card-container:hover .card {
  transform: translateY(-5px) scale(1.02);
}

/* Caras de la tarjeta */
.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 200px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Cara frontal */
.card-front {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-top: none;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

/* Imagen de fondo para cada tarjeta */
.card-front .card-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.card-container:hover .card-bg-image {
  opacity: 0.25;
}

/* Imágenes específicas por tarjeta */
[data-id="1"] .card-bg-image { background-image: url('assets/1.jpg'); }
[data-id="2"] .card-bg-image { background-image: url('assets/2.jpg'); }
[data-id="3"] .card-bg-image { background-image: url('assets/3.jpg'); }
[data-id="4"] .card-bg-image { background-image: url('assets/4.jpg'); }
[data-id="5"] .card-bg-image { background-image: url('assets/5.jpg'); }
[data-id="6"] .card-bg-image { background-image: url('assets/6.jpg'); }
[data-id="7"] .card-bg-image { background-image: url('assets/7.jpg'); }
[data-id="8"] .card-bg-image { background-image: url('assets/8.jpg'); }
[data-id="9"] .card-bg-image { background-image: url('assets/9.jpg'); }
[data-id="10"] .card-bg-image { background-image: url('assets/10.jpg'); }

.card-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--christmas-red), var(--gold), var(--christmas-green), var(--gold), var(--christmas-red));
  border-radius: 20px 20px 0 0;
}

/* Número decorativo de fondo */
.card-number {
  position: absolute;
  bottom: 0;
  right: 0.5rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 7rem;
  font-weight: 700;
  color: rgba(212, 175, 55, 0.12);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.card-front h2,
.card-front .short,
.card-front .click-hint {
  position: relative;
  z-index: 1;
}

.card-back h2,
.card-back .full {
  position: relative;
  z-index: 1;
}

.card-front h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.card-front .short {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.card-front .click-hint {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Efecto de geolocalización */
.geo-pulse {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.geo-dot {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  z-index: 2;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}

.geo-wave {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: geoWave 2.5s ease-out infinite;
}

.geo-wave-2 {
  animation-delay: 1.25s;
}

@keyframes geoWave {
  0% {
    width: 10px;
    height: 10px;
    opacity: 0.6;
  }
  100% {
    width: 40px;
    height: 40px;
    opacity: 0;
  }
}

/* Cara trasera */
.card-back {
  background: linear-gradient(145deg, var(--christmas-green) 0%, var(--christmas-green-light) 100%);
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
  border-top: none;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.card-back::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--christmas-red), var(--gold));
  border-radius: 20px 20px 0 0;
}

.card-back h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.card-back .full {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--snow-white);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 1rem;
}

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

/* Imagen de fondo del modal (pantalla completa) */
.modal-overlay-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  z-index: 0;
  filter: blur(2px);
}

/* Overlay oscuro sobre la imagen - más sutil */
.modal-overlay-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* Modal Card (versión expandida) */
.modal-card {
  perspective: 1500px;
  width: 100%;
  max-width: 550px;
  transform: scale(0.8);
  transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-card-inner {
  position: relative;
  width: 100%;
  min-height: 350px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 24px;
}

.modal-card-inner.flipped {
  transform: rotateY(180deg);
}

/* Caras del modal */
.modal-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 350px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-front {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.95) 0%, rgba(20, 20, 35, 0.98) 100%);
  border: 2px solid rgba(212, 175, 55, 0.5);
  border-top: none;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}


.modal-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--christmas-red), var(--gold), var(--christmas-green), var(--gold), var(--christmas-red));
}

/* Número decorativo en modal */
.modal-number {
  font-size: 10rem;
  color: rgba(212, 175, 55, 0.08);
  bottom: -1rem;
  right: 1rem;
}

.modal-front h2,
.modal-front .short,
.modal-front .flip-instruction {
  position: relative;
  z-index: 1;
}

.modal-back h2,
.modal-back .modal-short,
.modal-back .full {
  position: relative;
  z-index: 1;
}

.modal-front h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 1rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.modal-front .short {
  font-family: 'Raleway', sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.modal-front .flip-instruction {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  text-align: center;
  color: var(--gold);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-front .flip-instruction:hover {
  color: var(--gold-light);
}

.flip-icon {
  animation: flipHint 2s ease-in-out infinite;
}

@keyframes flipHint {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(20deg); }
}

.modal-back {
  background: linear-gradient(145deg, var(--christmas-green) 0%, var(--deep-burgundy) 100%);
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
  border-top: none;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.modal-back::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--christmas-red), var(--gold));
}

.modal-back h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.modal-back .modal-short {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--cream);
  font-style: italic;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.modal-back .full {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--snow-white);
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* Footer */
.nm-footer {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.nm-footer p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--cream);
  font-style: italic;
}

.nm-footer .christmas-wishes {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--gold-light);
  margin-top: 1rem;
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-logo .logo-img {
  max-height: 80px;
  width: auto;
  filter: brightness(1.1);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gold-light);
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.link-separator {
  color: var(--gold);
  opacity: 0.5;
}

.nm-footer .footer-logo {
  margin-bottom: 1.5rem;
}

.nm-footer .logo-img {
  max-width: 200px;
  height: auto;
  filter: brightness(1.1);
}

.nm-footer .footer-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nm-footer .footer-links a {
  color: var(--gold-light);
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 25px;
  transition: all 0.3s ease;
}

.nm-footer .footer-links a:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.nm-footer .link-separator {
  color: var(--gold);
  opacity: 0.5;
}

.nm-footer .ornaments {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 0.5rem;
}

/* Animaciones adicionales */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold), var(--gold-light), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  header .intro {
    font-size: 0.95rem;
  }
  
  .modal-front h2,
  .modal-back h2 {
    font-size: 1.4rem;
  }
  
  .modal-face {
    padding: 1.8rem;
  }
}

/* Estado visto - borde dorado brillante */
.card-container.viewed .card-front {
  border-color: var(--gold);
  border-width: 2px;
  box-shadow: 
    0 8px 32px rgba(212, 175, 55, 0.25),
    0 0 20px rgba(212, 175, 55, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-container.viewed .card-front::before {
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  height: 6px;
}

.card-container.viewed .card-number {
  color: rgba(212, 175, 55, 0.2);
}

/* Ocultar indicador de clic en tarjetas ya vistas */
.card-container.viewed .click-hint {
  display: none;
}

/* Botón de control de música */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(212, 175, 55, 0.4);
  cursor: pointer;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.music-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--gold);
  transform: scale(1.1);
}

.music-toggle.playing {
  background: rgba(212, 175, 55, 0.3);
  border-color: var(--gold);
  animation: musicPulse 1.5s ease-in-out infinite;
}

.music-icon {
  font-size: 1.5rem;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(212, 175, 55, 0.5); }
}

/* Botón de WhatsApp */
.whatsapp-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  cursor: pointer;
  z-index: 2500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  animation: whatsappGlow 2s ease-in-out infinite;
}

.whatsapp-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
}

.whatsapp-button .wa-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.whatsapp-button .wa-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.whatsapp-button .wa-main {
  color: white;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.whatsapp-button .wa-sub {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  white-space: nowrap;
}

.whatsapp-button .wa-decoration {
  font-size: 1rem;
  color: white;
  filter: none;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  animation: snowflakeSpin 3s linear infinite;
}

@keyframes whatsappGlow {
  0%, 100% { 
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  50% { 
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 40px rgba(212, 175, 55, 0.3);
  }
}

@keyframes snowflakeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive para el botón de WhatsApp */
@media (max-width: 600px) {
  .whatsapp-button {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }
  
  .whatsapp-button .wa-icon {
    font-size: 1.5rem;
  }
  
  .whatsapp-button .wa-main {
    font-size: 0.75rem;
  }
  
  .whatsapp-button .wa-sub {
    font-size: 0.6rem;
  }
  
  .whatsapp-button .wa-decoration {
    display: none;
  }
}

