/* ========================================
   HERO SECTION - CSS ULTRA OPTIMIZADO
   Impacto visual máximo y conversión
======================================== */

/* ========================================
   VARIABLES ESPECÍFICAS HERO
======================================== */
:root {
  /* Gradientes hero */
  --gradient-hero-bg: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 50%, var(--accent-cyan) 100%);
  --gradient-hero-text: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  --gradient-cta-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
  --gradient-cta-secondary: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  
  /* Sombras específicas */
  --shadow-floating-card: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-cta-primary: 0 8px 25px rgba(59, 130, 246, 0.4);
  --shadow-cta-secondary: 0 8px 25px rgba(255, 255, 255, 0.2);
  
  /* Animaciones 
  --animation-float: float 6s ease-in-out infinite;
  --animation-glow: glow 4s ease-in-out infinite alternate;
  */
}

/* ========================================
   HERO PRINCIPAL
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero-bg);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: var(--space-20) 0 var(--space-16) 0;
}

/* Patrón de fondo sutil */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="hero-grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="1000" height="1000" fill="url(%23hero-grid)"/></svg>');
  opacity: 0.4;
  z-index: 1;
}

/* ========================================
   CONTENIDO HERO
======================================== */
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   TEXTO HERO
======================================== */
.hero-text {
  animation: fadeInLeft 1s ease-out;
}

.hero-title {
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.hero-title-main {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  background: var(--gradient-hero-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.hero-title-accent {
  display: block;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--accent-cyan);
  font-family: var(--font-secondary);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  color: rgba(255, 255, 255, 0.9);
  max-width: 90%;
}

.hero-subtitle strong {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* ========================================
   BOTONES HERO
======================================== */
.hero-buttons {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.hero-cta-primary {
  background: var(--gradient-cta-primary);
  color: var(--white);
  box-shadow: var(--shadow-cta-primary);
  border: none;
  font-weight: 700;
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.hero-cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.hero-cta-primary:hover::before {
  left: 100%;
}

.hero-cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
}

.hero-cta-secondary {
  background: var(--gradient-cta-secondary);
  backdrop-filter: blur(10px);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-cta-secondary);
  font-weight: 600;
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
}

.hero-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  white-space: nowrap;
  min-width: 180px;
}

.hero-buttons .btn i {
  font-size: 1.125rem;
}

/* ========================================
   ESTADÍSTICAS HERO
======================================== */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* .hero-stat {
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.hero-stat:nth-child(2) {
  animation-delay: 0.7s;
}

.hero-stat:nth-child(3) {
  animation-delay: 0.9s;
} */

.hero-stat-number {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: whitesmoke;
  margin-bottom: var(--space-1);
  text-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.hero-stat-label {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  line-height: 1.3;
}

/* ========================================
   VISUAL HERO
======================================== */
.hero-visual {
  position: relative;
  /* animation: fadeInRight 1s ease-out 0.3s both; */
}

.hero-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent !important;
}

.hero-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius-2xl);
  /* animation: var(--animation-float); */
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
  background: transparent !important;
}
©ƒ
/* Overlay con cards flotantes */
.hero-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-floating-card);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-dark);
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* animation: var(--animation-float); */
}

.floating-card i {
  font-size: 1rem;
  color: var(--primary-blue);
}

.floating-card-1 {
  top: 15%;
  left: -10%;
  animation-delay: 0s;
}

.floating-card-2 {
  top: 60%;
  right: -5%;
  animation-delay: 2s;
}

.floating-card-3 {
  bottom: 20%;
  left: -5%;
  /*animation-delay: 4s;*/
}

/* ========================================
   SCROLL INDICATOR
======================================== */
.hero-scroll-indicator {
  position: relative;
  margin-top: var(--space-8); /* distancia fija bajo el último bloque */
  bottom: auto; /* anula el absolute */
}

.scroll-down {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}

.scroll-down:hover {
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.scroll-text {
  font-size: var(--text-sm);
  font-weight: 500;
}

.scroll-arrow {
  font-size: 1.25rem;
  /* animation: bounce 2s infinite; */
}

/* ========================================
   ELEMENTOS DE FONDO
======================================== */
.hero-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: var(--animation-glow);
}

.hero-bg-circle-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.hero-bg-circle-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: 5%;
  animation-delay: 2s;
}

.hero-bg-circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 80%;
  animation-delay: 4s;
}

/* ========================================
   ANIMACIONES
======================================== */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

@keyframes glow {
  from {
    opacity: 0.3;
    transform: scale(1);
  }
  to {
    opacity: 0.1;
    transform: scale(1.1);
  }
}

/* ========================================
   RESPONSIVE DESIGN - TABLETS
======================================== */
@media (max-width: 991.98px) {

  .hero-image {
    background: transparent !important;
  }

  .hero {
    padding: var(--space-16) 0 var(--space-12) 0;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .hero-image {
    max-width: 400px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .floating-card {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }
  
  .floating-card-1 {
    left: 5%;
  }
  
  .floating-card-2 {
    right: 5%;
  }
  
  .floating-card-3 {
    left: 5%;
  }
}

/* ========================================
   RESPONSIVE DESIGN - MÓVILES
======================================== */
@media (max-width: 575.98px) {

  .hero-image {
    background: transparent !important;
  }

  .hero-image-container {
    margin-top: var(--space-8); /* añade separación respecto al header */
  }

  .hero {
    padding-bottom: var(--space-16); /* extra espacio abajo solo en móvil */
  }

  .hero {
    min-height: 90vh;
    padding: var(--space-12) 0 var(--space-8) 0;
  }
  
  .hero-content {
    gap: var(--space-8);
  }
  
  .hero-title-main {
    font-size: clamp(2rem, 8vw, 2.5rem);
    line-height: 1.2;
  }
  
  .hero-title-accent {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
    max-width: 100%;
    margin-bottom: var(--space-6);
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-8);
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    min-width: auto;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    max-width: 200px;
    margin: 0 auto;
  }
  
  .hero-stat-number {
    font-size: var(--text-xl);
  }
  
  .hero-image {
    max-width: 320px;
    border-radius: var(--radius-xl);
  }
  
  .floating-card {
    display: none; /* Ocultar en móvil para simplificar */
  }
  
  .hero-scroll-indicator {
    bottom: var(--space-4);
  }
  
  .scroll-text {
    font-size: var(--text-xs);
  }
  
  .scroll-arrow {
    font-size: 1rem;
  }
  
  /* Animaciones más suaves en móvil */
  @keyframes fadeInLeft {
    from {
      opacity: 0;
      transform: translateX(-20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes fadeInRight {
    from {
      opacity: 0;
      transform: translateX(20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes float {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-10px);
    }
  }
}

/* ========================================
   LANDSCAPE MÓVIL
======================================== */
@media (max-width: 991.98px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: var(--space-8) 0;
  }
  
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
  }
  
  .hero-visual {
    order: 1;
  }
  
  .hero-text {
    text-align: left;
  }
  
  .hero-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   OPTIMIZACIONES DE RENDIMIENTO

.hero-image,
.floating-card,
.hero-bg-circle {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}
======================================== */
.hero-content {
  contain: layout style;
}

/* ========================================
   ESTADOS DE INTERACCIÓN MEJORADOS
======================================== */
.hero-cta-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.hero-cta-secondary:active {
  transform: translateY(-1px) scale(0.98);
}

.scroll-down:active {
  transform: scale(0.95);
}

/* ========================================
   DARK MODE ENHANCEMENTS
======================================== */

@media (prefers-color-scheme: dark) {
  .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .floating-card i {
    color: var(--accent-cyan);
  }
  
  .hero-bg-circle {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  }
}


/* ========================================
   PRINT STYLES
======================================== */
@media print {
  .hero {
    background: none;
    color: #000;
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero-bg-elements,
  .floating-card,
  .hero-scroll-indicator {
    display: none;
  }
  
  .hero-title-main,
  .hero-title-accent {
    color: #000;
    background: none;
    -webkit-text-fill-color: initial;
  }
  
  .hero-buttons {
    display: none;
  }
}

/* ========================================
   VERY LARGE SCREENS
======================================== */
@media (min-width: 1400px) {
  .hero-content {
    max-width: 1200px;
    gap: var(--space-16);
  }
  
  .hero-image {
    max-width: 450px;
  }
  
  .floating-card {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
}