/* ============================================================
   NetWorth Explained — Main Stylesheet
   ============================================================ */

:root {
  --green: #1e8a32;
  --black: #111111;
  --text-gray: #555555;
  --light-gray: #f5f5f5;
  --border: #e8e8e8;
  --footer-bg: #111111;
  --max-width: 1200px;
  --nav-height: 65px;
  --font-sans: 'Libre Franklin', sans-serif;
  --font-serif: 'Source Serif Pro', serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--black);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 3px solid var(--green);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1;
}
.logo-green { color: var(--green); }
.logo-black { color: var(--black); }

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-item > a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  transition: color 0.15s;
}
.nav-item > a:hover { color: var(--green); }

.nav-arrow {
  font-size: 9px;
  opacity: 0.5;
  pointer-events: none;
}

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  background: #fff;
  border-top: 2px solid var(--green);
  border: 1px solid var(--border);
  border-top: 2px solid var(--green);
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.nav-item:hover .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s, color 0.1s;
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--light-gray); color: var(--green); }

/* Search */
.nav-search-btn { display: flex; align-items: center; }
.nav-search-icon {
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.nav-search-btn:hover .nav-search-icon { opacity: 1; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: all 0.2s;
}

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */

.hero {
  text-align: center;
  padding: 60px 40px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-h2 {
  font-size: 19px;
  font-weight: 400;
  color: var(--green);
  font-style: italic;
}

/* ============================================================
   SEPARATOR
   ============================================================ */

.separator {
  max-width: var(--max-width);
  margin: 8px auto 0;
  padding: 0 40px;
}
.separator-line { height: 1px; background: var(--border); }

/* ============================================================
   ARTICLE LISTING (HOMEPAGE + CATEGORY PAGES)
   ============================================================ */

.articles-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 40px 60px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: var(--black);
}

.article-card {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.article-card:last-child { border-bottom: none; }

.article-card-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--black);
  transition: color 0.15s;
}
.article-card-title:hover,
.article-card a:hover .article-card-title { color: var(--green); }

.article-card-subtitle {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.55;
}

.article-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: opacity 0.2s;
}
.article-card a:hover .article-card-image { opacity: 0.92; }

/* ============================================================
   HOMEPAGE ABOUT SNIPPET
   ============================================================ */

.home-about {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 40px 60px;
}

.home-about h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 20px;
}

.home-about p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-gray);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--footer-bg);
  color: #fff;
  padding: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-logo {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}
.footer-logo .logo-green { color: var(--green); }
.footer-logo .logo-white { color: #fff; }

.footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 12px;
  color: #aaa;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }

.footer-copyright {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-nav a {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--green); }

.footer-x-logo {
  width: 22px;
  height: 22px;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.footer-x-logo:hover { opacity: 1; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.article-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 40px 0;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: start;
}

.article-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}

.article-subtitle {
  font-size: 17px;
  color: var(--text-gray);
  margin-bottom: 24px;
  line-height: 1.5;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 14px;
}
.article-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.article-author a { color: var(--green); font-weight: 600; }

.article-affiliate {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.article-hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Article body */
.article-body {
  max-width: 760px;
  margin: 44px auto 0;
  padding: 0 40px 60px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.9;
  color: #2a2a2a;
}

.article-body p { margin-bottom: 26px; }

.article-body h2 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  margin: 44px 0 18px;
}

.article-body h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.article-body ul, .article-body ol {
  margin: 0 0 26px 24px;
  list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 10px; }

.article-body img {
  max-width: 100%;
  margin: 32px auto;
}

.article-body figcaption, .article-body em.caption {
  font-size: 13px;
  color: #888;
  text-align: center;
  display: block;
  margin-top: -20px;
  margin-bottom: 32px;
  font-style: italic;
  font-family: var(--font-sans);
}

.article-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover { color: #166b28; }

.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  font-style: italic;
  color: #555;
}

.article-body strong { font-weight: 700; }

.article-social-cta {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-gray);
  margin-bottom: 26px;
}

/* Newsletter CTA */
.newsletter {
  background: var(--light-gray);
  border: 1px solid var(--border);
  padding: 36px;
  max-width: 760px;
  margin: 0 auto 16px;
  text-align: center;
}

.newsletter-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
}

.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid #ccc;
  border-right: none;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
}
.newsletter-input:focus { border-color: var(--green); }

.newsletter-btn {
  padding: 11px 20px;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.newsletter-btn:hover { background: #166b28; }

/* Related articles */
.related-section {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 0 40px 60px;
}

/* ============================================================
   GENERAL CONTENT PAGE (About, Methodology, etc.)
   ============================================================ */

.page-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 40px 20px;
}

.page-hero h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
}

.page-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 40px 60px;
  font-size: 16px;
  line-height: 1.85;
  color: #333;
}

.page-body p { margin-bottom: 22px; }

.page-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  margin: 40px 0 16px;
}

.page-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
}

.page-body ul, .page-body ol {
  margin: 0 0 22px 24px;
  list-style: disc;
}
.page-body li { margin-bottom: 8px; }

.page-body a { color: var(--green); text-decoration: underline; }
.page-body strong { font-weight: 700; }

.page-body img {
  max-width: 100%;
  margin: 28px 0;
}

/* Contact form */
.contact-form { max-width: 520px; margin-top: 36px; }

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green); }

.form-group textarea { height: 140px; resize: vertical; }

.form-submit {
  padding: 12px 28px;
  background: var(--green);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
}
.form-submit:hover { background: #166b28; }

/* ============================================================
   CATEGORY HEADER
   ============================================================ */

.category-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 40px 20px;
}

.category-hero h1 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 8px;
}

.category-hero p {
  font-size: 16px;
  color: var(--text-gray);
}

.empty-category {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 40px 80px;
  color: var(--text-gray);
  font-size: 16px;
}

/* ============================================================
   METHODOLOGY PAGE
   ============================================================ */

.methodology-images {
  display: flex;
  gap: 20px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.methodology-images img {
  flex: 1;
  min-width: 200px;
  max-width: 100%;
}

.methodology-notes {
  background: var(--light-gray);
  border-left: 3px solid var(--green);
  padding: 24px 28px;
  margin: 28px 0;
}

.methodology-notes ul {
  list-style: disc;
  margin-left: 20px;
}

.methodology-notes li {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

/* ============================================================
   SITEMAP PAGE
   ============================================================ */

.sitemap-section { margin-bottom: 32px; }

.sitemap-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}

.sitemap-section ul { list-style: disc; margin-left: 20px; }

.sitemap-section li { margin-bottom: 8px; }

.sitemap-section a { color: var(--green); }

/* ============================================================
   AUTHOR PAGE
   ============================================================ */

.author-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 40px 30px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.author-bio-short { font-size: 15px; color: var(--text-gray); }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .article-card {
    grid-template-columns: 1fr 260px;
    gap: 28px;
  }

  .article-header {
    grid-template-columns: 1fr 320px;
    gap: 36px;
  }
}

@media (max-width: 700px) {
  .nav-inner { padding: 0 20px; }

  .nav-toggle { display: flex; }

  .nav-right {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 2px solid var(--green);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 8px 0;
  }

  .nav-right.open { display: flex; }

  .nav-item {
    width: 100%;
    flex-wrap: wrap;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
  }

  .dropdown {
    display: none !important; /* simplified on mobile */
  }

  .nav-search-btn { padding: 12px 20px; }

  .hero { padding: 36px 20px 28px; }
  .hero-h1 { font-size: 26px; }
  .hero-h2 { font-size: 16px; }

  .separator { padding: 0 20px; }

  .articles-section { padding: 20px 20px 40px; }

  .article-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 0;
  }

  .article-card-image { order: -1; aspect-ratio: 16/9; }
  .article-card-title { font-size: 21px; }

  .home-about { padding: 30px 20px 48px; }
  .home-about h2 { font-size: 24px; }

  .footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-nav { justify-content: flex-start; gap: 20px; }

  .article-header {
    grid-template-columns: 1fr;
    padding: 28px 20px 0;
    gap: 20px;
  }

  .article-title { font-size: 26px; }

  .article-body, .page-body { padding: 0 20px 48px; font-size: 16px; }

  .newsletter { padding: 24px 20px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-input { border-right: 1px solid #ccc; }

  .page-hero, .category-hero { padding: 36px 20px 16px; }
  .page-hero h1, .category-hero h1 { font-size: 26px; }

  .related-section { padding: 0 20px 48px; }

  .author-header { padding: 36px 20px 20px; flex-direction: column; text-align: center; }
  .methodology-images { flex-direction: column; }
}
