/* =========================================================
   INVITACIÓN SIMPLE: PAW PATROL DINO RESCUE (NICOLÁS CUMPLE 3)
   Estilo Vivo, Marco Limpio y Atmósfera de Selva
   ========================================================= */

:root {
  --bg-deep: #081610;
  --bg-jungle: #0f2c1f;
  --bg-card: rgba(14, 38, 27, 0.82);
  --gold-primary: #ffb703;
  --gold-vibrant: #fb8500;
  --rescue-blue: #0284c7;
  --rescue-green: #10b981;
  --wa-color: #25D366;
  --text-light: #f8fafc;
  --text-muted: #cbd5e1;
  --border-glass: rgba(255, 255, 255, 0.14);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.55);
}

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

[hidden] {
  display: none !important;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-light);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Fondo ambiental selvático con gradientes y textura viva */
body {
  background: 
    radial-gradient(circle at 50% 15%, rgba(34, 197, 94, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 10% 85%, rgba(245, 158, 11, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 90% 60%, rgba(14, 165, 233, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, #07140e 0%, #0d281c 50%, #050f0a 100%);
  background-attachment: fixed;
}

/* Canvas de partículas perimetrales sutiles */
.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Accesibilidad para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =========================================================
   PANTALLA DE BIENVENIDA / ACTIVACIÓN DE AUDIO
   ========================================================= */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 8, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.welcome-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(145deg, rgba(16, 46, 33, 0.95), rgba(9, 26, 18, 0.98));
  border: 2px solid rgba(255, 183, 3, 0.35);
  border-radius: 28px;
  padding: 34px 24px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 183, 3, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(0);
  animation: welcomePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes welcomePop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.paw-badge-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb703, #fb8500);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(251, 133, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  margin-bottom: 18px;
  animation: badgePulse 2.2s infinite ease-in-out;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(251, 133, 0, 0.5); }
  50% { transform: scale(1.06); box-shadow: 0 0 35px rgba(251, 133, 0, 0.85); }
}

.paw-badge {
  width: 66px;
  height: 66px;
  background: #0f2c1f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffb703;
}

.paw-icon {
  width: 38px;
  height: 38px;
}

.welcome-tag {
  display: inline-block;
  background: rgba(255, 183, 3, 0.15);
  color: #ffd166;
  border: 1px solid rgba(255, 183, 3, 0.4);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.welcome-title {
  font-family: 'Titan One', cursive, sans-serif;
  font-size: 1.85rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 183, 3, 0.3);
}

.welcome-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-open-invite {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #081a12;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 16px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(251, 133, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-open-invite:hover,
.btn-open-invite:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(251, 133, 0, 0.6);
  outline: none;
}

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

.btn-open-invite .btn-icon {
  font-size: 1.3rem;
}

/* =========================================================
   BOTÓN FLOTANTE DE MÚSICA
   ========================================================= */
.music-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 34, 24, 0.88);
  border: 1.5px solid rgba(255, 183, 3, 0.45);
  border-radius: 50px;
  padding: 8px 14px;
  color: #ffd166;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.music-toggle:hover {
  background: rgba(16, 46, 33, 0.95);
  border-color: #ffb703;
  transform: scale(1.03);
}

.music-toggle:focus-visible,
.modal-close-btn:focus-visible,
.dropdown-item:focus-visible,
.btn-rsvp-submit:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.sound-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.sound-waves .bar {
  width: 3px;
  background: #ffb703;
  border-radius: 3px;
  height: 4px;
  transition: height 0.2s ease;
}

.music-toggle.is-playing .bar-1 { animation: wave 0.8s infinite ease-in-out alternate; }
.music-toggle.is-playing .bar-2 { animation: wave 0.6s 0.2s infinite ease-in-out alternate; }
.music-toggle.is-playing .bar-3 { animation: wave 0.9s 0.4s infinite ease-in-out alternate; }
.music-toggle.is-playing .bar-4 { animation: wave 0.7s 0.1s infinite ease-in-out alternate; }

@keyframes wave {
  0% { height: 4px; }
  100% { height: 14px; }
}

.music-toggle.is-paused .bar {
  height: 3px;
  opacity: 0.5;
}

/* =========================================================
   CONTENEDOR PRINCIPAL
   ========================================================= */
.invite-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
  padding: 68px 14px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =========================================================
   MARCO VIVO CON LA IMAGEN DE CANVA
   ========================================================= */
.poster-card-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.poster-frame {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #0d281c;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.65), 
    0 0 35px rgba(34, 197, 94, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}

/* La imagen principal: 100% completa, sin recortes, proporción natural */
.poster-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  vertical-align: middle;
}

/* Brillo muy sutil en bordes */
.poster-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 22px;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08);
}

/* =========================================================
   SECCIÓN DE ACCIONES ÚTILES DEBAJO DE LA LÁMINA
   ========================================================= */
.actions-section {
  width: 100%;
  margin-top: 22px;
  position: relative;
}

.actions-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 16px;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.action-btn:hover,
.action-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
  outline: none;
}

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

/* Botón RSVP Principal */
.btn-rsvp {
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #091a11;
  box-shadow: 0 8px 22px rgba(251, 133, 0, 0.38);
}

.btn-rsvp:hover {
  box-shadow: 0 12px 28px rgba(251, 133, 0, 0.55);
}

/* Botón Ubicación */
.btn-location {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.32);
}

.btn-location:hover {
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.48);
}

/* Botón Calendario */
.btn-calendar {
  background: rgba(16, 44, 32, 0.9);
  color: #f8fafc;
  border: 1.5px solid rgba(255, 183, 3, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.btn-calendar:hover {
  border-color: #ffb703;
  background: rgba(22, 58, 42, 0.95);
}

/* Menú Desplegable de Calendario */
.calendar-dropdown {
  background: #0d281c;
  border: 1.5px solid rgba(255, 183, 3, 0.4);
  border-radius: 16px;
  margin-top: 10px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(255, 183, 3, 0.12);
  color: #ffd166;
}

.dropdown-icon {
  font-size: 1.2rem;
}

/* Nota de pie */
.footer-note {
  margin-top: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
}

/* =========================================================
   MODAL DE CONFIRMACIÓN RSVP
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.25s ease-out;
}

@media (min-width: 540px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

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

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(165deg, #0e2b1e 0%, #081c13 100%);
  border-top: 2px solid rgba(255, 183, 3, 0.4);
  border-radius: 28px 28px 0 0;
  padding: 28px 22px 32px;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.6);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 540px) {
  .modal-sheet {
    border-radius: 28px;
    border: 2px solid rgba(255, 183, 3, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  font-size: 1.8rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-badge {
  font-size: 2rem;
  margin-bottom: 4px;
}

.modal-header h3 {
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 0.85rem;
  color: #ffd166;
}

/* Formulario */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(8, 24, 16, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ffb703;
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.2);
}

.form-group textarea {
  resize: vertical;
}

/* Botones de envío RSVP */
.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.btn-rsvp-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: 'Fredoka', 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}

.btn-rsvp-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-wa {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.btn-direct {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.btn-direct:hover {
  background: rgba(255, 255, 255, 0.2);
}

.rsvp-status {
  padding: 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 6px;
}

.rsvp-status.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

/* Tarjeta de Éxito */
.rsvp-success {
  text-align: center;
  padding: 24px 10px;
  animation: fadeIn 0.3s ease;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.rsvp-success h4 {
  font-family: 'Titan One', cursive, sans-serif;
  font-size: 1.5rem;
  color: #ffd166;
  margin-bottom: 8px;
}

.rsvp-success p {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =========================================================
   MEDIA QUERIES Y ACCESIBILIDAD
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ambient-canvas {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .invite-container {
    padding-top: 36px;
    padding-bottom: 60px;
  }
  
  .poster-frame:hover {
    transform: translateY(-4px);
    box-shadow: 
      0 26px 55px rgba(0, 0, 0, 0.75), 
      0 0 45px rgba(34, 197, 94, 0.25);
  }
}
