/* ===========================
   HERK'S PLUMBING - Main CSS
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --navy:    #07253d;
  --blue:    #0d4a7a;
  --mid:     #1a6fb5;
  --sky:     #3bb8e8;
  --white:   #ffffff;
  --off:     #f4f8fc;
  --gray:    #6b7280;
  --dark:    #1f2937;
  --orange:  #f97316;
  --red:     #ef4444;
  --gold:    #f59e0b;
  --border:  #d1dce8;
  --radius:  8px;
  --shadow:  0 4px 24px rgba(7,37,61,0.12);
  --shadow-lg: 0 12px 48px rgba(7,37,61,0.18);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
  background: var(--orange);
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.announcement-bar a { color: white; text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo-wrap img { height: 56px; width: auto; }

nav.main-nav { display: flex; align-items: center; gap: 4px; }

nav.main-nav a {
  color: rgba(255,255,255,0.85);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  background: var(--mid);
  color: var(--white);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sky);
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.phone-link:hover { color: white; }
.phone-link svg { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-primary:hover { background: #ea6c0a; border-color: #ea6c0a; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,0.4); }

.btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.5);
}
.btn-secondary:hover { background: white; color: var(--navy); border-color: white; }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: white; }

.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 10px; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: white; border-radius: 2px; transition: all 0.3s; }

/* ===== HERO ===== */
.hero {
  position: relative;
  background: var(--navy);
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,184,232,0.15);
  border: 1px solid rgba(59,184,232,0.4);
  color: var(--sky);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-badge::before { content: '★'; color: var(--gold); }

.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  color: white;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero h1 span { color: var(--sky); }

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-trust {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
}
.trust-item::before { content: '✓'; color: var(--sky); font-weight: 700; font-size: 15px; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--mid);
  padding: 20px 0;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  divide-x: 1px solid rgba(255,255,255,0.2);
}
.stat-item {
  text-align: center;
  padding: 12px 24px;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: white;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ===== SECTION STYLES ===== */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-dark { background: var(--navy); color: white; }
.section-off { background: var(--off); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  display: inline-block;
  color: var(--mid);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.section-dark .section-label { color: var(--sky); }
.section-title {
  font-size: clamp(28px, 4vw, 46px);
  margin-bottom: 16px;
  color: var(--navy);
}
.section-dark .section-title { color: white; }
.section-sub {
  font-size: 17px;
  color: var(--gray);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-dark .section-sub { color: rgba(255,255,255,0.7); }

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: all 0.3s;
  cursor: pointer;
}
.service-card:hover {
  border-color: var(--mid);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--off);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background 0.3s;
}
.service-card:hover .service-icon { background: var(--mid); }
.service-icon svg { width: 32px; height: 32px; }
.service-card:hover .service-icon svg { filter: brightness(10); }

.service-card h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 10px;
}
.service-card p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.65;
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mid);
  font-weight: 600;
  font-size: 13px;
  margin-top: 16px;
  transition: gap 0.2s;
}
.service-card:hover .service-link { gap: 10px; }

/* Emergency card */
.service-card.emergency {
  background: #fff5f5;
  border-color: var(--red);
}
.service-card.emergency .service-icon { background: #fee2e2; }
.service-card.emergency h3 { color: var(--red); }
.service-card.emergency .service-link { color: var(--red); }

/* ===== WHY CHOOSE US ===== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.why-graphic {
  position: relative;
}
.why-graphic-main {
  background: linear-gradient(135deg, var(--blue), var(--mid));
  border-radius: 16px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.why-stat-big {
  font-family: 'Oswald', sans-serif;
  font-size: 72px;
  font-weight: 700;
  color: white;
  line-height: 1;
}
.why-stat-big span { font-size: 36px; color: var(--sky); }
.why-graphic-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--orange);
  color: white;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.why-badge-num {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.why-badge-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }

.why-features { display: flex; flex-direction: column; gap: 24px; }
.why-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.why-feature-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  background: var(--off);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.why-feature h4 { font-size: 18px; color: var(--navy); margin-bottom: 4px; }
.why-feature p { font-size: 14px; color: var(--gray); line-height: 1.6; }

/* ===== PROCESS ===== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(12.5% + 8px);
  right: calc(12.5% + 8px);
  height: 2px;
  background: linear-gradient(to right, var(--mid), var(--sky));
}
.process-step { text-align: center; padding: 0 16px; position: relative; }
.step-num {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--sky);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--sky);
  position: relative;
  z-index: 1;
}
.process-step h4 { color: white; font-size: 17px; margin-bottom: 8px; }
.process-step p { color: rgba(255,255,255,0.65); font-size: 14px; line-height: 1.6; }

/* ===== TESTIMONIALS ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.3s;
}
.review-card:hover { box-shadow: var(--shadow); }
.review-stars { color: var(--gold); font-size: 18px; margin-bottom: 14px; letter-spacing: 2px; }
.review-text {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--dark);
  line-height: 1.7;
  margin-bottom: 20px;
}
.reviewer {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reviewer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: white;
}
.reviewer-name { font-weight: 600; font-size: 14px; color: var(--navy); }
.reviewer-source { font-size: 12px; color: var(--gray); }

/* ===== SERVICE AREAS ===== */
.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.area-tag {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  transition: all 0.2s;
}
.area-tag:hover { background: var(--mid); color: white; border-color: var(--mid); }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--mid) 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(59,184,232,0.07);
}
.cta-banner h2 { color: white; font-size: clamp(28px, 4vw, 46px); margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,0.75); font-size: 17px; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== CONTACT FORM ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info h3 { font-size: 28px; color: var(--navy); margin-bottom: 16px; }
.contact-info p { color: var(--gray); line-height: 1.7; margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: var(--off);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.contact-item-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray); margin-bottom: 2px; }
.contact-item-value { font-weight: 600; color: var(--navy); font-size: 15px; }

.form-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 22px; color: var(--navy); margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--dark);
  background: var(--off);
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--mid);
  background: white;
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 14px; line-height: 1.7; margin: 16px 0 20px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  transition: all 0.2s;
}
.social-link:hover { background: var(--mid); border-color: var(--mid); color: white; }

.footer-heading {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--sky); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { transition: color 0.2s; }
.footer-legal a:hover { color: white; }

/* ===== INNER PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: white; font-size: clamp(32px, 4vw, 52px); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.75); font-size: 17px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 13px; }
.breadcrumb a { color: var(--sky); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ===== LEGAL PAGES ===== */
.legal-content { max-width: 820px; margin: 0 auto; padding: 64px 24px; }
.legal-content h1 { font-size: 36px; color: var(--navy); margin-bottom: 8px; }
.legal-date { color: var(--gray); font-size: 13px; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-content h2 { font-size: 22px; color: var(--navy); margin: 36px 0 12px; }
.legal-content h3 { font-size: 17px; color: var(--dark); margin: 24px 0 8px; }
.legal-content p, .legal-content li { color: var(--gray); line-height: 1.8; margin-bottom: 14px; }
.legal-content li { padding-left: 8px; }
.legal-content ul { padding-left: 20px; list-style: disc; margin-bottom: 16px; }

/* ===== SERVICE PAGE VISUAL PANELS ===== */
.service-visual {
  border-radius: 16px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.service-visual--light { background: var(--off); }
.service-visual--dark  { background: var(--navy); }

/* Flip layout for alternating service sections */
.why-grid--flip {
  direction: ltr;
}
.why-grid--flip > :first-child { order: 2; }
.why-grid--flip > :last-child  { order: 1; }

/* ===== ABOUT PAGE CLASSES ===== */
.about-panel {
  background: linear-gradient(135deg, var(--navy), var(--mid));
  border-radius: 16px;
  padding: 40px;
  color: white;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.stats-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  nav.main-nav { display: none; }
  .hamburger { display: flex; }
  nav.main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 20px;
    gap: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 99;
  }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Reset flip order on mobile so text always comes first */
  .why-grid--flip > :first-child { order: 1; }
  .why-grid--flip > :last-child  { order: 2; }
  .service-visual { padding: 28px; min-height: 160px; }
  .about-panel { padding: 28px; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr 1fr; gap: 32px; }
  .process-steps::before { display: none; }
  .reviews-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }

  /* Scale down phone number on tablet */
  .phone-link {
    font-size: 16px;
    gap: 6px;
  }
  .phone-link svg { width: 16px; height: 16px; }

  /* Shrink quote button on tablet */
  .header-cta .btn {
    padding: 9px 14px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .service-visual { padding: 20px; min-height: 140px; }
  .about-panel { padding: 24px; }
  .stats-row { gap: 20px; }

  /* Header: keep logo + phone + hamburger on one line */
  .header-inner {
    gap: 10px;
  }

  /* Phone number: compact icon-only style on small screens */
  .phone-link {
    font-size: 14px;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .phone-link svg { width: 15px; height: 15px; }

  /* Hide "Get a Quote" button in header on small phones to save space */
  .header-cta .btn {
    display: none;
  }

  /* Logo slightly smaller on mobile */
  .logo-wrap img { height: 44px; }

  /* Hero adjustments */
  .hero { min-height: auto; padding: 48px 0; }
  .hero p { font-size: 16px; }

  /* Footer bottom stacks on very small screens */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-legal { flex-wrap: wrap; justify-content: center; gap: 12px; }
}

@media (max-width: 380px) {
  /* Extra small phones: show only phone icon, hide number text */
  .phone-link span {
    display: none;
  }
  .phone-link svg {
    width: 20px;
    height: 20px;
  }
}
