/* =========================================================================
   SPEEDHOME Guide — static blog styles (plain CSS, no framework)
   Mirrors the live SPEEDHOME blog redesign: white header + dropdown nav,
   bright-yellow pills, heavy Montserrat headings, blue CTAs.
   ========================================================================= */

:root {
  --yellow: #FFE12B;          /* brand yellow — pills (matches live #FFE12B) */
  --yellow-dark: #F2CE00;
  --blue: #1d4ed8;            /* CTA / in-content links */
  --blue-dark: #1741b6;
  --accent: #E14D36;          /* legacy red (kept for the odd accent) */
  --heading: #182235;         /* dark-navy headings & titles (live card title) */
  --ink: #2b2b30;             /* body text */
  --ink-soft: #4b4b55;        /* excerpts / secondary text */
  --muted: #71717a;           /* meta text */
  --line: #e8e8ec;            /* borders */
  --dark: #1f2433;            /* active language pill */
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --maxw: 1180px;
  --radius: 10px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.18;
  color: var(--heading);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.container--post { max-width: 1080px; }
.container--narrow { max-width: 760px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 12px; top: 12px;
  background: #fff; padding: 8px 14px; z-index: 100;
  border: 2px solid var(--blue); border-radius: var(--radius);
}

/* ---------- header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

/* logo — single self-contained SVG (1:1 with the live header) */
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; }
.site-logo__img { height: 32px; width: auto; display: block; }
/* footer sits on a dark panel — flip the dark logo to white there */
.site-footer .site-logo__img { filter: brightness(0) invert(1); }

/* primary nav */
.site-nav .menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu > li > a {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #20242e;
  padding: 12px 14px;
  white-space: nowrap;
}
.menu > li > a:hover,
.menu > li:focus-within > a { color: var(--blue); text-decoration: none; }
.menu-trigger { cursor: pointer; }
.caret { font-size: 11px; margin-left: 2px; color: inherit; }

/* dropdowns */
.menu-item.has-children { position: relative; }
.submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
  margin: 2px 0 0;
  padding: 8px 0;
  list-style: none;
  z-index: 60;
}
.menu-item.has-children:hover > .submenu,
.menu-item.has-children:focus-within > .submenu { display: block; }
.submenu a {
  display: block;
  padding: 9px 18px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}
.submenu a:hover { background: var(--bg-soft); color: var(--blue); text-decoration: none; }

/* mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--heading); display: block; }

/* ---------- main ---------- */
.site-main { padding: 28px 0 56px; min-height: 50vh; }

/* ---------- language switcher ---------- */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 10px;
}
.lang-pill {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--heading);
  text-decoration: none;
}
.lang-pill:hover { text-decoration: none; filter: brightness(.96); }
.lang-pill.is-active { background: var(--dark); color: #fff; }

/* ---------- section heading ---------- */
.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: #111827;
  margin: 22px 0 24px;
}

/* ---------- category pills ---------- */
.cat-pill {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1;
  color: #101828;
  background: var(--yellow);
  padding: 5px 10px;
  border-radius: 999px;
}
.cat-pill--link { position: relative; z-index: 2; color: #101828; }
.cat-pill--link:hover { background: var(--yellow-dark); color: #101828; text-decoration: none; }

/* ---------- card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); gap: 30px; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.card-thumb { display: block; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb--placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; letter-spacing: .1em;
  color: var(--heading);
  background: linear-gradient(135deg, var(--yellow), #ffe680);
}
.card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 18px 22px;
}
.card-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.28;
  color: var(--heading);
  margin: 0;
}
.card-title a { color: inherit; }
.card-title a:hover { color: inherit; text-decoration: none; }

/* stretched link: compact card title covers the whole card */
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* full card (category archive) */
.card--full .card-body { padding: 20px 22px 24px; gap: 12px; }
.card-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.card--full .card-title { font-size: 22px; }
.card-excerpt {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 11px 22px;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
}
.btn--read { background: var(--blue); color: #fff; }
.btn--read:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }

/* ---------- meta ---------- */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.meta-icon { color: var(--muted); flex-shrink: 0; }

/* ---------- single post (centered card) ---------- */
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .05);
  padding: 32px;
  margin: 24px 0 56px;
}
.article-card__hero {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 26px;
}
.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.post-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--heading);
  margin: 0 0 14px;
}
.article-card .post-meta { margin: 0 0 4px; font-size: 14px; }

/* ---------- post body / prose ---------- */
.post-body, .prose { font-size: 17px; line-height: 1.8; color: #303036; margin-top: 22px; }
.post-body h2, .prose h2 {
  font-family: var(--font-head); font-weight: 800;
  font-size: 26px; color: var(--heading); margin: 34px 0 12px;
}
.post-body h3, .prose h3 {
  font-family: var(--font-head); font-weight: 700;
  font-size: 21px; color: var(--heading); margin: 26px 0 10px;
}
.post-body p, .prose p { margin: 0 0 18px; }
.post-body ul, .post-body ol, .prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li, .prose li { margin: 6px 0; }
.post-body a, .prose a { color: var(--blue); }
.post-body blockquote {
  margin: 22px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--yellow);
  background: var(--bg-soft);
  color: var(--ink-soft);
}
.post-body code {
  background: #f4f4f5; padding: 2px 6px; border-radius: 4px; font-size: .9em;
}
/* Tables (imported content is table-heavy; scroll horizontally on small screens) */
.post-body table {
  width: 100%; border-collapse: collapse; margin: 20px 0 24px;
  display: block; overflow-x: auto; font-size: 15px;
}
.post-body th, .post-body td {
  border: 1px solid var(--line); padding: 10px 12px;
  text-align: left; vertical-align: top;
}
.post-body th { background: var(--bg-soft); font-weight: 700; color: var(--heading); }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 18px 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
/* Highlighted "quick answer" callouts retained in imported HTML posts */
.post-body .qa-answer {
  border-left: 4px solid var(--yellow); background: var(--bg-soft);
  padding: 10px 16px; margin: 18px 0; border-radius: 0 6px 6px 0;
}
.post-back { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- static pages ---------- */
.page { padding-top: 8px; }
.page-title { font-size: 34px; margin: 6px 0 18px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 18px; }
.contact-list li { margin: 8px 0; }
.contact-company { color: var(--muted); font-size: 14px; margin-top: 28px; }
.page--404 { text-align: center; padding: 24px 0 40px; }
.page--404 .prose { display: inline-block; text-align: left; }
.error-code { font-size: 72px; font-weight: 800; line-height: 1; margin: 0; color: var(--yellow); }

.empty { padding: 40px 0; color: var(--ink-soft); }

/* ---------- category archive header ---------- */
.archive-head { margin: 8px 0 0; }
.archive-title {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: var(--heading);
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--yellow);
}
.archive-sub { color: var(--ink-soft); font-size: 18px; margin: 16px 0 0; }

/* ---------- pagination ---------- */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin: 44px 0 8px;
}
.pagination__link {
  display: inline-block; padding: 9px 18px;
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 7px; color: var(--heading);
}
.pagination__link:hover {
  text-decoration: none; border-color: var(--blue); color: var(--blue); background: var(--bg-soft);
}
.pagination__link.is-disabled { color: var(--muted); opacity: .5; cursor: default; }
.pagination__status { font-size: 13px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: #3f3f46; color: #d4d4d8; margin-top: 48px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 36px;
}
/* property-type list (left column) with thin dividers, like the live footer */
.footer-types { display: flex; flex-direction: column; }
.footer-types a {
  color: #d4d4d8;
  font-size: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #52525b;
}
.footer-types a:first-child { padding-top: 0; }
.footer-types a:hover { color: var(--yellow); text-decoration: none; }
/* contact block (right column) */
.footer-contact { grid-column: 3; }
.footer-contact p { margin: 0 0 14px; font-size: 15px; color: #d4d4d8; line-height: 1.5; }
.footer-contact a { color: #fff; }
.footer-contact a:hover { color: var(--yellow); }
/* bottom bar: white strip with dark copyright (left) + brand social icons (right) — mirrors live */
.footer-bottom { background: #fff; border-top: 1px solid #e5e7eb; padding: 18px 0; }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-bottom p { margin: 0; font-size: 13px; color: #111827; }
.footer-social { display: flex; align-items: center; gap: 16px; }
.footer-social a { display: inline-flex; transition: opacity .15s ease; }
.footer-social a:hover { opacity: .75; text-decoration: none; }
/* brand colours sampled from the live footer */
.footer-social .is-facebook  { color: #3b5a9b; }
.footer-social .is-x         { color: #111827; }
.footer-social .is-instagram { color: #e4405f; }
.footer-social .is-youtube   { color: #ed3f41; }

/* back-to-top button — fixed, reveals on scroll (mirrors live) */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7c6fe0;
  color: #fff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
  z-index: 80;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #6a5cd0; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .header-inner { position: relative; min-height: 64px; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
  }
  .site-nav.is-open { display: block; }
  .site-nav .menu { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 12px; }
  .menu > li > a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .caret { float: right; }
  .submenu {
    position: static; display: block;
    min-width: 0; border: 0; box-shadow: none; margin: 0; padding: 0 0 6px;
    background: var(--bg-soft);
  }
  .submenu a { padding-left: 22px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-contact { grid-column: auto; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .post-title { font-size: 30px; }
  .section-title { font-size: 26px; }
  .article-card { padding: 22px; border-radius: 12px; }
}
@media (max-width: 640px) {
  .card-grid, .card-grid--2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .post-title { font-size: 26px; }
}

/* =========================================================================
   Clustered homepage (hero + Browse-by-Topic + Essential Guides + per-topic
   sections + CTA) — mirrors the static export's directory-style index.
   ========================================================================= */

/* ---------- buttons (hero/CTA variants) ---------- */
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }
.btn--secondary {
  background: #fff; color: var(--heading);
  border: 1.5px solid var(--heading);
}
.btn--secondary:hover { background: var(--heading); color: #fff; text-decoration: none; }

/* ---------- hero ---------- */
.blog-hero {
  background: linear-gradient(180deg, #fffbe0 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
  text-align: center;
}
.blog-hero__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 42px;
  line-height: 1.12;
  color: var(--heading);
  margin: 0 auto 14px;
  max-width: 820px;
}
.blog-hero__lead {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 auto 26px;
  max-width: 680px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.page-body { padding-bottom: 56px; }

/* ---------- Browse by Topic tiles ---------- */
.cluster-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 44px;
}
.cluster-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--heading);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.cluster-tile:hover {
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .07);
  transform: translateY(-2px);
  border-color: var(--yellow-dark);
}
.cluster-tile__icon { font-size: 22px; line-height: 1; }
.cluster-tile__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  flex: 1;
}
.cluster-tile__count {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 12px;
  color: #101828;
  background: var(--yellow);
  padding: 3px 9px;
  border-radius: 999px;
}

.featured-grid { margin-bottom: 48px; }

/* ---------- per-topic sections ---------- */
.cluster-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.cluster-header { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.cluster-icon { font-size: 26px; line-height: 1; }
.cluster-header h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  color: var(--heading);
  margin: 0;
}
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
}
.article-list li { line-height: 1.5; }
.article-list a { color: var(--ink); }
.article-list a:hover { color: var(--blue); }
.cluster-more { margin: 16px 0 0; }
.cluster-more a { font-family: var(--font-head); font-weight: 700; font-size: 14px; }

/* ---------- bottom CTA ---------- */
.bottom-cta {
  margin: 44px 0 0;
  padding: 40px 28px;
  text-align: center;
  background: linear-gradient(135deg, var(--yellow), #ffe680);
  border-radius: 16px;
}
.bottom-cta h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 26px;
  color: var(--heading);
  margin: 0 0 8px;
}
.bottom-cta p { color: #3a3a44; margin: 0 auto 22px; max-width: 560px; }
.bottom-cta .hero-ctas { }
.bottom-cta .btn--secondary { border-color: var(--heading); }

/* ---------- breadcrumb (post pages) ---------- */
.breadcrumb { margin: 0 0 18px; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; color: var(--muted); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb li[aria-current="page"] { color: var(--muted); }

@media (max-width: 900px) {
  .cluster-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .blog-hero__title { font-size: 32px; }
  .blog-hero { padding: 40px 0 34px; }
}
@media (max-width: 640px) {
  .cluster-tiles { grid-template-columns: 1fr; }
  .article-list { grid-template-columns: 1fr; }
  .blog-hero__title { font-size: 27px; }
  .blog-hero__lead { font-size: 16px; }
}

/* =========================================================================
   Post enrichments — E-E-A-T reviewer byline, table of contents, related
   guides (restored from the static export for internal linking + trust).
   ========================================================================= */

/* ---------- reviewer byline (E-E-A-T) ---------- */
.post-byline {
  margin: 4px 0 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border-left: 3px solid var(--yellow-dark);
  border-radius: 0 6px 6px 0;
}

/* ---------- table of contents ---------- */
.toc {
  margin: 24px 0 8px;
  padding: 16px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.toc-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 10px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; line-height: 1.5; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--blue); }

/* give anchored headings breathing room below the sticky header */
.post-body h2[id], .post-body h3[id] { scroll-margin-top: 80px; }

/* ---------- related guides ---------- */
.related-posts {
  margin: 40px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.related-posts__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  color: var(--heading);
  margin: 0 0 14px;
}
.related-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 28px;
}
.related-posts li { line-height: 1.5; }
.related-posts a { color: var(--blue); font-weight: 500; }

@media (max-width: 640px) {
  .related-posts ul { grid-template-columns: 1fr; }
}
