/* ==========================================================================
   CSS PRINCIPAL - INVITACIÓN BABY SHOWER SAFARI PREMIUM
   ========================================================================== */

/* Variables de Diseño (Safari Premium Paleta de Color) */
:root {
  --color-primary: #2d4a22; /* Verde bosque safari */
  --color-secondary: #5e6f52; /* Verde musgo suave */
  --color-cream: #faf7f2; /* Crema de fondo */
  --color-dark-bg: #1f3017;
  --color-gold: #c5a86d; /* Oro premium */
  --color-gold-hover: #ad8f52;
  --color-sand: #f0e6d2; /* Arena suave */
  --color-text-dark: #333333;
  --color-text-light: #ffffff;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', Helvetica, Arial, sans-serif;
  --font-cursive: 'Great Vibes', cursive;
  --font-funny: 'Fredoka', sans-serif;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 20px -3px rgba(45, 74, 34, 0.15);
  --shadow-lg: 0 20px 35px -5px rgba(45, 74, 34, 0.25);

  --border-radius-sm: 8px;
  --border-radius-md: 18px;
  --border-radius-lg: 35px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-cream);
  color: var(--color-text-dark);
  font-family: var(--font-sans);
  line-height: 1.65;
  font-weight: 300;
  overflow-x: hidden;
}

/* Clases de Utilidad */
.cursive {
  font-family: var(--font-cursive);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--color-primary);
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. REPRODUCTOR DE MÚSICA FLOTANTE
   ========================================================================== */
.music-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  transition: all 0.5s ease;
}

.music-player {
  background-color: rgba(250, 247, 242, 0.9);
  border: 1px solid rgba(197, 168, 109, 0.4);
  padding: 8px 16px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.music-player:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.song-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.player-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.player-btn:active {
  transform: scale(0.85);
}

.music-icon.playing {
  animation: spin 3s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   2. SOBRE INTERACTIVO (PÁGINA DE BIENVENIDA)
   ========================================================================== */
#envelope-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(45, 74, 34, 0.4), rgba(45, 74, 34, 0.4)), url('fondo_incio.jpg') no-repeat center center;
  background-size: cover;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.8s ease;
  overflow: hidden;
}

.envelope-opened {
  transform: translateY(-100vh);
  opacity: 0;
  pointer-events: none;
}

.envelope-wrapper {
  background-color: rgba(250, 247, 242, 0.95);
  padding: 40px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(197, 168, 109, 0.3);
  text-align: center;
  max-width: 450px;
  width: 90%;
  position: relative;
  z-index: 2010;
  backdrop-filter: blur(10px);
}

.envelope-names-header .title-pre-envelope {
  font-size: 2.2rem;
  color: var(--color-secondary);
  display: block;
}

.parents-names-envelope {
  font-size: 2.5rem;
  font-family: var(--font-serif);
  color: var(--color-primary);
  margin-top: 10px;
  font-weight: 600;
  letter-spacing: 2px;
}

.envelope-divider {
  width: 60px;
  height: 3px;
  background-color: var(--color-gold);
  margin: 15px auto 0 auto;
  border-radius: 2px;
}

.envelope-container {
  margin: 40px 0;
  cursor: pointer;
}

.btn-primary-envelope {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

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

.envelope-tip {
  font-size: 1.2rem;
  color: var(--color-secondary);
  margin-top: 10px;
}

/* Estilos de Ultrasonido y Fila de Animales en Portada */
.envelope-ultrasound-container {
  width: 180px;
  height: 180px;
  margin: 20px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--color-gold);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-ultrasound {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.envelope-animals-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

.envelope-animal {
  width: 60px;
  height: auto;
  opacity: 0.95;
  animation: gentleSway 6s ease-in-out infinite;
  cursor: pointer;
}

.envelope-animal.animal-sway-1 {
  animation-duration: 5s;
  animation-delay: 0s;
}

.envelope-animal.animal-sway-2 {
  animation-duration: 6s;
  animation-delay: 1s;
}

.envelope-animal.animal-sway-3 {
  animation-duration: 7s;
  animation-delay: 0.5s;
}

.envelope-animal.animal-sway-4 {
  animation-duration: 8s;
  animation-delay: 1.5s;
}

.envelope-animals-tip {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ==========================================
   MOVIMIENTO LIGERO DE LOS ANIMALITOS (SWAYING)
   ========================================== */
.animal-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2005;
}

.safari-animal {
  position: absolute;
  max-width: 120px;
  height: auto;
  opacity: 0.95;
  animation: gentleSway 6s ease-in-out infinite;
}

/* Ubicaciones de los animalitos en la portada */
.animal-lion {
  bottom: 10%;
  left: 5%;
  animation-duration: 7s;
  animation-delay: 0s;
}

.animal-monkey {
  top: 10%;
  right: 8%;
  max-width: 80px;
  animation-duration: 5s;
  animation-delay: 1s;
}

.animal-elephant {
  bottom: 8%;
  right: 6%;
  max-width: 140px;
  animation-duration: 8s;
  animation-delay: 0.5s;
}

.animal-zebra {
  bottom: 35%;
  left: 8%;
  max-width: 100px;
  animation-duration: 6s;
  animation-delay: 1.5s;
}

@keyframes gentleSway {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(8px, 4px) rotate(2deg);
  }
  50% {
    transform: translate(0, 8px) rotate(0deg);
  }
  75% {
    transform: translate(-8px, 4px) rotate(-2deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* Animations for inner pages */
.anim-sway-left {
  animation: gentleSway 7s ease-in-out infinite alternate;
}

.anim-sway-right {
  animation: gentleSway 6s ease-in-out infinite alternate-reverse;
}

/* ==========================================================================
   3. CONTENIDO PRINCIPAL & HEADER
   ========================================================================== */
main {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

main.visible {
  opacity: 1;
}

.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 247, 242, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 900;
  border-bottom: 1px solid rgba(197, 168, 109, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 24px;
}

.nav-logo {
  font-size: 1.8rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--color-gold);
}

/* ==========================================================================
   SECCIÓN HERO / PORTADA
   ========================================================================== */
.hero-section {
  padding: 120px 24px 80px 24px;
  text-align: center;
  background-color: var(--color-cream);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-content {
  max-width: 800px;
  z-index: 10;
}

.hero-sub {
  font-size: 2.2rem;
  color: var(--color-gold);
  display: block;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  font-family: var(--font-funny);
  font-weight: 700;
}

.hero-intro-text {
  font-size: 1.1rem;
  color: var(--color-text-dark);
  margin-bottom: 40px;
}

.hero-photo-wrapper {
  position: relative;
  max-width: 480px;
  margin: 0 auto 40px auto;
}

.hero-photo-container {
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--color-sand);
  aspect-ratio: 1;
  box-shadow: var(--shadow-lg);
}

.hero-photo-couple {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-animals {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.hero-animal-img {
  position: absolute;
  max-width: 90px;
}

.hero-animal-img:nth-child(1) {
  bottom: 0px;
  left: -40px;
  max-width: 110px;
}

.hero-animal-img:nth-child(2) {
  bottom: 10px;
  right: -30px;
}

.hero-animal-img:nth-child(3) {
  top: 15%;
  left: -35px;
  max-width: 95px;
}

.hero-animal-img:nth-child(4) {
  top: 12%;
  right: -25px;
  max-width: 80px;
}

.wedding-date {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.wedding-location {
  font-size: 1rem;
  color: var(--color-secondary);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-gold);
  transform: translateY(-2px);
}

.btn-outline-location {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  text-decoration: none;
  padding: 10px 26px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-outline-location:hover {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

/* ==========================================================================
   CUENTA REGRESIVA
   ========================================================================== */
.countdown-section {
  background-color: var(--color-sand);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-section .container {
  position: relative;
  z-index: 2;
}

.countdown-decor {
  position: absolute;
  width: 240px;
  height: auto;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

.decor-top-left {
  top: -15px;
  left: -15px;
}

.decor-bottom-right {
  bottom: -15px;
  right: -15px;
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .countdown-decor {
    width: 160px;
  }
}

@media (max-width: 480px) {
  .countdown-decor {
    width: 110px;
    opacity: 0.75;
  }
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

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

#countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.countdown-item {
  background: linear-gradient(rgba(250, 247, 242, 0.6), rgba(250, 247, 242, 0.6)), url('fondo_incio.jpg') no-repeat center center;
  background-size: cover;
  padding: 15px 25px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 100px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(197, 168, 109, 0.4);
}

.countdown-item .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary); /* Restaurar verde bosque oscuro */
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.countdown-item .label {
  font-size: 0.8rem;
  color: var(--color-secondary); /* Restaurar gris/musgo secundario */
  text-transform: uppercase;
  margin-top: 5px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

@media (max-width: 480px) {
  #countdown {
    gap: 8px;
  }
  .countdown-item {
    padding: 8px 10px;
    min-width: 68px;
  }
  .countdown-item .number {
    font-size: 1.4rem;
  }
  .countdown-item .label {
    font-size: 0.65rem;
  }
}

/* ==========================================================================
   SECCIÓN DE FOTOS FAMILIARES (GALLERY)
   ========================================================================== */
.family-gallery-section {
  padding: 60px 24px 20px 24px;
  background-color: var(--color-cream);
  text-align: center;
}

.gallery-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  width: 280px;
  height: 360px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 6px solid var(--color-sand);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s, box-shadow 0.3s;
}

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

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold);
}

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

@media (max-width: 768px) {
  .gallery-item {
    width: 100%;
    max-width: 300px;
    height: 380px;
  }
}

/* ==========================================================================
   SECCIÓN DE JUEGO
   ========================================================================== */
.game-section {
  padding: 80px 24px;
  background-color: var(--color-cream);
}

.voting-cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.vote-card-container {
  perspective: 1000px;
  width: 260px;
  height: 320px;
  margin-bottom: 20px;
}

.vote-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

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

.vote-card-front, .vote-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(197, 168, 109, 0.2);
  background-color: var(--color-cream);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.vote-card-front:hover, .vote-card-back:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-lg);
}

.vote-card-back {
  transform: rotateY(180deg);
}

.vote-balloon {
  max-width: 100px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.vote-card-front h3, .vote-card-back h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.vote-face {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-gold);
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.btn-vote {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  color: white;
  font-size: 0.9rem;
}

.green-btn {
  background-color: var(--color-primary);
}

.brown-btn {
  background-color: #8c6a3c;
}

/* Efecto de Votación */
.smoke-effect-container {
  display: none;
  justify-content: center;
  margin: 20px 0;
  transition: opacity 0.8s ease;
}

.smoke-message {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 30px;
  background-color: var(--color-sand);
}

.green-text {
  color: var(--color-primary);
}

.brown-text {
  color: #8c6a3c;
}

/* ==========================================================================
   DETALLES DEL EVENTO
   ========================================================================== */
.details-section {
  padding: 80px 24px;
  background-color: var(--color-sand);
}

.cards-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px auto;
  max-width: 900px;
  flex-wrap: wrap;
}

.details-card {
  background-color: var(--color-cream);
  padding: 30px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  flex: 1;
  min-width: 280px;
  text-align: center;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.card-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.card-time {
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.card-venue {
  color: var(--color-secondary);
}

.card-address {
  font-size: 0.9rem;
  color: #666;
}

.card-buttons {
  margin-top: 20px;
}

.btn-card {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.btn-card:hover {
  background-color: var(--color-gold);
}

.gift-box {
  background-color: var(--color-cream);
  padding: 30px;
  border-radius: var(--border-radius-md);
  max-width: 700px;
  margin: 40px auto 0 auto;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px dashed var(--color-gold);
}

.gift-box h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.gift-options {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.gift-badge {
  background-color: var(--color-sand);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* ==========================================================================
   RSVP / CONFIRMACIÓN
   ========================================================================== */
.rsvp-section {
  padding: 80px 24px;
  background-color: var(--color-cream);
}

.rsvp-box {
  background-color: var(--color-sand);
  border-radius: var(--border-radius-md);
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.rsvp-form {
  margin-top: 30px;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(45, 74, 34, 0.2);
  border-radius: var(--border-radius-sm);
  background-color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary-submit {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
}

.btn-primary-submit:hover {
  background-color: var(--color-gold);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  background-color: var(--color-dark-bg);
  color: var(--color-cream);
  padding: 60px 24px;
}

.main-footer p {
  color: rgba(250, 247, 242, 0.8);
}

.footer-signature {
  font-size: 2.2rem;
  color: var(--color-gold) !important;
  margin-bottom: 10px;
}

.wedding-footer-date {
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 30px;
}

.copyright {
  font-size: 0.8rem;
  margin-top: 10px;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Simplificado para móviles */
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .parents-names-envelope {
    font-size: 2rem;
  }
}
