/* ==========================================================================
   1. VARIABLES Y ESTILOS GENERALES
   ========================================================================== */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;

  --bg: #F5F7FA;
  --card: #FFFFFF;
  --border: #E2E8F0;

  --text: #1F2937;
  --muted: #64748B;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--muted);
}

/* ==========================================================================
   2. HERO PREMIUM (SECCIÓN PRINCIPAL / SLIDER)
   ========================================================================== */

.hero-premium {
  padding: 80px 0;
  background: #F8F9FA;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-left {
  flex: 1;
  max-width: 550px;
}

.hero-right {
  flex: 1;
}

.hero-badge {
  display: inline-block;
  background: #1e293b;
  color: #60a5fa;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  margin-bottom: 20px;
}

.hero-left h1 {
  font-size: 52px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-left h1 span {
  color: #3b82f6;
}

.hero-left p {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: #1F2937;
  font-size: 14px;
}

/* ESTRUCTURA INTERNA DEL SLIDER */
.hero-slider {
  position: relative;
  width: 100%;
  height: 420px; /* Alto fijo por defecto para pantallas de escritorio */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(37, 99, 235, .20);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: white;
  cursor: pointer;
  z-index: 10;
}

.slider-prev { left: 15px; }
.slider-next { right: 15px; }

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  opacity: .4;
  cursor: pointer;
}

.dot.active {
  opacity: 1;
}

/* ==========================================================================
   3. OTRAS SECCIONES DE LA HOME
   ========================================================================== */
.brands-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:30px;
    align-items:center;
}

.brand-item{
    display:flex;
    justify-content:center;
    align-items:center;
}

.brand-item img{
    max-width:140px;
    max-height:60px;
    object-fit:contain;
    filter:grayscale(100%);
    opacity:.7;
    transition:.3s;
}

.brand-item img:hover{
    filter:grayscale(0%);
    opacity:1;
    transform:scale(1.05);
}
/* BENEFITS */
.benefits { padding: 90px 0; }
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
.benefit-card {
  background: #111827;
  border-radius: 18px;
  padding: 30px;
  border: 1px solid #1f2937;
  transition: .3s;
}
.benefit-card:hover {
  transform: translateY(-8px);
  border-color: #2563eb;
}
.benefit-card h3 { margin-bottom: 12px; }
.benefit-card p {
  color: #94a3b8;
  line-height: 1.7;
}

/* STATS */
.stats {
  padding: 90px 0;
  background: #0f172a;
}
.stats-grid {
  display: grid;
  grid-template-columns'. repeat(4, 1fr);
  gap: 20px;
}
.stat-item { text-align: center; }
.stat-item h3 {
  font-size: 48px;
  color: #3b82f6;
  margin-bottom: 10px;
}
.stat-item p { color: #94a3b8; }

/* TESTIMONIALS */
.testimonials { padding: 90px 0; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.testimonial-card {
  background: #111827;
  border-radius: 18px;
  padding: 30px;
  border: 1px solid #1f2937;
  transition: .3s;
}
.testimonial-card:hover { transform: translateY(-8px); }
.testimonial-card p {
  color: #1F2937;
  line-height: 1.8;
  margin-bottom: 20px;
}
.testimonial-card strong { color: #60a5fa; }

/* NEWSLETTER */
.newsletter {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #0f172a, #111827);
}
.newsletter h2 {
  font-size: 36px;
  margin-bottom: 30px;
}
.newsletter-form {
  max-width: 700px;
  margin: auto;
  display: flex;
  gap: 15px;
}
.newsletter-form input {
  flex: 1;
  height: 55px;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  background: #fff;
  color: #000;
}

/* SCROLL EFFECT */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all .8s ease;
}
.reveal.active {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   4. SISTEMA RESPONSIVE (CORREGIDO Y OPTIMIZADO)
   ========================================================================== */

@media (max-width: 991px) {
  /* Añadimos paddings laterales para que los elementos no se peguen a la pantalla */
  .hero-premium {
    padding: 60px 24px;
  }

  .hero-content {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }

  .hero-left,
  .hero-right {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .hero-left {
    text-align: center;
    max-width: 100%;
  }

  .hero-buttons,
  .hero-features {
    justify-content: center;
  }

  .hero-left h1 {
    font-size: 38px;
    line-height: 1.2;
  }

  /* El slider ahora usa proporciones fluidas en tablets */
  .hero-slider {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
  }

  /* Grillas generales */
  .brands-grid,
  .benefits-grid,
  .stats-grid,
  .testimonial-grid {
  grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-form {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .hero-premium {
    padding: 45px 16px; /* Espaciado idóneo para móviles */
  }

  .hero-content {
    gap: 25px;
  }

  .hero-left h1 {
    font-size: 30px;
  }

  .hero-left p {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  /* Relación de aspecto optimizada para celulares. Evita que la imagen se reduzca demasiado verticalmente. */
  .hero-slider {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; 
    border-radius: 14px;
  }

  /* Reducción de los controles del slider para ganar área visual */
  .slider-prev,
  .slider-next {
    width: 38px;
    height: 38px;
  }
  .slider-prev { left: 8px; }
  .slider-next { right: 8px; }

  /* Secciones a una sola columna en pantallas pequeñas */
  .brands-grid,
  .benefits-grid,
  .stats-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .stat-item h3 {
    font-size: 36px;
  }
}




