/*
Theme Name: FinanceFlare
Theme URI: https://finance.robsonalves.com.br
Author: AutoBlog
Description: Professional personal finance blog theme optimized for AdSense
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: financeflare
*/

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

:root {
    --navy:   #0d1b2a;
    --teal:   #1a3a4a;
    --gold:   #f0a500;
    --gold2:  #ffc93c;
    --white:  #ffffff;
    --gray:   #f4f6f9;
    --text:   #2c3e50;
    --muted:  #6c757d;
    --accent: #1e6b8c;
    --font:   'Inter', 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }

/* ─── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p  { margin-bottom: 1rem; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Navigation ───────────────────────────────────────────────────────────── */
.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 24px;
}

.site-logo {
    font-size: 1.6rem;
    font-weight: 800;
    font-style: italic;
    color: var(--white);
    letter-spacing: -0.5px;
}
.site-logo span { color: var(--gold); }

.primary-nav { display: flex; align-items: center; gap: 8px; list-style: none; }
.primary-nav a {
    color: rgba(255,255,255,.85);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: .95rem;
    transition: all .2s;
}
.primary-nav a:hover { color: var(--white); background: rgba(255,255,255,.1); }

.nav-cta {
    background: var(--gold);
    color: var(--navy) !important;
    padding: 10px 22px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: .9rem !important;
}
.nav-cta:hover { background: var(--gold2) !important; color: var(--navy) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--white); margin: 5px 0; border-radius: 2px; transition: .3s;
}

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--navy);
}

.hero-bg {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1486325212027-8081e485255e?w=1600&q=80') center/cover no-repeat;
    filter: brightness(.35) saturate(1.2);
}

.hero-chart {
    position: absolute; inset: 0; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 600' preserveAspectRatio='none'%3E%3Cpolyline points='0,500 150,420 300,460 450,350 600,300 750,200 900,150 1050,80 1200,30' fill='none' stroke='%23f0a500' stroke-width='3' stroke-opacity='0.5'/%3E%3Cpolyline points='0,550 200,500 400,480 600,400 800,320 1000,220 1200,120' fill='none' stroke='%23ffc93c' stroke-width='1.5' stroke-opacity='0.3'/%3E%3C/svg%3E") center/cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px 24px;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 24px;
    text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.hero-content h1 span { text-decoration: underline; text-decoration-color: var(--gold); }

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.85);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all .25s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: var(--white); color: var(--white); }

/* ─── Stats Bar ────────────────────────────────────────────────────────────── */
.stats-bar {
    background: var(--teal);
    padding: 28px 0;
}
.stats-inner {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}
.stat-item { color: var(--white); }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--gold); display: block; }
.stat-label { font-size: .85rem; opacity: .8; text-transform: uppercase; letter-spacing: 1px; }

/* ─── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: var(--gray); }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { margin-bottom: 12px; }
.section-title p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ─── Post Grid ────────────────────────────────────────────────────────────── */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.14); }

.post-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-img-placeholder {
    font-size: 3rem;
    opacity: .4;
}

.post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }

.post-category {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.4;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt { color: var(--muted); font-size: .92rem; flex: 1; margin-bottom: 16px; }

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: .85rem;
    color: var(--muted);
}
.read-more {
    color: var(--accent);
    font-weight: 600;
    font-size: .9rem;
}
.read-more:hover { color: var(--gold); }

/* ─── Single Post ──────────────────────────────────────────────────────────── */
.post-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    padding: 80px 0 60px;
    text-align: center;
    color: var(--white);
}
.post-hero .post-category { margin-bottom: 20px; }
.post-hero h1 { color: var(--white); max-width: 800px; margin: 0 auto 20px; font-size: clamp(1.6rem,4vw,2.8rem); }
.post-meta { color: rgba(255,255,255,.7); font-size: .9rem; }

.post-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    padding: 60px 0;
    align-items: start;
}

.post-content {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    font-size: 1.05rem;
    line-height: 1.9;
}
.post-content h2 { margin: 32px 0 16px; color: var(--navy); border-left: 4px solid var(--gold); padding-left: 16px; }
.post-content h3 { margin: 24px 0 12px; color: var(--teal); }
.post-content ul, .post-content ol { margin: 16px 0 16px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content strong { color: var(--navy); }
.post-content a { color: var(--accent); border-bottom: 1px solid; }

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 24px; }

.widget {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
}

.widget ul { list-style: none; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: .9rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); }
.widget ul li a:hover { color: var(--gold); }

.adbox {
    background: linear-gradient(135deg, var(--gray), #e8edf2);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
}

/* ─── Newsletter ───────────────────────────────────────────────────────────── */
.newsletter {
    background: linear-gradient(135deg, var(--navy), var(--teal));
    padding: 70px 0;
    text-align: center;
    color: var(--white);
}
.newsletter h2 { color: var(--white); margin-bottom: 12px; }
.newsletter p { color: rgba(255,255,255,.8); margin-bottom: 32px; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input {
    flex: 1;
    min-width: 220px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.newsletter-form button {
    padding: 14px 28px;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s;
}
.newsletter-form button:hover { background: var(--gold2); }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); }

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
}

.footer-brand .site-logo { font-size: 1.4rem; margin-bottom: 16px; display: block; }
.footer-brand p { font-size: .9rem; line-height: 1.7; }

.footer-col h4 {
    color: var(--white);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: .9rem; }
.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--gold); }

.disclaimer {
    background: rgba(0,0,0,.3);
    padding: 16px 0;
    font-size: .78rem;
    color: rgba(255,255,255,.4);
    text-align: center;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .primary-nav { display: none; flex-direction: column; }
    .primary-nav.open { display: flex; position: absolute; top: 70px; left: 0; right: 0; background: var(--navy); padding: 16px; }
    .nav-toggle { display: block; }

    .post-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }

    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .section { padding: 50px 0; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .stats-inner { gap: 32px; }
}
