/* ========================================
   NOTICIAS.CSS - Estilos exclusivos para páginas de noticias
   Con mayor contraste y sombras para mejor legibilidad
   ======================================== */

/* Hero de noticias */
.noticias-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 120px 0 80px;
    margin-top: 80px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.noticias-hero::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), transparent);
    pointer-events: none;
}

.noticias-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.noticias-hero-subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Filtros y búsqueda */
.noticias-filtros {
    background: #ffffff;
    padding: 30px 0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.filtros-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.busqueda-container {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.busqueda-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    stroke-width: 2;
}

.busqueda-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.busqueda-input:focus {
    border-color: #14b8a6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.categorias-filtro {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.categoria-btn {
    padding: 10px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 40px;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.categoria-btn:hover {
    border-color: #14b8a6;
    color: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.2);
}

.categoria-btn.active {
    background: #14b8a6;
    border-color: #14b8a6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

/* Grid completo de noticias */
.noticias-lista-section {
    padding: 60px 0;
    background: #f8fafc;
    min-height: 500px;
}

.noticias-grid-completo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 50px;
}

.noticia-card-completa {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.noticia-card-completa:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.25), 0 10px 15px -6px rgba(0, 0, 0, 0.15);
}

.noticia-card-imagen {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.noticia-card-imagen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
}

.noticia-card-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.noticia-card-completa:hover .noticia-card-imagen img {
    transform: scale(1.05);
}

.noticia-card-categoria {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #14b8a6;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.noticia-card-destacada {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f59e0b;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.noticia-card-contenido {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.noticia-card-fecha {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.noticia-card-fecha svg {
    color: #14b8a6;
    stroke-width: 2;
}

.noticia-card-titulo {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.noticia-card-titulo a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.noticia-card-titulo a:hover {
    color: #14b8a6;
}

.noticia-card-resumen {
    color: #334155;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    font-size: 0.95rem;
}

.noticia-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: auto;
}

.noticia-card-leer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #14b8a6;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.noticia-card-leer:hover {
    gap: 12px;
    color: #0f172a;
}

.noticia-card-leer svg {
    transition: transform 0.3s ease;
}

.noticia-card-leer:hover svg {
    transform: translateX(4px);
}

/* Paginación */
.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagina-btn {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagina-btn:hover {
    border-color: #14b8a6;
    color: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.15);
}

.pagina-btn.active {
    background: #14b8a6;
    border-color: #14b8a6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
}

.pagina-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Detalle de noticia */
.noticia-detalle-section {
    padding: 40px 0 80px;
    background: #f8fafc;
    margin-top: 80px;
    min-height: 600px;
}

.noticia-detalle-container {
    max-width: 900px;
    margin: 0 auto 60px;
}

.noticia-detalle {
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.noticia-detalle-imagen {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
}

.noticia-detalle-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.noticia-detalle-categoria {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #14b8a6;
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.noticia-detalle-contenido {
    padding: 48px;
}

.noticia-detalle-header {
    margin-bottom: 30px;
}

.noticia-detalle-titulo {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.noticia-detalle-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #64748b;
    font-size: 1rem;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.noticia-detalle-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.noticia-detalle-meta svg {
    color: #14b8a6;
    stroke-width: 2;
}

.noticia-detalle-cuerpo {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1e293b;
}

.noticia-detalle-cuerpo p {
    margin-bottom: 24px;
}

.noticia-detalle-cuerpo h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 40px 0 20px;
}

.noticia-detalle-cuerpo h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #0f172a;
    margin: 30px 0 15px;
}

.noticia-detalle-cuerpo ul, 
.noticia-detalle-cuerpo ol {
    margin: 20px 0;
    padding-left: 30px;
}

.noticia-detalle-cuerpo li {
    margin-bottom: 10px;
}

.noticia-detalle-cuerpo blockquote {
    background: #f1f5f9;
    padding: 24px;
    border-left: 6px solid #14b8a6;
    border-radius: 8px;
    font-style: italic;
    margin: 30px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.noticia-detalle-volver {
    margin-top: 40px;
    text-align: center;
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #ffffff;
    border: 2px solid #14b8a6;
    color: #14b8a6;
    font-weight: 600;
    border-radius: 40px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-volver:hover {
    background: #14b8a6;
    color: #ffffff;
    transform: translateX(-4px);
    box-shadow: 0 8px 16px rgba(20, 184, 166, 0.25);
}

/* Noticias relacionadas */
.noticias-relacionadas {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
}

.relacionadas-titulo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 30px;
    text-align: center;
}

.relacionadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.relacionada-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.relacionada-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.15);
}

.relacionada-imagen {
    height: 160px;
    overflow: hidden;
}

.relacionada-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.relacionada-card:hover .relacionada-imagen img {
    transform: scale(1.05);
}

.relacionada-contenido {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.relacionada-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.relacionada-titulo a {
    color: inherit;
    text-decoration: none;
}

.relacionada-titulo a:hover {
    color: #14b8a6;
}

.relacionada-fecha {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 60px;
    color: #64748b;
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

.loading-spinner::after {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    margin: 20px auto;
    border: 4px solid #e2e8f0;
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mensaje sin resultados */
.sin-resultados {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.sin-resultados svg {
    width: 80px;
    height: 80px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.sin-resultados h3 {
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 10px;
}

.sin-resultados p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .noticias-grid-completo {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .noticia-detalle-titulo {
        font-size: 2rem;
    }
    
    .noticia-detalle-contenido {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .noticias-hero {
        padding: 100px 0 60px;
    }
    
    .noticias-hero-title {
        font-size: 2rem;
    }
    
    .noticias-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .noticias-grid-completo {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .noticia-detalle-imagen {
        height: 300px;
    }
    
    .noticia-detalle-titulo {
        font-size: 1.6rem;
    }
    
    .noticia-detalle-contenido {
        padding: 24px;
    }
    
    .noticia-detalle-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .categorias-filtro {
        gap: 8px;
    }
    
    .categoria-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .noticias-hero {
        margin-top: 70px;
        padding: 80px 0 40px;
    }
    
    .noticias-hero-title {
        font-size: 1.8rem;
    }
    
    .noticia-detalle-imagen {
        height: 200px;
    }
    
    .noticia-detalle-titulo {
        font-size: 1.3rem;
    }
    
    .noticia-detalle-contenido {
        padding: 20px;
    }
    
    .categoria-btn {
        width: 100%;
        text-align: center;
    }
}

/* Estilos para los enlaces de noticias */
.noticia-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: color 0.3s ease;
}

.noticia-link:hover {
    color: #14b8a6;
}

.noticia-card h4 a.noticia-link {
    font-weight: 700;
    display: block;
}

.noticia-card .leer-mas a.noticia-link {
    color: #14b8a6;
    font-weight: 600;
}

.noticia-card .leer-mas a.noticia-link:hover {
    color: #0f172a;
    gap: 12px;
}

/* Asegurar que los clics funcionen en toda el área */
.noticia-card h4 a,
.noticia-card .leer-mas a {
    display: inline-block;
    padding: 4px 0;
}

