/* ========================================
   ALTEQX - HOME PAGE STYLES OPTIMIZADO
   Estilos específicos para index.html
   OPTIMIZACIÓN: CLS reducido, aspect-ratios fijos
   ======================================== */

/* ========== HERO SECTION ========== */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 70vh;
  overflow: hidden;
  padding-top: 60px;
}

/* ========== HERO CAROUSEL ========== */
.hero-carousel {
  position: relative;
  width: 100%;
  min-height: 70vh;
  height: 70vh;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  will-change: opacity;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

/* Overlay para mejorar legibilidad del texto */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 15, 30, 0.85) 0%,
    rgba(15, 23, 42, 0.75) 50%,
    rgba(10, 15, 30, 0.85) 100%
  );
  z-index: 1;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: var(--space-8) 0;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  margin-bottom: var(--space-5);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-light);
  background-color: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.hero-title {
  margin-bottom: var(--space-5);
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.hero-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(96, 165, 250, 0.4));
}

.hero-text {
  margin: 0 auto var(--space-8);
  max-width: 500px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
}

.hero-buttons .btn {
  min-width: 200px;
}

/* ========== CAROUSEL CONTROLS ========== */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-base);
  opacity: 0.7;
}

.hero-arrow:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.hero-arrow-prev {
  left: var(--space-4);
}

.hero-arrow-next {
  right: var(--space-4);
}

/* Carousel Dots - OPTIMIZADO para accesibilidad táctil */
.hero-dots {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 12px;
  padding: var(--space-3) var(--space-5);
  background-color: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-dot {
  /* Tamaño visual */
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
  position: relative;
}

/* Área táctil mínima 48x48px (invisible) */
.hero-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
}

.hero-dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.hero-dot.active {
  background-color: var(--color-primary-light);
  width: 24px;
  border-radius: var(--radius-full);
}

/* Tablet */
@media (min-width: 640px) {

  .hero-buttons {
    flex-direction: row;
  }

  .hero-buttons .btn {
    min-width: 180px;
  }

  .hero-arrow {
    display: flex;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }

  .hero-arrow-prev {
    left: var(--space-6);
  }

  .hero-arrow-next {
    right: var(--space-6);
  }

  .hero-dots {
    bottom: var(--space-8);
    gap: 14px;
    padding: var(--space-3) var(--space-6);
  }

  .hero-dot {
    width: 14px;
    height: 14px;
  }

  .hero-dot.active {
    width: 28px;
  }
}

/* Desktop */
@media (min-width: 768px) {

  .hero-content {
    padding: var(--space-12) 0;
  }

  .hero-badge {
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-6);
    margin-bottom: var(--space-6);
  }

  .hero-text {
    font-size: 1.125rem;
  }

  .hero-buttons {
    gap: var(--space-6);
  }

  .hero-arrow-prev {
    left: var(--space-8);
  }

  .hero-arrow-next {
    right: var(--space-8);
  }

  .hero-dots {
    bottom: var(--space-10);
  }
}

@media (min-width: 968px) {
  .hero-content {
    max-width: 900px;
    text-align: left;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-text {
    margin-left: 0;
  }

  .hero-arrow {
    width: 4rem;
    height: 4rem;
  }

  .hero-arrow-prev {
    left: var(--space-12);
  }

  .hero-arrow-next {
    right: var(--space-12);
  }
}

/* Pantallas muy grandes */
@media (min-width: 1280px) {
  .hero-carousel {
    min-height: 70vh;
  }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
/* Reducir animaciones en dispositivos de bajo rendimiento */
@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }

  .hero-arrow,
  .hero-dot {
    transition-duration: 0.1s;
  }
}

/* Optimización para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .hero-arrow {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 0.9;
  }

  .hero-arrow:active {
    transform: translateY(-50%) scale(0.95);
  }
  
  /* Mejorar área táctil en móviles */
  .hero-dots {
    padding: 14px 18px;
    gap: 16px;
    bottom: var(--space-8);
  }
  
  .hero-dot {
    width: 14px;
    height: 14px;
  }
  
  .hero-dot.active {
    width: 30px;
  }
}

/* ========== SECTION HEADER ========== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.section-badge {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-light);
}

.section-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--color-primary-light);
  transition: gap var(--transition-base);
}

.section-link:hover,
.section-link:focus-visible {
  gap: var(--space-3);
}

/* ========== COMMUNITY SECTION ========== */
.community-section {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.community-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.community-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.92) 0%, 
    rgba(10, 15, 30, 0.88) 100%);
  backdrop-filter: blur(2px);
}

.community-content {
  position: relative;
  z-index: 10;
}

.community-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-5);
  font-size: 2rem;
  color: var(--color-success);
  background-color: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
}

@media (min-width: 640px) {
  .community-icon {
    width: 70px;
    height: 70px;
    font-size: 2.25rem;
    margin-bottom: var(--space-6);
  }
}

@media (min-width: 768px) {
  .community-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }
}