/* ==========================================================================
   NJ Leak Detection - Deptford, NJ
   Core Production Stylesheet
   ========================================================================== */

:root {
  --color-primary: #0a3d62;         /* Deep authoritative water blue */
  --color-primary-dark: #062338;    /* Deep navy for footer/contrast */
  --color-primary-light: #1e6091;   /* Medium ocean blue for links/highlights */
  --color-accent: #d9531e;          /* Vibrant call CTA orange (exclusive to call actions) */
  --color-accent-hover: #b84012;    /* Darker orange hover */
  --color-accent-light: #fff3ec;    /* Soft tint for callout highlights */
  
  --color-text: #2d3748;            /* Slate dark for body copy */
  --color-text-muted: #4a5568;      /* Secondary copy */
  --color-heading: #0f1d2d;         /* High-contrast dark headings */
  
  --color-bg: #ffffff;              /* Crisp white background */
  --color-bg-alt: #f4f8fa;          /* Cool clean light background for alternating sections */
  --color-bg-subtle: #edf3f7;       /* Card & callout background */
  --color-border: #d8e2ea;          /* Subtle border */
  --color-border-light: #eaf0f5;    /* Very light separator */

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1180px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 12px rgba(10, 61, 98, 0.08);
  --shadow-lg: 0 8px 24px rgba(10, 61, 98, 0.12);
  
  --header-height: 76px;
}

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

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

body {
  font-family: var(--font-family);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover, a:focus {
  color: var(--color-primary);
  text-decoration-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.85rem;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  letter-spacing: -0.015em;
  margin-top: 1.5rem;
}

h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  margin-top: 1.25rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1.25rem;
}

ul, ol {
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  color: var(--color-heading);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Layout Containers & Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.brand-logo:hover .brand-name {
  color: var(--color-primary-light);
}

.nav-desktop {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover, .nav-link:focus {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary-light);
}

.nav-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Dropdown */
.nav-item-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.5rem 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 2px solid transparent;
}

.dropdown-toggle:hover, .dropdown-toggle:focus {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary-light);
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem 0;
  list-style: none;
  z-index: 1050;
  margin-top: 0.25rem;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu,
.nav-item-dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-item a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item a:hover, .dropdown-item a:focus {
  background-color: var(--color-bg-alt);
  color: var(--color-primary);
}

/* Call Button (Exclusive Bright Accent) */
.btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-accent);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(217, 83, 30, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.btn-call:hover, .btn-call:focus {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 83, 30, 0.45);
}

.btn-call-large {
  font-size: 1.2rem;
  padding: 0.95rem 1.85rem;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb-nav {
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumb-item::after {
  content: "/";
  color: #a0aec0;
}

.breadcrumb-item:last-child::after {
  content: "";
}

.breadcrumb-item a {
  color: var(--color-primary-light);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.current {
  color: var(--color-text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero Sections
   -------------------------------------------------------------------------- */
.hero {
  padding: 3.5rem 0 3rem 0;
  background-color: #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  max-width: 680px;
}

.hero-tagline {
  display: inline-block;
  background-color: var(--color-bg-subtle);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.hero-call-info {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.hero-image-wrapper {
  position: relative;
}

.hero-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.hero-image-caption {
  font-size: 0.825rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Two-Column Content Layouts (Alternating & Editorial)
   -------------------------------------------------------------------------- */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin: 2rem 0;
}

.editorial-grid.reverse {
  grid-template-columns: 1fr 1fr;
}

.editorial-media {
  position: relative;
}

.editorial-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Structured Step-by-Step & Diagnostic Grids
   -------------------------------------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2.25rem 0 1.5rem 0;
}

.process-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.process-step-num {
  display: inline-block;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.process-card h3 {
  font-size: 1.2rem;
  margin-top: 0.25rem;
  margin-bottom: 0.6rem;
}

.process-card p {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* Service Summary Grid (Homepage) */
.services-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.service-summary-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.service-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.service-summary-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.service-summary-card p {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.card-link {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Warning Signs & Local Causes Lists
   -------------------------------------------------------------------------- */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}

.checklist-item {
  background-color: #ffffff;
  border-left: 4px solid var(--color-primary-light);
  border-top: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.checklist-item h4 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: var(--color-heading);
}

.checklist-item p {
  margin-bottom: 0;
  font-size: 0.98rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Callout & Mid-Page CTA Boxes
   -------------------------------------------------------------------------- */
.callout-box {
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent);
  padding: 2rem 2.25rem;
  border-radius: var(--radius-md);
  margin: 2.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .callout-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.callout-text h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.callout-text p {
  margin-bottom: 0;
  color: var(--color-text-muted);
  max-width: 600px;
}

/* Gas Warning Banner */
.gas-warning-banner {
  background-color: #fff5f5;
  border: 1px solid #fed7d7;
  border-left: 5px solid #e53e3e;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 2rem 0;
  color: #742a2a;
}

.gas-warning-banner h4 {
  color: #9b2c2c;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.gas-warning-banner p {
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq-section {
  margin: 2.5rem 0;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  background-color: #ffffff;
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-heading);
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.faq-answer {
  padding: 1.25rem 1.5rem;
  color: var(--color-text);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Neighborhood & Town Grids (Service Areas)
   -------------------------------------------------------------------------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.area-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.area-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.area-card p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-primary-dark);
  color: #e2e8f0;
  padding: 4.5rem 0 2rem 0;
  font-size: 0.95rem;
  border-top: 4px solid var(--color-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.footer-col p {
  color: #cbd5e1;
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.925rem;
  transition: color 0.15s ease;
}

.footer-links a:hover, .footer-links a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.footer-phone-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.footer-phone-cta:hover {
  color: #ffab82;
}

.footer-notice {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.55;
  color: #94a3b8;
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom a {
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   Mobile Sticky Call Bar (≤ 768px)
   -------------------------------------------------------------------------- */
.sticky-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.15);
  padding: 0.65rem 1rem;
  z-index: 9999;
}

.sticky-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-accent);
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none !important;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  width: 100%;
  min-height: 48px;
  box-shadow: 0 2px 6px rgba(217, 83, 30, 0.4);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .editorial-grid,
  .editorial-grid.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-image {
    height: 300px;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 72px; /* Ensure space for sticky call bar */
  }

  .sticky-call-bar {
    display: block;
  }

  .header-cta {
    display: none; /* Mobile sticky bar replaces header button on small screens */
  }

  .mobile-nav-toggle {
    display: block;
  }

  .nav-desktop {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 1.25rem 1.5rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-desktop.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-link, .dropdown-toggle {
    width: 100%;
    padding: 0.85rem 0.5rem;
    min-height: 44px;
    border-bottom: 1px solid var(--color-border-light);
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background-color: var(--color-bg-alt);
    margin: 0;
    padding: 0.25rem 0 0.5rem 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-item-dropdown.is-open .dropdown-menu {
    display: block;
  }

  .dropdown-item a {
    padding: 0.75rem 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
