/* Pawlak V1.4.2: additive pricing, form controls and existing contact dock. */
:root {
  --calm-muted: #52616b;
  --calm-orange-hover: #913d1f;
  --calm-field-border: #73818d;
  --cro-link: #8f3e20;
}

/* Keep the service and place names intact at intermediate laptop widths. */
.hero-v2 #hero-title {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

/* A direct inquiry CTA lands on the form, not on the explanatory column above it. */
#anfrageformular { scroll-margin-top: 8.5rem; }
main > section:has(:target) { content-visibility: visible; }
@media (max-width: 1100px) {
  #anfrageformular { scroll-margin-top: 5rem; }
}

/* Four coherent clearing scopes replace the former five-category summary. */
.price-start-anchor__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .price-start-anchor__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cro-section .cro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(.625rem, 2vw, 1.25rem);
  margin-block: 1.5rem 1rem;
}

.cro-section .cro-card {
  min-width: 0;
  padding: clamp(.75rem, 2vw, 1.25rem);
  border: 1px solid var(--calm-line, #e5e9ed);
  border-radius: var(--calm-radius, .75rem);
  background: var(--calm-white, #fff);
  color: var(--calm-ink, #243746);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.cro-section .cro-card h3 {
  margin: 0 0 .375rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.25;
}

.cro-section .cro-grid:has(> details) { align-items: start; }

.cro-section details.cro-card > summary {
  min-height: 44px;
  padding-block: .375rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

body .cro-section .cro-price {
  margin: 0 0 .375rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
}

body .cro-section :is(.cro-scope, .cro-note) {
  color: var(--calm-muted) !important;
  line-height: 1.55;
}

.cro-section :is(.cro-note, .cro-payment-note, .cro-value-note) {
  max-width: 70ch;
}

.cro-section :is(.cro-payment-note, .cro-value-note) {
  margin-block: .75rem 0;
  padding-inline-start: .75rem;
  border-inline-start: 2px solid var(--calm-field-border);
  overflow-wrap: anywhere;
}

body .cro-section :is(p, li, dd) a:not([data-contact-ui="button"]) {
  color: var(--cro-link) !important;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.cro-section .cro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.cro-section .cro-actions a {
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (min-width: 390px) {
  .cro-section .cro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cro-section .cro-card:has(.cro-price) > h3 { min-height: 3.75em; }
}

@media (min-width: 1024px) {
  .cro-section .cro-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cro-section .cro-card:has(.cro-price) > h3 { min-height: 2.5em; }
  .cro-section .cro-grid:has(> details) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body #mobileNav [data-contact-action]:is([data-contact-action="email"], [data-contact-action="phone"]) {
  border: 1px solid var(--calm-white, #fff) !important;
  background: var(--calm-navy, #172536) !important;
  color: var(--calm-white, #fff) !important;
}

body #mobileNav [data-contact-action]:is([data-contact-action="email"], [data-contact-action="phone"]):hover {
  background: var(--calm-ink, #243746) !important;
}

body :is(.contact-form, .quick-request-card) :is(input:not([type="hidden"]), select, textarea) {
  min-height: 48px;
  font-size: 1rem;
}

/* Hero, form and consent suppression still belong to the existing scripts. */
.floating-contact-stack.is-suppressed { visibility: hidden; }

.floating-contact-stack .floating-contact-phone {
  border: 1px solid var(--calm-white, #fff);
  background: var(--calm-navy, #172536);
  color: var(--calm-white, #fff);
}

.floating-contact-stack .floating-contact-phone:hover { background: var(--calm-ink, #243746); }
.floating-contact-stack .floating-contact:hover { transform: none; }

@media (max-width: 767px) {
  :root { --cro-dock-space: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: var(--cro-dock-space); }
  body:has(> .floating-contact-stack) { padding-bottom: var(--cro-dock-space); }

  .floating-contact-stack {
    inset-inline: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: .375rem;
    padding: .5rem max(.5rem, env(safe-area-inset-right, 0px))
      calc(.5rem + env(safe-area-inset-bottom, 0px)) max(.5rem, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--calm-field-border);
    background: var(--calm-navy, #172536);
  }

  .floating-contact-stack > .floating-contact {
    width: 100%;
    height: auto;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    gap: .25rem;
    padding: .375rem .25rem;
    border-radius: .5rem;
    box-shadow: none;
    text-align: center;
  }

  .floating-contact-stack > .floating-contact-email {
    border: 1px solid var(--calm-white, #fff);
    background: var(--calm-navy, #172536);
  }

  .floating-contact-stack > .floating-contact-email:hover { background: var(--calm-ink, #243746); }

  .floating-contact-stack > .floating-contact svg { width: 1rem; height: 1rem; }

  .floating-contact-stack > .floating-contact span {
    position: static;
    width: auto;
    height: auto;
    min-width: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: .875rem;
    line-height: 1.25;
  }
}

@media (max-width: 640px) {
  .hero-v2 #hero-title {
    max-width: 100%;
    font-size: clamp(2rem, 7.75vw, 2.5rem);
    line-height: 1.08;
    text-wrap: balance;
  }

  .hero-v2 .hero-v2-lead { font-size: 1rem; line-height: 1.5; }

  .cro-section .cro-actions > a { flex: 1 1 auto; }
}
