/* Estilos para o Sistema de Notícias Real */

/* Container de notícias */
#dynamic-news-container {
    min-height: 400px;
}

/* Item de notícia */
.news-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Header da notícia */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.news-category {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.category-ia { background-color: #e3f2fd; color: #1976d2; }
.category-segurança { background-color: #fff3e0; color: #f57c00; }
.category-conectividade { background-color: #e8f5e8; color: #388e3c; }
.category-smartphones { background-color: #fce4ec; color: #c2185b; }
.category-computadores { background-color: #f3e5f5; color: #7b1fa2; }
.category-tecnologia { background-color: #e0f2f1; color: #00695c; }

.news-time {
    color: #666;
    font-size: 12px;
}

/* Título da notícia */
.news-title {
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #007bff;
    text-decoration: none;
}

/* Descrição da notícia */
.news-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Footer da notícia */
.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.news-source {
    color: #888;
    font-size: 12px;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Filtros de categoria */
.category-filters {
    margin-bottom: 20px;
}

.category-filter {
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-filter.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Estatísticas */
.stat-item {
    text-align: center;
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-item p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Tópicos em alta */
.trending-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-rank {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}

.trending-topic {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.trending-mentions {
    font-size: 12px;
    color: #666;
}

/* Estados de loading e erro */
#loading-indicator {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.error-state h3 {
    color: #dc3545;
    margin-bottom: 10px;
}

.no-news {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

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

.news-item {
    animation: fadeInUp 0.3s ease;
}

/* Responsividade */
@media (max-width: 768px) {
    .news-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .category-filter {
        margin-right: 5px;
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
}

