/*
Theme Name: SpendSmartly
Theme URI: https://spendsmartly.ca/
Author: SpendSmartly
Description: Custom theme for spendsmartly.ca — beginner-friendly Canadian personal finance. Trustworthy feel: deep navy, gold accent, clean light background. v2: colorful photo-forward money magazine homepage (hero, featured guide cards, Budgeting & Spending / Saving Money / Credit & Debt / Big Money Goals photo sections).
Version: 2.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: spendsmartly
*/

:root {
  --navy-700: #16324A;
  --navy-600: #1F4E79;
  --navy-100: #DCE7F2;
  --navy-50: #EEF3F9;
  --gold-500: #C99A2E;
  --gold-600: #A87F1F;
  --bg: #FBFCFE;
  --bg-dark: #F1F5FA;
  --slate-900: #1E293B;
  --slate-600: #475569;
  --slate-400: #94A3B8;
  --white: #FFFFFF;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--slate-900);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--navy-700); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; letter-spacing: -0.01em; color: var(--slate-900); }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #E2E8F0;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--slate-900); }
.brand:hover { text-decoration: none; color: var(--slate-900); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; color: #FFFFFF;
}
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.brand-tag { font-size: 0.7rem; color: var(--slate-400); letter-spacing: 0.06em; font-weight: 600; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.main-nav a { color: var(--slate-600); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--navy-600); text-decoration: none; }
.btn {
  display: inline-block; background: var(--navy-600); color: #FFFFFF !important;
  font-weight: 700; padding: 12px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 1rem; text-decoration: none !important;
}
.btn:hover { background: var(--navy-700); }
.btn-accent { background: var(--gold-500); }
.btn-accent:hover { background: var(--gold-600); }
.btn-outline {
  background: transparent; color: var(--navy-600) !important;
  border: 2px solid var(--navy-600);
}
.btn-outline:hover { background: var(--navy-600); color: #FFFFFF !important; }

/* Hero */
.hero {
  background: linear-gradient(180deg, #E2EBF5 0%, var(--bg) 100%);
  padding: 84px 0 70px; text-align: center;
}
.hero h1 { font-size: 2.9rem; margin-bottom: 0.4em; }
.hero h1 .hl { color: var(--gold-500); }
.hero p.lead { font-size: 1.2rem; color: var(--slate-600); max-width: 640px; margin: 0 auto 1.6em; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badges { margin-top: 26px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: var(--slate-400); font-size: 0.9rem; }
.hero-badges span::before { content: "✓ "; color: var(--navy-600); font-weight: 700; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--white); border-top: 1px solid #E6EBF2; border-bottom: 1px solid #E6EBF2; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: 0.95rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border: 1px solid #E6EBF2;
  border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(31, 78, 121, 0.12); }
.card:hover a.card-title { text-decoration: none; }
.card-kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-600); margin-bottom: 10px; }
.card-title { font-size: 1.15rem; font-weight: 700; color: var(--slate-900); margin-bottom: 10px; line-height: 1.4; }
.card-excerpt { color: var(--slate-600); font-size: 0.95rem; flex: 1; }
.card-meta { margin-top: 14px; font-size: 0.82rem; color: var(--slate-400); }

/* Email band */
.email-band {
  background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
  border-radius: var(--radius);
  padding: 44px; text-align: center; color: #FFFFFF;
}
.email-band h2 { margin-bottom: 0.4em; color: #FFFFFF; }
.email-band p { color: #DCE7F2; max-width: 560px; margin: 0 auto 1.4em; }
.ss-form-slot { max-width: 520px; margin: 0 auto; text-align: left; }

/* Article */
.article-hero { padding: 56px 0 8px; }
.article-hero h1 { font-size: 2.2rem; max-width: 800px; }
.article-meta { color: var(--slate-400); font-size: 0.9rem; margin: 14px 0 30px; }
.article-body { background: var(--white); border: 1px solid #E6EBF2; border-radius: var(--radius); padding: 44px; box-shadow: 0 2px 10px rgba(30, 41, 59, 0.05); }
.article-body h2 { margin-top: 1.8em; padding-top: 0.4em; border-top: 1px solid #E6EBF2; }
.article-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin-bottom: 0.5em; }
.disclosure-box {
  background: #FFF7E8; border: 1px solid #F3DFAE; border-radius: 10px;
  padding: 16px 20px; font-size: 0.88rem; color: var(--slate-600); margin: 0 0 28px;
}

/* Footer */
.site-footer { background: var(--slate-900); color: #CBD5E1; padding: 46px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-400); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #CBD5E1; font-size: 0.93rem; }
.footer-grid a:hover { color: var(--gold-500); }
.footer-grid p { color: var(--slate-400); font-size: 0.93rem; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 22px; font-size: 0.82rem; color: var(--slate-400); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .main-nav ul { gap: 14px; }
  .article-body { padding: 26px; }
}

/* ===== v2: colorful photo-forward money magazine homepage ===== */

.hero-photo {
  background-size: cover; background-position: center 65%;
  min-height: 78vh; display: flex; align-items: stretch;
  position: relative;
}
.hero-photo-overlay {
  background: linear-gradient(180deg, rgba(22, 50, 74, 0.62) 0%, rgba(22, 50, 74, 0.30) 45%, rgba(22, 50, 74, 0.78) 100%);
  width: 100%; display: flex; align-items: center;
  padding: 110px 0 90px; text-align: center;
}
.hero-kicker {
  color: var(--gold-500); font-weight: 800; font-size: 0.8rem;
  letter-spacing: 0.22em; margin-bottom: 18px;
}
.hero-photo h1 { color: #FFFFFF; font-size: 3.4rem; margin-bottom: 0.4em; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.hero-photo h1 .hl { color: var(--gold-500); }
.hero-photo p.lead { color: #EEF3F9; font-size: 1.25rem; max-width: 660px; margin: 0 auto 1.8em; text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.hero-photo .hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-trust { color: #DCE7F2; font-size: 0.9rem; margin-top: 26px; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.btn-outline-light {
  background: rgba(255,255,255,0.12); color: #FFFFFF !important;
  border: 2px solid #FFFFFF; backdrop-filter: blur(4px);
}
.btn-outline-light:hover { background: #FFFFFF; color: var(--navy-700) !important; }

.section-kicker {
  color: var(--gold-600); font-weight: 800; font-size: 0.75rem;
  letter-spacing: 0.2em; margin: 0 0 10px; text-transform: uppercase;
}
.section-head > div { max-width: 70%; }

.mag-grid { display: grid; gap: 22px; }
.mag-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mag-grid-2 { grid-template-columns: repeat(2, 1fr); }

.mag-card {
  position: relative; display: block; border-radius: var(--radius);
  background-size: cover; background-position: center;
  min-height: 300px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mag-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(31, 78, 121, 0.28); text-decoration: none; }
.mag-card-tall { min-height: 380px; }
.mag-card-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,50,74,0.05) 30%, rgba(22,50,74,0.85) 100%);
  transition: background 0.18s ease;
}
.mag-card:hover .mag-card-shade {
  background: linear-gradient(180deg, rgba(22,50,74,0.0) 20%, rgba(22,50,74,0.90) 100%);
}
.mag-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px; display: flex; flex-direction: column; gap: 6px;
}
.mag-kicker {
  color: var(--gold-500); font-weight: 800; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.mag-title { color: #FFFFFF; font-size: 1.35rem; font-weight: 800; line-height: 1.3; text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.mag-excerpt { color: #E7EEF6; font-size: 0.92rem; line-height: 1.55; }

@media (max-width: 900px) {
  .mag-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .mag-grid-3, .mag-grid-2 { grid-template-columns: 1fr; }
  .hero-photo { min-height: 66vh; }
  .hero-photo-overlay { padding: 80px 0 64px; }
  .hero-photo h1 { font-size: 2.3rem; }
}
