/* ==========================================================================
   1. REINICIO DE ESTILOS Y CONTENEDOR PRINCIPAL (PANTALLAS GRANDES) - INTACTO
   ========================================================================== */

/* Aseguramos que nada deje márgenes blancos y las imágenes escalen al 100% */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

.sliders {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #000; /* Fondo de seguridad */
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* Controlado por tu JS */
  align-items: center;
  justify-content: center;
}

/* Forzamos a que cualquier imagen o video del slider cubra la pantalla completa */
.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide video {
  background-image: url(../img/slide1.jpg);
}

.video-desktop {
  background: center;
}

/* ==========================================================================
   2. TEXTOS Y BOTONES - SLIDE 1 (ESCRITORIO) - INTACTO
   ========================================================================== */

/* Corregido: Ya no se colapsa ni se oculta el contenedor */
.text-slide1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.text-slide1 h1 {
  position: absolute;
  top: 10px;
  color: white;
  font-size: 25px;
  padding: 220px 810px 0px 165px;
  -webkit-user-modify: read-only;
  text-align: justify;
  margin: 0;
}

/* Aquí vive tu botón "Solicitar Demo" */
.text-slide1 p {
  position: absolute;
  top: 10px;
  color: white;
  font-size: 15px;
  padding: 400px 810px 0px 165px;
  -webkit-user-modify: read-only;
  text-align: justify;
  margin: 0;
}

/* ==========================================================================
   3. LOGOS Y ELEMENTOS - SLIDE 2 (ESCRITORIO) - INTACTO
   ========================================================================== */

.img-slide1 {
  position: absolute;
  top: 400px;
  left: 510px;
  z-index: 2;
}

.text-slide2 {
  position: absolute;
  top: 20px;
  left: 60px;
  color: white;
  font-size: 25px;
  padding: 275px 50px 0px 25px;
  text-wrap: balance;
  text-align: justify;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s forwards;
}

.text-slide3 {
  position: absolute;
  top: 20px;
  left: 60px;
  color: white;
  font-size: 25px;
  padding: 325px 50px 0px 25px;
  text-wrap: balance;
  text-align: justify;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

.text-slide4 {
  position: absolute;
  top: 20px;
  left: 60px;
  color: white;
  font-size: 25px;
  padding: 375px 50px 0px 25px;
  text-wrap: balance;
  text-align: justify;
  opacity: 0;
  transform: translateX(30px);
  animation: fadeInUp 0.3s forwards;
}

.text-slide5 {
  position: absolute;
  top: 20px;
  left: 60px;
  color: white;
  font-size: 25px;
  padding: 425px 50px 0px 25px;
  text-wrap: balance;
  text-align: justify;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInDown 0.6s forwards;
}

/* Clases complementarias de tu estructura */
.logoindex { height: 120px; width: 200px; }
.logo_atdi3 { height: 85px; width: 141px; }
.titulo_about { color: white; }
.slide_about { background-image: url(../img/about1.jpg); }

.texto_about {
  color: white;
  padding: 0px 0px 0px 0px;
  text-align: left;
  text-wrap-style: balance;
  font-size: 13px;
}

.colorlib-nav #colorlib-logo3 {
  font-size: 24px;
  margin: 0px;
  padding: 0px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ==========================================================================
   4. CARRUSEL DE MARCAS / LOGOS CLIENTES - INTACTO
   ========================================================================== */

.logos-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.logos-track {
  display: flex;
  gap: 30px;
  width: max-content;
  animation: scroll 45s linear infinite;
}

.logos-slider:hover .logos-track {
  animation-play-state: paused;
}

.logo-card {
  width: 220px;
  height: 130px;
  background: radial-gradient(circle at top right, #1f385e 0%, #476c81 40%),
        #1f385e;
  border: 1px solid rgba(250, 235, 152, 0.815);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .4s ease;
  overflow: hidden;
}

.logo-card:hover {
  transform: translateY(-10px) scale(1.03);
  background: rgba(255,255,255,0.14);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25), 0 0 25px rgba(126,224,255,0.15);
}

.logo-card img {
  width: 75%;
  object-fit: contain;
  filter: grayscale(5%) brightness(1);
  opacity: .8;
  transition: all .4s ease;
}

.logo-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}


/* ==========================================================================
   5. CORRECCIÓN RESPONSIVA CORREGIDA (SÓLO MODIFICA EL COMPORTAMIENTO MÓVIL)
   ========================================================================== */

@media (max-width: 991px) {
  
  .sliders {
    height: 90vh !important; 
    min-height: 600px !important;
  }

  /* REPARACIÓN: Quitamos el display: flex general. Dejamos que actúe el display nativo/JS 
     para que la imagen ocupe todo el fondo y no se mezclen los contenidos */
  .slide {
    text-align: center !important;
  }

  /* --- RESPONSIVO DEL SLIDE 1 (TEXTO + SOLICITAR DEMO) --- */
  .text-slide1 {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    /* Capa oscura azulada para asegurar legibilidad total sobre la primera imagen */
    /*background: rgba(15, 44, 89, 0.75) !important; */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
  }

  /* Quitamos los paddings absolutos rígidos para que se ajusten y centren en móviles */
  .text-slide1 h1,
  .text-slide1 p {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    padding: 0 !important;
    margin: 0 auto 15px auto !important;
    width: 90% !important;
    max-width: 480px !important;
    text-align: center !important;
    color: #ffffff !important;
    display: block !important;
  }

  .text-slide1 h1 {
    font-size: 24px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
  }

  .text-slide1 p {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  /* Garantiza visibilidad y espaciado del botón Demo */
  .text-slide1 p a, 
  .text-slide1 p .btn {
    display: inline-block !important;
    margin-top: 10px !important;
    padding: 12px 30px !important;
    width: auto !important;
  }

  /* --- RESPONSIVO DEL SLIDE 2 (TARJETAS CELESTES) --- */
  
  .slide #colorlib-logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 auto 10px auto !important;
    display: inline-block !important;
  }
  
  .slide #colorlib-logo img {
    height: 45px !important;
    width: auto !important;
  }

  .img-slide1 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 auto 20px auto !important;
    display: block !important;
    text-align: center !important;
  }

  .img-slide1 img {
    height: 55px !important;
    width: auto !important;
  }

  /* Alineación limpia una debajo de otra en móviles */
  .text-slide2, 
  .text-slide3, 
  .text-slide4, 
  .text-slide5 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 85% !important;
    max-width: 320px !important;
    padding: 12px 15px !important;
    margin: 8px auto !important;
    font-size: 15px !important;
    text-align: center !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: rgba(0, 195, 255, 0.95) !important;
    color: var(--color-heading-light) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    text-shadow: none !important;
    
    /* Invalidamos la opacidad 0 de la animación de escritorio */
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   6. OPTIMIZACIÓN DE SECCIÓN DE CLIENTES Y DETALLES EXTREMOS (MAX 768px)
   ========================================================================== */

@media (max-width: 1024px) {
  .clientes-section { padding: 40px 15px; }
  .clientes-header h2 { font-size: 26px; line-height: 1.2; }
  
  .logos-track { gap: 15px; animation: scroll 25s linear infinite; }
  .logo-card { width: 140px; height: 85px; border-radius: 14px; }
  .logos-slider:hover .logos-track { animation-play-state: running; }
  .logo-card img { width: 80%; filter: grayscale(0%); opacity: 1; }
  .logoindex { height: 51px; width: 90px; place-self:center; }

  .text-slide1 h1 { font-size: 15px !important;  padding: 263px 717px 0px 165px; }
  .text-slide1 p { font-size: 10px !important; }
}

   
@media (max-width: 768px) {
  .clientes-section { padding: 40px 15px; }
  .clientes-header h2 { font-size: 26px; line-height: 1.2; }
  
  .logos-track { gap: 15px; animation: scroll 25s linear infinite; }
  .logo-card { width: 140px; height: 85px; border-radius: 14px; }
  .logos-slider:hover .logos-track { animation-play-state: running; }
  .logo-card img { width: 80%; filter: grayscale(0%); opacity: 1; }
  .logoindex { height: 51px; width: 90px; place-self:center; }
}

@media (max-width: 480px) {
  .sliders { height: 85vh !important; min-height: 520px !important; }
  .text-slide1 h1 { font-size: 21px !important; }
  .text-slide1 p { font-size: 14px !important; }
  
  .slide #colorlib-logo img { height: 35px !important; }
  .img-slide1 img { height: 45px !important; }
  
  .text-slide2, .text-slide3, .text-slide4, .text-slide5 {
    font-size: 14px !important;
    padding: 11px !important;
    margin: 6px auto !important;
    .logoindex { height: 31px; width: 70px; place-self:center;  }
  }
}