/* assets/css/noticias.css */

/* --- ESTRUCTURA BASE --- */
.card-noticia {
    position: relative; /* Clave para el efecto de la línea superior */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 16px;
}

/* Reducimos el espacio interno (padding) para que no quede tanto hueco */
.card-noticia .card-body {
    padding: 1.25rem !important; 
}

/* --- LA INNOVACIÓN: LÍNEA SUPERIOR MÁGICA --- */
.card-noticia::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0; /* Arranca invisible */
    height: 5px; /* Grosor de la línea */
    background: linear-gradient(90deg, #6c2288, #a42c94); /* Gradiente del footer */
    transition: width 0.4s ease-out;
    z-index: 2;
    border-top-left-radius: 16px; 
}

/* --- EFECTOS AL PASAR EL MOUSE (HOVER) --- */
.card-noticia:hover {
    transform: translateY(-6px);
    /* Sombra innovadora teñida con tu color institucional en vez de gris */
    box-shadow: 0 15px 35px rgba(102, 36, 69, 0.15) !important;
}

.card-noticia:hover::before {
    width: 100%; 
    border-top-right-radius: 16px; 
}

/* --- IMAGEN CON ZOOM SUTIL --- */
.img-fluida-noticia {
    height: 200px; /* Más bajita para acortar la tarjeta */
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-noticia:hover .img-fluida-noticia {
    transform: scale(1.05);
}

/* --- TEXTOS MÁS COMPACTOS --- */
.titulo-noticia {
    color: #222222;
    font-size: 1.1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
    margin-bottom: 0.5rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Obligamos a que máximo sean 2 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-noticia:hover .titulo-noticia {
    color: #662445; 
}

.texto-bajada {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1.2rem !important; /* Acercamos el texto al botón */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Reducimos a 2 líneas para matar el espacio extra */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- BOTÓN ANIMADO --- */
.btn-ver-mas {
    color: #662445;
    font-weight: 800;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-ver-mas .arrow-icon {
    font-size: 1.1rem;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.card-noticia:hover .btn-ver-mas {
    color: #a42c94; 
}

.card-noticia:hover .arrow-icon {
    transform: translateX(6px); /* La flecha se desliza */
}

/* Noticias Recientes */
.img-noticia.cover-center { object-fit: cover; object-position: center; }
.img-noticia.cover-top    { object-fit: cover; object-position: top; }
.img-noticia.cover-bottom { object-fit: cover; object-position: bottom; }
.img-noticia.contain-fit  { object-fit: contain; object-position: center; background-color: #f4f4f5; }

/* --- PAGINACIÓN INSTITUCIONAL --- */
.custom-pagination .page-link {
    color: #662445; /* Morado base */
    background-color: #ffffff;
    border-color: #eaeaea;
    transition: all 0.3s ease;
    font-weight: 600;
}

/* Al pasar el mouse */
.custom-pagination .page-link:hover {
    color: #ffffff;
    background-color: #a42c94; /* Morado claro del hover */
    border-color: #a42c94;
}

/* La página actual seleccionada */
.custom-pagination .page-item.active .page-link {
    color: #ffffff;
    background-color: #662445; /* Morado institucional */
    border-color: #662445;
    box-shadow: 0 4px 10px rgba(102, 36, 69, 0.3); /* Sombra para destacar */
}

/* Quitamos el borde azul brillante al hacer clic (focus) */
.custom-pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 36, 69, 0.25);
}