/* Carrusel personalizado con 7 segundos por imagen - Transición Slide */

/* Asegurar que el carrusel mantenga la proporción */
.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1920 / 600;
}

/* Evitar saltos/espacios blancos: hacer que cada item ocupe toda la altura del carrusel */
.carousel-item {
    position: relative;
    display: none;
    width: 100%;
    height: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease-in-out;
}

.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
    display: block;
}


.carousel-item-next:not(.carousel-item-start),
.active.carousel-item-end {
    transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-end),
.active.carousel-item-start {
    transform: translateX(-100%);
}

.carousel-item-next.carousel-item-start,
.carousel-item-prev.carousel-item-end {
    transform: translateX(0);
}

.carousel-item > img,
.carousel-item > a,
.carousel-item > a > img {
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Estilos para imágenes enlazadas */
.carousel-item a {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.carousel-item a:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Indicador visual de imagen enlazada */
.carousel-item a::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-item a:hover::after {
    opacity: 1;
}

.carousel-item a::before {
    content: '\f35d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 16px;
    position: absolute;
    top: 18px;
    right: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.carousel-item a:hover::before {
    opacity: 1;
}

/* Mejoras en los controles del carrusel */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    z-index: 20;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Indicadores del carrusel */
.carousel-indicators li {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid #fff;
}

.carousel-indicators .active {
    background-color: #fff;
}

/* Captions del carrusel */
.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    bottom: 30px;
}

.carousel-caption h5 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 16px;
    margin-bottom: 0;
}

.carousel-caption .fa-link {
    color: #17a2b8;
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-inner {
        aspect-ratio: 1920 / 800;
    }

    .carousel-caption {
        bottom: 10px;
        padding: 15px;
    }
    
    .carousel-caption h5 {
        font-size: 18px;
    }
    
    .carousel-caption p {
        font-size: 14px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
    
    .carousel-item a::before,
    .carousel-item a::after {
        display: none;
    }
}
