/* Estilos para la invitación de cumpleaños de Magnolia */
/* Tema: Mascotas (Golden y Gato) con colores pasteles */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Pacifico&display=swap');

:root {
  --primary: #F4C2A1;      /* Beige/durazno suave */
  --secondary: #F8C8DC;    /* Rosa pastel */
  --accent: #FFF3B8;       /* Amarillo muy suave */
  --background: #FFFBF5;   /* Fondo cremita */
  --text: #8B4513;         /* Marrón cálido */
  --text-light: #A0725C;   /* Marrón más claro */
  --white: #FFFFFF;
  --shadow: rgba(139, 69, 19, 0.15);
  --radius: 20px;
}

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

html,body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Fredoka, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

body {
  font-family: 'Fredoka', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--background) 0%, #FFF8E7 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Elementos generales */
img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--shadow);
  overflow: hidden;
  border: 2px solid var(--primary);
  position: relative;
}

.card::before {
  content: '🐕 🐱';
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.2rem;
  opacity: 0.3;
  pointer-events: none;
}

/* Header principal */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  padding: clamp(30px, 6vw, 60px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="2" fill="%23FFF" opacity="0.3"/><circle cx="75" cy="75" r="1.5" fill="%23FFF" opacity="0.2"/><circle cx="50" cy="10" r="1" fill="%23FFF" opacity="0.4"/></svg>');
  animation: float 20s infinite linear;
  pointer-events: none;
}

@keyframes float {
  0% { transform: translateX(-50px) translateY(-50px) rotate(0deg); }
  100% { transform: translateX(-50px) translateY(-50px) rotate(360deg); }
}

.badge {
  display: inline-block;
  background: var(--white);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}

.hero h1 {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--white);
  text-shadow: 3px 3px 6px rgba(139, 69, 19, 0.3);
  margin: 10px 0;
  position: relative;
  z-index: 10;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--white);
  margin-bottom: 20px;
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(139, 69, 19, 0.3);
  position: relative;
  z-index: 10;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 25px 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.countdown-item {
  background: var(--white);
  border-radius: 15px;
  padding: 15px;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  border: 2px solid var(--accent);
}

.countdown-number {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  display: block;
}

.countdown-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 5px;
}

/* Botones - CORREGIDO PARA QUE FUNCIONEN */
.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 25px;
  position: relative;
  z-index: 20; /* Z-index alto para asegurar que estén encima */
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-family: inherit;
  background: none;
  position: relative;
  z-index: 30;
  pointer-events: auto; /* CRUCIAL: Asegurar que se puedan hacer clic */
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.btn-primary {
  background: var(--white);
  color: var(--text);
  border-color: var(--white);
}

.btn-primary:hover {
  background: var(--text);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--text);
}

/* Grid layout */
.grid {
  display: grid;
  gap: 25px;
  margin-top: 30px;
}

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

/* Secciones de contenido */
.section {
  padding: 30px;
}

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 600;
}

.section h3 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 15px;
  font-weight: 600;
}

.detail-item {
  margin-bottom: 20px;
}

.detail-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-content {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.detail-content strong {
  color: var(--text);
  font-weight: 600;
}

/* Galería de fotos */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.gallery img {
  width: 100%;
  height: auto; /* Altura automática para respetar proporciones */
  max-height: 250px; /* Altura máxima para evitar imágenes muy altas */
  object-fit: contain; /* Muestra la imagen completa sin recortar */
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid var(--accent);
  background: var(--white);
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* Formulario de confirmación */
.form-group {
  margin-bottom: 20px;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(248, 200, 220, 0.3);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Estados de confirmación */
.status-confirmed {
  background: linear-gradient(135deg, #90EE90, #98FB98);
  color: #006400;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  margin: 20px 0;
}

.status-declined {
  background: linear-gradient(135deg, #FFB6C1, #FFC0CB);
  color: #8B0000;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  margin: 20px 0;
}

/* Mapa */
.map-container {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  border: 3px solid var(--accent);
}

.map-placeholder {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
  font-weight: 500;
}

/* Iframe del mapa de Google */
.map-container iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 12px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Panel administrativo */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--primary);
}

.admin-table th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.admin-table tr:hover {
  background: var(--background);
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-si {
  background: #90EE90;
  color: #006400;
}

.status-no {
  background: #FFB6C1;
  color: #8B0000;
}

.status-pendiente {
  background: var(--accent);
  color: var(--text);
}

/* Animaciones de confetti */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1000;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--primary);
  animation: fall 3s linear infinite;
}

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

/* Responsividad */
@media (max-width: 768px) {
  .hero {
    padding: 20px;
  }
  
  .countdown {
    gap: 10px;
  }
  
  .countdown-item {
    min-width: 70px;
    padding: 10px;
  }
  
  .btn-group {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    min-width: 200px;
    justify-content: center;
  }
  
  .section {
    padding: 20px;
  }
  
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Efectos especiales para mascotas */
.pet-decoration {
  position: relative;
}

.pet-decoration::after {
  content: '🐾';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.5rem;
  opacity: 0.6;
  animation: bounce 2s infinite;
  pointer-events: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* CORRECCIONES CRÍTICAS PARA BOTONES */
button, a.btn, .btn {
  pointer-events: auto !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Asegurar que nada bloquee los botones */
.hero * {
  pointer-events: auto;
}

.hero::before {
  pointer-events: none !important;
}

/* Tabs para admin */
.tabs {
  display: flex;
  background: var(--white);
  border-radius: 15px;
  padding: 5px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab {
  flex: 1;
  padding: 15px;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
  color: var(--text);
  pointer-events: auto;
}

.tab.active {
  background: var(--primary);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}