/**
 * Hero Component - Clean Architecture
 * ====================================
 * 
 * RESPONSABILIDAD:
 * - Estilos de todas las secciones hero del sitio
 * - Variantes: hero, blog-hero, page-header, category-hero
 * - DRY: Código compartido, sin repetición
 * 
 * BENEFICIOS:
 * - Sin !important (especificidad natural)
 * - DRY (no repetir estilos 5 veces)
 * - Context-aware (herencia de colores)
 * 
 * Clean Architecture: Component Pattern + DRY
 */

/* ==========================================================================
   BASE HERO STYLES (compartido por todos los heros)
   ========================================================================== */

.hero,
.blog-hero,
.page-header,
.category-hero,
.categories-hero,
.cta-section {
  position: relative;

  /* Colores base - NEGRO/BLANCO (Clean Architecture) */
  background: linear-gradient(135deg, var(--color-bg-dark-prime) 0%, var(--color-bg-dark-sec) 100%);
  /* Negro a gris oscuro */
  color: var(--color-text-on-primary);

  /* Spacing - Equilibrado y consistente */
  padding: 2.5rem var(--spacing-xl);
  /* Padding vertical consistente */
  margin-top: 0;
  /* Pegado a breadcrumbs o header */
  margin-bottom: 0;
  /* Sin espacio extra abajo */

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* Visual */
  overflow: hidden;
}

/* ==========================================================================
   TYPOGRAPHY DENTRO DE HEROES
   ========================================================================== */

/* Títulos heredan color del padre (text-on-primary) */
.hero h1,
.hero h2,
.hero h3,
.blog-hero h1,
.blog-hero h2,
.blog-hero h3,
.page-header h1,
.page-header h2,
.page-header h3,
.category-hero h1,
.category-hero h2,
.category-hero h3,
.categories-hero h1,
.categories-hero h2,
.categories-hero h3,
.cta-section h1,
.cta-section h2,
.cta-section h3 {
  color: inherit;
  /* Hereda --color-text-on-primary */
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

/* Párrafos con transparencia para jerarquía visual */
.hero p,
.blog-hero p,
.page-header p,
.category-hero p,
.categories-hero p,
.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  /* font-size removed to allow Tailwind/Specific classes priority */
  line-height: 1.6;
  max-width: 700px;
  /* Ancho adecuado */
  margin: 0 auto var(--spacing-md) auto;
  /* Espaciado adecuado */
}

/* ==========================================================================
   HERO VARIANTES ESPECÍFICAS
   ========================================================================== */

/* Hero Homepage (con grid para imagen) */
.hero {
  text-align: left;
  /* Padding y margin heredados de la clase base */
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-lg);
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-2xl);
  /* Aumentado de xl a 2xl */
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
  /* Separación adicional del description */
}

.hero-image img {
  width: min(100%, 420px);
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Blog Hero */
.blog-hero {
  min-height: auto;
  /* Padding y margin heredados de la clase base */
}

.blog-hero h1 {
  font-size: var(--font-size-4xl);
  /* 40px - Título grande y visible */
  margin-bottom: var(--spacing-sm);
}

/* Page Header */
.page-header {
  min-height: auto;
  /* Padding y margin heredados de la clase base */
}

.page-header h1 {
  font-size: var(--font-size-4xl);
  /* 40px - Título grande y visible */
  margin-bottom: var(--spacing-sm);
}

/* Category Hero */
.category-hero,
.categories-hero {
  min-height: auto;
  /* Padding y margin heredados de la clase base */
}

.category-hero h1,
.categories-hero h1 {
  font-size: var(--font-size-4xl);
  /* 40px - Título grande y visible */
  margin-bottom: var(--spacing-sm);
}

/* CTA Section */
.cta-section {
  padding: var(--spacing-3xl) var(--spacing-xl);
}

.cta-section h2 {
  font-size: 2.5rem;
}

/* ==========================================================================
   HERO CONTENT WRAPPER
   ========================================================================== */

.hero-content,
.blog-hero-content,
.page-header-content,
.category-hero-content,
.categories-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero {
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    max-width: 460px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {

  .hero,
  .blog-hero,
  .page-header,
  .category-hero,
  .categories-hero,
  .cta-section {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  .hero-text h1,
  .blog-hero h1 {
    font-size: 2rem;
  }

  .hero-grid {
    gap: var(--spacing-md);
  }

  .page-header h1,
  .category-hero h1,
  .categories-hero h1,
  .cta-section h2 {
    font-size: 1.75rem;
  }

  .hero p,
  .blog-hero p,
  .page-header p,
  .category-hero p,
  .categories-hero p,
  .cta-section p {
    font-size: var(--font-size-base);
  }

  .hero-description {
    font-size: 1rem;
  }
}

/* ==========================================================================
   TECH PREMIUM ANIMATION SYSTEM (STAGGER & GSAP)
   ========================================================================== */

.hero-content-stagger .hero-anim {
    opacity: 0;
    transform: translateY(30px);
    will-change: transform, opacity;
}

.tech-premium-refined .parallax-bg {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }
}