/* Sacramento HVAC Contractor — single stylesheet, mobile-first */
:root {
  --navy: #0d3b66;
  --navy-dark: #092c4d;
  --orange: #f26522;
  --orange-dark: #d4520f;
  --blue: #2f9be3;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --text: #22313f;
  --muted: #5a6b7b;
  --border: #e3e9ef;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(13, 59, 102, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  /* room for the sticky mobile call bar */
  padding-bottom: 64px;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.2; color: var(--navy-dark); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); color: var(--navy-dark); margin-bottom: 0.6rem; }
h3 { font-size: 1.15rem; color: var(--navy-dark); }

p { margin-bottom: 1rem; }

section { padding: 44px 0; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.15;
}
.logo svg { width: 34px; height: 34px; flex: none; }
.logo span small { display: block; font-weight: 500; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.04em; }

.nav-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.15rem;
  color: var(--navy);
  cursor: pointer;
}

.site-nav { display: none; }
.site-nav.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.site-nav ul { list-style: none; }
.site-nav a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}
.site-nav a:hover { background: var(--bg-alt); }

.header-call {
  display: none;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  white-space: nowrap;
}
.header-call:hover { background: var(--orange-dark); }

/* ---------- Mega-menu (Chicago-style header) ---------- */
.site-nav ul { margin: 0; padding: 0; }
.site-nav li { position: relative; }
.caret { font-size: 0.6rem; opacity: 0.75; margin-left: 3px; }

.mega {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 0 0 10px 10px; box-shadow: var(--shadow);
  padding: 18px; display: none; z-index: 120;
}
.site-nav li:hover .mega, .site-nav li:focus-within .mega,
.site-nav li.open .mega { display: block; }

.mega__inner { display: block; }
.mega--services .mega__inner { min-width: 640px; }
.mega--blog .mega__inner { min-width: 640px; }
/* Locations panel: wide enough for "→ AC Repair Elk Grove" rows, and centred
   under the Areas item so it does not run off the right edge. */
.mega--locations .mega__inner { min-width: 1080px; max-width: calc(100vw - 40px); width: max-content; }
.mega--locations { left: 50%; transform: translateX(-50%); }
.mega__featured { min-width: 170px; border-right: 1px solid var(--border); padding-right: 18px; }
.mega__featured strong { display: block; color: var(--orange-dark); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.mega__featured ul, .mega__cols ul { list-style: none; margin: 0; padding: 0; }
.mega__featured li, .mega__cols li { margin: 0; }
.mega__featured a, .mega__cols a, .loc-block__sub a, .loc-block__head {
  display: block; color: var(--navy-dark); text-decoration: none; padding: 5px 8px;
  font-size: 0.86rem; border-radius: 5px; line-height: 1.35;
}
.mega__featured a:hover, .mega__cols a:hover, .loc-block__sub a:hover { background: var(--bg-alt); color: var(--orange-dark); }
.mega__cols { display: grid; gap: 0 20px; }
.mega__cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.loc-block { margin-bottom: 16px; }
.loc-block__head { font-weight: 700; color: var(--navy-dark); margin: 0 0 4px; display: block; }
.loc-block__head:hover { color: var(--orange-dark); background: none; }
.loc-block__sub { margin: 0; }
.loc-block__sub a { padding: 2px 8px; font-size: 0.83rem; color: var(--muted); line-height: 1.3; }
.loc-block__sub a::before { content: "\2192\00a0"; color: var(--orange); }

@media (max-width: 879px) {
  .site-nav ul { display: block; }
  .mega { position: static; min-width: 0; width: auto; transform: none; left: 0; box-shadow: none; border: 0; border-left: 2px solid var(--orange); border-radius: 0; padding: 6px 0 6px 12px; margin: 2px 0 8px 12px; }
  .mega__inner { display: block; width: auto; min-width: 0; }
  .mega--services .mega__inner, .mega--locations .mega__inner, .mega--blog .mega__inner { width: auto; min-width: 0; }
  .mega__featured { border-right: 0; padding-right: 0; }
  .mega__cols--3 { grid-template-columns: 1fr; gap: 4px; }
  .loc-block { margin-bottom: 8px; }
  .mega__featured a, .mega__cols a, .loc-block__sub a, .loc-block__head { font-size: 0.95rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #14538c 100%);
  color: #fff;
  padding: 56px 0;
}
.hero h1 { color: #fff; margin-bottom: 0.75rem; }
.hero .sub { font-size: 1.1rem; color: #d6e4f0; max-width: 640px; margin-bottom: 1.5rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.4rem; }
.trust-bullets { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #cfe0ee; font-size: 0.92rem; }
.trust-bullets li::before { content: "✓ "; color: #7fc97f; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 1.02rem;
}
.btn-call { background: var(--orange); color: #fff; }
.btn-call:hover { background: var(--orange-dark); }
.btn-outline { border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.6rem; }
/* Decorative heading icons live in data-icon so they stay out of the heading's
   text content (cleaner for SERP snippets, AI extraction and screen readers). */
[data-icon]::before { content: attr(data-icon) " "; }
.card .more { font-weight: 600; font-size: 0.92rem; text-decoration: none; color: var(--orange-dark); }
.card .more:hover { text-decoration: underline; }

.alt { background: var(--bg-alt); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 54px; margin-bottom: 18px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 14px; border: 1px solid var(--border); }
th { background: var(--navy); color: #fff; }
tr:nth-child(even) td { background: var(--bg-alt); }
.price-note { font-size: 0.85rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 18px;
  color: var(--navy-dark);
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.2rem; color: var(--orange); }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 18px 14px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  border-radius: var(--radius);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #ffe4d3; max-width: 560px; margin: 0 auto 1.2rem; }
.cta-band .btn { background: #fff; color: var(--orange-dark); }

/* ---------- Inline callout ---------- */
.callout {
  border-left: 4px solid var(--orange);
  background: var(--bg-alt);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  margin: 1.2rem 0;
}
.callout strong a { color: var(--orange-dark); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); padding: 14px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* ---------- Areas strip ---------- */
.areas-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.areas-list a {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.areas-list a:hover { border-color: var(--navy); }

/* ---------- Article / long-form content ---------- */
.content ul, .content ol { margin: 0 0 1rem 1.4rem; }
.content li { margin-bottom: 0.4rem; }
.content h2 { margin-top: 2rem; }
.content h3 { margin-top: 1.4rem; margin-bottom: 0.5rem; }
.lead { font-size: 1.08rem; }
.area-parent { font-size: 0.9rem; color: #5a6b7b; margin-top: -0.25rem; margin-bottom: 1rem; }

.content-img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.2rem 0;
}

/* Explanatory diagrams. width/height are set on the <img> so the box is
   reserved before the SVG loads - that is what keeps CLS at 0. */
.diagram { margin: 1.8rem 0; }
.diagram img {
  width: 100%;
  /* Cap the width: stretched to a 1060px column the labels scale up to look
     oversized, and the figures are drawn on a 720-unit canvas. */
  max-width: 680px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.diagram figcaption {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- Comparison blocks ----------
   Text-heavy comparisons are HTML rather than SVG: legible at any width,
   selectable, and readable by crawlers as text. */
.compare { display: grid; gap: 16px; margin: 1.6rem 0; }
.compare-col {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.compare-col--alt { border-top-color: var(--orange); }
.content .compare-col h3 { margin: 0 0 0.2rem; font-size: 1.05rem; color: var(--navy); }
.compare-era { margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 600; color: var(--blue); }
.compare-col--alt .compare-era { color: var(--orange-dark); }
.content .compare-col ul { margin: 0 0 0 1.1rem; }
.content .compare-col li { margin-bottom: 0.45rem; }
.compare-note { color: var(--muted); font-size: 0.92rem; }

.table-wrap { overflow-x: auto; margin: 1.6rem 0; }
.compare-table { width: 100%; min-width: 340px; border-collapse: collapse; }
.compare-table caption {
  text-align: left; font-weight: 700; color: var(--navy);
  font-size: 1.05rem; padding-bottom: 0.6rem;
}
.compare-table th, .compare-table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border); font-size: 0.94rem;
}
.compare-table thead th { color: var(--navy); font-size: 0.9rem; }
.compare-table thead th:nth-child(2) { color: var(--blue); }
.compare-table thead th:nth-child(3) { color: var(--orange-dark); }
.compare-table tbody th { font-weight: 600; color: var(--text); }
.compare-table td { color: var(--muted); }
.compare-table tbody tr:nth-child(odd) { background: var(--bg-alt); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (min-width: 700px) {
  .compare { grid-template-columns: 1fr 1fr; }
}

/* ---------- Footer (Chicago-style service x area matrix) ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--navy-dark) 0%, #061f38 100%);
  color: #cfdbe9;
  font-size: 0.92rem;
  margin-top: 40px;
  padding: 56px 0 24px;
}

/* Brand + Company share a single 2-column row above the matrix on desktop.
   Mobile / tablet: stack as full-width rows. */
.footer-top {
  display: grid; gap: 36px; grid-template-columns: 1fr;
  max-width: var(--max, 1120px); margin: 0 auto 40px;
  padding: 0 24px;
}
@media (min-width: 880px) {
  .footer-top { grid-template-columns: 2.4fr 1fr; gap: 56px; align-items: start; }
}

.footer-brand h4, .footer-company h4 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 1.02rem;
  letter-spacing: .06em;
  display: flex; align-items: center; gap: 10px;
}
.footer-brand h4::before {
  content: "";
  display: inline-block;
  width: 22px; height: 2px;
  background: var(--orange);
}
.footer-brand p, .footer-company p { margin: 0 0 8px; line-height: 1.55; }
.footer-brand .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #7fd0ff;
  margin: 0 0 6px;
}
.footer-brand .address { margin-top: 14px; }
.footer-brand .address p { margin: 0 0 2px; }

.footer-company ul { list-style: none; padding: 0; margin: 0; }
.footer-company li { margin: 0 0 10px; }
.footer-company a {
  color: #cfdbe9; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.92rem;
}
.footer-company a::before {
  content: "›";
  color: #7fd0ff;
  font-weight: 700; font-size: 1rem;
}
.footer-company a:hover { color: #fff; }
.footer-company a:hover::before { color: var(--orange); }

/* Phone CTA — visual anchor of the footer */
.footer-phone {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--orange);
  color: #fff !important;
  font-weight: 800; font-size: 1.18rem;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
  margin: 14px 0;
  box-shadow: 0 2px 0 var(--orange-dark), 0 6px 18px rgba(242, 101, 34, .35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.footer-phone:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--orange-dark), 0 10px 22px rgba(242, 101, 34, .45);
}
.footer-phone::before { content: "📞"; font-size: 1.1rem; }

/* Matrix section — distinct band */
.footer-matrix {
  background: #0a2440;
  padding: 48px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.matrix-title {
  color: #fff; font-size: 1.35rem; font-weight: 800;
  letter-spacing: .12em; text-align: center;
  margin: 0 auto 8px;
  text-transform: uppercase;
}
.matrix-title::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  background: var(--orange);
  margin: 12px auto 22px;
  border-radius: 2px;
}
.matrix-chips {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  justify-content: center;
  margin: 0 auto 24px;
  max-width: 980px;
  padding: 0 24px;
}
.matrix-chips a {
  color: #d4e3f0; text-decoration: none;
  font-size: .84rem; font-weight: 500;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.matrix-chips a:hover {
  color: #fff;
  background: rgba(127, 208, 255, .15);
  border-color: #7fd0ff;
}

/* Region grid: 1 col mobile, 2 cols tablet, 3 cols small desktop, 4 cols wide desktop. */
.matrix-grid {
  display: grid; gap: 18px; grid-template-columns: 1fr;
  max-width: var(--max, 1120px); margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 560px) { .matrix-grid { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (min-width: 880px) { .matrix-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1180px) { .matrix-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }

.mx-cell {
  background: #0d3460;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 3px solid var(--navy);
  border-radius: 10px;
  padding: 18px 18px 14px;
  display: flex; flex-direction: column;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.mx-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .22);
  border-top-color: var(--orange);
  background: #113e74;
}

.mx-region {
  color: #fff;
  font-size: 1.02rem; font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 14px;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.mx-region::before {
  content: "📍";
  font-size: .92rem;
}
.mx-list { list-style: none; padding: 0; margin: 0; }
.mx-list li {
  margin: 0 0 7px; font-size: .88rem; line-height: 1.4;
  display: flex; align-items: baseline; gap: 6px;
}
.mx-list a {
  color: #d4e3f0; text-decoration: none;
  transition: color .12s ease;
}
.mx-list a:hover { color: #7fd0ff; text-decoration: underline; }
.mx-arrow {
  color: #7fd0ff; font-weight: 700;
  flex-shrink: 0;
}

/* Legible, not hidden fine print. */
.disclosure {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 22px 24px 0;
  margin: 32px auto 0;
  max-width: var(--max, 1120px);
  font-size: 0.8rem;
  color: #8fa6ba;
  line-height: 1.65;
}
.copyright { padding: 22px 24px 0; font-size: 0.8rem; color: #8fa6ba; max-width: var(--max, 1120px); margin: 0 auto; }

/* ---------- Sticky mobile call bar ---------- */
.sticky-call {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--orange);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 15px 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}
.sticky-call:active { background: var(--orange-dark); }

/* ---------- Touch target sizing (WCAG 2.5.8) ----------
   Standalone links get a >=44px tall hit area on touch screens. Links inline
   inside a sentence are exempt under 2.5.8 and are left alone. */
@media (max-width: 899px) {
  .site-footer li { margin-bottom: 0; }
  .site-footer li a {
    display: block;
    padding: 11px 0;
    min-height: 44px;
    box-sizing: border-box;
  }
  .breadcrumbs ol { gap: 10px; }
  .breadcrumbs a { display: inline-block; padding: 10px 0; }
  .card .more { display: inline-block; padding: 12px 0; min-height: 44px; box-sizing: border-box; }
  .footer-phone { display: inline-block; padding: 10px 0; }
  .nav-toggle { min-width: 48px; min-height: 48px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .sticky-call { display: none; }
  .nav-toggle { display: none; }
  .site-nav { display: block !important; position: static; box-shadow: none; border: none; }
  .site-nav ul { display: flex; gap: 2px; }
  .site-nav a { border: none; padding: 8px 11px; border-radius: 6px; font-size: 0.88rem; }
  .header-call { display: inline-block; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  section { padding: 60px 0; }
}

/* On-page photos + homepage card images (2026-08-24). */
.page-photo { margin: 26px auto 6px; max-width: 780px; }
.page-photo img { border-radius: 12px; box-shadow: 0 4px 18px rgba(13, 59, 102, 0.14); max-width: 100%; height: auto; display: block; }
.card-photo { width: 100%; border-radius: 10px; margin: 2px 0 12px; max-width: 100%; height: auto; }
