/* Estilo base del carrusel */
.carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    padding-top: 8vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    /* Ocultar todos los slides por defecto */
    transform: translateX(100%);
    /* Todos los slides empiezan fuera de la pantalla */
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    transform: translateX(0);
    /* Centrar el slide activo */
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.carousel-caption {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    max-width: 80%;
    padding: 20px;
    border-radius: 10px;
}

.carousel-background {
    position: absolute; /* Asegura que el fondo esté sobre el contenedor */
    inset: 0; /* Reemplaza top: 0; left: 0; width: 100%; height: 100%; para mayor legibilidad y rendimiento */
    background: rgba(0, 0, 0, 0.20) center / cover no-repeat; /* Combina propiedades de fondo en una sola línea */
    z-index: 1; /* Mantiene la jerarquía de elementos */
    pointer-events: none; /* Asegura que no interfiera con la interacción del usuario */
}


/* Ajustes en los textos y botones para pantallas más grandes */
.carousel-caption h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #FFF;
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.carousel-caption .btn-primary {
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.carousel-caption .btn-primary:hover {
    background-color: #0056b3;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.3s ease;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background-color: #007bff;
}

/* Imagen por defecto en Slide 2 */
.slide-2 {
    background-image: url('../images/banner/AdmisionPrepa.jpg');
}

/* Ajustes para pantallas de tamaño pequeño (max-width: 768px) */
@media (max-width: 768px) {
    .carousel {
        height: 70vh; /* Ajustar la altura para pantallas pequeñas */
        padding-top: 4vh; /* Reducir el padding superior */
    }

    .slide-2 {
        background-image: url('../images/banner/Redes-Preparatoria2025.jpg');
    }

    /* Ajustar el tamaño de los textos */
    .carousel-caption h1 {
        font-size: 1rem; /* Reducir el tamaño del título */
    }

    .carousel-caption p {
        font-size: .8rem; /* Reducir el tamaño del texto */
    }

    .carousel-caption .btn-primary {
        padding: 8px 18px; /* Reducir el tamaño de los botones */
        font-size: 0.8rem;
    }

    /* Ajustar botones de navegación */
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.25rem; /* Reducir tamaño de los controles */
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    /* Ajustar indicadores */
    .carousel-indicators {
        bottom: 30px;
        gap: 12px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

}

/* Ajustes para pantallas de tamaño medio (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .carousel {
        height: 70vh; /* Ajustamos la altura para que no ocupe toda la pantalla */
        padding-top: 5vh; /* Ajustamos el padding superior */
    }

    .carousel-caption h1 {
        font-size: 2rem; /* Reducir el tamaño del título */
    }

    .carousel-caption p {
        font-size: 1rem; /* Reducir el tamaño del texto */
    }

    .carousel-caption .btn-primary {
        padding: 8px 18px; /* Reducir el tamaño de los botones */
        font-size: 0.9rem;
    }

    /* Ajustar botones de navegación */
    .carousel-control {
        width: 45px;
        height: 45px;
        font-size: 1.5rem; /* Reducir tamaño de los controles */
    }

    .carousel-control-prev {
        left: 15px;
    }

    .carousel-control-next {
        right: 15px;
    }

    /* Ajustar indicadores */
    .carousel-indicators {
        bottom: 30px;
        gap: 12px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* Estilos específicos para pantallas de 1024px */
@media (min-width: 1024px) {
    .carousel {
        height: 100vh; /* Mayor altura en pantallas grandes */
        padding-top: 8vh; /* Ajuste ligero en padding */
    }

    .carousel-caption {
        max-width: 60%; /* Reduce el ancho para mejor distribución */
        padding: 15px;
    }

    .carousel-caption h1 {
        font-size: 2.2rem;
    }

    .carousel-caption p {
        font-size: 1.1rem;
    }

    .carousel-caption .btn-primary {
        padding: 12px 24px;
        font-size: 1.1rem;
    }

    .carousel-control {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }

    .carousel-control-prev {
        left: 20px;
    }

    .carousel-control-next {
        right: 20px;
    }

    .carousel-indicators {
        bottom: 40px;
    }

    .indicator {
        width: 12px;
        height: 12px;
    }
}
