/* ==========================================================================
   Harrisburg Water Heater Pros — style.css
   Custom CSS only. Purpose-built. No framework.
   ========================================================================== */

:root {
  --primary: #1e2d40;
  --primary-dark: #16212f;
  --accent: #e07b2a;
  --accent-dark: #c4661c;
  --emergency: #c0392b;
  --bg: #ffffff;
  --bg-alt: #f8f7f5;
  --text: #1a1a1a;
  --text-soft: #4a4a4a;
  --border: #e5e7eb;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --maxw: 1180px;
  --radius: 10px;
  --font-head: "Roboto Slab", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--primary); line-height: 1.25; margin: 0 0 .5em; }

/* Service page type scale */
.page-service h1 { font-size: 32px; font-weight: 700; }
.page-service h2 { font-size: 24px; font-weight: 700; }
.page-service h3 { font-size: 20px; font-weight: 600; }
.page-service h4 { font-size: 16px; font-weight: 600; }
/* Blog page type scale */
.page-blog h1 { font-size: 24px; font-weight: 700; }
.page-blog h2 { font-size: 20px; font-weight: 700; }
.page-blog h3 { font-size: 16px; font-weight: 600; }

p { margin: 0 0 1.1em; }
a { color: var(--accent-dark); text-decoration: underline; }
a:hover { color: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo img { height: 44px; width: auto; }
.logo { text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--primary); display: flex; align-items: center; gap: 10px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.main-nav a { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 14px; display: inline-block; border-radius: 6px; }
.main-nav a:hover { background: var(--bg-alt); color: var(--accent-dark); }

.has-dropdown { position: relative; }
.dropdown-toggle::after { content: " \25BE"; font-size: 11px; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 288px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); padding: 8px;
  list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease; z-index: 120;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 10px 12px; font-size: 14px; border-radius: 6px; }

.call-btn {
  background: var(--accent); color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: 15px; padding: 13px 18px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; white-space: normal; text-align: center; max-width: 100%;
  box-shadow: 0 2px 8px rgba(224, 123, 42, 0.35);
}
.call-btn svg { flex: 0 0 auto; }
.call-btn:hover { background: var(--accent-dark); color: #fff; }
.call-btn svg { width: 18px; height: 18px; fill: currentColor; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 6px; width: 46px; height: 46px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 22px; height: 2px; background: var(--primary); position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 1; }
.hero-inner { position: relative; z-index: 2; padding-block: 64px; padding-inline: 20px; max-width: var(--maxw); margin-inline: auto; }
.hero h1 { color: #fff; max-width: 780px; }
.hero-sub { font-size: 19px; max-width: 640px; color: #f2f2f2; margin-bottom: 22px; }
.hero .call-btn { font-size: 18px; padding: 16px 26px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-badges span { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--primary); color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-block: 26px; text-align: center; }
.trust-grid .num { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: #fff; display: block; }
.trust-grid .lbl { font-size: 13px; color: #cfd6df; }

/* ---------- Sections ---------- */
section { padding-block: 54px; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: var(--accent-dark); margin-bottom: 8px; }

/* Key takeaways */
.takeaways { background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--card-shadow); }
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { margin-bottom: 8px; }

/* Cards / grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 24px; }
.card h3 { margin-top: 6px; }
.card .icon { width: 40px; height: 40px; color: var(--accent-dark); margin-bottom: 6px; }
.card .icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; }
.card a.card-link { font-weight: 700; }

/* Split section */
.split { display: grid; grid-template-columns: 45% 55%; gap: 34px; align-items: center; }
.split .media { position: relative; }
.split .media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.stat-badge { position: absolute; bottom: -18px; right: -14px; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 14px 18px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.stat-badge b { font-family: var(--font-head); font-size: 24px; display: block; line-height: 1; }
.stat-badge small { font-size: 12px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checklist li::before { content: "\2714"; position: absolute; left: 0; top: 0; color: var(--accent-dark); font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 22px; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 15px; }
table.data caption { text-align: left; font-weight: 600; color: var(--text-soft); padding-bottom: 8px; }
table.data th, table.data td { border: 1px solid var(--border); padding: 11px 13px; text-align: left; vertical-align: top; }
table.data thead th { background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 600; }
table.data tbody tr:nth-child(even) { background: var(--bg-alt); }

/* Divider strip */
.divider-strip { position: relative; height: 250px; }
.divider-strip img { width: 100%; height: 100%; object-fit: cover; }
.divider-strip::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }

/* Brand logo strip */
.brand-strip { background: #fff; border-block: 1px solid var(--border); }
.brand-strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 34px; padding-block: 24px; }
.brand-strip img { height: 54px; width: auto; filter: grayscale(100%); opacity: .8; transition: filter .2s, opacity .2s; }
.brand-strip img:hover { filter: grayscale(0%); opacity: 1; }
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: center; }
.brand-grid .brand-cell { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; background: #fff; }
.brand-grid img { height: 64px; width: auto; margin-inline: auto; }

/* Areas (dark) section */
.areas { background: var(--primary-dark); color: #fff; }
.areas h2 { color: #fff; }
.areas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.areas-list { columns: 2; list-style: none; padding: 0; margin: 0; }
.areas-list li { margin-bottom: 10px; break-inside: avoid; }
.areas-list a { color: #ffd9b8; }
.map-card { border-radius: var(--radius); overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.15); }
.map-card iframe { display: block; width: 100%; height: 340px; border: 0; }

/* Process steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--card-shadow); }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700; margin-bottom: 10px; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--card-shadow); }
.faq-item h3 { margin: 0 0 8px; }
.faq-answer { margin: 0; color: var(--text-soft); }
.faq-answer strong { color: var(--text); }

/* Mid CTA inline */
.mid-cta { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 26px; text-align: center; margin-block: 30px; }
.mid-cta p { font-size: 18px; margin-bottom: 16px; color: #eef1f5; }
.mid-cta .call-btn { font-size: 17px; }

/* Emergency band */
.emergency-band { background: var(--emergency); color: #fff; text-align: center; padding-block: 18px; }
.emergency-band a { color: #fff; font-weight: 700; }

/* Final CTA (different bg from footer) */
.final-cta { background: linear-gradient(135deg, #e07b2a 0%, #c4661c 100%); color: #fff; text-align: center; }
.final-cta h2 { color: #fff; }
.final-cta p { font-size: 19px; max-width: 640px; margin-inline: auto; margin-bottom: 22px; }
.final-cta .call-btn { background: #fff; color: var(--accent-dark) !important; font-size: 19px; padding: 16px 28px; }
.final-cta .call-btn:hover { background: #fff5ec; }

/* Content prose helpers */
.prose { max-width: 820px; }
.prose figure { margin: 24px 0; }
.prose figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prose figcaption { font-size: 14px; color: var(--text-soft); margin-top: 8px; }
.answer-lead { font-size: 18px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text-soft); padding-block: 12px; }
.breadcrumb a { color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #c9d1db; padding-block: 46px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c9d1db; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-blurb { font-size: 14px; line-height: 1.6; }
.footer-logo { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 18px; margin-bottom: 12px; display: inline-flex; align-items: center; gap: 8px; }
.footer-phone { display: inline-block; margin-top: 8px; font-size: 20px; font-weight: 700; color: #fff; text-decoration: none; }
.service-area { background: var(--primary); border-radius: var(--radius); padding: 22px 24px; margin-top: 34px; }
.service-area h3 { color: #fff; }
.service-area p { color: #c9d1db; font-size: 14px; margin-bottom: 8px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 30px; padding-top: 18px; font-size: 13px; color: #90a0b3; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .stat-badge { right: 14px; }
  .areas-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: fixed; inset: 68px 0 auto 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 10px 24px rgba(0,0,0,.12); padding: 12px 20px 20px; display: none; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 14px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; min-width: 0; }
  .header-cta { order: 2; }
  .call-btn.header-call .label-long { display: none; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .page-service h1 { font-size: 27px; }
  .page-service h2 { font-size: 21px; }
  .page-service h3 { font-size: 18px; }
  .hero-inner { padding-block: 46px; }
  .hero-sub { font-size: 17px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .logo img { height: 36px; }
  /* Header call button becomes icon-only to guarantee no overflow on small phones */
  .call-btn.header-call { font-size: 0; gap: 0; padding-inline: 13px; }
  .call-btn.header-call svg { width: 20px; height: 20px; }
  .hero .call-btn, .final-cta .call-btn, .mid-cta .call-btn { font-size: 16px; padding: 14px 18px; }
}
@media (max-width: 520px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .areas-list { columns: 1; }
  .header-inner { gap: 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
