/* ============================================================
   RetireFlexi Blog — shared stylesheet
   All pages in /blog/ link to this file.
   ============================================================ */

:root {
  --bg:     #0f1117;
  --bg2:    #161b27;
  --bg3:    #1e2535;
  --surface:#252d3d;
  --border: #3a4560;
  --text:   #e8eaf0;
  --text-muted: #8892a4;
  --text-dim:   #5a6480;
  --gold:       #c9a84c;
  --gold-light: #e8c96a;
  --gold-dim:   #7a6030;
  --green:  #4caf82;
  --red:    #e85050;
  --blue:   #5090e8;
  --font-display: 'Playfair Display', serif;
  --font-body:    'DM Sans', sans-serif;
  --radius:    10px;
  --radius-sm:  6px;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────────────────── */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  height: 60px;
}

.blog-nav .brand {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.blog-nav .brand:hover { color: var(--gold-light); }

.blog-nav .nav-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.blog-nav .nav-blog {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.blog-nav .nav-blog:hover { color: var(--text); }
.blog-nav .nav-blog.active { color: var(--gold); }

.blog-nav .spacer { flex: 1; }

.blog-nav .nav-back {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  transition: all .15s;
  white-space: nowrap;
}
.blog-nav .nav-back:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ── BLOG INDEX ──────────────────────────────────────────── */
.index-wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}

.index-header { margin-bottom: 52px; }

.index-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.index-header p {
  color: var(--text-muted);
  font-size: .95rem;
  max-width: 520px;
  line-height: 1.7;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}
.post-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}

.post-card-tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
}

.post-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}

.post-card-meta {
  font-size: .75rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.post-card-read { color: var(--gold); font-weight: 600; }

/* ── POST PAGE ───────────────────────────────────────────── */
.post-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 110px;
}

.post-tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.post-wrap h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 18px;
  color: var(--text);
}

.post-meta {
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

/* Body content */
.post-body { color: var(--text-muted); }

.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin: 44px 0 14px;
  line-height: 1.3;
}

.post-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}

.post-body p { margin-bottom: 20px; }

.post-body strong { color: var(--text); font-weight: 600; }

.post-body em { color: var(--text); font-style: italic; }

.post-body ul,
.post-body ol {
  margin: 0 0 20px 22px;
}
.post-body li { margin-bottom: 7px; }

.post-body a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  transition: color .15s;
}
.post-body a:hover { color: var(--gold-light); border-bottom-color: var(--gold); }

/* Callout box */
.callout {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: .9rem;
  line-height: 1.7;
}
.callout strong { color: var(--text); }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: .88rem;
}
.data-table th {
  text-align: left;
  padding: 11px 16px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }

/* CTA block */
.post-cta {
  margin: 52px 0 0;
  padding: 36px 32px;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.post-cta h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.post-cta p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.btn-cta {
  display: inline-block;
  background: var(--gold);
  color: #0f1117;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  transition: background .15s;
}
.btn-cta:hover { background: var(--gold-light); color: #0f1117; border: none; }

/* Disclaimer */
.disclaimer {
  margin-top: 52px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── SHARED FOOTER ───────────────────────────────────────── */
.blog-footer {
  text-align: center;
  padding: 36px 24px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-dim);
}
.blog-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.blog-footer a:hover { color: var(--gold); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .post-wrap  { padding: 32px 16px 70px; }
  .post-wrap h1 { font-size: 1.55rem; }
  .index-wrap { padding: 40px 16px 70px; }
  .index-header h1 { font-size: 1.7rem; }
  .data-table { font-size: .8rem; }
  .data-table th,
  .data-table td { padding: 9px 10px; }
}

/* btn-cta sits inside .post-body so .post-body a overrides its color — reset it */
.post-body .btn-cta,
.post-body .btn-cta:hover {
  color: #0f1117;
  border-bottom: none;
}

/* Author bio */
.author-bio {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  background: rgba(212,175,55,0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.author-bio p { margin: 0; }
.author-bio strong { color: var(--text); }
