/* Estilos para a Página de Notícias */

/* Header da página */
.section-header {
    text-align: center;
    margin: 3rem 0 4rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #667eea, var(--primary-color));
}

.section-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.section-header h1::after {
    content: '📰';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.section-header p {
    font-size: 1.3rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid de notícias */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

/* Cards de notícias */
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #667eea);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.news-card:hover::before {
    transform: scaleX(1);
}

/* Imagem da notícia */
.news-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

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

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

.news-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

/* Conteúdo da notícia */
.news-content {
    padding: 2rem;
}

.news-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 3.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta informações */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.news-date {
    color: #868e96;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

/* Botão Ler Mais */
.news-meta .btn {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 153, 153, 0.3);
    position: relative;
    overflow: hidden;
}

.news-meta .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.news-meta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 153, 153, 0.4);
}

.news-meta .btn:hover::before {
    left: 100%;
}

/* Estado sem conteúdo */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    margin: 3rem 0;
}

.no-content p {
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0;
}

/* ===== PAGINAÇÃO INTELIGENTE ===== */

/* Paginação básica */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 4rem 0;
    flex-wrap: wrap;
}

.pagination-item {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pagination-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 153, 153, 0.3);
}

.pagination-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Botões especiais da paginação */
.pagination-item.prev,
.pagination-item.next {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
}

.pagination-item.prev:hover,
.pagination-item.next:hover {
    background: linear-gradient(135deg, #667eea, var(--primary-color));
    transform: translateY(-2px) scale(1.05);
}

/* Separador de páginas */
.pagination-separator {
    color: #6c757d;
    font-weight: 600;
    padding: 0 0.5rem;
    user-select: none;
}

/* Informações da paginação */
.pagination-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 15px;
    color: #495057;
    font-weight: 500;
}

.pagination-info span {
    color: var(--primary-color);
    font-weight: 700;
}

/* Paginação compacta para muitas páginas */
.pagination-compact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-compact .pagination-item {
    padding: 0.6rem 1rem;
    min-width: 45px;
    text-align: center;
}

.pagination-compact .pagination-item.current {
    background: linear-gradient(135deg, #667eea, var(--primary-color));
    color: white;
    font-weight: 800;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.pagination-compact .pagination-item.total {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Seletor de página */
.pagination-selector-container {
    text-align: center;
    margin-top: 2rem;
}

.pagination-selector {
    padding: 0.75rem 1.2rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 153, 153, 0.2);
    min-width: 150px;
    text-align: center;
    outline: none;
}

.pagination-selector:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 153, 153, 0.3);
}

.pagination-selector:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(39, 153, 153, 0.1);
}

.pagination-selector option {
    background: white;
    color: var(--primary-color);
    padding: 0.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .section-header {
        margin: 2rem 0 3rem;
        padding: 1.5rem 1rem;
    }
    
    .section-header h1 {
        font-size: 2.5rem;
    }
    
    .section-header p {
        font-size: 1.1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 2rem 0;
    }
    
    .news-content {
        padding: 1.5rem;
    }
    
    .news-content h3 {
        font-size: 1.3rem;
        min-height: auto;
    }
    
    .pagination {
        gap: 0.5rem;
        margin: 3rem 0;
    }
    
    .pagination-item {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .pagination-compact .pagination-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 40px;
    }
    
    .pagination-selector {
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* Animações de entrada */
.news-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
