/* ================================================
   SECCIÓN: MÁS NOTICIAS
================================================ */
.mas-noticias {
    margin-top: 1rem;
    max-height: 450px;
    padding: 2rem 5rem;
    background-color: #f5f6f8;
}

.separador {
    border: none;
    border-top: 2px solid #ccc;
    margin-bottom: 3rem;
    width: 100%;
    margin-top: 0px;
}

.mas-noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Tres columnas iguales */
    gap: 2.5rem;
}

.tarjeta-noticia {
    background: #fff;
    border-radius: 12px;
    overflow: hidden; /* Evita que se salga contenido fuera de la tarjeta */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 400px;
    width: 100%;
    min-width: 0;
}

.tarjeta-noticia:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tarjeta-imagen {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.tarjeta-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tarjeta-noticia:hover .tarjeta-imagen img {
    transform: scale(1.05);
}

/* Botón sobre imagen */
.btn-leer-mas-overlay {
    position: absolute;
    bottom: 10px;
    left: 15%;
    transform: translateX(-50%);
    background-color: #007DD6;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-leer-mas-overlay:hover {
    background-color: #ffffff;
}

/* Contenido */
.tarjeta-contenido {
    padding: 1rem 1.3rem 1.5rem 1.3rem;
    flex-grow: 1;
    overflow: hidden; /* Evita que el contenido se salga */
}

.tarjeta-titulo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    overflow: hidden; 
    text-overflow: ellipsis; /* Trunca el título si es muy largo */
    white-space: nowrap; /* Evita que el título haga salto de línea */
}

.tarjeta-extracto {
    font-size: 0.95rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis; /* Trunca el extracto si es muy largo */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Máximo 4 líneas */
    -webkit-box-orient: vertical;
}


/* RESPONSIVO Más Noticias */
@media (max-width: 992px) {
    .mas-noticias {
        padding: 2rem 3rem;
    }
    .mas-noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .mas-noticias {
        padding: 1.5rem;
    }
    .mas-noticias-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
    SECCIÓN PRINCIPAL – NOTICIAS
================================================ */
.noticia-page {
    background-color: #f5f6f8;
    padding: 4rem 0;
    margin-top: 70px;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3rem;
    
}

/* GRID PRINCIPAL */
.noticia-grid {
    display: flex;
    gap: 1.5rem;
    align-items: stretch; /* Alinea columnas a la misma altura */
}

/* ===============================
   COLUMNA DERECHA PORTADA PRINCIPAL
=============================== */
.noticia-col-derecha {
    flex: 1.6;
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

/* La altura de portada1 debe ser igual a portada2 + portada3 + gap */
.noticia-col-derecha .noticia-card {
    height: 624px; /* 300 + 300 + 24px gap */
    background-color: transparent;
    overflow: hidden;
    border-radius: 15px;
}

.noticia-col-derecha .imagen-con-texto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;    
    justify-content: center;
    background-color: #000;
    overflow: hidden;
}


.noticia-col-derecha .imagen-con-texto img {
    width: 100%;
    height: 100%; /*no recorta la imagen pero rrellena con negro*/
    object-fit: contain;
}

.noticia-col-derecha .noticia-card.vacia {
    background-color: transparent;
}

/* ===============================
   COLUMNA IZQUIERDA PORTADA 2–3
=============================== */
.noticia-col-izquierda {
    flex: 0 0 38.462%;
    max-width: 38.462%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

/* Altura fija para portada2 y portada3 */
.noticia-col-izquierda .noticia-card {
    height: 300px;
    background-color: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

/* Imagen contenida sin deformación */
.noticia-col-izquierda .imagen-con-texto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    
}

/* Si falta portada3 */
.noticia-col-izquierda .noticia-card.vacia {
    background-color: transparent;
}

.noticia-col-izquierda .imagen-con-texto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; 
    background-color: #000;
}
/* ===============================
   RESPONSIVE – MÓVILES Y TABLETS
=============================== */
@media (max-width: 1024px) {
    .noticia-grid {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 0px;
        padding-bottom: auto;
    }

    .noticia-col-derecha,
    .noticia-col-izquierda {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* Ajusta altura de portada principal para que no sea tan grande */
    .noticia-col-derecha .noticia-card {
        height: auto;
        margin-bottom: auto;
    }

    /* Ajusta altura de portada2 y portada3 */
    .noticia-col-izquierda .noticia-card {
        height: 200px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .noticia-grid {
        gap: 0.75rem;
    }

    .noticia-col-derecha .noticia-card,
    .noticia-col-izquierda .noticia-card {
        border-radius: 10px;
    }

    .noticia-col-izquierda {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .noticia-grid {
        gap: 0.5rem;
    }

    .noticia-col-derecha .noticia-card,
    .noticia-col-izquierda .noticia-card {
        height: auto; /* Ajusta automáticamente según contenido */
    }

    .noticia-col-derecha .imagen-con-texto img,
    .noticia-col-izquierda .imagen-con-texto img {
        object-fit: cover; /* Para ocupar todo el ancho y alto disponible */
    }
}
/* ================================================
    ESTILO GENERAL TARJETAS DE NOTICIA
================================================ */
.noticia-card {
    border-radius: 0;
    overflow: hidden;
    background: #000;
    transition: 0.3s ease;
}

.imagen-con-texto {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Overlay */
.overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.2rem;
    color: #fff;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 25%,
        rgba(0, 0, 0, 0.4) 60%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* Texto */
.fecha-noticia {
    font-size: 0.9rem;
    color: #ffffff;
}

.fecha-noticia.grande {
    font-size: 1rem;
    font-weight: 500;
}

.titulo-noticia {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.titulo-noticia.grande {
    font-size: 1.8rem;
}

/* Botón */
.btn-leer-mas {
    margin-top: 0.4rem;
    background-color: #007DD6;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 25px;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
}

.btn-leer-mas:hover {
    background-color: #ffffff;
}

/* ===============================
   RESPONSIVO PRINCIPAL
=============================== */
@media (max-width: 900px) {
    .noticia-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .imagen-con-texto {
        height: auto;
    }

    .imagen-con-texto.grande {
        height: auto;
    }

    .titulo-noticia.grande {
        font-size: 1.4rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* ================================================
    SWIPER
================================================ */
.mas-noticias .swiper-slide {
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .mas-noticias-swiper .swiper-slide {
        width: 100% !important;
    }

    .mas-noticias-swiper .tarjeta-noticia {
        width: 90%;
    }
}

.swiper-button-next,
.swiper-button-prev {
    opacity: 3;
    color: #f0f4f5ff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ícono de flecha */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Hover */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: #121421;
    transform: scale(1.1);
    box-shadow: 0 0 15px #b4bbbcff;
}

/* Ajustes de posición */
.swiper-button-next {
    right: 10px;
}
.swiper-button-prev {
    left: 10px;
}

