/* HomeOfficeRanked — Unified Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafafa; --surface: #ffffff; --text: #1a1a2e; --text-muted: #64748b;
  --accent: #2563eb; --accent-hover: #1d4ed8; --border: #e2e8f0;
  --tag-bg: #eff6ff; --tag-text: #1e40af; --radius: 12px;
  --green: #16a34a; --green-bg: #f0fdf4;
  --orange: #ea580c;
}
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* NAV */
nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; font-size: 0.9rem; font-weight: 500; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--accent); }

/* NAV DROPDOWN */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; cursor: pointer; padding: 8px 0; }
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 8px 0; min-width: 220px; z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 8px 16px; color: var(--text); font-size: 0.85rem;
  font-weight: 500; white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--tag-bg); color: var(--accent); }

/* FOOTER */
footer { text-align: center; padding: 32px 24px; font-size: 0.85rem; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ARTICLE LAYOUT */
.article { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.article-meta .badge { background: var(--tag-bg); color: var(--tag-text); padding: 3px 10px; border-radius: 6px; font-weight: 600; font-size: 0.78rem; }
.article-summary { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 24px; border-left: 4px solid var(--accent); padding-left: 16px; }
.article h1 { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.article h2 { font-size: 1.4rem; font-weight: 700; margin: 40px 0 16px; }
.article h3 { font-size: 1.15rem; font-weight: 700; margin: 32px 0 12px; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 16px 24px; }
.article li { margin-bottom: 8px; }
.article img { max-width: 100%; height: auto; }
.article blockquote { border-left: 4px solid var(--accent); padding: 12px 16px; margin: 16px 0; background: var(--tag-bg); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--text-muted); }
.article code { background: #f1f5f9; padding: .15rem .4rem; border-radius: 3px; font-size: .85em; font-family: 'Menlo', 'Monaco', monospace; }
.article pre { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin-bottom: 16px; }
.article pre code { background: none; padding: 0; }
.article hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* TABLES */
.article table, table.comparison-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.9rem; }
.article th, .article td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.article th { background: var(--tag-bg); font-weight: 600; }
.comparison-table { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.comparison-table th { background: #f1f5f9; padding: 12px 14px; text-align: left; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.comparison-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .winner { background: #f0fdf4; }
.table-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.table-badge.gold { background: #d97706; }
.table-badge.green { background: var(--green); }
.table-badge.purple { background: #7c3aed; }
.stars { color: #f59e0b; letter-spacing: 1px; }

/* TRUST BAR */
.trust-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 12px 0; margin-bottom: 16px; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.trust-bar span { display: flex; align-items: center; gap: 4px; }
.trust-bar .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); }

/* BREADCRUMB */
.breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* DISCLOSURE */
.disclosure { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 12px 16px; font-size: 0.85rem; color: #92400e; margin-bottom: 24px; }

/* UPDATED LINE */
.updated { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-bottom: 24px; }

/* OUR PICK / VERDICT BOX */
.our-pick, .verdict-box { background: var(--green-bg); border: 2px solid var(--green); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.our-pick .label, .verdict-box .label { font-size: 0.75rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.our-pick h3 { margin: 0 0 8px; }
.our-pick p { margin-bottom: 12px; }
.verdict-box .pick { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.verdict-box .reason { font-size: 0.9rem; color: var(--text-muted); }

/* CTA BUTTON */
.cta-btn { display: inline-block; background: var(--accent); color: #fff; padding: 10px 24px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; }
.cta-btn:hover { background: var(--accent-hover); color: #fff; }

/* PROS / CONS */
.pros-cons, .proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.pros-cons div, .proscons div { padding: 16px; border-radius: var(--radius); }
.pros { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cons { background: #fef2f2; border: 1px solid #fecaca; }
.pros-cons h4, .proscons h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.pros h4 { color: var(--green); }
.cons h4 { color: var(--orange); }
.pros-cons ul, .proscons ul { margin-left: 16px; font-size: 0.9rem; }

/* TABLE OF CONTENTS */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 32px; }
.toc h3, .toc h4 { margin-bottom: 12px; font-size: 0.9rem; }
.toc ol { margin-left: 20px; font-size: 0.9rem; }
.toc li { margin-bottom: 4px; }

/* INTERNAL / CROSS LINKS */
.internal-links, .cross-links { background: var(--tag-bg); border-radius: var(--radius); padding: 20px 24px; margin: 32px 0; }
.internal-links h4, .cross-links h4 { margin-bottom: 12px; font-size: 0.95rem; }
.internal-links ul, .cross-links ul { margin-left: 20px; }
.internal-links li, .cross-links li { margin-bottom: 6px; }

/* FAQ SECTION */
.faq-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* PRODUCT CARD */
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 32px 0; position: relative; }
.product-card.featured { border-color: var(--accent); border-width: 2px; }
.product-rank { position: absolute; top: -14px; left: 20px; background: var(--accent); color: #fff; font-size: 0.78rem; font-weight: 800; padding: 4px 12px; border-radius: 8px; }
.product-rank.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.product-rank.green { background: var(--green); }
.product-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.product-name { font-size: 1.25rem; font-weight: 800; }
.product-bestfor { font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-top: 2px; }
.product-score { text-align: right; }
.product-score .num { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.product-score .of { font-size: 0.82rem; color: var(--text-muted); }
.product-price-line { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.product-price-line strong { color: var(--text); }

/* SPECS GRID */
.specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.spec { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.spec .label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.spec .value { font-size: 0.95rem; font-weight: 700; }

/* AUTHOR BOX */
.author-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 40px 0 0; display: flex; gap: 16px; align-items: center; }
.author-box .avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #dbeafe, #c7d2fe); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.author-box .info { font-size: 0.85rem; }
.author-box .name { font-weight: 700; }
.author-box .bio { color: var(--text-muted); }

/* AFFILIATE BOX */
.affiliate-box { background: var(--tag-bg); border: 2px solid var(--accent); border-radius: var(--radius); padding: 24px; text-align: center; margin: 32px 0; }
.affiliate-box h3 { color: var(--accent); margin-bottom: 8px; }
.aff-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.aff-link { display: inline-block; padding: .5rem 1.2rem; background: var(--accent); color: #fff !important; border-radius: 8px; font-weight: 600; margin: 4px; font-size: 0.9rem; }
.aff-link:hover { background: var(--accent-hover); color: #fff !important; }
.aff-book { display: inline-block; padding: .5rem 1.2rem; background: var(--surface); color: var(--text) !important; border: 1px solid var(--border); border-radius: 8px; font-weight: 500; margin: 4px; font-size: 0.9rem; }

/* NEWSLETTER BOX */
.newsletter-box { background: var(--surface); border: 2px solid var(--green); border-radius: var(--radius); padding: 24px; text-align: center; margin: 32px 0; }
.newsletter-box h3 { color: var(--green); margin-bottom: 8px; }
.newsletter-box p { color: var(--text-muted); margin-bottom: 12px; font-size: 0.9rem; }
.newsletter-form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input { flex: 1; min-width: 200px; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; }
.newsletter-form input:focus { border-color: var(--accent); outline: none; }
.newsletter-form button { padding: .5rem 1.2rem; background: var(--green); color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.newsletter-form button:hover { background: #15803d; }
.sub-success { color: var(--green); padding: .5rem 0; }

/* CTA BOX (newsletter promo) */
.cta-box { background: #f1f5ff; border: 1px solid #dbeafe; border-radius: var(--radius); padding: 18px 22px; margin: 32px 0; }

/* BACK LINK */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }
.back-link:hover { color: var(--accent); }

/* QUICK PICKS (legacy) */
.quick-picks ul { margin-left: 24px; }

/* HERO IMAGE */
.hero-image { margin: 0 -24px 24px; overflow: hidden; border-radius: 8px; }
.hero-image img { width: 100%; height: auto; display: block; }

/* HOMEPAGE STYLES */

/* Container */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.home-container { max-width: 1120px; margin: 0 auto; padding: 48px 24px; }

/* Hero */
.home-hero { background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%); padding: 72px 24px 64px; text-align: center; }
.home-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 16px; color: var(--text); }
.home-hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 28px; }
.home-hero .stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 28px; flex-wrap: wrap; }
.home-hero .stat { font-size: 0.9rem; color: var(--text-muted); }
.home-hero .stat strong { color: var(--text); font-weight: 700; }
.home-hero .cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background 0.2s, box-shadow 0.2s; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-secondary:hover { background: var(--accent); color: #fff; }

/* Section headers */
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* Legacy section labels (used by pillar/category sections) */
.section-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 16px; }
.section-sub { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin-bottom: 32px; }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; color: inherit; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.06); color: inherit; }
.card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card .card-body { padding: 16px 20px; }
.card .tag { display: inline-block; background: var(--tag-bg); color: var(--tag-text); padding: 3px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }
.card .meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }

/* Category cards (6 columns at 2-col) */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 32px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; color: inherit; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.08); color: inherit; }
.cat-card .cat-thumb { width: 100%; height: 180px; object-fit: cover; display: block; }
.cat-card .cat-body { padding: 16px 20px; }
.cat-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.cat-desc { color: var(--text-muted); font-size: 0.9rem; }
.cat-arrow { display: inline-block; color: var(--accent); font-weight: 600; margin-top: 8px; }

/* Why-us grid */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.why-card .why-num { font-size: 2rem; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.why-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.why-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Homepage sections */
.home-section { padding: 64px 0; }
.home-section.alt-bg { background: var(--bg); }

/* Section CTA link */
.section-cta { text-align: center; margin-top: 40px; }

/* BLOG INDEX */
.blog-header { text-align: center; padding: 40px 0 24px; }
.blog-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.blog-header p { color: var(--text-muted); font-size: 1rem; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 32px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; color: inherit; transition: transform 0.2s, box-shadow 0.2s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.06); color: inherit; }
.article-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.article-card .card-body { padding: 16px 20px; }
.article-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.article-card p { font-size: 0.85rem; color: var(--text-muted); }
.article-card .card-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }
.card-thumb { width: 100%; height: 180px; object-fit: cover; display: block; border-radius: 12px 12px 0 0; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-dropdown-menu { position: static; transform: none; box-shadow: none; border: none; padding: 0 0 0 16px; }
  .pros-cons, .proscons { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .product-header { flex-direction: column; }
  .newsletter-form { flex-direction: column; }
  .cat-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .trust-bar { gap: 8px; font-size: 0.8rem; }
  .home-hero { padding: 48px 24px 40px; }
  .home-hero .stats { gap: 16px; }
}
