/* Shared opening section and progressively enhanced quote form. */
.lead-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 450px);
  gap: 24px clamp(24px, 4vw, 56px);
  align-items: stretch;
  width: min(calc(100% - 64px), 1380px);
  margin: 20px auto 0;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 22px;
  background: var(--forest);
  color: #fff;
}
.lead-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lead-copy { min-width: 0; }
.lead-hero h1 {
  margin: 0 0 12px;
  max-width: 22ch;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.lead-description {
  max-width: 58ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #fff;
}
.lead-media {
  order: 1;
  grid-column: 1;
  min-width: 0;
  margin: auto 0 0;
  overflow: hidden;
  border-radius: 12px;
  align-self: stretch;
}
.lead-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.lead-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  grid-column: 1;
}
.lead-hero .post-meta { margin: 0; color: #fff; font-size: .85rem; }
.lead-breadcrumb { grid-column: 1; margin: 0; font-size: .82rem; color: #fff; }
.lead-breadcrumb a { color: #fff; text-decoration: underline; }
.quote-panel {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  min-width: 0;
  padding: 22px;
  border: 2px solid var(--amber);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 22px rgba(221, 107, 32, .32), 0 14px 32px rgba(0, 34, 43, .2);
  scroll-margin-top: 20px;
}
.quote-panel [hidden], .quote-bar[hidden] { display: none !important; }
.quote-heading-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.quote-heading-row svg { flex: 0 0 24px; color: var(--amber-deep); }
.quote-panel h2 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.quote-intro { margin: 0 0 12px; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.quote-form { display: flex; flex-direction: column; gap: 12px; }
.quote-stages { display: grid; gap: 12px; min-width: 0; }
.quote-fields { display: grid; gap: 12px; min-width: 0; }
.is-enhanced .quote-step:not(.is-active) { visibility: hidden; pointer-events: none; }
.is-enhanced .quote-step.is-active { position: relative; z-index: 1; }
.quote-step > .quote-next, .quote-step > .quote-final-actions { margin-top: auto; }
.quote-progress { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: .82rem; line-height: 1.4; }
#quoteStepStatus { color: var(--forest); font-weight: 700; }
#quoteStepName { color: var(--muted); }
.quote-progress-track { height: 4px; border-radius: 4px; background: var(--cream-dim); margin-top: -8px; }
.quote-progress-track span { display: block; width: 50%; height: 100%; border-radius: inherit; background: var(--amber); }
.quote-progress-track.is-final-step span { width: 100%; }
.quote-step { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.quote-legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.quote-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.quote-field label { color: var(--ink); font-size: .87rem; font-weight: 600; }
.quote-field input, .quote-field select, .quote-field textarea, .quote-pest-toggle {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #8b999b;
  border-radius: 8px;
  background: #f7f8f7;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}
.quote-field input::placeholder, .quote-field textarea::placeholder { color: #596366; opacity: 1; }
.quote-field textarea { min-height: 72px; resize: vertical; }
.quote-pest-field { position: relative; }
.quote-pest-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.quote-pest-toggle::after { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 3px 0 0; }
.quote-pest-toggle[aria-invalid="true"] { border-color: #913c0b; }
.quote-pest-options {
  position: absolute;
  z-index: 20;
  inset: calc(100% + 6px) 0 auto;
  max-height: min(280px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #8b999b;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 34, 43, .2);
}
.quote-pest-options.opens-up { top: auto; bottom: calc(100% + 6px); }
.quote-pest-options label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px; border-radius: 4px; cursor: pointer; }
.quote-pest-options label:hover, .quote-pest-options label:focus-within { background: #edf5f4; }
.quote-pest-options input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--forest); }
.quote-pest-error { margin: 0; color: #913c0b; font-size: .85rem; }
.quote-panel :is(input, select, textarea, button, a):focus-visible,
.quote-bar a:focus-visible {
  outline: 3px solid var(--forest-light);
  outline-offset: 3px;
}
.quote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 50px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--amber-deep);
  color: #fff;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease;
}
.quote-button:hover { background: #963f08; }
.quote-button:active { background: #7c3508; }
.quote-button:disabled { opacity: .7; cursor: wait; }
.quote-final-actions { display: flex; align-items: center; gap: 14px; }
.quote-back { min-width: 48px; min-height: 48px; padding: 8px 0; border: 0; background: transparent; color: var(--forest); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.quote-back:disabled { opacity: .6; cursor: wait; }
.quote-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 16px; }
.quote-contact {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, box-shadow .15s ease;
}
.quote-contact-call { background: var(--forest); color: #fff; box-shadow: 0 0 14px rgba(10, 145, 172, .35), 0 3px 8px rgba(0, 95, 115, .18); }
.quote-contact-call:hover { background: #004b5b; box-shadow: 0 0 20px rgba(10, 145, 172, .5), 0 3px 8px rgba(0, 95, 115, .22); }
.quote-contact-call:active { background: #003d49; }
.quote-contact-whatsapp { background: var(--whatsapp); color: #073b1b; box-shadow: 0 0 14px rgba(37, 211, 102, .4), 0 3px 8px rgba(20, 84, 45, .14); }
.quote-contact-whatsapp:hover { background: #20bf5b; box-shadow: 0 0 20px rgba(37, 211, 102, .55), 0 3px 8px rgba(20, 84, 45, .18); }
.quote-contact-whatsapp:active { background: var(--whatsapp-deep); }
.quote-form .form-message { min-height: 0; margin: 0; text-align: left; font-size: .92rem; }
.quote-form .form-message.error { color: #913c0b; }
.quote-success { padding-block: 16px; }
.quote-success h3 { margin: 0 0 12px; color: var(--forest); font-size: 1.4rem; }
.quote-success p { margin: 0 0 18px; color: var(--ink); }
.contact-grid.contact-details-only { grid-template-columns: 1fr; max-width: 760px; }
.contact-return { margin-top: 20px; }
.quote-bar { display: none; }

@media (min-width: 761px) {
  .quote-form, .is-enhanced .quote-stages { flex: 1; }
  .is-enhanced .quote-step { grid-area: 1 / 1; }
  .quote-contact-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-contact-fields > .quote-field:nth-child(n + 3) { grid-column: 1 / -1; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .lead-hero { width: calc(100% - 40px); grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); padding: 24px; gap: 24px; }
  .lead-hero h1 { font-size: 2rem; }
  .quote-panel { padding: 22px; }
}
@media (max-width: 760px) {
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .lead-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: calc(100% - 24px);
    margin-top: 12px;
    padding: 20px 16px;
    border-radius: 16px;
  }
  .lead-content { display: contents; }
  .lead-copy { grid-column: 1; grid-row: 1; }
  .lead-hero h1 { max-width: none; margin-bottom: 12px; font-size: clamp(1.65rem, 6.5vw, 2rem); line-height: 1.16; }
  .lead-description { font-size: 1rem; line-height: 1.45; }
  .quote-panel { grid-column: 1; grid-row: 2; padding: 16px; border-radius: 12px; scroll-margin-top: 12px; }
  .quote-heading-row { gap: 8px; }
  .quote-panel h2 { font-size: 1.25rem; }
  .quote-intro { font-size: .87rem; }
  .is-enhanced .quote-step:not(.is-active) { display: none; }
  .quote-field { gap: 5px; }
  .quote-field input, .quote-field select, .quote-pest-toggle { min-height: 46px; padding: 10px; }
  .quote-pest-options input { min-height: 0; padding: 0; }
  .quote-button { font-size: .85rem; padding-inline: 8px; }
  .lead-media { grid-column: 1; grid-row: 3; }
  .lead-media img { max-height: 180px; }
  .lead-details { grid-column: 1; grid-row: 4; gap: 8px 20px; }
  .lead-details .post-meta { flex-basis: 100%; }
  .lead-breadcrumb { grid-row: 4; }
  .lead-details + .lead-breadcrumb { grid-row: 5; }
  .whatsapp-float { display: none; }
  .quote-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 250;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 34, 43, .16);
  }
  .quote-bar .quote-button { min-height: 48px; font-size: .85rem; }
  .quote-bar-chat { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 12px; border-radius: 8px; background: #daf4e3; color: #14542d; font-size: .85rem; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .quote-button, .quote-contact { transition: none; }
}
