/* ==========================================
   CARRUSEL DE NOTICIAS
   ========================================== */

.seccion-carrusel-noticias {
    padding: 40px 20px;
    margin-top: 40px;
}

.carrusel-container {
    max-width: 900px;
    margin: 0 auto;
}

.titulo-carrusel {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Wrapper principal */
.carrusel-wrapper {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main carrusel */
.carrusel-main {
    position: relative;
    width: 100%;
}

.carrusel-inner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carrusel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carrusel-slide.active {
    opacity: 1;
    z-index: 10;
}

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

.carrusel-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

/* Controles */
.carrusel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 20;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.carrusel-control:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.carrusel-control.prev {
    left: 20px;
}

.carrusel-control.next {
    right: 20px;
}

.carrusel-control span {
    font-weight: bold;
}

/* Thumbnails */
.carrusel-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    padding: 15px;
    max-height: 120px;
    overflow-y: auto;
}

.thumbnail {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 80px;
}

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

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #ddd;
}

.thumbnail.active {
    border-color: #d32f2f;
    box-shadow: 0 0 5px rgba(211, 47, 47, 0.5);
}

/* Indicadores (puntos) */
.carrusel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.indicator:hover {
    background: #999;
    transform: scale(1.2);
}

.indicator.active {
    background: #d32f2f;
    width: 32px;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .carrusel-inner {
        height: 350px;
    }

    .carrusel-control {
        width: 40px;
        height: 40px;
        padding: 10px 15px;
        font-size: 18px;
    }

    .carrusel-control.prev {
        left: 10px;
    }

    .carrusel-control.next {
        right: 10px;
    }

    .titulo-carrusel {
        font-size: 22px;
    }

    .carrusel-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
        padding: 10px;
    }

    .thumbnail {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .carrusel-inner {
        height: 250px;
    }

    .carrusel-control {
        width: 35px;
        height: 35px;
        padding: 8px 12px;
        font-size: 16px;
    }

    .carrusel-caption {
        font-size: 12px;
        padding: 8px 12px;
        bottom: 10px;
        left: 10px;
    }

    .titulo-carrusel {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .carrusel-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 6px;
        padding: 8px;
    }

    .thumbnail {
        height: 50px;
    }

    .carrusel-indicators {
        padding: 15px 10px;
        gap: 6px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 28px;
    }
}
