/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS - Tema Claro */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --background: #ffffff;
    --background-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --card-bg: #ffffff;
    --hover-bg: #f3f4f6;
}

/* Tema Escuro */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --text-color: #ffffff;
    --text-light: #d1d5db;
    --background: #111827;
    --background-light: #1f2937;
    --border-color: #374151;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --card-bg: #1f2937;
    --hover-bg: #374151;
}

/* Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-bottom: 3rem;
}

.header-content {
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Main content */
.main {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

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

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date {
    font-weight: 500;
}

.article-title {
    margin-bottom: 1rem;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--background-light);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Botão de tema */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.theme-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text-color);
    transition: var(--transition);
}

/* Footer */
.footer {
    background: var(--background-light);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-links a {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
}

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

.article-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.article-card:nth-child(even) {
    animation-delay: 0.1s;
}

.article-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Melhorias para legibilidade */
.year-header,
.month-header {
    color: var(--text-color);
}

.stats {
    color: var(--text-light);
}

.section-header h2 {
    color: var(--text-color);
}

.section-header p {
    color: var(--text-light);
}

/* Footer melhorado */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

.footer a {
    color: var(--primary-color);
}

.footer a:hover {
    color: var(--secondary-color);
}

/* Filtros de Busca */
.filters-section {
    padding: 2rem 0;
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.search-box {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.category-filter select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.category-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.category-filter select:hover {
    border-color: var(--primary-color);
}

/* Responsividade dos filtros */
@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .search-box {
        min-width: 100%;
        max-width: 100%;
    }
    
    .category-filter select {
        width: 100%;
    }
}
