/* =========================================
   ESTILOS SECCIÓN NOTICIAS
   Hereda variables de :root del archivo inicio.css
   ========================================= */

/* Header pequeño para subpáginas */
.subpage-header {
    background: linear-gradient(135deg, var(--color-vino) 0%, var(--color-rojo) 100%);
    padding: 120px 0 40px;
    /* Ajustado para navbar fixed */
    color: var(--color-blanco);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.subpage-header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* GRID DE NOTICIAS */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 3rem 0;
}

.news-card {
    background: var(--color-blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(156, 24, 54, 0.15);
    /* Sombra roja suave */
    border-color: rgba(156, 24, 54, 0.3);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--color-rojo);
    color: var(--color-blanco);
    padding: 5px 15px;
    border-top-left-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    color: var(--color-negro);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.news-content p {
    color: var(--color-gris-oscuro);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Ajuste del botón para la tarjeta */
.small-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* =========================================
   ESTILOS NOTICIA INDIVIDUAL (DETALLE)
   ========================================= */

.single-news-page {
    padding-top: 120px;
    /* Espacio si no usas el subpage-header aquí */
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-gris-medio);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--color-rojo);
}

.full-article {
    background: var(--color-blanco);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--color-vino);
    margin-bottom: 1rem;
}

.meta-info {
    display: flex;
    gap: 20px;
    color: var(--color-gris-tecla);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.article-image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 2.5rem;
}

.article-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    color: var(--color-gris-oscuro);
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Estilos para el contenido que venga de la BD (párrafos, listas) */
.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    color: var(--color-rojo);
    margin-top: 2rem;
}

.article-body ul {
    margin-left: 20px;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .full-article {
        padding: 1.5rem;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .subpage-header {
        padding: 100px 0 30px;
    }
}