/* Estilos generales para la sección de noticias */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.news-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.news-card-placeholder {
    height: 200px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.news-card-placeholder i {
    font-size: 3rem;
}

.news-card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.news-card-excerpt {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.news-card-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.news-card-meta i {
    margin-right: 0.3rem;
}

.news-card-read-more {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    transition: color 0.2s ease;
}

.news-card-read-more:hover {
    color: #0056b3;
}

/* Estilos para el modal de noticia completa */
.news-modal-image {
    max-height: 400px;
    object-fit: cover;
    width: 100%;
}

/* Responsive ajustes */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Categorías */
.news-category-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.category-general {
    background-color: #6c757d;
    color: white;
}

.category-salud {
    background-color: #28a745;
    color: white;
}

.category-campanas {
    background-color: #007bff;
    color: white;
}

.category-capacitacion {
    background-color: #17a2b8;
    color: white;
}

.category-eventos {
    background-color: #ffc107;
    color: #212529;
}

.category-administrativo {
    background-color: #343a40;
    color: white;
}


/* Estilos profesionales para detalle de noticias y comentarios */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --text-color: #333;
    --border-color: #e9ecef;
    --background-color: #f8f9fa;
}

.news-detail {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.news-article {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 0;
    margin-bottom: 2rem;
}

.news-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.news-header {
    padding: 0 1.5rem;
}

.news-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.news-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.news-content .article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #212529;
    padding: 0 1.5rem;
}

.news-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.social-share a {
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.social-share a:hover {
    opacity: 0.7;
}

.comments-section {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 2rem;
}

.comments-section h3 {
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.comment {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comment-avatar .avatar-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-author {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.comment-text {
    color: #495057;
    line-height: 1.6;
}

.comment-form {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.comment-form .form-label {
    font-weight: 500;
    color: var(--text-color);
}

.comment-form .form-control {
    border-color: var(--border-color);
}

.comment-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

@media (max-width: 768px) {
    .news-title {
        font-size: 1.8rem;
    }

    .news-content .article-body {
        font-size: 1rem;
    }

    .comments-section,
    .comment-form {
        padding: 1rem;
    }
}