/* Variables de tema para mantener coherencia */
:root {
    --news-primary: #1a2537;
    --news-accent: #269571;
    --news-bg: #f8fafc;
    --news-white: #ffffff;
    --news-text-main: #334155;
    --news-text-muted: #64748b;
    --news-border: #e2e8f0;
}

.news-body {
    background-color: var(--news-bg);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--news-text-main);
}

.news-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.5rem 0.2rem;
}

.news-header {
    background: var(--news-primary);
    background-image: radial-gradient(circle at 50% 50%, rgba(38, 149, 113, 0.15), transparent 70%); /* Centrado también el brillo */
    padding: 3.5rem 0;
    border-radius: 0;
    border-bottom: 4px solid var(--news-accent);
    margin: 0 0 1.5rem 0;
    color: white;
    width: 100%;
    text-align: center; /* Alineación centrada */
}

.news-header h1 {
    font-weight: 900;
    font-size: 2.25rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.news-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 0;
    max-width: 800px; /* Opcional: limita el ancho del texto para que no sea una línea infinita */
    margin-left: auto;
    margin-right: auto;
	text-align: center;
}

/* Stats Cards */
.news-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.news-stat-card {
    background: var(--news-white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--news-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

.news-stat-card:hover {
    transform: translateY(-4px);
}

.news-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--news-primary);
}

.news-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--news-text-muted);
    font-weight: 600;
}

/* Filtros Estilo Pill */
.news-filters-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.news-filter-pill {
    padding: 0.6rem 1.25rem;
    background: var(--news-white);
    border: 1px solid var(--news-border);
    border-radius: 50px;
    color: var(--news-text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.news-filter-pill:hover {
    border-color: var(--news-accent);
    color: var(--news-accent);
}

.news-filter-pill.active {
    background: var(--news-primary);
    color: white;
    border-color: var(--news-primary);
    box-shadow: 0 4px 12px rgba(26, 37, 55, 0.2);
}

/* Listado de Noticias */
.news-grid-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Estilo para el Fallback de la Card si no carga el componente */
.news-card-fallback {
    background: var(--news-white);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid var(--news-accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.news-card-fallback h3 {
    font-weight: 700;
    color: var(--news-primary);
    margin-bottom: 0.75rem;
}

/* Paginación moderna */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.news-page-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--news-border);
    text-decoration: none;
    color: var(--news-text-main);
    font-weight: 600;
    transition: all 0.2s ease;
}

.news-page-link:hover {
    border-color: var(--news-accent);
    color: var(--news-accent);
}

.news-page-link.active {
    background: var(--news-accent);
    color: white;
    border-color: var(--news-accent);
}
.news-category-age {
    background-color: #edcf38; /* Tu amarillo exacto */
    color: #1a2537;            /* Tu azul oscuro para que se lea perfecto */
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}
/* Específicos para el detalle de noticia */
.news-detail-view {
    background: var(--news-white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--news-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.news-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--news-text-muted);
}

.news-breadcrumb a {
    color: var(--news-accent);
    text-decoration: none;
}

.news-detail-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--news-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.news-detail-summary {
    font-size: 1.2rem;
    color: var(--news-text-main);
    line-height: 1.6;
    padding: 1.5rem;
    background: #f1f5f9;
    border-left: 4px solid var(--news-accent);
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.news-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--news-text-main);
}

.news-btn-boe {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #dc2626;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-btn-boe:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.2);
}

.news-related-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--news-border);
}

.news-related-title {
    font-weight: 800;
    color: var(--news-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}
.news-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 24px;
        transition: all 0.2s ease;
        position: relative;
        display: flex;
        flex-direction: column;
    }
    
    .news-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        border-color: #269571; /* Tu verde institucional */
    }
    
    .news-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        gap: 12px;
    }
    
    .news-meta {
        display: flex;
        gap: 12px;
        align-items: center;
        font-size: 0.8rem;
        font-weight: 500;
        color: #64748b;
    }
    
    .news-source {
        color: #1a2537;
        font-weight: 700;
    }
    
    .news-bulletin {
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.7rem;
    }
    
    /* Badges ajustadas a tu paleta */
    .news-badge {
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }
    
    .badge-primary, .badge-C1_ADMIN { background: #1a2537; color: white; }
    .badge-success, .badge-C2_AUXILIAR { background: #269571; color: white; }
    .badge-info, .badge-BOTH { background: #0d6efd; color: white; }
    
    .news-title {
        font-family: 'Inter', sans-serif;
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 12px;
        letter-spacing: -0.01em;
    }
    
    .news-title a {
        color: #1a2537;
        text-decoration: none;
    }
    
    .news-title a:hover {
        color: #269571;
    }
    
    .news-summary {
        color: #475569;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .news-keywords {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 20px;
    }
    
    .keyword-tag {
        background: #f8fafc;
        color: #64748b;
        border: 1px solid #e2e8f0;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .news-card-footer {
        display: flex;
        gap: 12px;
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid #f1f5f9;
    }
    
    /* Botones estilo SaaS */
    .btn-boe, .btn-details {
        padding: 8px 16px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 0.85rem;
        text-decoration: none;
        transition: all 0.2s ease;
        text-align: center;
    }
    
    .btn-boe {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fee2e2;
    }
    
    .btn-boe:hover {
        background: #dc2626;
        color: white;
    }
    
    .btn-details {
        background: #1a2537;
        color: white;
        border: 1px solid #1a2537;
        flex-grow: 1;
    }
    
    .btn-details:hover {
        background: #269571;
        border-color: #269571;
    }
    
    @media (max-width: 576px) {
        .news-card-header { flex-direction: column; align-items: flex-start; }
        .news-card-footer { flex-direction: column; }
    }