/* noticias_style.css */

.noticias-view {
    padding: 30px 0;
    min-height: 60vh; /* Asegura altura mínima para el footer no suba */
}

/* --- GRID SYSTEM (Responsive Moderno) --- */
.noticias-grid {
    display: grid;
    /* Magia de CSS Grid: Columnas automáticas de mínimo 300px */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

/* --- TARJETA DE NOTICIA (LISTA) --- */
.news-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Igualar alturas en el grid */
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    width: 100%;
    height: 200px; /* Altura fija para uniformidad */
    overflow: hidden;
    background-color: var(--bg-light);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el espacio sin deformar */
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ocupa el espacio restante */
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content h3 {
    font-size: 1.25rem;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
    line-height: 1.4;
    /* Limitar a 2 líneas y poner puntos suspensivos (...) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Limitar a 3 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-leer-mas {
    align-self: flex-start;
    padding: 8px 0;
    color: var(--color-primary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-leer-mas:hover {
    color: var(--color-primary-light);
    border-bottom-color: var(--color-primary-light);
}

/* --- EMPTY STATE (Diseño Profesional) --- */
.empty-state-card {
    background-color: var(--bg-light);
    border-radius: var(--radius-card);
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
    border: 2px dashed #d0d7de; /* Borde punteado sutil */
}

.empty-icon {
    font-size: 4rem;
    color: #a0aab5; /* Gris desaturado */
    margin-bottom: 20px;
}

.empty-state-card h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
}

/* --- VISTA DETALLE --- */
.btn-volver-noticias {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: color 0.3s;
}

.btn-volver-noticias i { margin-right: 8px; }
.btn-volver-noticias:hover { color: var(--color-primary-light); text-decoration: underline; }

.news-detail-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.detail-image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 10px;
}

.detail-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* EL TRUCO DEL TEXTO PLANO */
.news-body-text {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.8;
    /* Esta propiedad mágica respeta los saltos de línea del Excel */
    white-space: pre-line; 
}

/* Responsive */
@media (max-width: 768px) {
    .news-detail-card { padding: 25px; }
    .news-content h3 { font-size: 1.1rem; }
    .news-image { height: 180px; }
}