/* =====================================================
   CARRUSEL DE NOTICIAS
===================================================== */

#news {
    overflow: hidden;
}

/* Contenedor general del carrusel */
#news .news-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 55px;
}

/* Ventana visible */
#news .news-carousel-viewport {
    width: 100%;
    overflow: hidden;
}

/* Pista que se desplaza */
#news .news-carousel-track {
    display: flex;
    transition: transform 0.55s ease;
    will-change: transform;
}

/* Cada elemento ocupa un tercio */
#news .news-carousel-item {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Tarjetas */
#news .card {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

#news .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

/* Imágenes uniformes */
#news .card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
}

/* Cuerpo de la tarjeta */
#news .card-body {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Título */
#news .card-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
}

/* Descripción */
#news .card-text {
    flex-grow: 1;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Botón */
#news .card-body .btn,
#news .card-body .hover-cursor-opacity {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
}

/* Footer */
#news .card-footer {
    padding: 0.7rem 1rem;
    font-size: 0.76rem;
    background-color: rgba(0, 0, 0, 0.03);
}

/* Flechas del carrusel */
#news .news-carousel-button {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.17);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

#news .news-carousel-button:hover {
    background-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.08);
}

#news .news-carousel-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

#news .news-carousel-prev {
    left: 0;
}

#news .news-carousel-next {
    right: 0;
}

/* Flechas dibujadas con CSS */
#news .news-carousel-button::before {
    display: block;
    width: 11px;
    height: 11px;
    content: "";
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

#news .news-carousel-prev::before {
    margin-left: 5px;
    transform: rotate(-135deg);
}

#news .news-carousel-next::before {
    margin-right: 5px;
    transform: rotate(45deg);
}

/* Indicadores */
#news .news-carousel-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

#news .news-carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.35);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition:
        width 0.25s ease,
        background-color 0.25s ease;
}

#news .news-carousel-dot.active {
    width: 24px;
    background-color: #ffffff;
    border-radius: 10px;
}

/* Tablets: 2 tarjetas */
@media (max-width: 991.98px) {
    #news .news-carousel {
        padding-right: 48px;
        padding-left: 48px;
    }

    #news .news-carousel-item {
        flex-basis: 50%;
        max-width: 50%;
    }

    #news .card-img-top {
        height: 175px;
    }
}

/* Celulares: 1 tarjeta */
@media (max-width: 575.98px) {
    #news {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    #news .news-carousel {
        padding-right: 45px;
        padding-left: 45px;
    }

    #news .news-carousel-item {
        flex-basis: 100%;
        max-width: 100%;
        padding-right: 7px;
        padding-left: 7px;
    }

    #news .card-img-top {
        height: 190px;
    }

    #news .news-carousel-button {
        width: 36px;
        height: 36px;
    }
}