/* Estilos para el carrusel de noticias */
.news-carousel-container {
    position: relative;
    margin: 20px 0 40px;
    overflow: hidden;
}

.news-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    margin: 0 -10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.news-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.news-card {
    flex: 0 0 auto;
    width: calc(33.333% - 20px);
    margin: 0 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1em;
    line-height: 1.3;
}

.news-content .date {
    color: #7f8c8d;
    font-size: 0.85em;
    margin-bottom: 10px;
    display: block;
}

.news-content p {
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #34495e;
}

.carousel-controls {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.carousel-arrow {
    background: #2c3e50;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.carousel-arrow:hover {
    background: #34495e;
    transform: scale(1.05);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #2c3e50;
    transform: scale(1.2);
}

.view-all-news {
    text-align: center;
    margin-top: 30px;
    display: none;
}

.view-all-news .btn {
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.view-all-news .btn:hover {
    background: #34495e;
}

/* Responsive - Tablets */
@media (max-width: 992px) {
    .news-card {
        width: calc(50% - 20px);
    }
}

/* Responsive - Móviles */
@media (max-width: 768px) {
    .news-card {
        width: calc(100% - 20px);
    }
    
    .news-card img {
        height: 160px;
    }
}

/* Pequeñas mejoras para pantallas muy pequeñas */
@media (max-width: 480px) {
    .news-card {
        margin: 0 5px;
        width: calc(100% - 10px);
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-content h3 {
        font-size: 1em;
    }
}