/* ========================
        SLIDER PRINCIPAL
   ======================== */
/* Reset básico */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
}
/* Contenedor principal del slider - MÁS REDUCIDO */
.slider-container {
    position: relative;
    width: 100vw;
    height: calc(75vh - 80px); /* MÁS REDUCIDO: De 85vh a 75vh */
    overflow: hidden;
    z-index: 1;
    margin-bottom: 0 !important; /* ELIMINA CUALQUIER MARGEN INFERIOR */
}
/* Área que contiene las slides */
.slider {
    position: relative;
    width: 100%;
    height: 100%;
}
/* Cada slide ocupa toda la pantalla visible */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* inicialmente invisibles */
    transition: opacity 1.2s ease-in-out; /* fade suave */
    z-index: 0;
}
/*RESPONSIVE IMAGENES SLIDER*/
/* Para laptops pequeñas (1024px a 1366px) */
@media (max-width: 1366px) and (min-width: 1024px) {
    .slider-container {
        height: calc(75vh - 70px); /* MÁS REDUCIDO: De 85vh a 75vh */
        margin-bottom: 0 !important;
    }
    .slide img {
        object-fit: cover;
        object-position: center 25%; /* MÁS ARRIBA para mostrar mejor las imágenes */
        object-position: center top; /* prioriza parte superior de la imagen */
    }
}
/* Pantallas medianas (1367px a 1600px) */
@media (min-width: 1367px) and (max-width: 1600px) {
    .slider-container {
        height: calc(75vh - 90px); /* MÁS REDUCIDO: De 85vh a 75vh */
        margin-bottom: 0 !important;
    }
    .slide img {
        object-fit: cover;
        object-position: center 20%; /* MÁS ARRIBA */
    }
}
/* Ajuste especial para pantallas tipo laptop 1366x768 */
@media (min-width: 1280px) and (max-width: 1440px) {
    .slider-container {
        height: calc(75vh - 90px); /* MÁS REDUCIDO: De 85vh a 75vh */
        margin-bottom: 0 !important;
    }
    .slide img {
        object-fit: cover;
        object-position: center 20%; /* MÁS ARRIBA */
    }
    .navigation-slider-principal button,
    .navigation button {
        font-size: 24px;  /* Botones un poco más pequeños que en pantallas grandes */
        padding: 10px 14px;
    }
}
/*FIN RESPONSIVE IMAGES SLIDER*/
/* La slide activa será visible */
.slide.active {
    opacity: 1;
    z-index: 1;
}
/* Imágenes adaptadas a su contenedor - AJUSTADO PARA IMÁGENES DE 1900x960 */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* llena el espacio sin deformar */
    object-position: center 25%; /* MÁS ARRIBA: De 30% a 25% */
    display: block;    /* evita espacios indeseados */
}
/* ========================
   NAVEGACION SLIDER PRINCIPAL
   ======================== */
.navigation-slider-principal {
    position: absolute;
    bottom: 12px; /* MÁS ARRIBA: De 15px a 12px */
    width: 100%;
    display: flex;
    justify-content: space-between; /* izquierda y derecha */
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 10;
}
.navigation-slider-principal button {
    background: rgba(245, 32, 32, 0.5);
    border: none;
    color: #fff;
    padding: 8px 14px;
    font-size: 25px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}
.navigation-slider-principal button:hover {
    background: rgba(255, 26, 26, 0.72);
    transform: scale(1.1);
}
/* ========================
   BOTONES DE NAVEGACION EXTRA
   ======================== */
.navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 5px;
    box-sizing: border-box;
    z-index: 10;
}
.navigation button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    padding: 10px 16px;
    font-size: 25px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}
.navigation button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}
/* ========================
   RESPONSIVE
   ======================== */
/* Slider oculto en móviles */
@media (max-width: 768px) {
    .slider-container {
        display: none !important;
    }
    .navigation-slider-principal button {
        font-size: 18px;
        padding: 6px 10px;
    }
    .navigation button {
        font-size: 24px;
        padding: 8px 12px;
    }
}
@media (max-width: 480px) {
    .navigation-slider-principal button {
        font-size: 16px;
        padding: 5px 8px;
    }
    .navigation button {
        font-size: 20px;
        padding: 6px 10px;
    }
}
/* ========================
   Laptops pequeños 1366x768
   ======================== */
@media screen and (max-width: 1366px) and (max-height: 768px) {
    .slider-container {
        height: calc(70vh - 65px); /* MÁS REDUCIDO: De 80vh a 70vh */
        margin-bottom: 0 !important;
    }
    
    .slide img {
        object-position: center 15%; /* MÁS ARRIBA: De 20% a 15% */
    }
    
    .navigation-slider-principal {
        bottom: 8px; /* MÁS ARRIBA: De 10px a 8px */
        padding: 0 15px;
    }
    
    .navigation-slider-principal button {
        font-size: 18px;   /* Más pequeño para 1366x768 */
        padding: 5px 10px; /* Menos padding */
    }
    
    .navigation button {
        font-size: 22px;   /* Un poco más pequeño */
        padding: 8px 12px;
    }
    
    .formulario-superpuesto {
        right: 35px;        /* Más a la izquierda para 1366x768 */
        max-width: 290px;   /* Más compacto */
        top: 50%;           /* MÁS ARRIBA: De 58% a 50% */
    }
    
    .formulario {
        width: 300px;       /* Más reducido */
        padding: 8px 12px;  /* Padding ajustado */
        font-size: 12px;    /* Texto más pequeño */
    }
    
    .titulo-impacto {
        font-size: 15px;    /* Más pequeño para 1366x768 */
        margin-bottom: 4px;
    }
    
    .subtitulo-impacto {
        font-size: 11px;    /* Más pequeño */
        margin-bottom: 6px;
    }
    
    .btn-enviar {
        width: 110px;       /* Más pequeño */
        font-size: 11px;
        padding: 8px 16px;
        margin-top: 8px;
    }
    
    .linea-decorativa {
        width: 40px;        /* Más pequeña */
        height: 3px;
        margin-bottom: 4px;
    }
}
/* ========================
   CABECERA + SLIDER FIX
   ======================== */
.cabecera2025-wrapper.menu-activo .slider-container {
    margin-top: 1px;
    transition: margin-top 0.4s ease;
}
/* Evita que el siguiente contenido se superponga */
.slider-container + * {
    position: relative;
    z-index: 2;
    margin-top: 0 !important; /* ELIMINA MARGEN SUPERIOR */
}
/* ========================
          FORMULARIO
   ======================== */
/* ===== Animación de entrada del formulario ===== */
.formulario-superpuesto {
  position: absolute;
  top: 48%; /* MÁS ARRIBA: De 52% a 48% */
  right: 5%;
  transform: translateY(-50%);
  z-index: 100;
  animation: slideIn 1s ease forwards;
  opacity: 0;
  max-width: 400px; /* Evita que sea muy ancho en pantallas grandes */
}
@keyframes slideIn {
  0% {
    transform: translateY(-50%) translateX(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}
/* ===== Encabezado ===== */
.encabezado-formulario {
  text-align: center;
  padding-bottom: 6px;
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
}
.titulo-impacto {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(16px, 1.2vw, 20px); /* Escala dinámicamente */
  font-weight: 800;
  color: #E42338;
  text-transform: uppercase;
  margin: 0 auto 6px;
  letter-spacing: 0.5px;
}
.subtitulo-impacto {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  color: #666;
  line-height: 1.4;
  margin: 0 auto 8px;
  padding: 0 10px;
}
.linea-decorativa {
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, #E42338, #FF5B5B);
  margin: 0 auto 6px;
  border-radius: 2px;
  animation: expandLine 1.2s ease-out forwards;
  opacity: 0;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes expandLine {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 220px;
    opacity: 1;
  }
}
/* ===== Caja del formulario ===== */
.formulario {
  background: rgba(255, 255, 255, 0.801);
  backdrop-filter: blur(10px);
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  width: 360px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: 'Poppins', sans-serif;
  max-height: 75vh;
  overflow-y: auto;
}
/* ===== Grupos de campos ===== */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  padding-left: 2px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fdfdfd;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #E42338;
  box-shadow: 0 0 6px rgba(228, 35, 56, 0.3);
  outline: none;
  background-color: #fff0efc3;
}
/* ===== Filas dobles ===== */
.form-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}
.form-row .campo-pequeno {
  flex: 0.4;
}
/* ===== Prefijo + celular ===== */
.telefono-input {
  display: flex;
  gap: 6px;
  width: 100%;
}
#prefijo {
  max-width: 65px;
  text-align: center;
}
/* ===== Condiciones ===== */
.condiciones-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
  padding-left: 2px;
  font-size: 11px;
}
.condiciones {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
  color: #333;
}
.condiciones a {
  color: #0077cc;
  text-decoration: underline;
  font-weight: 600;
  font-size: 11px;
}
/* ===== Botón ===== */
.btn-enviar {
  background-color: #E42338;
  color: #fff;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  display: block;
  margin: 10px auto 0;
  width: 120px;
  box-shadow: 0 5px 14px rgba(214, 0, 0, 0.2);
}
.btn-enviar:hover {
  background-color: #a80000;
  transform: scale(1.05);
}
/* ================== RESPONSIVE ================== */

/* Pantallas grandes (≥1400px) */
@media (min-width: 1400px) {
  .formulario-superpuesto {
    right: 6%; /* un poco más cerca del borde */
    max-width: 380px; /* más delgado */
    top: 46%; /* MÁS ARRIBA: De 54% a 46% */
  }
  .formulario {
    padding: 18px 22px;
    width: 360px;
    font-size: 14px;
  }
  .titulo-impacto {
    font-size: 20px;
  }
  .subtitulo-impacto {
    font-size: 14px;
  }
  .btn-enviar {
    width: 130px;
    font-size: 13px;
  }
}
/* Ultra wide (≥1920px) */
@media (min-width: 1920px) {
  .formulario-superpuesto {
    right: 8%;
    max-width: 400px; /* aún delgado, sin exagerar */
    top: 46%; /* MÁS ARRIBA: De 54% a 46% */
  }
  .formulario {
    width: 380px;
    padding: 20px 24px;
  }
  .titulo-impacto {
    font-size: 21px;
  }
  .subtitulo-impacto {
    font-size: 15px;
  }
  .btn-enviar {
    width: 140px;
    font-size: 14px;
  }
}
/* Tablets verticales y pantallas medianas */
@media (max-width: 1023px) {
  .formulario-superpuesto {
    position: static;
    transform: none;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    opacity: 1;
    animation: none;
  }
  .formulario {
    width: 94%;
    max-width: 360px;
    padding: 14px;
    animation: fadeInMobile 0.8s ease;
  }
  @keyframes fadeInMobile {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .linea-decorativa {
    opacity: 1 !important;
    animation: expandLine 1.2s ease-out forwards;
  }
}
/* Móviles */
@media (max-width: 576px) {
  .formulario {
    width: 100%;
    max-width: 95%;
    padding: 12px;
  }
  .titulo-impacto {
    font-size: 16px;
  }
  .subtitulo-impacto {
    font-size: 12px;
  }
  .btn-enviar {
    width: 100%;
  }
}

/* ==========================
   BANNER INFERIOR DE CURSOS - SIN SEPARACIÓN
   ==========================*/
/* Banner fijo inferior (solo escritorio) - SIN MARGEN */
.curso-banner-desktop {
    position: relative;
    width: 100%;
    padding: 8px 0;
    background: #E42338;
    z-index: 8000;
    display: none;
    margin-top: 0 !important; /* SIN SEPARACIÓN */
    margin-bottom: 0;
    padding-top: 0;
}
/* Contenedor de íconos con espaciado proporcional */
.curso-iconos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.2vw; /* Espaciado optimizado */
    padding: 0 2.5vw;
    overflow: hidden;
    flex-wrap: nowrap;
    margin: 0;
}
/* Íconos escalables sin distorsión - TAMAÑO MEJORADO */
.curso-iconos a img {
    height: 85px; /* AUMENTADO: De 80px a 85px para mejor visibilidad */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    max-width: 100%;
}
/* Hover para realce visual */
.curso-iconos a img:hover {
    transform: scale(1.15); /* Hover más pronunciado */
}
/* Mostrar solo en pantallas a partir de 1024px */
@media (min-width: 1024px) {
    .curso-banner-desktop {
        display: block;
    }
}
/* Ajuste para pantallas intermedias (ej. laptops pequeñas) */
@media (min-width: 1024px) and (max-width: 1280px) {
    .curso-iconos a img {
        height: 70px; /* AUMENTADO: De 65px a 70px */
    }
    .curso-iconos {
        gap: 2vw;
        padding: 0 2vw;
    }
}
/* Extra responsive para pantallas muy grandes */
@media (min-width: 1600px) {
    .curso-iconos a img {
        height: 90px; /* AUMENTADO: De 75px a 90px */
    }
    .curso-iconos {
        gap: 2.5vw;
        padding: 0 2.5vw;
    }
}

/* Ajuste adicional para pantallas extra grandes */
@media (min-width: 1920px) {
    .curso-iconos a img {
        height: 95px; /* AUMENTADO: De 85px a 95px */
    }
    .curso-iconos {
        gap: 3vw;
    }
}

/* ==========================
   AJUSTES ESPECÍFICOS PARA 1366x768 - BANNER INFERIOR SIN SEPARACIÓN
   ==========================*/
@media screen and (max-width: 1366px) and (max-height: 768px) {
    /* Ajustes para el banner inferior de cursos en 1366x768 - SIN SEPARACIÓN */
    .curso-banner-desktop {
        padding: 8px 0;
        margin-top: 0 !important; /* SIN SEPARACIÓN */
    }
    
    .curso-iconos {
        gap: 1.8vw;
        padding: 0 1.5vw;
    }
    
    .curso-iconos a img {
        height: 65px; /* AUMENTADO: De 55px a 65px */
    }
}

/* ========================
   AJUSTES ESPECÍFICOS PARA 1366x768
   ======================== */
@media screen and (max-width: 1366px) and (max-height: 768px) {
    .formulario-superpuesto {
        left: auto;
        right: 60px;
        max-width: 260px;
        top: 48%; /* MÁS ARRIBA: De 54% a 48% */
        transform: translateY(-50%);
    }
    
    @keyframes slideIn {
        0% {
            transform: translateY(-50%) translateX(50px);
            opacity: 0;
        }
        100% {
            transform: translateY(-50%) translateX(0);
            opacity: 1;
        }
    }
    
    .formulario {
        width: 260px;
        padding: 10px 12px;
        font-size: 11px;
        gap: 4px;
    }
    
    .titulo-impacto {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .subtitulo-impacto {
        font-size: 10px;
        margin-bottom: 5px;
        line-height: 1.3;
    }
    
    .btn-enviar {
        width: 100px;
        font-size: 10px;
        padding: 8px 14px;
        margin-top: 6px;
    }
    
    .linea-decorativa {
        width: 35px;
        height: 2.5px;
        margin-bottom: 3px;
    }
    
    .form-group {
        margin-bottom: 3px;
    }
    
    .form-group input,
    .form-group select {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .form-row {
        gap: 6px;
        margin-bottom: 3px;
    }
    
    .condiciones-wrapper {
        margin-top: 4px;
        font-size: 10px;
    }
    
    .curso-banner-desktop {
        padding: 8px 0;
        margin-top: 0 !important; /* SIN SEPARACIÓN */
    }
    
    .curso-iconos {
        gap: 1.5vw;
        padding: 0 2vw;
    }
    
    .curso-iconos a img {
        height: 70px; /* AUMENTADO: De 70px se mantiene */
        transition: transform 0.3s ease;
    }
    
    .curso-iconos a img:hover {
        transform: scale(1.2);
    }
    
    .slider-container {
        height: calc(70vh - 65px); /* MÁS REDUCIDO: De 80vh a 70vh */
        margin-bottom: 0 !important;
    }
    
    .slide img {
        object-position: center 15%; /* MÁS ARRIBA: De 20% a 15% */
    }
    
    .navigation-slider-principal {
        bottom: 8px; /* MÁS ARRIBA: De 10px a 8px */
        padding: 0 15px;
    }
    
    .navigation-slider-principal button {
        font-size: 18px;
        padding: 5px 10px;
    }
    
    .navigation button {
        font-size: 22px;
        padding: 8px 12px;
    }
}

@media screen and (width: 1366px) and (height: 768px) {
    .formulario-superpuesto {
        right: 80px;
        top: 50%; /* MÁS ARRIBA: De 56% a 50% */
        left: auto;
    }
    
    .curso-iconos {
        gap: 20px;
        padding: 0 15px;
    }
    
    .curso-iconos a img {
        height: 75px; /* AUMENTADO: De 75px se mantiene */
    }
    
    .curso-iconos {
        justify-content: space-around;
    }
}

@media screen and (min-width: 1280px) and (max-width: 1366px) and (max-height: 768px) {
    .formulario-superpuesto {
        right: 50px;
        top: 49%; /* MÁS ARRIBA: De 55% a 49% */
        left: auto;
    }
}

/* ========================
   AJUSTES GENERALES PARA ELIMINAR SEPARACIONES
   ======================== */
/* Elimina TODOS los márgenes entre slider y banner */
.slider-container + .curso-banner-desktop {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Elimina padding superior del banner */
.curso-banner-desktop {
    padding-top: 0 !important;
}

/* Asegura que no haya espacio entre elementos en el wrapper */
.cabecera2025-wrapper > * {
    margin-bottom: 0 !important;
}

.cabecera2025-wrapper > .slider-container {
    margin-bottom: 0 !important;
}

.cabecera2025-wrapper > .curso-banner-desktop {
    margin-top: 0 !important;
}

/* Estilo del banner directamente pegado al slider */
.curso-banner-desktop {
    position: relative;
    background: linear-gradient(135deg, #E42338, #C4182B);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    border-top: none; /* Elimina borde superior que pueda crear espacio visual */
}

/* Ajuste final para que el slider termine exactamente donde empieza el banner */
.slider-container {
    border-bottom: none;
}