/* ===== MELHORIAS PARA PÁGINA DE NOTÍCIAS ===== */

/* Loading states */
.news-loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton-loading {
    animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Hover effects for news cards */
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border-left-width: 6px !important;
}

.news-card:hover .news-image-placeholder {
    background: linear-gradient(135deg, #004d13 0%, #1b5e20 100%) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .search-filters-container .row {
        flex-direction: column;
    }
    
    .search-filters-container .col-md-8,
    .search-filters-container .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .news-card .row {
        flex-direction: column;
    }
    
    .news-card .news-image-placeholder {
        height: 120px;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .pagination-modern {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination-modern .page-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Acessibilidade */
.news-card:focus-within {
    outline: 2px solid #006218;
    outline-offset: 2px;
}

.btn:focus,
.form-control:focus,
.pagination-modern .page-link:focus {
    outline: 2px solid #006218;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 98, 24, 0.2);
}

/* Estados vazios */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Melhorias de performance */
.news-card {
    will-change: transform, box-shadow;
}

.news-image-placeholder {
    will-change: background;
}

/* Print styles */
@media print {
    .search-filters-container,
    .pagination-modern,
    .news-actions {
        display: none !important;
    }
    
    .news-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem !important;
    }
}

/* Estados de erro */
.error-state {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border-left: 4px solid #f44336;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.error-state i {
    color: #f44336;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Melhorias de contraste para acessibilidade */
.text-muted {
    color: #495057 !important;
}

.badge {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Estados de carregamento para busca */
.search-loading .form-control {
    background-image: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="8" cy="8" r="3" fill="none" stroke="%23006218" stroke-width="2"><animate attributeName="r" values="3;6;3" dur="1s" repeatCount="indefinite"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
}
