/* styles.css - NJ Leak Detection (Galloway, NJ) */
:root {
  --primary-deep: #0B3C5D;    /* Deep water blue */
  --primary-mid: #1B6CA8;     /* Mid blue */
  --accent-aqua: #3FA9C9;     /* Aqua tone */
  --bg-cool: #F7FAFC;         /* Cool off-white */
  --text-ink: #0F1720;        /* Ink typography */
  --text-muted: #3E4C59;      /* Readable secondary charcoal */
  --call-accent: #FF6B35;     /* Bright accent RESERVED ONLY FOR CALL BUTTONS */
  --call-hover: #E8551E;
  --white: #FFFFFF;
  --border-light: #E2E8F0;
  --border-subtle: #CBD5E1;
  --shadow-sm: 0 1px 3px rgba(15, 23, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 32, 0.08);
  --font-heading: Georgia, "Times New Roman", Cambria, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-reading-width: 70ch;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-ink);
  background-color: var(--bg-cool);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--primary-deep);
  color: var(--white);
  padding: 12px 18px;
  z-index: 9999;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--call-accent);
}

a {
  color: var(--primary-mid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover, a:focus-visible {
  color: var(--primary-deep);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--primary-mid);
  outline-offset: 2px;
}

/* Base Layout Containers */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.reading-width {
  max-width: var(--max-reading-width);
}

/* Header & Navigation */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-deep);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-loc {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-ink);
  text-decoration: none;
  padding: 8px 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}
.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--primary-mid);
}

/* Desktop Dropdown */
.dropdown {
  position: relative;
}
.dropdown-toggle {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-ink);
  cursor: pointer;
  padding: 8px 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dropdown-toggle:hover,
.dropdown-toggle:focus-visible {
  color: var(--primary-mid);
}
.arrow-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  list-style: none;
  z-index: 1010;
}
.dropdown:hover .dropdown-menu,
.dropdown.is-open .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}
.dropdown-menu li {
  margin: 0;
}
.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-ink);
  text-decoration: none;
  min-height: 44px;
  line-height: 1.4;
}
.dropdown-menu li a:hover,
.dropdown-menu li a:focus-visible {
  background-color: #F1F5F9;
  color: var(--primary-deep);
}

/* Call Buttons */
.btn-call-header {
  background-color: var(--call-accent);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn-call-header:hover,
.btn-call-header:focus-visible {
  background-color: var(--call-hover);
  transform: translateY(-1px);
}

.btn-primary-call {
  background-color: var(--call-accent);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn-primary-call:hover,
.btn-primary-call:focus-visible {
  background-color: var(--call-hover);
  transform: translateY(-2px);
}

/* Mobile Toggle */
.btn-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1.4rem;
  color: var(--text-ink);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  line-height: 1;
}

/* Mobile Nav Drawer */
.mobile-nav-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 380px;
  background-color: var(--white);
  z-index: 2000;
  padding: 24px;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
}
.mobile-nav-panel.is-active {
  transform: translateX(0);
}
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.5);
  z-index: 1999;
}
.mobile-backdrop.is-active {
  display: block;
}
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.btn-close-mobile {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  color: var(--text-ink);
}
.mobile-nav-list {
  list-style: none;
  margin-bottom: 24px;
}
.mobile-nav-list li {
  margin-bottom: 4px;
}
.mobile-nav-list a,
.mobile-submenu-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-ink);
  text-decoration: none;
  min-height: 44px;
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.mobile-sub-list {
  list-style: none;
  padding-left: 16px;
  display: none;
  border-left: 2px solid var(--accent-aqua);
  margin: 6px 0 12px;
}
.mobile-sub-list.is-open {
  display: block;
}
.mobile-sub-list li a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 0;
  min-height: 44px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F6FA 100%);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border-light);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero-text h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1.18;
  color: var(--primary-deep);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.hero-text .lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}
.hero-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  display: block;
}

/* Breadcrumbs */
.breadcrumbs-nav {
  padding: 14px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.breadcrumbs-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumbs-list li::after {
  content: "/";
  margin-left: 8px;
  color: var(--border-subtle);
}
.breadcrumbs-list li:last-child::after {
  content: "";
}
.breadcrumbs-list a {
  text-decoration: none;
  color: var(--primary-mid);
}
.breadcrumbs-list a:hover {
  text-decoration: underline;
}

/* Editorial Sections */
section {
  padding: 54px 0;
}
section:nth-child(even) {
  background-color: var(--white);
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  line-height: 1.25;
  color: var(--primary-deep);
  margin-bottom: 18px;
  letter-spacing: -0.015em;
}
h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--primary-deep);
  margin: 24px 0 12px;
}
p {
  margin-bottom: 16px;
}
p:last-child {
  margin-bottom: 0;
}

/* Two Column Editorial Blocks */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 32px 0;
}
.editorial-grid.reverse {
  direction: rtl;
}
.editorial-grid.reverse > * {
  direction: ltr;
}
.editorial-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: block;
}

/* Technical Details Box / Warning Signs */
.feature-box {
  background: #F1F6FA;
  border-left: 4px solid var(--primary-mid);
  padding: 24px;
  border-radius: 0 6px 6px 0;
  margin: 28px 0;
}
.feature-box h3 {
  margin-top: 0;
  color: var(--primary-deep);
}

.checklist {
  list-style: none;
  margin: 18px 0;
}
.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 1rem;
}
.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-mid);
  font-weight: bold;
}

/* Process Steps */
.process-list {
  list-style: none;
  counter-reset: step-counter;
  margin: 28px 0;
}
.process-step {
  counter-increment: step-counter;
  position: relative;
  padding-left: 54px;
  margin-bottom: 24px;
}
.process-step::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-deep);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.process-step h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

/* Service Card Grids */
.services-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}
.service-card h3 {
  margin-top: 0;
  font-size: 1.22rem;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
}
.service-card .card-link {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Comparison / Reference Table */
.data-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
}
table.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border-light);
}
table.comparison-table th,
table.comparison-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
}
table.comparison-table th {
  background: #F1F6FA;
  font-family: var(--font-heading);
  color: var(--primary-deep);
  font-weight: 700;
}
table.comparison-table tr:last-child td {
  border-bottom: none;
}

/* FAQ Section */
.faq-wrap {
  margin: 32px 0;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 20px 24px;
}
.faq-question {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--primary-deep);
  margin-bottom: 10px;
}
.faq-answer {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Mid-Page & Final CTA Banners */
.editorial-cta-band {
  background: linear-gradient(135deg, #0B3C5D 0%, #1B6CA8 100%);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}
.editorial-cta-band h2 {
  color: var(--white);
  margin-bottom: 14px;
}
.editorial-cta-band p {
  color: #E2E8F0;
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 28px;
}
.editorial-cta-band .btn-primary-call {
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

/* Related Services Strip */
.related-services-strip {
  background: #F1F6FA;
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
}
.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
}
.related-link-card {
  background: var(--white);
  padding: 18px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}
.related-link-card h4 {
  font-family: var(--font-heading);
  color: var(--primary-deep);
  margin-bottom: 6px;
}
.related-link-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Footer */
footer {
  background: #07263B;
  color: #D3DFE8;
  padding: 56px 0 28px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #CADAE5;
  text-decoration: none;
}
.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--white);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid #163E5C;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.85rem;
  color: #9AB4C7;
}
.footer-parent-link {
  color: var(--accent-aqua);
  font-weight: 600;
}

/* Sticky Mobile Call Bar */
.sticky-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: 10px 16px;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}
.sticky-mobile-bar .btn-primary-call {
  width: 100%;
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .editorial-grid.reverse {
    direction: ltr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-desktop,
  .btn-call-header {
    display: none;
  }
  .btn-menu-toggle {
    display: block;
  }
  .mobile-nav-panel {
    display: block;
  }
  .sticky-mobile-bar {
    display: block;
  }
  body {
    padding-bottom: 74px; /* Space for sticky call bar */
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.55rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 430px) {
  .hero-text h1 {
    font-size: 1.75rem;
  }
  .hero-section {
    padding: 36px 0 28px;
  }
  section {
    padding: 40px 0;
  }
}
