/* ==========================================================================
   Home Money - main.css
   ========================================================================== */

:root {
    --color-primary: #0a7c3a;
    --color-primary-dark: #065c2a;
    --color-accent: #f4b400;
    --color-bg: #ffffff;
    --color-surface: #f7f8fa;
    --color-text: #1a1d23;
    --color-muted: #5b6473;
    --color-border: #e5e7eb;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 6px 18px rgba(0,0,0,.08);
    --container: 1140px;
    --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Poppins', var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-heading);
    line-height: 1.25;
    margin: 0 0 .6em;
    color: var(--color-text);
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px,1px,1px,1px);
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 20px;
}
.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.site-title a { color: var(--color-primary); text-decoration: none; }
.site-description { font-size: .85rem; color: var(--color-muted); margin: 0; }

/* Menu */
.main-navigation { display: flex; align-items: center; }
.primary-menu {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-menu a {
    color: var(--color-text);
    font-weight: 500;
    padding: 8px 4px;
}
.primary-menu a:hover { color: var(--color-primary); text-decoration: none; }
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: transform .25s, opacity .25s;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 12px 20px;
        border-top: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
    }
    .primary-menu li { border-bottom: 1px solid var(--color-border); }
    .primary-menu li:last-child { border-bottom: 0; }
    .primary-menu a { display: block; padding: 14px 0; }
    .main-navigation.toggled .primary-menu { display: flex; }
    .site-header__inner { position: relative; }
}

/* Conteúdo */
.site-content { padding: 40px 0 60px; }
.content-area { max-width: 820px; margin: 0 auto; }

.page-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
}
.page-title { margin: 0; }

/* Card de post */
.posts-list {
    display: grid;
    gap: 28px;
}
.post-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-card__thumb img { width: 100%; height: auto; }
.post-card__body { padding: 22px 24px; }
.entry-title { margin-top: 0; }
.entry-title a { color: var(--color-text); }
.entry-title a:hover { color: var(--color-primary); text-decoration: none; }
.entry-meta { font-size: .85rem; color: var(--color-muted); margin-bottom: 10px; }
.entry-summary { color: var(--color-muted); }
.entry-footer { margin-top: 14px; }

/* Single / Page */
.single-post, .page-article {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}
.entry-thumbnail { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2, .entry-content h3 { margin-top: 1.5em; }
.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    background: var(--color-surface);
    padding: 14px 20px;
    margin: 24px 0;
    color: var(--color-muted);
}
.entry-content code {
    background: var(--color-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .92em;
}
.entry-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px;
    border-radius: var(--radius);
    overflow-x: auto;
}

/* Botão */
.button, button.button, input[type="submit"] {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .1s;
}
.button:hover, input[type="submit"]:hover {
    background: var(--color-primary-dark);
    color: #fff;
    text-decoration: none;
}
.button:active { transform: translateY(1px); }

/* Paginação */
.pagination, .post-navigation, .comments-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 36px 0;
}
.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.page-numbers {
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
}
.page-numbers.current,
.page-numbers:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    text-decoration: none;
}

/* Formulários */
input[type="text"], input[type="email"], input[type="url"],
input[type="search"], input[type="password"], textarea, select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    border-color: var(--color-primary);
}

.search-form {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.search-form .search-field { flex: 1; }

/* Comentários */
.comments-area {
    margin-top: 40px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
}
.comment-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}
.comment-list .comment {
    border-top: 1px solid var(--color-border);
    padding: 18px 0;
}
.comment-list .comment:first-child { border-top: 0; }
.comment-author { font-weight: 600; }
.comment-meta { font-size: .85rem; color: var(--color-muted); margin-bottom: 8px; }

/* 404 / no-results */
.error-404, .no-results {
    text-align: center;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 48px 24px;
}
.error-actions { margin-top: 18px; }

/* Footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 36px 0;
    margin-top: 60px;
}
.site-footer a { color: #fff; }
.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    text-align: center;
}
.footer-menu {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.site-info { margin: 0; font-size: .9rem; }

/* Widgets */
.widget {
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.widget-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 8px;
}
