/*
Theme Name: TheTraderPod
Theme URI: https://thetraderpod.com
Author: Vin Castillo
Author URI: https://thetraderpod.com
Description: TheTraderPod - Trading Education & Community Hub
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: traderpod
*/

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  /* Blues */
  --blue-900: #0a1628;
  --blue-800: #0d1f3c;
  --blue-700: #0f2d5a;
  --blue-600: #1a3f7a;
  --blue-500: #1e5aad;
  --blue-400: #2b76d4;
  --blue-300: #4a9af0;
  --blue-200: #8dc3f8;
  --blue-100: #dbeeff;

  /* Accent */
  --accent: #2b76d4;
  --accent-glow: rgba(43, 118, 212, 0.25);
  --accent-hover: #4a9af0;

  /* Light mode */
  --bg: #f4f8ff;
  --bg-card: #ffffff;
  --bg-nav: rgba(255,255,255,0.92);
  --text-primary: #0a1628;
  --text-secondary: #3a5070;
  --text-muted: #6b88a8;
  --border: #d0e0f4;
  --shadow: 0 2px 16px rgba(10,22,40,0.08);
  --shadow-card: 0 4px 24px rgba(10,22,40,0.10);

  /* Typography */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --radius: 10px;
  --radius-lg: 18px;
  --nav-h: 68px;
}

[data-theme="dark"] {
  --bg: #080f1e;
  --bg-card: #0d1a30;
  --bg-nav: rgba(8,15,30,0.95);
  --text-primary: #e8f2ff;
  --text-secondary: #8db8e8;
  --text-muted: #4a7aaa;
  --border: #1a3050;
  --shadow: 0 2px 16px rgba(0,0,0,0.4);
  --shadow-card: 0 4px 32px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ─── NAV ────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo span {
  color: var(--accent);
}

.logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
  box-shadow: 0 0 8px var(--accent);
}

#primary-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

#primary-navigation a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  display: block;
}

#primary-navigation a:hover,
#primary-navigation .current-menu-item > a {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Community nav CTA */
#primary-navigation .nav-community > a {
  background: var(--accent);
  color: #fff;
  padding: 7px 18px;
  font-weight: 600;
}

#primary-navigation .nav-community > a:hover {
  background: var(--accent-hover);
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-size: 1rem;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
}

/* ─── LAYOUT ─────────────────────────────────────────── */
.site-content {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-800) 50%, #0a1e40 100%);
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(43,118,212,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(43,118,212,0.15);
  border: 1px solid rgba(43,118,212,0.35);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-200);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--blue-300);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--blue-300);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 780px;
  margin: 0 auto 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue-300);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--blue-200);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(43,118,212,0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(43,118,212,0.5);
}

.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--blue-200);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── SECTIONS ───────────────────────────────────────── */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.65;
}

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

.section-header.center {
  text-align: center;
}

.section-header.center .section-subtitle {
  margin: 0 auto;
}

/* ─── CARDS ──────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(43,118,212,0.12);
  border-color: var(--accent);
}

.card-icon {
  width: 46px; height: 46px;
  background: var(--accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── COMMUNITY SECTION ──────────────────────────────── */
.community-banner {
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 100%);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  border: 1px solid rgba(43,118,212,0.3);
  box-shadow: 0 0 60px rgba(43,118,212,0.12);
  position: relative;
  overflow: hidden;
}

.community-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(43,118,212,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.community-banner-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.community-banner-text p {
  color: var(--blue-200);
  font-size: 0.97rem;
  max-width: 440px;
}

.community-banner .btn-primary {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── POSTS / BLOG ───────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.post-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 3rem;
}

.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 22px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.post-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 100px;
}

.post-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.post-card p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── SINGLE POST ────────────────────────────────────── */
.single-post-header {
  background: linear-gradient(160deg, var(--blue-900), var(--blue-800));
  padding: 80px 24px 60px;
  text-align: center;
}

.single-post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  max-width: 760px;
  margin: 0 auto 16px;
}

.post-content {
  padding: 60px 0;
}

.post-content .container-sm {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin: 40px 0 14px; color: var(--text-primary); }
.post-content h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: 32px 0 12px; color: var(--text-primary); }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 0 0 18px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ─── SIDEBAR ────────────────────────────────────────── */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ─── FOOTER ─────────────────────────────────────────── */
#site-footer {
  background: var(--blue-900);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 60px 0 32px;
  color: var(--blue-200);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 32px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
  margin-top: 14px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue-300); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

.footer-disclaimer {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.2);
  max-width: 560px;
  line-height: 1.5;
}

/* ─── PAGE TEMPLATES ─────────────────────────────────── */
.page-header {
  background: linear-gradient(160deg, var(--blue-900), var(--blue-800));
  padding: 80px 24px 60px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Forum style override (bbPress) */
#bbpress-forums {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
}

/* ─── UTILITIES ──────────────────────────────────────── */
.text-accent { color: var(--accent); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  #primary-navigation {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }

  #primary-navigation.open { display: block; }

  #primary-navigation ul {
    flex-direction: column;
    gap: 4px;
  }

  .menu-toggle { display: flex; }
  .hero { padding: 70px 20px 56px; }
  .hero-stats { gap: 28px; }
  .community-banner { padding: 36px 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
}
