/* JB Plumbing HVAC & Construction — Main Stylesheet
   Mobile-first, clean, simple. */

/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --jb-red: #750808;
  --jb-red-hover: #5a0606;
  --jb-gray: #7e8796;
  --jb-dark: #1a1a1a;
  --jb-light: #f8f8f8;
  --jb-white: #ffffff;
  --jb-border: #e0e0e0;
  --jb-text: #333333;
  --jb-text-light: #666666;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--jb-text);
  background: var(--jb-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--jb-red); text-decoration: none; }
a:hover { color: var(--jb-red-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--jb-dark);
}

h1 { font-size: 2rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.65rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ── Top Banner ──────────────────────────────────── */
.top-banner {
  background: var(--jb-red);
  color: var(--jb-white);
  text-align: center;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.top-banner a { color: var(--jb-white); text-decoration: underline; }
.top-banner a:hover { opacity: 0.9; }

/* ── Header ──────────────────────────────────────── */
.site-header {
  background: var(--jb-white);
  border-bottom: 1px solid var(--jb-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo img { height: 50px; width: auto; }
.header-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--jb-red);
  line-height: 1.2;
}
.header-logo-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--jb-gray);
}

.header-right { display: flex; align-items: center; gap: 20px; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--jb-red);
}
.header-phone svg { width: 18px; height: 18px; fill: var(--jb-red); }

.header-emergency {
  background: var(--jb-red);
  color: var(--jb-white);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Navigation ──────────────────────────────────── */
.main-nav { background: var(--jb-dark); }
.nav-inner {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.nav-links { display: flex; list-style: none; width: 100%; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block;
  padding: 14px 16px;
  color: var(--jb-white);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}
.nav-links > li > a:hover,
.nav-links > li.active > a {
  background: var(--jb-red);
  color: var(--jb-white);
}

/* Dropdowns */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--jb-white);
  min-width: 240px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 0 0 4px 4px;
  z-index: 999;
}
.nav-links > li:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--jb-dark);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--jb-border);
}
.nav-dropdown a:hover { background: var(--jb-light); color: var(--jb-red); }
.nav-dropdown a:last-child { border-bottom: none; }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--jb-white);
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
              url('../images/hero-bg.webp') center/cover no-repeat;
  color: var(--jb-white);
  padding: 60px 20px;
  text-align: center;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-content { max-width: 800px; }
.hero h1 { font-size: 2.2rem; color: var(--jb-white); margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; margin-bottom: 1.5rem; opacity: 0.95; }

.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  min-width: 44px;
  min-height: 44px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--jb-red); color: var(--jb-white); }
.btn-primary:hover { background: var(--jb-red-hover); color: var(--jb-white); }
.btn-outline { background: transparent; color: var(--jb-white); border: 2px solid var(--jb-white); }
.btn-outline:hover { background: var(--jb-white); color: var(--jb-red); }
.btn-white { background: var(--jb-white); color: var(--jb-red); }
.btn-white:hover { background: var(--jb-light); color: var(--jb-red); }

/* ── Trust Bar ───────────────────────────────────── */
.trust-bar {
  background: var(--jb-light);
  padding: 20px 0;
  border-bottom: 1px solid var(--jb-border);
}
.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--jb-dark);
  white-space: nowrap;
}
.trust-item .star { color: #f5a623; }

/* ── Sections ────────────────────────────────────── */
.section { padding: 50px 0; }
.section-alt { background: var(--jb-light); }
.section-dark { background: var(--jb-dark); color: var(--jb-white); }
.section-dark h2 { color: var(--jb-white); }

.section-header { text-align: center; margin-bottom: 2rem; }
.section-header p { color: var(--jb-text-light); max-width: 600px; margin: 0 auto; }

/* ── Service Cards ───────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--jb-white);
  border: 1px solid var(--jb-border);
  border-radius: 8px;
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.service-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { color: var(--jb-text-light); font-size: 0.9rem; margin-bottom: 1rem; }
.service-card .btn { font-size: 0.85rem; padding: 10px 20px; }

/* ── Reviews ─────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.review-card {
  background: var(--jb-white);
  border: 1px solid var(--jb-border);
  border-radius: 8px;
  padding: 24px;
}
.review-stars { color: #f5a623; font-size: 1.1rem; margin-bottom: 8px; }
.review-text { font-style: italic; color: var(--jb-text); margin-bottom: 12px; font-size: 0.95rem; }
.review-author { font-weight: 700; font-size: 0.85rem; color: var(--jb-dark); }
.review-date { font-size: 0.8rem; color: var(--jb-gray); }

/* ── Page Content ────────────────────────────────── */
.page-hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url('../images/hero-bg.webp') center/cover no-repeat;
  color: var(--jb-white);
  padding: 40px 20px;
  text-align: center;
}
.page-hero h1 { color: var(--jb-white); font-size: 2rem; }
.page-hero p { opacity: 0.9; }

.page-content { padding: 40px 0; }
.page-content h2 { margin-top: 1.5rem; }
.page-content ul, .page-content ol { margin-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { margin-bottom: 0.4rem; }

/* Content with sidebar */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
.content-main { min-width: 0; }
.content-sidebar {
  background: var(--jb-light);
  border-radius: 8px;
  padding: 24px;
}
.sidebar-cta {
  background: var(--jb-red);
  color: var(--jb-white);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
}
.sidebar-cta h3 { color: var(--jb-white); margin-bottom: 0.5rem; }
.sidebar-cta p { margin-bottom: 1rem; opacity: 0.9; }
.sidebar-cta .btn { background: var(--jb-white); color: var(--jb-red); }

/* Related services sidebar */
.related-services { margin-bottom: 20px; }
.related-services h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.related-services a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--jb-border);
  color: var(--jb-text);
  font-size: 0.9rem;
}
.related-services a:hover { color: var(--jb-red); }
.related-services a:last-child { border-bottom: none; }

/* ── FAQ ─────────────────────────────────────────── */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--jb-border);
  padding: 16px 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  gap: 12px;
}
.faq-question::after { content: '+'; font-size: 1.4rem; color: var(--jb-red); flex-shrink: 0; }
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer { display: none; padding-top: 10px; color: var(--jb-text-light); font-size: 0.95rem; }
.faq-item.open .faq-answer { display: block; }

/* ── CTA Section ─────────────────────────────────── */
.cta-section {
  background: var(--jb-red);
  color: var(--jb-white);
  text-align: center;
  padding: 50px 20px;
}
.cta-section h2 { color: var(--jb-white); font-size: 1.8rem; margin-bottom: 0.75rem; }
.cta-section p { margin-bottom: 1.5rem; opacity: 0.9; font-size: 1.05rem; }
.cta-section .btn { background: var(--jb-white); color: var(--jb-red); }
.cta-section .btn:hover { background: var(--jb-light); }

/* ── Team Grid ───────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.team-card { text-align: center; }
.team-card img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--jb-border);
}
.team-card h3 { font-size: 1rem; margin-bottom: 2px; }
.team-card p { color: var(--jb-gray); font-size: 0.85rem; }

/* ── Specials / Coupons ──────────────────────────── */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.coupon-card {
  border: 2px dashed var(--jb-red);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: var(--jb-white);
}
.coupon-amount { font-size: 2rem; font-weight: 700; color: var(--jb-red); }
.coupon-desc { font-size: 1rem; font-weight: 600; margin: 8px 0; }
.coupon-fine { font-size: 0.8rem; color: var(--jb-gray); }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  background: var(--jb-dark);
  color: #ccc;
  padding: 40px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 30px;
}
.footer-col h3 { color: var(--jb-white); font-size: 1rem; margin-bottom: 12px; }
.footer-col a { color: #ccc; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--jb-white); }
.footer-col p { font-size: 0.9rem; line-height: 1.5; }

.footer-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.85rem;
}
.footer-brands span {
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 3px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.footer-badge {
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 20px;
  text-align: center;
  font-size: 0.8rem;
}
.footer-bottom a { color: #ccc; }
.footer-bottom a:hover { color: var(--jb-white); }

/* ── GHL Form Placeholder ────────────────────────── */
.ghl-form-placeholder {
  background: var(--jb-light);
  border: 2px dashed var(--jb-border);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--jb-gray);
}

/* ── Service Area ────────────────────────────────── */
.area-columns {
  column-count: 2;
  column-gap: 30px;
}
.area-county { break-inside: avoid; margin-bottom: 20px; }
.area-county h3 { font-size: 1.05rem; color: var(--jb-red); margin-bottom: 6px; }
.area-county ul { list-style: none; margin: 0; padding: 0; }
.area-county li { padding: 3px 0; font-size: 0.9rem; }

/* ── Responsive ──────────────────────────────────── */
@media (min-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }
  .hero { padding: 80px 20px; min-height: 450px; }
  .hero h1 { font-size: 2.6rem; }
  .content-grid { grid-template-columns: 1fr 320px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .area-columns { column-count: 3; }
  body { font-size: 16px; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .hero { padding: 100px 20px; min-height: 500px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .area-columns { column-count: 4; }
}

/* Mobile nav */
@media (max-width: 767px) {
  body { font-size: 18px; }
  .hamburger { display: block; }
  .nav-inner { justify-content: flex-end; padding: 8px 20px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--jb-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-dropdown {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
  }
  .nav-dropdown a { color: #ccc; padding-left: 32px; }
  .nav-links > li:hover .nav-dropdown { display: none; }
  .nav-links > li.mobile-open .nav-dropdown { display: block; }

  .header-emergency { display: none; }
  .header-phone { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 300px; }

  .trust-items { gap: 12px; }
  .trust-item { font-size: 0.75rem; }
}

/* ── Utility ─────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
