/* Estilos específicos para la página de Noticias */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, 
        rgba(26, 75, 132, 0.9) 0%, 
        rgba(138, 43, 226, 0.8) 25%, 
        rgba(70, 130, 180, 0.7) 50%, 
        rgba(135, 206, 235, 0.6) 75%, 
        rgba(173, 216, 230, 0.5) 100%);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.2) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.6;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.3rem;
    color: white;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    line-height: 1.6;
}

/* Botón de regreso */
.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a4b84 0%, #0d2b4a 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 2rem;
    box-shadow: 0 4px 15px rgba(26, 75, 132, 0.3);
}

.back-btn:hover {
    background: linear-gradient(135deg, #0d2b4a 0%, #1a4b84 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 75, 132, 0.4);
}

/* Contenido principal */
.main-content {
    padding-top: 2rem;
    background: #f8f9fa;
}

/* Secciones de contenido */
.content-section {
    background: white;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.content-section .container {
    padding: 3rem;
}

/* Estados de carga y error */
.loading-container, .error-container, .no-news-message {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a4b84;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-icon, .no-news-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-container h3, .no-news-message h3 {
    color: #1a4b84;
    margin-bottom: 1rem;
}

.error-container p, .no-news-message p {
    color: #666;
    margin-bottom: 2rem;
}

/* Header de noticias */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.news-header h2 {
    font-size: 2.5rem;
    color: #1a4b84;
    margin: 0;
    position: relative;
}

.news-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #8A2BE2 0%, #9370DB 100%);
    border-radius: 2px;
}

/* Filtros de noticias */
.news-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #1a4b84;
    background: transparent;
    color: #1a4b84;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background: #1a4b84;
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #8A2BE2;
    border-color: #8A2BE2;
    color: white;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

/* Grid de noticias */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Tarjeta de noticia */
.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(26, 75, 132, 0.9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.news-date {
    font-weight: 500;
}

.news-author {
    font-style: italic;
}

.news-title {
    font-size: 1.3rem;
    color: #1a4b84;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-weight: 600;
}

.news-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.news-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #8A2BE2 0%, #9370DB 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.news-link:hover {
    background: linear-gradient(135deg, #9370DB 0%, #8A2BE2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

/* Botón cargar más */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #1a4b84 0%, #0d2b4a 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 75, 132, 0.3);
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #0d2b4a 0%, #1a4b84 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 75, 132, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .content-section .container {
        padding: 2rem 1.5rem;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-header h2 {
        font-size: 2rem;
    }
    
    .news-filters {
        width: 100%;
        justify-content: center;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-card {
        margin-bottom: 1rem;
    }
    
    .back-btn {
        margin: 1rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .news-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .news-excerpt {
        font-size: 0.9rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease-out;
}

.content-section {
    animation: fadeInUp 0.6s ease-out;
}