
/* FINAL POLISH PASS */
/* Service diagnostic/detail panels: restore hierarchy so the explanatory headline does not overpower the section. */
.leak-layout .leak-panel,
.problem-layout .problem-panel {
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(270px, .82fr) !important;
  gap: clamp(22px, 3vw, 38px) !important;
  padding: clamp(27px, 3.6vw, 42px) !important;
  align-items: center !important;
}
.leak-layout .leak-copy h3,
.problem-layout .problem-copy h3 {
  max-width: 680px;
  margin: 12px 0 14px !important;
  font-size: clamp(1.55rem, 2.05vw, 2.12rem) !important;
  line-height: 1.13 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}
.leak-layout .leak-copy p,
.problem-layout .problem-copy p {
  font-size: .94rem !important;
  line-height: 1.7 !important;
}
.leak-layout .leak-fix,
.problem-layout .problem-fix {
  padding: clamp(22px, 2.6vw, 31px) !important;
}
.leak-layout .leak-fix h4,
.problem-layout .problem-fix h4 {
  font-size: clamp(1.28rem, 1.65vw, 1.62rem) !important;
  line-height: 1.18 !important;
}
.leak-layout .leak-symptoms,
.problem-layout .problem-signs { margin-top: 21px !important; gap: 8px !important; }

/* Header dropdown refinements. */
.nav-services-dropdown .nav-dropdown-menu { width: 282px; }
@media (min-width: 901px) {
  .nav-item-dropdown:hover > .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
  }
  .nav-item-dropdown:hover > .nav-dropdown-toggle svg { transform: rotate(180deg); }
}
@media (max-width: 900px) {
  .nav-services-dropdown.open .nav-dropdown-menu { max-height: 360px !important; margin-bottom: 7px; }
  .nav-work-dropdown.open .nav-dropdown-menu { max-height: 110px !important; }
  .nav-dropdown-menu .dropdown-note { font-size: .64rem; }
}
@media (max-width: 760px) {
  .leak-layout .leak-panel,
  .problem-layout .problem-panel {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 22px !important;
  }
  .leak-layout .leak-copy h3,
  .problem-layout .problem-copy h3 {
    font-size: clamp(1.42rem, 7vw, 1.82rem) !important;
  }
  .leak-layout .leak-fix,
  .problem-layout .problem-fix { padding: 20px !important; }
}

/* Health Check page shell */
.health-check-page {
  position: relative;
  padding: 132px 0 clamp(5.5rem, 8vw, 7rem);
  overflow: hidden;
}
.health-check-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 900px;
  right: -210px;
  top: -350px;
  transform: rotate(31deg);
  background: linear-gradient(90deg, transparent, rgba(203,252,4,.018), rgba(203,252,4,.085), rgba(255,255,255,.024), transparent);
  pointer-events: none;
}
.health-check-frame {
  position: relative;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}
.health-check-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, rgba(203,252,4,.018) 0 1px, transparent 1px 22px);
  mask-image: linear-gradient(135deg, #000, transparent 76%);
  pointer-events: none;
}
.health-check-frame #dhc-root {
  position: relative;
  z-index: 1;
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding: clamp(28px, 4.4vw, 44px) !important;
  border: 1px solid rgba(203,252,4,.12);
  border-radius: 22px;
  background: rgba(18,18,18,.88) !important;
}
.health-check-frame #dhc-root .dhc-landing-title { font-size: clamp(2.25rem, 5vw, 3.65rem) !important; max-width: 650px !important; }
.health-check-frame #dhc-root .dhc-landing-sub { max-width: 610px !important; }
.health-check-frame #dhc-root .dhc-form-head { margin-bottom: 1.55rem; }
.health-check-frame #dhc-root .dhc-qcard { background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.075); }
.health-check-frame #dhc-root .dhc-btn-primary { box-shadow: none; }
.health-check-frame #dhc-root .dhc-btn-primary:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(203,252,4,.15); }
.health-check-context {
  width: min(760px, 100%);
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.health-context-card {
  padding: 15px 17px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}
.health-context-card span { color: var(--lime); font-family: 'Satoshi', sans-serif; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.health-context-card p { margin-top: 6px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
@media (max-width: 720px) {
  .health-check-page { padding-top: 104px; padding-bottom: 4.5rem; }
  .health-check-frame { padding: 7px; border-radius: 23px; }
  .health-check-frame #dhc-root { padding: 22px 17px 28px !important; border-radius: 17px; }
  .health-check-context { grid-template-columns: 1fr; }
}

/* Iteration 2: close dropdowns cleanly after Escape/click-out even while the trigger keeps focus. */
@media (min-width: 901px) {
  .nav-item-dropdown:not(.open):focus-within:not(:hover) > .nav-dropdown-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, -7px) scale(.985) !important;
  }
}

/* Iteration 2: service diagnostic headlines are supporting hooks, not page-level headlines. */
.leak-layout .leak-copy h3,
.problem-layout .problem-copy h3 {
  font-size: clamp(1.5rem, 1.8vw, 1.9rem) !important;
  line-height: 1.15 !important;
}
@media (max-width: 760px) {
  .leak-layout .leak-copy h3,
  .problem-layout .problem-copy h3 {
    font-size: clamp(1.38rem, 6.5vw, 1.68rem) !important;
  }
}

/* Iteration 3: dropdowns are deliberate click/tap controls, not hover traps. */
@media (min-width: 901px) {
  .nav-item-dropdown:not(.open) > .nav-dropdown-menu,
  .nav-item-dropdown:not(.open):focus-within > .nav-dropdown-menu,
  .nav-item-dropdown:not(.open):hover > .nav-dropdown-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, -7px) scale(.985) !important;
  }
  .nav-item-dropdown.open > .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) scale(1) !important;
  }
  .nav-item-dropdown:not(.open) > .nav-dropdown-toggle svg { transform: rotate(0) !important; }
  .nav-item-dropdown.open > .nav-dropdown-toggle svg { transform: rotate(180deg) !important; }
}
@media (max-width: 900px) {
  .nav-item-dropdown:not(.open) > .nav-dropdown-menu {
    max-height: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .nav-item-dropdown.open > .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
  }
}
