/**
 * Estilos Específicos para Notícias
 * Cartório Elinalva Henrique - 2º Ofício de Pacatuba/CE
 */

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.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; }

/* Badge de nova notícia (últimas 24h) */
.news-badge-new {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc2626;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Hover effect no título */
.news-card:hover .news-title {
    color: var(--color-secondary);
    transition: color 0.3s ease;
}

/* Estilos para diferentes fontes */
.news-source.source-tjce {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.news-source.source-cnj {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.news-source.source-anoreg-br,
.news-source.source-anoreg-ce {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.news-source.source-cnb-ce {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.news-source.source-notariado {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

/* Filtros de notícias */
.gallery-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px 0;
}

.gallery-filter-btn {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 63, 49, 0.2);
}

.gallery-filter-btn.active {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(200, 169, 97, 0.3);
}

/* Loading state */
.news-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    font-size: 1.2rem;
    color: var(--color-gray);
}

.news-loading i {
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty state */
.news-empty {
    text-align: center;
    padding: 80px 20px;
    background-color: var(--color-light);
    border-radius: 12px;
}

.news-empty i {
    font-size: 5rem;
    color: var(--color-gray-light);
    margin-bottom: 20px;
}

.news-empty h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.news-empty p {
    color: var(--color-gray);
    font-size: 1.1rem;
}

/* Seção de informações das fontes */
.news-sources-info {
    background: linear-gradient(135deg, var(--color-light) 0%, rgba(200, 169, 97, 0.1) 100%);
    padding: 50px;
    border-radius: 12px;
    margin-top: 60px;
}

.news-sources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.news-source-card {
    background-color: var(--color-white);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--color-secondary);
    transition: all 0.3s ease;
}

.news-source-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.news-source-card h4 {
    color: var(--color-secondary);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.news-source-card p {
    color: var(--color-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.news-source-card small {
    color: var(--color-gray);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Paginação */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding: 30px 0;
}

.news-pagination .btn {
    min-width: 120px;
}

.news-pagination-info {
    padding: 0 20px;
    color: var(--color-gray);
    font-weight: 600;
}

/* Responsividade */
@media (max-width: 992px) {
    .news-sources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-sources-grid {
        grid-template-columns: 1fr;
    }

    .news-sources-info {
        padding: 30px 20px;
    }

    .gallery-filter-btn {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
}

/* Print styles */
@media print {
    .news-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .news-card-footer,
    .gallery-filters,
    .news-pagination {
        display: none;
    }
}
