/* CSS GLOBAL OPTIMIZADO PARA TODAS LAS PÁGINAS */
/* Optimizaciones de rendimiento aplicadas globalmente */

/* Optimizar todas las imágenes hero */
.hero-image-wrapper img,
.critical-image,
.responsive-hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 450px;
  margin: 0 auto;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Hero sections optimizadas */
.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

/* Hero content optimizado */
.hero-content {
  visibility: visible;
  opacity: 1;
}

/* Hero image wrapper optimizado */
.hero-image-wrapper {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Texto crítico optimizado */
.display-4, .lead, .badge, h1, h2 {
  visibility: visible;
  opacity: 1;
}

/* Navbar crítico */
.navbar, .navbar-brand {
  visibility: visible;
  opacity: 1;
}

/* Container optimizado */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Row optimizado */
.row {
  display: flex;
  flex-wrap: wrap;
}

/* Col optimizado */
.col-lg-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

/* Responsive global */
@media (max-width: 991.98px) {
  .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .hero-section {
    min-height: 50vh;
    padding-top: 60px;
  }
  
  .hero-image-wrapper img {
    max-width: 100%;
  }
}

/* Prevenir layout shift global */
* {
  box-sizing: border-box;
}

/* Optimizar fuentes global */
body {
  font-display: swap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Botones críticos */
.btn {
  display: inline-block;
  visibility: visible;
  opacity: 1;
}

/* Floating badges optimizados */
.floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Optimización para imágenes lazy loading */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Placeholder para imágenes */
.image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
  border-radius: 8px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Optimización para elementos fuera de pantalla */
.below-fold {
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}