/* ===========================================
   Finanças por Profissão BR - Stylesheet
   =========================================== */

/* Variables */
:root {
    --primary: #1e3a5f;
    --primary-dark: #0f2744;
    --accent: #00a878;
    --accent-light: #e8f5f0;
    --text: #333333;
    --text-light: #666666;
    --bg: #fafafa;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--primary);
}

/* Homepage Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,168,120,0.4);
}

/* Sections */
section {
    padding: 4rem 2rem;
}

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

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.card-meta {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Featured Articles */
.featured {
    background: var(--white);
    padding: 4rem 2rem;
}

.featured-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.article-item:hover {
    background: var(--accent-light);
}

.article-item .tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-item h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.article-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: var(--accent-light);
    padding: 4rem 2rem;
    text-align: center;
}

.cta-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

footer a {
    color: var(--accent);
}

footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ===========================================
   Article Page Styles
   =========================================== */

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--white);
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--accent);
}

.article-header {
    margin-bottom: 2.5rem;
}

.article-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-size: 1.35rem;
    color: var(--primary);
    margin: 2rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: var(--primary);
}

.article-content a {
    color: var(--accent);
    text-decoration: underline;
}

/* Highlight Box */
.highlight-box {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    text-align: center;
}

.cta-box h3 {
    margin-bottom: 0.75rem;
}

.cta-box a {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 1rem;
    text-decoration: none;
}

.cta-box a:hover {
    background: #008f6a;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

tr:hover {
    background: var(--bg);
}

/* FAQ Section */
.faq {
    margin: 3rem 0;
}

.faq-item {
    background: var(--bg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Step Boxes */
.step-box {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.step-box h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    background: var(--accent);
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Investment Cards */
.investment-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.investment-card h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.risk-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.risk-low {
    background: #d4edda;
    color: #155724;
}

.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.risk-high {
    background: #f8d7da;
    color: #721c24;
}

/* Article Navigation */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.article-nav a {
    flex: 1;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.article-nav a:hover {
    background: var(--accent-light);
}

.article-nav span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

/* 404 Page */
.error-404 {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    nav {
        display: none;
    }

    .article-item {
        flex-direction: column;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-container {
        padding: 1rem;
    }

    .header-inner {
        padding: 1rem;
    }

    section {
        padding: 2rem 1rem;
    }
}
