html {
  scroll-padding-top: 140px;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: #44b651;
  color: #000;
  padding: 12px 20px;
  border-radius: 3px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 16px;
}

/* ─── Prevent pseudo-element blobs from causing horizontal scroll ─────────── */
.page-hero,
.cta-banner,
.hero {
  overflow: hidden;
}

/* ─── Mobile: fix common layout overflow issues ──────────────────────────── */
@media (max-width: 768px) {
  /* Tables scroll horizontally instead of breaking layout */
  .vs-table,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Two-column grids collapse to single column */
  .split,
  .two-col,
  .grid-2 {
    grid-template-columns: 1fr !important;
  }

  /* Buttons stack and fill width */
  .hero-ctas,
  .btn-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hero-ctas .btn,
  .hero-ctas a {
    text-align: center !important;
  }

  /* Section padding tighter on mobile */
  section {
    padding: 60px 0 !important;
  }

  .page-hero {
    padding: 100px 0 60px !important;
  }

  /* Container doesn't overflow */
  .container {
    padding: 0 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Page hero h1 doesn't overflow */
  .page-hero h1 {
    font-size: clamp(2.2rem, 10vw, 4rem) !important;
    word-break: break-word;
  }

  /* CTA banner padding */
  .cta-banner {
    padding: 60px 0 !important;
  }
}

/* ─── Main nav only (direct child of body) ─────────────────────────────── */
body > nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: rgba(10, 10, 10, 0.92) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

body > nav .nav-flex {
  align-items: center !important;
}

body > nav .nav-links {
  align-items: center !important;
}

/* Locations dropdown container */
body > nav .nav-details {
  position: relative !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* Style <summary> identically to a nav link <a> */
body > nav .nav-summary {
  display: block !important;
  color: #44b651;
  text-decoration: none;
  margin-left: 22px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 1px;
  transition: background-color 0.25s ease, color 0.25s ease;
  padding: 8px 10px;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  white-space: nowrap;
}

body > nav .nav-summary::-webkit-details-marker { display: none; }
body > nav .nav-summary::marker { display: none; }

body > nav .nav-summary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

body > nav .nav-summary:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: 2px solid #44b651;
  outline-offset: 3px;
}

/* Dropdown menu — absolute so it floats below without displacing phone CTA */
body > nav .nav-menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 22px !important;
  display: none !important;
  grid-template-columns: 1fr;
  gap: 4px;
  min-width: 180px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 200;
}

body > nav .nav-details[open] .nav-menu {
  display: grid !important;
}

body > nav .nav-menu a {
  width: 100%;
  margin-left: 0 !important;
  padding: 10px 12px !important;
  background: #101010 !important;
  border: 1px solid rgba(68, 182, 81, 0.18) !important;
  border-radius: 4px !important;
  font-size: 0.75rem !important;
}

body > nav .nav-menu a.active {
  background: rgba(68, 182, 81, 0.1) !important;
  border-color: rgba(68, 182, 81, 0.4) !important;
}

/* Phone icon — orange, button stays green */
body > nav .nav-links a.cta-link .cta-icon {
  filter: brightness(0) saturate(100%) invert(62%) sepia(98%) saturate(500%) hue-rotate(358deg) brightness(1.05);
}

/* ─── Footer nav reset — undo inline `nav {}` rules that leak in ─────────── */
footer nav,
.footer-nav {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  z-index: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  padding: 0 !important;
}

/* ─── Footer logo sizing — consistent across all pages ──────────────────── */
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: #44b651;
  margin-bottom: 8px;
}

/* ─── Hero padding (accounts for fixed nav height) ──────────────────────── */
.hero {
  padding-top: 210px !important;
}

.page-hero {
  padding-top: 190px !important;
}

.hero-topline,
.hero-actions,
.hero-ctas {
  position: relative;
  z-index: 2;
}

/* ─── Hamburger button (hidden on desktop) ───────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1200;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #44b651;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* X state */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hamburger focus state */
.nav-hamburger:focus-visible {
  outline: 2px solid #44b651;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  body > nav {
    padding: 0 !important;
  }

  body > nav .container {
    padding: 0 16px !important;
  }

  /* Single row: logo left, hamburger right */
  body > nav .nav-flex {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    padding: 10px 0 !important;
  }

  body > nav .logo {
    font-size: 1.1rem !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .nav-hamburger {
    display: flex !important;
  }

  /* Nav links hidden by default, slide down when open */
  body > nav .nav-links {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(10,10,10,0.97) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px 20px 20px !important;
    gap: 4px !important;
    border-top: 1px solid rgba(68,182,81,0.2) !important;
    z-index: 999 !important;
  }

  body > nav .nav-links.open {
    display: flex !important;
  }

  body > nav .nav-links a {
    margin-left: 0 !important;
    font-size: 0.82rem !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    width: 100% !important;
  }

  body > nav .nav-links a.cta-link {
    margin-top: 8px !important;
    text-align: center !important;
    border-bottom: none !important;
    border-radius: 3px !important;
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
  }

  body > nav .nav-details {
    width: 100% !important;
    align-items: flex-start !important;
  }

  body > nav .nav-summary {
    margin-left: 0 !important;
    font-size: 0.82rem !important;
    padding: 10px 12px !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 0 !important;
  }

  body > nav .nav-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    min-width: 0;
    width: 100%;
    padding-left: 12px !important;
  }

  body > nav .nav-menu a {
    font-size: 0.78rem !important;
    padding: 8px 12px !important;
    border-radius: 3px !important;
  }

  .hero {
    padding-top: 80px !important;
  }

  .page-hero {
    padding-top: 80px !important;
  }
}

/* ─── Typography enhancements ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* ─── Touch & interaction ─────────────────────────────────────────────────── */
button,
a,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ─── Focus visible (keyboard navigation) ────────────────────────────────── */
:focus-visible {
  outline: 2px solid #44b651;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Transition fix: no transition:all anti-pattern ─────────────────────── */
/* Overridden per-file; this is a safe base for global elements */
body > nav .nav-links a {
  transition: background-color 0.25s ease, color 0.25s ease !important;
}

/* ─── Reduced motion support ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar {
  background: #0d0d0d;
  border-top: 1px solid rgba(68, 182, 81, 0.18);
  border-bottom: 1px solid rgba(68, 182, 81, 0.18);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: #44b651;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-desc {
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }
}

/* ─── Image divider section ──────────────────────────────────────────────── */
.img-divider {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 110px 0;
  text-align: center;
}

.img-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.img-divider-inner {
  position: relative;
  z-index: 1;
}

.img-divider-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #44b651;
  margin-bottom: 16px;
}

.img-divider h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  margin-bottom: 28px;
  color: #fff;
}

.img-divider h2 span {
  color: #44b651;
}

@media (max-width: 768px) {
  .img-divider {
    background-attachment: scroll;
    padding: 70px 0;
  }
}

/* ─── Service card image layout (homepage) ───────────────────────────────── */
.svc-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 3px 3px 0 0;
  transition: transform 0.4s ease;
}

.service-card:hover .svc-img {
  transform: scale(1.04);
}

.svc-body {
  padding: 28px;
}

/* ─── Location card image layout (homepage) ──────────────────────────────── */
.loc-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 3px 3px 0 0;
  transition: transform 0.4s ease;
}

.location-card:hover .loc-img {
  transform: scale(1.04);
}

.loc-body {
  padding: 22px 24px;
}

/* ─── Location page feature image ────────────────────────────────────────── */
.location-feature-img {
  width: 100%;
  display: block;
}

.location-feature-img img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

/* ─── SVG icon in CTA phone link ─────────────────────────────────────────── */
.cta-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 2px;
}

.cta-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

body > nav .nav-links a.cta-link .cta-icon svg {
  stroke: #f97316; /* orange */
}
