/*
Theme Name: Money Blog
Description: A minimal, fast, SEO-friendly classic theme built for AdSense-monetized blogs. Niche-agnostic.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Author: Money Blog
Text Domain: money-blog
*/

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: #222;
    background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1a5fb4; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4em; }

/* ---------- Layout ---------- */
.site-header, .site-footer {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
.site-footer { border-top: 1px solid #e5e5e5; border-bottom: none; margin-top: 2.5rem; }
.header-inner, .footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.site-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.site-title a { color: #111; }
.primary-menu { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-menu a { color: #333; font-weight: 500; }
.footer-links { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { color: #666; font-size: 0.9rem; }

.content-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem;
    align-items: start;
}
main.site-main { min-width: 0; }
aside.sidebar { min-width: 0; }

@media (max-width: 782px) {
    .content-wrap { grid-template-columns: 1fr; }
}

/* ---------- Posts ---------- */
.post-card { margin-bottom: 2.25rem; padding-bottom: 2.25rem; border-bottom: 1px solid #eee; }
.post-card:last-child { border-bottom: none; }
.post-card__title { font-size: 1.5rem; margin: 0 0 0.4rem; }
.post-card__title a { color: #111; }
.post-meta { color: #777; font-size: 0.88rem; margin-bottom: 0.6rem; }
.post-thumb { margin-bottom: 0.75rem; border-radius: 6px; overflow: hidden; }

.single-title { font-size: 2rem; line-height: 1.25; margin-bottom: 0.4rem; }
.post-byline { color: #777; font-size: 0.92rem; margin: 0 0 1rem; }
.post-byline a { color: #444; font-weight: 500; }
.single-content { font-size: 1.08rem; }
.single-content p { margin: 0 0 1.2em; }
.single-content h2 { margin-top: 2em; }
.single-content img { border-radius: 6px; }

.post-author-bio { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid #eee; }
.post-author-bio img { border-radius: 50%; flex-shrink: 0; }
.post-author-bio__text p { margin: 0 0 0.4rem; font-size: 0.95rem; color: #444; }
.post-author-bio__name { font-weight: 700; color: #111 !important; }

/* ---------- Sidebar widgets ---------- */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: #555; margin: 0 0 0.75rem; }

/* ---------- Related posts ---------- */
.related-posts { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid #eee; }
.related-posts__title { font-size: 1.15rem; margin-bottom: 1rem; }
.related-posts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.related-posts__list a { color: #111; font-weight: 500; }

/* ---------- Ad slots ---------- */
.mba-ad-slot { margin: 1.5rem 0; text-align: center; overflow: hidden; }
.mba-ad-header, .mba-ad-footer { margin: 0; padding: 0.5rem 0; }
.mba-ad-in-feed { grid-column: 1 / -1; }

/* ---------- Misc ---------- */
.pagination { display: flex; gap: 1rem; margin-top: 2rem; }
.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] { flex: 1; padding: 0.4rem 0.6rem; }
.screen-reader-text { position: absolute; margin: -1px; padding: 0; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; }
.comments-area { margin-top: 2.5rem; }
