/* Estilos específicos para la sección de Noticias e Inicio */

/* Menú Superior de Navegación */
.main_menu .navbar-nav .nav-link {
    font-family: 'Open Sans', 'Source Sans Pro', sans-serif;
    font-size: 19px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    padding: 8px 18px !important;
    transition: color 0.2s ease-in-out;
}

.main_menu .navbar-nav .nav-link:hover,
.main_menu .navbar-nav .nav-link:focus {
    color: #228b22 !important;
}

.main_menu .navbar-nav .nav-item.active .nav-link,
.main_menu .navbar-nav .nav-link.active {
    color: #228b22 !important;
    font-weight: 700 !important;
}

.section_carrousel {
    margin-top: 25px !important;
    margin-bottom: 50px !important;
    position: relative;
    z-index: 1;
}

/* Distribución 60% Carrusel y 40% Noticias en pantallas de escritorio */
@media (min-width: 992px) {
    .col-carousel {
        flex: 0 0 60%;
        max-width: 60%;
    }
    .col-noticias {
        flex: 0 0 40%;
        max-width: 40%;
    }
}

.carousel-inner {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 100%;
}

.carousel-inner img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

@media (max-width: 991px) {
    .carousel-inner img {
        height: 380px;
    }
}

@media (max-width: 576px) {
    .carousel-inner img {
        height: 260px;
    }
}

/* Contenedor del panel de noticias */
.noticias-box {
    background: #ffffff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
    overflow: hidden;
}

@media (max-width: 991px) {
    .noticias-box {
        min-height: auto;
        max-height: 520px;
    }
}

.noticias-header {
    background: linear-gradient(135deg, #1b6d1b 0%, #28a745 100%);
    padding: 16px 20px;
    border-bottom: 2px solid #165b16;
    flex-shrink: 0;
}

.noticias-header h5 {
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.noticias-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

/* Scrollbar estilizado */
.noticias-list::-webkit-scrollbar {
    width: 6px;
}
.noticias-list::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}
.noticias-list::-webkit-scrollbar-thumb {
    background: #c2c9d1;
    border-radius: 3px;
}
.noticias-list::-webkit-scrollbar-thumb:hover {
    background: #28a745;
}

/* Elemento individual de noticia */
.noticia-card-item {
    display: flex;
    align-items: flex-start;
    padding: 14px;
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.noticia-card-item:last-child {
    margin-bottom: 0;
}

.noticia-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    border-color: #28a745;
}

.noticia-thumb-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 85px;
    margin-right: 14px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.noticia-play-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(34, 139, 34, 0.92);
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    padding-left: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.noticia-card-item:hover .noticia-play-overlay {
    background: #dc3545;
    transform: scale(1.15);
}

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

.noticia-thumb-placeholder {
    color: #a0aec0;
    font-size: 1.5rem;
}

.noticia-content {
    flex: 1 1 auto;
    min-width: 0;
}

.noticia-meta {
    font-size: 0.78rem;
    color: #718096;
    margin-bottom: 4px;
}

.noticia-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.noticia-card-item:hover .noticia-title {
    color: #228b22;
}

.noticia-excerpt {
    font-size: 0.82rem;
    color: #718096;
    line-height: 1.45;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noticia-btn-more {
    font-size: 0.78rem;
    font-weight: 600;
    color: #228b22;
    display: inline-block;
    margin-top: 4px;
}

/* Modal de detalle de noticia */
.noticia-modal-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.noticia-modal-date {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 15px;
}

.noticia-modal-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    white-space: pre-line;
}

