/*
Theme Name: Getwealthy
Theme URI: https://getwealthy.blog
Author: Getwealthy
Description: Canadian Personal Finance Blog Theme
Version: 4.8
License: GNU General Public License v2 or later
Text Domain: getwealthy
*/

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

:root {
  --green-light: #7DC241;
  --green-mid:   #2E8B3A;
  --green-dark:  #1A5C28;
  --dark:        #1a1a1a;
  --cream:       #f4f9f4;
  --border:      #d4e8d4;
  --grey:        #555;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: #fff; color: var(--dark); line-height: 1.7; }
a { color: var(--green-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container    { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px;  margin: 0 auto; padding: 0 24px; }

/* ── HEADER ──────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 70px;
}
.site-logo { text-decoration: none; display: flex; align-items: center; }
.site-logo-img { height: 44px; width: auto; display: block; }
.logo-tagline {
  font-size: 0.6rem; letter-spacing: 0.18em;
  color: #aaa; margin-top: 3px;
  font-family: var(--font-body);
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--dark); padding: 8px 12px; border-radius: 6px;
  transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { color: var(--green-mid); background: var(--cream); text-decoration: none; }

/* ── MOBILE NAV ───────────────────────────────────────── */
.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 1.4rem; cursor: pointer; color: var(--dark); padding: 4px 8px;
}
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .site-nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 24px 20px; gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08); z-index: 199;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: none; margin-top: 8px; }
}

/* ── CATEGORY NAV BAR ─────────────────────────────────── */
.cat-nav {
  background: #fff;
  border-bottom: 2px solid var(--border);
  position: sticky; top: 70px; z-index: 190;
  overflow-x: auto;
}
.cat-nav-inner {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 100%;
}
.cat-nav-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px; gap: 3px;
  text-decoration: none; color: var(--grey);
  font-family: var(--font-body);
  border-bottom: 3px solid transparent;
  border-right: 1px solid var(--border);
  transition: all 0.2s;
  white-space: normal;
  text-align: center;
  border-top: 3px solid transparent;
  box-sizing: border-box;
}
.cat-nav-item:last-child { border-right: none; }
.cat-nav-item:hover {
  color: var(--green-mid);
  background: var(--cream);
  border-bottom-color: var(--green-mid);
  text-decoration: none;
}
.cat-nav-item.active {
  color: var(--green-mid);
  border-bottom-color: var(--green-mid);
  background: #f0faf0;
}
.cat-nav-icon { font-size: 1.5rem; line-height: 1; }
.cat-nav-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; }

/* ── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 11px 24px;
  font-family: var(--font-body); font-size: 0.9rem;
  border-radius: 6px; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
  border: none; letter-spacing: 0.03em;
}
.btn-primary { background: var(--green-mid); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--green-mid); border: 2px solid var(--green-mid); }
.btn-outline:hover { background: var(--green-mid); color: #fff; text-decoration: none; }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn-outline-white:hover { background: #fff; color: var(--green-dark); text-decoration: none; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #f0faf0 0%, #e8f5e8 60%, #f4faf4 100%);
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
}
.hero-label {
  font-size: 0.72rem; letter-spacing: 0.22em;
  color: var(--green-mid); margin-bottom: 20px;
  font-family: var(--font-body); font-weight: 600;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900; line-height: 1.15;
  margin-bottom: 20px; color: var(--dark);
}
.hero h1 em { color: var(--green-mid); font-style: normal; }
.hero p { font-size: 1.05rem; color: var(--grey); line-height: 1.8; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* hero category cards */
.hero-cats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.hero-cat-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 18px 12px;
  text-align: center; text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(46,139,58,0.07);
}
.hero-cat-card:hover {
  border-color: var(--green-mid);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46,139,58,0.14);
  text-decoration: none;
}
.hero-cat-card .cat-icon { font-size: 2.2rem; margin-bottom: 8px; line-height: 1; }
.hero-cat-card .cat-name {
  font-size: 0.75rem; font-weight: 700;
  color: var(--dark); letter-spacing: 0.03em;
  font-family: var(--font-body);
}

/* ── STATS BAR ────────────────────────────────────────── */
.stats-bar { background: var(--green-mid); padding: 32px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 900; color: #fff;
}
.stat-label, .stat-lbl {
  font-size: 0.68rem; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.78);
  font-family: var(--font-body); margin-top: 4px;
}

/* ── SECTIONS ─────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-cream { background: var(--cream); }
.section-dark  { background: var(--dark); color: #fff; }
.section-label {
  font-size: 0.68rem; letter-spacing: 0.2em;
  color: var(--green-mid); margin-bottom: 8px;
  font-family: var(--font-body); font-weight: 600;
}
.section-dark .section-label { color: var(--green-light); }
.section-header {
  display: flex; justify-content: space-between;
  align-items: baseline; margin-bottom: 40px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
}
.section-dark .section-title { color: #fff; }

/* ── CATEGORY CARDS GRID ──────────────────────────────── */
.categories-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.cat-card {
  background: #fff; border: 1px solid var(--border);
  border-top: 4px solid var(--green-mid);
  border-radius: 8px; padding: 24px;
  text-decoration: none; color: var(--dark);
  transition: all 0.2s; display: block;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46,139,58,0.12);
  text-decoration: none; color: var(--dark);
}
.cat-card .icon { font-size: 2.4rem; margin-bottom: 12px; line-height: 1; }
.cat-card .name {
  font-family: var(--font-display); font-size: 1rem;
  font-weight: 700; margin-bottom: 6px; color: var(--dark);
}
.cat-card .desc { font-size: 0.82rem; color: var(--grey); line-height: 1.6; margin-bottom: 10px; }
.cat-card .count {
  font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--green-mid); font-weight: 600;
  font-family: var(--font-body);
}

/* ── POST CARDS ───────────────────────────────────────── */
.featured-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 28px;
  text-decoration: none; color: var(--dark);
  display: block; transition: all 0.2s;
}
.section-dark .post-card { background: #2a2a2a; border-color: #3a3a3a; color: #fff; }
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(46,139,58,0.12);
  border-color: var(--green-mid);
  text-decoration: none; color: var(--dark);
}
.section-dark .post-card:hover { color: #fff; }
.post-card.featured { padding: 36px; }
.cat-badge {
  display: inline-block; background: var(--green-mid);
  color: #fff; padding: 3px 12px; border-radius: 4px;
  font-size: 0.68rem; letter-spacing: 0.1em;
  margin-bottom: 14px; font-family: var(--font-body);
}
.post-card h2 {
  font-family: var(--font-display); font-size: 1.7rem;
  font-weight: 700; line-height: 1.3; margin-bottom: 12px;
}
.post-card h3 {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; line-height: 1.35; margin-bottom: 10px;
}
.post-card p { font-size: 0.9rem; color: var(--grey); line-height: 1.7; margin-bottom: 18px; }
.section-dark .post-card p { color: #aaa; }
.post-meta {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px; font-size: 0.75rem;
  font-family: var(--font-body);
}
.section-dark .post-meta { border-color: #3a3a3a; }
.post-meta .date { color: #aaa; }
.post-meta .read-time,
.post-meta .read { color: var(--green-mid); font-weight: 600; }

/* ── LATEST POSTS LIST ─────────────────────────────────── */
.posts-list { display: grid; gap: 16px; }
.post-list-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 28px 32px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 20px; align-items: center;
  text-decoration: none; color: var(--dark);
  transition: all 0.2s;
}
.post-list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(46,139,58,0.10);
  border-color: var(--green-mid);
  color: var(--dark); text-decoration: none;
}
.post-list-card h2 {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 700; line-height: 1.35; margin-bottom: 10px;
}
.post-list-card p { font-size: 0.92rem; color: var(--grey); line-height: 1.7; }

/* ── NEWSLETTER ───────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 44px 0; text-align: center;
}
.newsletter-section h2 {
  font-family: var(--font-display); font-size: 1.7rem;
  font-weight: 700; color: #fff; margin-bottom: 8px;
}
.newsletter-section p { color: rgba(255,255,255,0.8); font-size: 0.95rem; line-height: 1.6; margin-bottom: 22px; }
.newsletter, .nl-form { display: flex; max-width: 520px; margin: 0 auto; border-radius: 6px; overflow: hidden; }
.newsletter input, .nl-form input {
  flex: 1; padding: 14px 18px;
  font-family: var(--font-body); font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.25); border-right: none;
  background: rgba(255,255,255,0.12); color: #fff; outline: none;
}
.newsletter input::placeholder, .nl-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter button, .nl-form button {
  background: #fff; color: var(--green-dark);
  border: none; padding: 14px 24px;
  font-family: var(--font-body); font-size: 1rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
}
.newsletter button:hover, .nl-form button:hover { background: var(--cream); }

/* ── PAGE SPECIFIC ────────────────────────────────────── */
.roadmap-step {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 28px; padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.roadmap-step:last-child { border-bottom: none; }
.step-num {
  font-family: var(--font-display); font-size: 2.5rem;
  font-weight: 900; color: var(--border);
  text-align: center; line-height: 1;
}
.step-tag {
  background: var(--green-mid); color: #fff;
  padding: 2px 8px; font-size: 0.6rem;
  letter-spacing: 0.08em; margin-top: 8px;
  font-family: var(--font-body); display: inline-block;
  border-radius: 3px;
}
.step-title {
  font-family: var(--font-display); font-size: 1.35rem;
  font-weight: 700; margin-bottom: 10px; color: var(--dark);
}
.step-desc { font-size: 0.95rem; color: var(--grey); line-height: 1.8; }
.about-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 40px;
}
.about-box p { font-size: 1.05rem; color: #333; line-height: 1.85; margin-bottom: 20px; }
.about-box h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 18px; color: var(--green-dark); }
.topics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic-item { font-size: 0.9rem; color: var(--grey); padding: 4px 0; }
.cat-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.cat-filter {
  padding: 6px 18px; border: 1px solid var(--border);
  background: #fff; font-family: var(--font-body);
  font-size: 0.8rem; cursor: pointer;
  text-decoration: none; color: var(--dark);
  transition: all 0.2s; border-radius: 20px;
}
.cat-filter:hover, .cat-filter.active {
  border-color: var(--green-mid); color: var(--green-mid);
  background: #f0faf0; text-decoration: none;
}

/* ── SINGLE POST ──────────────────────────────────────── */
.post-hero {
  background: linear-gradient(135deg, #f0faf0 0%, #e6f4e6 100%);
  padding: 64px 0; border-bottom: 1px solid var(--border);
}
.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 900; line-height: 1.2;
  margin-bottom: 18px; color: var(--dark);
}
.post-body { padding: 64px 0; }
.post-body .content { font-size: 1.05rem; line-height: 1.85; color: #333; }
.post-body h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 40px 0 14px; color: var(--green-dark); }
.post-body h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin: 28px 0 10px; }
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px 24px; }
.post-body li { margin-bottom: 8px; }
.post-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.9rem; }
.post-body th { background: var(--green-dark); color: #fff; padding: 12px 16px; text-align: left; }
.post-body td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.post-body tr:nth-child(even) td { background: var(--cream); }
.disclaimer {
  background: #f0faf0; border-left: 4px solid var(--green-mid);
  padding: 18px 22px; margin: 36px 0;
  font-size: 0.85rem; color: #557755;
  font-style: italic; border-radius: 0 6px 6px 0;
}

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer { background: #111d11; color: rgba(255,255,255,0.75); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-logo {
  font-family: var(--font-display); font-size: 1.6rem;
  font-weight: 900; color: #fff !important; margin-bottom: 10px;
}
.footer-logo span { color: var(--green-light) !important; }
.footer-logo img { height: 40px; width: auto; display: block; margin-bottom: 4px; filter: brightness(0) invert(1); }
.footer-desc { font-size: 0.85rem; color: rgba(255,255,255,0.65); line-height: 1.7; }
.footer-heading { font-size: 0.68rem; letter-spacing: 0.15em; color: var(--green-light); margin-bottom: 14px; }
.footer-links a { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 10px; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: rgba(255,255,255,0.4);
}

/* ── COMMENTS ─────────────────────────────────────────── */
.comments-section {
  background: var(--cream);
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.comments-section .container-sm { max-width: 680px; }

.comments-title {
  font-size: 1.1rem; font-weight: 600;
  color: var(--dark); margin-bottom: 24px;
  font-family: var(--font-body);
}

/* Comment list */
.comment-list { list-style: none; padding: 0; margin: 0 0 36px; }
.comment-list .children { list-style: none; padding-left: 32px; margin-top: 12px; }
.comment-item { margin-bottom: 16px; }
.comment-body {
  background: #fff; border-radius: 10px;
  padding: 16px 20px; border: 1px solid var(--border);
}
.comment-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.comment-author { font-size: 0.85rem; font-weight: 600; color: var(--dark); }
.comment-date   { font-size: 0.78rem; color: var(--grey); }
.comment-awaiting { font-size: 0.75rem; color: #e08000; }
.comment-text p { font-size: 0.92rem; line-height: 1.7; color: var(--dark); margin: 0; }
.comment-reply  { margin-top: 8px; }
.comment-reply-link {
  font-size: 0.78rem; color: var(--green-mid);
  text-decoration: none; font-weight: 600;
}
.comment-avatar { display: none; }

/* Comment form */
#respond { margin-top: 8px; }
.comment-reply-title {
  font-size: 1.1rem; font-weight: 600;
  color: var(--dark); margin-bottom: 16px;
  font-family: var(--font-body);
}
#commentform textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem; color: var(--dark);
  background: #fff; resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#commentform textarea:focus {
  outline: none; border-color: var(--green-mid);
}
.comment-submit-btn {
  margin-top: 12px;
  display: inline-block;
  background: var(--green-mid); color: #fff;
  border: none; border-radius: 8px;
  padding: 11px 28px;
  font-size: 0.9rem; font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer; transition: background 0.2s;
}
.comment-submit-btn:hover { background: var(--green-dark); }

@media (max-width: 600px) {
  .comment-list .children { padding-left: 16px; }
  .comment-body { padding: 14px 16px; }
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid, .featured-grid { grid-template-columns: 1fr; }
  .hero-cats { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .cat-nav-inner { grid-template-columns: repeat(5, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .site-nav a:not(.btn) { display: none; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .hero-cats { grid-template-columns: repeat(3, 1fr); }
  .cat-nav-inner { grid-template-columns: repeat(3, 1fr); }

  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-list-card { grid-template-columns: 1fr; }
  .roadmap-step { grid-template-columns: 1fr; }
}
