/* AUDITORÍA COMPLETA Y FIXES PAGESPEED */

/* ============================================
   1. FIXES PARA EL BOTÓN DE "ENTRAR AL SITIO"
   ============================================ */

/* Asegurar que el overlay esté correctamente oculto */
#intro-overlay {
  opacity: 1;
  visibility: visible;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#intro-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.btn-intro {
  cursor: pointer;
  transition: all 0.3s ease;
  will-change: transform;
}

.btn-intro:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.btn-intro:active {
  transform: translateY(0);
}

/* ============================================
   2. OPTIMIZACIONES PAGESPEED (GENERAL)
   ============================================ */

/* Preload fuentes críticas */
@font-face {
  font-family: 'Inter';
  src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&display=swap');
  font-display: swap;
}

/* ============================================
   3. OPTIMIZACIONES MÓVIL
   ============================================ */

/* Reducir tamaño de fuentes en móvil */
@media (max-width: 768px) {
  .intro-title {
    font-size: 20px !important;
  }

  .intro-text {
    font-size: 13px !important;
  }

  .intro-subtitle {
    font-size: 14px !important;
  }

  .btn-intro {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }

  .btn {
    padding: 10px 16px !important;
    font-size: 11px !important;
  }

  .hero-content h1 {
    font-size: 20px !important;
  }

  .hero-content p {
    font-size: 12px !important;
  }

  /* Mejorar touchability en móvil */
  button, a {
    min-height: 44px;
    min-width: 44px;
  }

  /* Reducir padding en móvil */
  .intro-card {
    padding: 20px !important;
    flex-direction: column;
  }

  .intro-left {
    display: none;
  }

  /* Optimizar formularios en móvil */
  .form-row {
    flex-direction: column !important;
  }

  .form-group {
    width: 100% !important;
  }

  input, textarea, select {
    font-size: 16px; /* Prevenir zoom en iOS */
  }
}

/* ============================================
   4. RENDIMIENTO GENERAL
   ============================================ */

/* Usar GPU para animaciones */
* {
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Optimizar imágenes */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading */
img[loading="lazy"] {
  background: #f0f0f0;
}

/* ============================================
   5. CUMPLIMIENTO WEB VITALS
   ============================================ */

/* LCP (Largest Contentful Paint) */
.hero-section {
  contain: layout style paint;
}

/* FID (First Input Delay) */
button, a, input {
  contain: layout style;
}

/* CLS (Cumulative Layout Shift) */
.form-status {
  min-height: 20px;
}

.status-message {
  min-height: 24px;
}

/* ============================================
   6. ACCESIBILIDAD Y SEO
   ============================================ */

/* Mejor contraste para accesibilidad */
a {
  color: var(--primary);
}

a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reducir motion para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   7. CACHÉ Y COMPRESIÓN
   ============================================ */

/* Headers para OVH (via .htaccess ya configurado) */
/* Gzip compression: activado en .htaccess */
/* Browser caching: activado en .htaccess */
