/*
Theme Name: Cash 4 My Home Blog
Theme URI: https://cash4myhome.com/blog/
Author: Cash 4 My Home
Description: Lightweight editorial theme matching the Cash 4 My Home website.
Version: 1.0.0
Text Domain: c4mh-blog
*/

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --navy: #111827;
  --slate: #475569;
  --pale: #eff6ff;
  --line: #e2e8f0;
  --white: #ffffff;
  --green: #22c55e;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(226,232,240,.9);
  backdrop-filter: blur(12px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); font-size: 1.2rem; font-weight: 800; white-space: nowrap; }
.brand:hover { color: var(--navy); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--white); background: var(--blue); border-radius: 10px; box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.brand-mark svg { width: 22px; height: 22px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 23px; font-size: .94rem; font-weight: 650; }
.site-nav a { color: #334155; }
.site-nav a:hover, .site-nav .current { color: var(--blue); }
.nav-cta { padding: 11px 18px; color: var(--white) !important; background: var(--blue); border-radius: 999px; box-shadow: 0 8px 20px rgba(37,99,235,.2); }
.nav-cta:hover { background: var(--blue-dark); }

.blog-hero { overflow: hidden; position: relative; padding: 82px 0 76px; color: var(--white); background: linear-gradient(120deg,#0f172a 0%,#1e3a8a 58%,#2563eb 100%); }
.blog-hero::after { content: ""; position: absolute; width: 480px; height: 480px; right: -130px; top: -240px; border-radius: 50%; background: rgba(255,255,255,.09); }
.eyebrow { display: inline-flex; padding: 7px 12px; margin-bottom: 18px; color: #dbeafe; background: rgba(59,130,246,.2); border: 1px solid rgba(147,197,253,.35); border-radius: 999px; font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.blog-hero h1 { max-width: 790px; margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.55rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -.035em; }
.blog-hero p { max-width: 690px; margin: 0; color: #dbeafe; font-size: 1.12rem; }

.content-section { padding: 66px 0 84px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -.025em; }
.section-head p { margin: 0; color: var(--slate); }
.post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; min-height: 100%; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(15,23,42,.055); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg,#dbeafe,#bfdbfe 45%,#60a5fa); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .card-media img { transform: scale(1.03); }
.card-placeholder { color: rgba(30,64,175,.72); font-size: 2.6rem; font-weight: 900; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; color: #64748b; font-size: .78rem; font-weight: 650; }
.post-meta a { color: var(--blue); }
.post-card h2 { margin: 0 0 11px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.02em; }
.post-card h2 a { color: var(--navy); }
.post-card h2 a:hover { color: var(--blue); }
.excerpt { margin: 0 0 20px; color: var(--slate); font-size: .94rem; }
.read-more { margin-top: auto; font-size: .9rem; font-weight: 750; }
.pagination { margin-top: 42px; display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers { padding: 9px 14px; color: #334155; background: var(--white); border: 1px solid var(--line); border-radius: 9px; }
.pagination .current { color: var(--white); background: var(--blue); border-color: var(--blue); }
.empty-state { grid-column: 1/-1; padding: 54px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

.article-shell { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 84px; }
.article-header { margin-bottom: 35px; text-align: center; }
.article-header h1 { margin: 14px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.35rem, 6vw, 4.15rem); line-height: 1.06; letter-spacing: -.04em; }
.article-header .post-meta { justify-content: center; }
.featured-image { overflow: hidden; margin: 0 0 36px; border-radius: 22px; box-shadow: var(--shadow); }
.article-content { color: #27364a; font-family: Georgia, "Times New Roman", serif; font-size: 1.13rem; }
.article-content > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.article-content h2, .article-content h3 { margin-top: 1.8em; color: var(--navy); font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.2; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.35rem; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote { padding: 20px 24px; color: #1e3a8a; background: var(--pale); border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; }
.article-content ul, .article-content ol { padding-left: 1.5em; }
.article-content .wp-block-image { max-width: 820px; }

.article-cta { margin-top: 54px; padding: 34px; color: var(--white); text-align: center; background: linear-gradient(135deg,#1e3a8a,#2563eb); border-radius: 22px; box-shadow: var(--shadow); }
.article-cta h2 { margin: 0 0 8px; font-size: 1.7rem; }
.article-cta p { margin: 0 0 20px; color: #dbeafe; }
.button { display: inline-block; padding: 13px 22px; color: var(--white); background: var(--green); border-radius: 10px; font-weight: 800; box-shadow: 0 10px 22px rgba(34,197,94,.2); }
.button:hover { color: var(--white); background: #16a34a; }

.site-footer { padding: 54px 0 28px; color: #cbd5e1; background: #0f172a; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 42px; }
.site-footer .brand { color: var(--white); }
.site-footer p { color: #94a3b8; }
.site-footer h2 { margin: 0 0 12px; color: var(--white); font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 8px 0; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { margin-top: 38px; padding-top: 22px; color: #64748b; border-top: 1px solid #243044; font-size: .85rem; }
.not-found { min-height: 55vh; display: grid; place-items: center; padding: 70px 20px; text-align: center; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; padding: 14px 0; }
  .site-nav { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 3px; }
  .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .wrap, .article-shell { width: min(100% - 28px, 1160px); }
  .site-nav { gap: 16px; }
  .site-nav a:not(.nav-cta):nth-child(2), .site-nav a:not(.nav-cta):nth-child(3) { display: none; }
  .blog-hero { padding: 58px 0 54px; }
  .content-section { padding: 44px 0 62px; }
  .post-grid, .footer-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: 6px; }
  .article-shell { padding-top: 46px; }
  .article-cta { padding: 28px 20px; }
}
