/* ============================================================
   Apartment Homestead Guide — Shared Article Stylesheet
   Link from any article with:
     <link rel="stylesheet" href="article-styles.css">
   FAQ uses onclick="toggleFaq(this)" with a toggleFaq() function
   that calls btn.closest('.faq-item').
   ============================================================ */

:root {
  --soil: #2c1f14;
  --moss: #4a6741;
  --moss-light: #eaf3de;
  --cream: #faf6ef;
  --terracotta: #c8603a;
  --text: #1c1c1c;
  --muted: #5c6170;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Lato', sans-serif; color: var(--text); background: var(--cream); line-height: 1.7; font-size: 17px; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.25; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
nav { background: var(--cream); border-bottom: 1px solid #e0d9cf; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1140px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--soil); white-space: nowrap; }
.nav-logo span { color: var(--moss); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 0.95rem; font-weight: 700; color: var(--text); letter-spacing: 0.02em; transition: color 0.2s; }
.nav-links a:hover { color: var(--moss); }
.nav-cta { background: var(--terracotta); color: #fff !important; padding: 9px 20px; border-radius: 6px; font-weight: 700; transition: background 0.2s; }
.nav-cta:hover { background: #b0512e !important; }

/* Header */
.article-header { background: linear-gradient(135deg, var(--moss) 0%, #3a5332 100%); color: #fff; padding: 56px 24px 60px; }
.header-inner { max-width: 800px; margin: 0 auto; }
.breadcrumb { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.article-kicker { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #d4e8c4; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 4px; margin-bottom: 16px; }
.article-title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; color: #fff; margin-bottom: 16px; line-height: 1.2; }
.article-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.8); line-height: 1.65; margin-bottom: 20px; max-width: 660px; }
.article-meta { font-size: 0.82rem; color: rgba(255,255,255,0.5); display: flex; gap: 20px; flex-wrap: wrap; }

/* Layout + body */
.article-layout { max-width: 1140px; margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.article-body h2 { font-size: 1.6rem; color: var(--soil); margin: 40px 0 14px; }
.article-body h3 { font-size: 1.2rem; color: var(--soil); margin: 28px 0 10px; }
.article-body p { font-size: 1rem; line-height: 1.75; margin-bottom: 18px; color: var(--text); }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 18px; }
.article-body li { font-size: 1rem; line-height: 1.7; margin-bottom: 8px; }
.article-body strong { color: var(--soil); }

/* Callouts + disclosure */
.callout { background: var(--moss-light); border-left: 4px solid var(--moss); border-radius: 0 8px 8px 0; padding: 18px 20px; margin: 24px 0; font-size: 0.95rem; line-height: 1.65; }
.callout strong { color: var(--soil); }
.warning-callout { background: #fff8ed; border-left: 4px solid var(--terracotta); border-radius: 0 8px 8px 0; padding: 18px 20px; margin: 24px 0; font-size: 0.95rem; line-height: 1.65; }
.affiliate-note { background: #f5f0e8; border: 1px solid #ddd7ce; border-radius: 8px; padding: 14px 18px; margin-bottom: 28px; font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* Comparison table */
.comparison-wrap { overflow-x: auto; margin: 24px 0 32px; border-radius: 10px; border: 1px solid #ddd7ce; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 540px; }
.comparison-table th { background: var(--soil); color: #fff; padding: 13px 16px; text-align: left; font-weight: 700; white-space: nowrap; }
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid #ede7de; vertical-align: middle; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: #f8f4ee; }
.comparison-table .top-row td { background: rgba(74,103,65,0.07); font-weight: 600; }

/* Product card */
.product-card { border: 1px solid #ddd7ce; border-radius: 12px; overflow: hidden; margin: 32px 0; background: #fff; }
.product-card-header { background: var(--cream); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid #ede7de; }
.product-rank { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); }
.product-name { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--soil); }
.product-subtitle { font-size: 0.85rem; color: var(--muted); }
.product-badge { background: var(--soil); color: #fff; font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; padding: 7px 14px; border-radius: 7px; white-space: nowrap; flex-shrink: 0; }
.product-card-body { padding: 24px; }

/* Pros / cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0 20px; }
.pros h4, .cons h4 { font-family: 'Lato', sans-serif; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.pros h4 { color: #2d7a3a; }
.cons h4 { color: #c0392b; }
.pros ul, .cons ul { list-style: none; padding: 0; }
.pros li, .cons li { font-size: 0.88rem; line-height: 1.5; margin-bottom: 6px; padding-left: 18px; position: relative; }
.pros li::before { content: '✓'; position: absolute; left: 0; color: #2d7a3a; font-weight: 700; }
.cons li::before { content: '✗'; position: absolute; left: 0; color: #c0392b; font-weight: 700; }

.who-for { background: var(--cream); border-radius: 7px; padding: 12px 16px; font-size: 0.88rem; margin-bottom: 16px; color: var(--text); }
.who-for strong { color: var(--soil); }
.product-cta-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid #ede7de; flex-wrap: wrap; }
.price-display { font-size: 1.4rem; font-weight: 700; color: var(--soil); font-family: 'Playfair Display', serif; }
.price-display span { font-size: 0.82rem; font-weight: 400; color: var(--muted); font-family: 'Lato', sans-serif; }
.btn-amazon { background: var(--terracotta); color: #fff; padding: 11px 26px; border-radius: 7px; font-size: 0.95rem; font-weight: 700; display: inline-block; transition: background 0.2s; text-decoration: none; }
.btn-amazon:hover { background: #b0512e; color: #fff; text-decoration: none; }
.btn-moss { background: var(--moss); }
.btn-moss:hover { background: #3a5332; }

/* FAQ */
.faq-list { border-top: 1px solid #ddd7ce; margin: 8px 0; }
.faq-item { border-bottom: 1px solid #ddd7ce; }
.faq-question { width: 100%; background: none; border: none; cursor: pointer; text-align: left; padding: 18px 0; font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--soil); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-question:hover { color: var(--moss); }
.faq-icon { font-size: 18px; transition: transform 0.2s; flex-shrink: 0; color: var(--terracotta); }
.faq-answer { display: none; padding: 0 0 18px; font-size: 0.94rem; line-height: 1.7; color: var(--text); }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* Verdict + related */
.verdict-box { background: var(--soil); color: #fff; border-radius: 12px; padding: 32px; margin: 36px 0; }
.verdict-box h3 { font-size: 1.4rem; color: #fff; margin-bottom: 14px; }
.verdict-box p { font-size: 0.95rem; color: rgba(255,255,255,0.8); line-height: 1.7; margin-bottom: 12px; }
.verdict-box p:last-of-type { margin-bottom: 20px; }
.related-guides { background: var(--cream); border: 1px solid #ddd7ce; border-radius: 12px; padding: 24px 28px; margin: 32px 0; }
.related-guides h4 { font-size: 1.05rem; color: var(--soil); margin-bottom: 14px; }
.related-guides ul { list-style: none; padding: 0; }
.related-guides li { margin-bottom: 10px; padding-left: 18px; position: relative; }
.related-guides li::before { content: '→'; position: absolute; left: 0; color: var(--terracotta); font-weight: 700; }
.related-guides a { font-size: 0.94rem; color: var(--moss); font-weight: 600; }

/* Sidebar */
.sidebar { position: sticky; top: 80px; }
.sidebar-box { background: #fff; border: 1px solid #ddd7ce; border-radius: 12px; padding: 22px; margin-bottom: 22px; }
.sidebar-box h4 { font-size: 0.95rem; color: var(--soil); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #ede7de; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 9px; }
.toc-list a { font-size: 0.83rem; color: var(--moss); display: block; line-height: 1.4; }
.toc-list a:hover { color: var(--soil); text-decoration: none; }
.picks-list { list-style: none; padding: 0; }
.pick-item { padding: 11px 0; border-bottom: 1px solid #ede7de; }
.pick-item:last-child { border-bottom: none; }
.pick-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--terracotta); }
.pick-name { font-size: 0.88rem; font-weight: 700; color: var(--soil); line-height: 1.3; margin: 3px 0; }
.pick-price { font-size: 0.82rem; color: var(--muted); }
.pick-link { font-size: 0.78rem; color: var(--moss); font-weight: 600; }

/* Footer */
footer { background: var(--soil); color: rgba(255,255,255,0.7); padding: 56px 24px 32px; }
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: #8fc47a; }
.footer-tagline { font-size: 0.85rem; color: rgba(255,255,255,0.45); line-height: 1.6; }
.footer-col h4 { font-family: 'Lato', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { font-size: 0.9rem; color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-col ul a:hover { color: #8fc47a; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; font-size: 0.8rem; color: rgba(255,255,255,0.35); line-height: 1.65; }

/* Responsive */
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } .sidebar { position: static; } }
@media (max-width: 700px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } .pros-cons { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .nav-links li:not(:last-child) { display: none; } }
