/* =========================================================================
   seo.css , styles for generated pages (service-area, province, blog).
   Layers on top of main.css (uses its tokens: --blue, --purple, --text, etc.)
   ========================================================================= */

.container.narrow { max-width: 860px; }

/* Breadcrumbs */
.breadcrumbs { border-bottom: 1px solid var(--line); background: var(--bg); }
.breadcrumbs .container { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 14px; padding-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

/* Sub-page hero (light) */
.page-hero { padding: 56px 0 40px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(30px, 4.6vw, 46px); max-width: 18ch; }
.page-lede { margin-top: 16px; color: var(--muted); font-size: 18px; max-width: 60ch; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Long-form prose */
.prose { color: var(--text); font-size: 17px; line-height: 1.75; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(23px, 3vw, 30px); margin: 1.7em 0 .2em; }
.prose h3 { font-size: 20px; margin: 1.4em 0 .1em; }
.prose p, .prose li { color: #475569; }
.prose strong { color: var(--text); }
.prose a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-soft); color: var(--text); font-weight: 700; }

/* Related links */
.related { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; }
.related h2 { font-size: 20px !important; margin: 0 0 14px !important; }
.related ul { display: grid; gap: 10px; }
.related a { color: var(--blue-600); font-weight: 500; }
.related a:hover { text-decoration: underline; }

/* Card grids (locations / blog index) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.seo-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.seo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cdd8ec; }
.seo-card .eyebrow { color: var(--blue); margin-bottom: 10px; }
.seo-card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.3; }
.seo-card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.seo-card .card-cta { margin-top: auto; padding-top: 14px; color: var(--blue-600); font-weight: 700; font-size: 14px; }

/* Location tag cloud */
.loc-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.loc-tags a { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: all .15s ease; }
.loc-tags a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Province groups on the locations index */
.geo-group { margin-top: 40px; }
.geo-group h2 { font-size: 22px; margin-bottom: 4px; }
.geo-group .geo-sub { color: var(--muted); font-size: 15px; margin-bottom: 16px; }

/* Article meta */
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 14px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* FAQ accordion */
.faq-list { display: grid; gap: 12px; margin-top: 26px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.faq-item.open { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: 0; padding: 18px 20px; text-align: left; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 16px; color: var(--text); }
.faq-q .pm { flex: none; width: 22px; height: 22px; position: relative; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.faq-q .pm::before { top: 10px; left: 3px; right: 3px; height: 2px; }
.faq-q .pm::after { left: 10px; top: 3px; bottom: 3px; width: 2px; }
.faq-item.open .faq-q .pm::after { transform: scaleY(0); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.open .faq-a { max-height: 480px; }
.faq-a-inner { padding: 0 20px 18px; color: #475569; line-height: 1.7; }

/* Section head reuse (center variant) */
.section-head.center { text-align: center; margin-inline: auto; max-width: 720px; }

/* ================= Blog article extras ================= */
.article-byline { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.au-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: 'Poppins', sans-serif; font-size: 15px; flex: none; }
.au-avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.au-name { display: block; font-weight: 600; color: var(--text); }
.au-sub { display: block; font-size: 13.5px; color: var(--muted); }
.author-card { display: flex; gap: 16px; align-items: flex-start; margin-top: 40px; padding: 24px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.author-card strong { font-family: 'Poppins', sans-serif; color: var(--text); }
.author-card p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

/* Table of contents */
.prose .toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 8px 0 6px; }
.prose .toc strong { display: block; font-family: 'Poppins', sans-serif; color: var(--text); margin-bottom: 10px; }
.prose .toc ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.prose .toc a { color: var(--blue-600); font-weight: 500; text-decoration: none; }
.prose .toc a:hover { text-decoration: underline; }
.prose h2 { scroll-margin-top: 90px; }

/* Charts / figures */
.prose figure.chart { margin: 26px 0; padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); text-align: center; }
.prose figure.chart svg { max-width: 100%; height: auto; margin: 0 auto; }
.prose figure.chart figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* =========================================================================
   FIX: generated pages have a LIGHT hero, but .site-header is fixed +
   transparent with white text (built for the dark homepage hero).
   Give it a solid dark bar and offset the content below it.
   ========================================================================= */
body { padding-top: 74px; }
.site-header { background: var(--dark-bg); box-shadow: 0 4px 20px rgba(3, 6, 20, .18); }
.site-header.scrolled { box-shadow: 0 6px 26px rgba(3, 6, 20, .3); }

/* Richer, better-aligned sub-page hero */
.page-hero {
  padding: 60px 0 52px;
  background:
    radial-gradient(60% 70% at 100% 0%, rgba(124,58,237,.08), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(37,99,235,.07), transparent 60%),
    linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero h1 { max-width: 20ch; }
.page-lede { font-size: 18.5px; line-height: 1.65; }

/* Consistent vertical rhythm for generated content */
main > .section { padding: 64px 0; }
.prose > h2:first-child { margin-top: 0; }
.related { margin-top: 36px; }

/* Keep the in-page anchor from hiding under the fixed header */
:target { scroll-margin-top: 96px; }

/* =========================================================================
   INTERNAL PAGE TEMPLATE, refined
   ========================================================================= */
/* Deliberate section rhythm instead of arbitrary banding */
main > .section { padding: 66px 0; }
main > .section + .section { border-top: 1px solid var(--line); }
main > .section.cta-band { border-top: 0; }

/* Hero: aligned, with clearer hierarchy */
.page-hero { padding: 52px 0 46px; }
.page-hero h1 { max-width: 22ch; margin-bottom: 14px; }
.page-lede { margin-top: 0; max-width: 66ch; }
.page-hero-actions { margin-top: 24px; }
.breadcrumbs .container { padding-top: 16px; padding-bottom: 16px; }

/* Prose: tighter measure, better hierarchy, styled lists */
.prose { max-width: 74ch; }
.prose h2 { margin: 1.6em 0 .35em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.5em 0 .3em; }
.prose > p:first-child { font-size: 18px; color: #334155; }

/* Turn plain bullets into check items */
.prose ul { list-style: none; padding-left: 0; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 30px; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 18px; border-radius: 50%;
  background: #EAF1FF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.prose ol { padding-left: 1.2em; }
.prose ol li::before { content: none; }
.prose ol li { padding-left: 0; }

/* Related: a proper link card grid */
.related { padding: 26px 28px; border-radius: 16px; }
.related ul { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 26px; }
.related li { position: relative; padding-left: 18px; }
.related li::before { content: "›"; position: absolute; left: 0; top: -1px; color: var(--blue); font-weight: 700; }

/* FAQ sits closer to its heading */
.faq-list { margin-top: 22px; }

@media (max-width: 768px) {
  main > .section { padding: 48px 0; }
  .page-hero { padding: 36px 0 34px; }
  .prose > p:first-child { font-size: 16.5px; }
}

/* ================= Multi-step requirements wizard ================= */
.mw { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 14px 40px -22px rgba(15,23,42,.30); }
.mw-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.mw-bar { flex: 1; height: 6px; background: #EDF1F8; border-radius: 99px; overflow: hidden; }
.mw-bar span { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .35s cubic-bezier(.4,0,.2,1); }
.mw-step-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }

.mw-step { display: none; }
.mw-step.is-active { display: block; animation: mwIn .3s ease; }
@keyframes mwIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mw-step h3 { font-size: 20px; margin-bottom: 6px; }
.mw-hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.mw-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }

.mw-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.mw-choices-2 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.mw-choice { text-align: left; background: #fff; border: 1px solid #DDE5F0; border-radius: 12px; padding: 15px 16px; transition: all .16s ease; }
.mw-choice strong { display: block; font-size: 15px; color: var(--text); font-family: 'Poppins', sans-serif; }
.mw-choice span { display: block; font-size: 12.8px; color: var(--muted); margin-top: 3px; }
.mw-choice:hover { border-color: var(--blue); transform: translateY(-2px); }
.mw-choice.is-sel { border-color: var(--blue); background: #F4F8FF; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

.mw-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.mw-chip { background: #F4F7FC; border: 1px solid #DDE5F0; color: #334155; border-radius: 999px; padding: 9px 15px; font-size: 13.5px; font-weight: 500; transition: all .15s ease; }
.mw-chip:hover { border-color: var(--blue); color: var(--blue-600); }
.mw-chip.is-sel { background: var(--blue); border-color: var(--blue); color: #fff; }

.mw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mw .field { margin-bottom: 14px; }
.mw label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 7px; }
.mw-opt { color: var(--muted); font-weight: 500; }
.mw input, .mw textarea { width: 100%; padding: 13px 14px; font: inherit; font-size: 15px; border: 1px solid #DDE5F0; border-radius: 11px; background: #fff; transition: border-color .16s, box-shadow .16s; }
.mw textarea { min-height: 108px; resize: vertical; }
.mw input:focus, .mw textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(37,99,235,.13); }
.mw input.invalid { border-color: #DC2626; }

.mw-nav { display: flex; gap: 12px; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.mw-nav .btn { min-width: 130px; justify-content: center; }
.mw-nav #mwNext, .mw-nav #mwSubmit { margin-left: auto; }
.mw-error { display: none; color: #DC2626; font-size: 13.5px; margin-top: 14px; }
.mw-error.show { display: block; }
.mw-done { text-align: center; padding: 26px 10px; }
.mw-done .tick { width: 62px; height: 62px; border-radius: 50%; background: rgba(34,197,94,.14); display: grid; place-items: center; margin: 0 auto 16px; }
.mw-done .tick svg { width: 30px; height: 30px; stroke: #16A34A; }
.mw-done h3 { font-size: 22px; margin-bottom: 8px; }
.mw-done p { color: var(--muted); }

/* Prefer to talk panel */
.mw-talk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 22px 26px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; }
.mw-talk strong { display: block; font-family: 'Poppins', sans-serif; color: var(--text); font-size: 16px; }
.mw-talk span { color: var(--muted); font-size: 14px; }
.mw-talk-btns { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .mw { padding: 20px; }
  .mw-grid { grid-template-columns: 1fr; }
  .mw-nav .btn { min-width: 0; flex: 1; }
  .mw-talk-btns .btn { flex: 1; justify-content: center; }
}

/* ================= Inline quote-request card (blog articles) ================= */
.prose .quote-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  margin: 32px 0; padding: 24px 26px; border-radius: 16px;
  background: var(--dark-bg); color: #fff;
  box-shadow: 0 20px 45px -22px rgba(37,99,235,.5);
}
.prose .quote-cta .quote-cta-tx { max-width: 60ch; }
.prose .quote-cta strong { display: block; color: #fff; font-family: 'Poppins', sans-serif; font-size: 18px; letter-spacing: -.01em; }
.prose .quote-cta span { display: block; color: rgba(255,255,255,.78); font-size: 14.5px; margin-top: 5px; line-height: 1.5; }
.prose .quote-cta .btn { flex: none; }
.prose .quote-cta a.btn, .prose .quote-cta a.btn:hover { color: #fff; text-decoration: none; }
@media (max-width: 560px) { .prose .quote-cta { flex-direction: column; align-items: flex-start; } .prose .quote-cta .btn { width: 100%; justify-content: center; } }
