/*
Theme Name: Desk Lamp
Theme URI: https://learntotradestocks.org
Author: LearnToTradeStocks
Description: A warm, rounded, teacher-toned theme for beginner stock-market education. Built for a numbered onboarding path, low visual density, and clean AdSense + affiliate broker infrastructure.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: desklamp
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #eef1ef;
  --panel: #ffffff;
  --line: #d7ded9;
  --ink: #1e2a28;
  --muted: #5c6b66;
  --accent: #2b6f77;
  --accent2: #c98a1f;

  --font-body: ui-rounded, "SF Pro Rounded", "Segoe UI", sans-serif;
  --font-display: ui-serif, "New York", Georgia, "Times New Roman", serif;

  --radius-card: 16px;
  --radius-pill: 99px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent2);
  font-weight: 700;
  font-size: 0.78rem;
}

/* =========================================================
   Buttons
   ========================================================= */
.cta {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.cta:hover { text-decoration: none; transform: translateY(-1px); }

.cta.primary {
  background: var(--accent);
  color: #fff;
}
.cta.primary:hover { opacity: 0.92; }

.cta.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.cta.ghost:hover { border-color: var(--accent); color: var(--accent); }

.cta.small { padding: 0.55em 1.2em; font-size: 0.85rem; }

/* =========================================================
   Nav
   ========================================================= */
.site-header { padding: 24px 0 8px; }

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

.brand, .brand a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  text-transform: lowercase;
}

.links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px;
}

.links a {
  display: inline-block;
  padding: 0.55em 1.1em;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.links a:hover,
.links a.current-menu-item-link { background: var(--bg); color: var(--accent); }
.links a { white-space: nowrap; }

.links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.links li { display: inline-block; }
.links .current-menu-item > a { background: var(--bg); color: var(--accent); }

.nav-toggle { display: none; }

@media (max-width: 640px) {
  .links { flex-wrap: wrap; justify-content: center; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  text-align: center;
  max-width: 760px;
  margin: 56px auto 64px;
  padding: 0 24px;
}
.hero .eyebrow { margin-bottom: 18px; }
.hero h1, .hero h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin-bottom: 20px;
}
.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   Numbered path
   ========================================================= */
.path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 0 56px;
}
@media (max-width: 900px) {
  .path { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .path { grid-template-columns: 1fr; }
}

.path-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
}
.path-step .num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-body);
  margin-bottom: 14px;
}
.path-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.path-step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* =========================================================
   Ad slots
   ========================================================= */
.ad-slot {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 56px;
  overflow: hidden;
  padding: 12px;
}
.ad-slot.ad-slot--filled {
  border-style: solid;
  min-height: 0;
  display: block;
  text-align: center;
}
.ad-slot--sidebar { margin-bottom: 24px; }
.ad-slot--incontent { margin: 32px 0; }

/* =========================================================
   Section title
   ========================================================= */
.section-title {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 28px;
}

/* =========================================================
   Broker review cards
   ========================================================= */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 56px;
}
@media (max-width: 900px) {
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .review-grid { grid-template-columns: 1fr; }
}

.review-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.review-card .stars { color: var(--accent2); letter-spacing: 0.15em; margin-bottom: 10px; font-size: 0.95rem; }
.review-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.review-card p { color: var(--muted); font-size: 0.95rem; flex-grow: 1; margin-bottom: 14px; }
.review-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.review-card .meta strong { color: var(--ink); }
.review-card a.read-more { font-weight: 700; color: var(--accent); }

.review-grid--archive { margin-top: 32px; }

/* =========================================================
   Course banner
   ========================================================= */
.course-banner {
  border-radius: var(--radius-card);
  padding: 36px;
  margin: 0 0 56px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent) 0%, color-mix(in srgb, var(--accent2) 16%, transparent) 100%),
    var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.course-banner h4 { font-size: 1.3rem; margin-bottom: 8px; }
.course-banner p { color: var(--muted); margin: 0; max-width: 420px; }
.course-banner .waitlist {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.course-banner input[type="email"],
.course-banner input[type="text"] {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.8em 1.2em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  min-width: 220px;
  background: var(--panel);
}
.course-banner .waitlist-note {
  width: 100%;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 48px; }
.foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.foot .disclosure { color: var(--muted); font-size: 0.85rem; max-width: 640px; }
.foot .foot-links a { color: var(--muted); font-weight: 600; }
.foot .foot-links ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.foot .foot-links li:not(:last-child)::after { content: "·"; margin-left: 8px; color: var(--muted); }

/* =========================================================
   Content layout: single / page / archive
   ========================================================= */
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  margin: 40px 0 56px;
  align-items: start;
}
.content-wrap.no-sidebar { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 860px) {
  .content-wrap { grid-template-columns: 1fr; }
}

.entry-header { margin-bottom: 24px; }
.entry-title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.entry-meta { color: var(--muted); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }

.entry-content, .page-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 36px;
  font-size: 1.05rem;
}
.entry-content p, .page-content p { margin: 0 0 1.2em; }
.entry-content h2, .page-content h2 { font-size: 1.5rem; margin-top: 1.4em; }
.entry-content h3, .page-content h3 { font-size: 1.2rem; margin-top: 1.2em; }
.entry-content ul, .entry-content ol, .page-content ul, .page-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content img, .page-content img { border-radius: 12px; margin: 1em 0; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.4em 0;
  padding: 0.2em 1.2em;
  color: var(--muted);
  font-style: italic;
}
.entry-content a, .page-content a { text-decoration: underline; }

.sidebar .widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar .widget-title { font-size: 1rem; margin-bottom: 12px; }

/* =========================================================
   Post / archive card grid
   ========================================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 700px) {
  .post-grid { grid-template-columns: 1fr; }
}
.post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
}
.post-card .eyebrow { margin-bottom: 10px; }
.post-card h2 { font-size: 1.2rem; margin-bottom: 8px; }
.post-card h2 a { color: var(--ink); }
.post-card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }
.post-card .read-more { font-weight: 700; font-size: 0.9rem; }

.pagination { display: flex; gap: 10px; justify-content: center; margin: 40px 0; }
.pagination a, .pagination span {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.5em 1.1em;
  font-size: 0.9rem;
  color: var(--ink);
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* =========================================================
   Misc / utility
   ========================================================= */
.page-header-simple { text-align: center; max-width: 760px; margin: 48px auto 8px; padding: 0 24px; }
.page-header-simple .eyebrow { margin-bottom: 14px; }
