/* Reference corrections, October 2026. Decorative assets come from KP4. */
.dp-ept-section.dp-facts .dp-facts-layout {
  background: url('../images/leaves-keyfacts.svg') center top / 100% 100% no-repeat;
}
@container (width > 990px) {
  /* Keep the original peak and centre the entire brand beneath it. */
  .dp-ept-section.dp-hero .dp-hero-brand {
    transform: translate(-.5cqw,-4cqw);
  }
  .dp-ept-section.dp-hero .dp-hero-intro {transform:translateY(-4cqw)}
  .dp-ept-section.dp-hero .dp-hero-band::before {
    background-position:0 3cqw;
    background-repeat:no-repeat;
    clip-path:polygon(0 47%,61.5% 27%,73% 0,81.5% 21%,100% 13%,100% calc(100% - var(--dp-hero-bottom-cut, 50px)),0 calc(82% - var(--dp-hero-bottom-cut, 50px)));
  }
  .dp-ept-section.dp-hero .dp-hero-band {
    align-items: end;
    margin-bottom:calc(-1 * var(--dp-hero-bottom-cut, 50px));
  }
  .dp-ept-section.dp-hero .dp-hero-brand {
    align-self: end;
  }
  .dp-ept-section.dp-hero .dp-hero-address:empty {display:none}

  /* Cut only the top of the green shape; keep its existing diagonal line.
     4cqw along a 25.9cqw rise intersects at 57.722% of the green width. */
  .dp-ept-section.dp-section .dp-location {
    padding-top: 6.2cqw;
  }
  .dp-ept-section.dp-section .dp-location::before {
    clip-path:polygon(0 4cqw,57.722007722% 4cqw,100% 70%,87.5213675% 100%,0 100%);
  }
  .dp-ept-section.dp-section .dp-flow {margin-top:-6.2cqw}
  .dp-ept-section.dp-section .dp-picture {
    clip-path:polygon(0 0,100% 7%,100% calc(70% + 4.2cqw),58.5% calc(70% + 7.5cqw),0 29cqw);
  }
  .dp-ept-section.dp-section .dp-quality::before {
    width:10cqw;height:10cqw;bottom:-1.5cqw;right:-1cqw;
  }
  .dp-ept-section.dp-section .dp-quality > .paragraph {
    transform:translateY(var(--dp-quality-offset,-30px));
  }

  /* Let the final distance row finish at the map's lower edge. */
  .dp-ept-section.dp-map-kp3 .dp-map-distances {
    padding-top:1.5cqw;padding-bottom:0;
  }
  .dp-ept-section.dp-map-kp3 .dp-map-distances .field--name-field-ept-text > :last-child {
    margin-bottom:0;
  }
  .dp-ept-section.dp-map-kp3 .dp-map-distances table {margin-bottom:0}
  .dp-ept-section.dp-map-kp3 .dp-map-scale {top:1.65cqw}

  /* Keep botanical decoration in the beige wedge, outside the map. */
  .dp-ept-section.dp-map-kp3 .dp-map-layout::after {display:none}
  .dp-ept-section.dp-map-kp3 .dp-map-region {clip-path:none}
  .dp-ept-section.dp-map-kp3 .dp-map-region > .paragraph {
    clip-path:polygon(0 0,81% 0,96% 100%,0 100%);
  }
  .dp-ept-section.dp-map-kp3 .dp-map-region::after {
    content:"";position:absolute;inset:0;pointer-events:none;
    background-color:var(--dp-cream);
    background-image:url('../images/leaf-region-flower.svg'),url('../images/leaf-region-heart.svg');
    background-position:99% 12%,99.5% 75%;
    background-size:12% auto,7% auto;
    background-repeat:no-repeat;
    clip-path:polygon(81% 0,100% 0,100% 100%,96% 100%);
  }

  /* White image margins must never paint over the beige heading area. */
  .dp-ept-section.dp-apartment-three .dp-apartment-three-plan {
    clip-path:polygon(0 0,100% 0,100% 100%,var(--dp-plan-cut-x,58%) 100%,0 var(--dp-plan-cut-y,60%));
  }

  /* Continue the contact panel's left edge; mobile retains its flat bar. */
  .dp-ept-section.dp-footer .dp-footer-layout::before {
    clip-path:polygon(3% 0,100% 0,100% 100%,calc(3% - var(--dp-footer-slant,1.75cqw)) 100%);
  }
}
@container (max-width:990px) {
  .dp-ept-section.dp-facts .dp-facts-layout {
    background-size: auto 71cqw;
    background-repeat: repeat-y;
  }
}

/* v6: Pflicht-Checkboxen als transparente Outline; Zimmerauswahl unverändert. */
.dp-ept-section.dp-registration .dp-registration-form input[type="checkbox"] {
  appearance:none!important;
  -webkit-appearance:none!important;
  background-color:transparent!important;
  border:2px solid #f7f3ec!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.dp-ept-section.dp-registration .dp-registration-form input[type="checkbox"]:checked {
  background-color:var(--dp-form-accent)!important;
  border-color:#f7f3ec!important;
}

/* v6: Überschrift und linker Fließtext gemeinsam 14px nach unten.
   Die bestehende JS-Baseline-Ausrichtung bleibt dadurch erhalten. */
@container (width > 990px) {
  .dp-ept-section.dp-section .dp-location .field--name-field-ept-text {
    transform:translateY(14px);
  }
  .dp-ept-section.dp-section .dp-quality > .paragraph {
    transform:translateY(calc(var(--dp-quality-offset,-30px) + 14px));
  }
}

/* v7 Desktop: weniger Grün unter dem Text, mehr Luft über der Stadt-Überschrift.
   Unterkante des Natur-Titels näher an das nachfolgende Foto. */
@container dp-wachau (min-width:991px) {
  .dp-ept-section.dp-section .dp-location {
    min-height:calc(35cqw - 48px);
    padding-top:calc(6.2cqw + 18px);
    padding-bottom:12px;
  }
  .dp-ept-section.dp-section .dp-flow {
    height:calc(35cqw - 48px);
  }
  .dp-ept-section.dp-section .dp-quality {
    bottom:12px;
  }
  /* v6's extra translation is removed: JS already synchronizes baselines. */
  .dp-ept-section.dp-section .dp-location .field--name-field-ept-text {
    transform:none;
  }
  .dp-ept-section.dp-section .dp-quality > .paragraph {
    transform:translateY(var(--dp-quality-offset,-30px));
  }
}

/* v8: Consent and info-subscription controls are Webform siblings of the
   registration-form wrapper on some layouts. Target the section instead. */
.dp-ept-section.dp-registration input[type="checkbox"]:not(.dp-form-interest-options input) {
  -webkit-appearance:none!important;
  appearance:none!important;
  background:transparent none!important;
  border:2px solid #f7f3ec!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.dp-ept-section.dp-registration input[type="checkbox"]:checked {
  background-color:var(--dp-form-accent,#29917d)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E")!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
}

/* v10: even out the white diagonal gutter around the DGNB certificate.
   Only the certificate silhouette changes; text and surrounding tiles stay put. */
@container dp-auf-einen-blick (min-width: 991px) {
  .dp-ept-section.dp-facts .dp-fact-certificate::before {
    clip-path: polygon(40% 0, 99% 0, 58% 100%, 1% 100%);
  }
}

/* v11: tighten the oversized lower-left white wedge of the DGNB tile.
   Desktop only; surrounding green polygons and content are unchanged. */
@container dp-auf-einen-blick (min-width: 991px) {
  .dp-ept-section.dp-facts .dp-fact-certificate::before {
    clip-path: polygon(41% 0, 99% 0, 59% 100%, 8% 100%);
  }
}


/* v9: Show a wider view of the four-room apartment photo.
   The original photo element spans the full section width, even though only
   the right-hand polygon is visible. Restrict image content to that visible
   side; preserve the parent's diagonal clip and section height. */
@media (min-width: 991px) {
  .dp-ept-section.dp-apartment-four .dp-apartment-four-photo .ept-container {
    position: absolute;
    inset: 0 0 0 55%;
    width: 45%;
    max-width: none;
    height: 100%;
    padding: 0;
    margin: 0;
  }
  .dp-ept-section.dp-apartment-four .dp-apartment-four-photo .ept-container > div {
    height: 100%;
  }
  .dp-ept-section.dp-apartment-four .dp-apartment-four-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
}

/* v13: correct only the oversized left white gutter of the DGNB field.
   Preserve the already-correct right diagonal and apartment photo fix. */
@container dp-auf-einen-blick (min-width: 991px) {
  .dp-ept-section.dp-facts .dp-fact-certificate::before {
    clip-path: polygon(35% 0, 99% 0, 59% 100%, 0% 100%);
  }
}

/* v14: move only the top-left certificate vertex inward to clear the green tile. */
@container dp-auf-einen-blick (min-width: 991px) {
  .dp-ept-section.dp-facts .dp-fact-certificate::before {
    clip-path: polygon(39% 0, 99% 0, 59% 100%, 0% 100%);
  }
}

/* v15 – Parkanlage: keep the decorative leaf artwork inside the beige field.
   Only scale/reposition the background artwork; no geometry or content changes. */
@container (min-width: 991px) {
  .dp-ept-section.dp-feature--parkanlage .dp-feature-layout {
    background-size: 94% 82%;
    background-position: center center;
  }
}

/* v16 – Parkanlage: keep the right-hand leaf clear of the photograph's
   diagonal. Artwork only; do not modify the photo, copy or section geometry. */
@container (min-width: 991px) {
  .dp-ept-section.dp-feature--parkanlage .dp-feature-layout {
    background-size: 76% 82%;
    background-position: left center;
  }
}

/* v17: SVG artwork fixed at source; use original proportions, not the v15/v16 background shrinking. */
@container (min-width: 991px) {
 .dp-ept-section.dp-feature--parkanlage .dp-feature-layout {background-size:100% 100%;background-position:center center;}
}

/* v18: Restore visible checkmark for outlined consent / info-subscription boxes.
   Override the earlier background shorthand and the generic checkbox rules;
   leave the apartment room radio options untouched. */
.dp-ept-section.dp-registration input[type="checkbox"]:checked {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: var(--dp-form-accent, #29917d) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: center center !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  border: 2px solid #f7f3ec !important;
}

/* v19: checked state must outrank v8's more-specific `background: transparent none`.
   Apply only to consent/newsletter checkboxes, never room-selection inputs. */
.dp-ept-section.dp-registration input[type="checkbox"]:not(.dp-form-interest-options input):checked {
  background: #29917d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10l4 4 8-9' fill='none' stroke='%23ffffff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat !important;
  border: 2px solid #f7f3ec !important;
}

/* v20 – requested form description, mandatory note and mobile refinements */
.dp-ept-section.dp-registration .dp-registration-form .form-check .description {
  margin-top: 9px;
  color: #000;
}
.dp-ept-section.dp-registration .dp-registration-form .dp-form-required-note {
  margin-top: 12px;
  margin-bottom: 14px;
}
@container dp-auf-einen-blick (max-width: 990px) {
  .dp-ept-section.dp-facts .dp-fact-certificate {
    /* Centre the whole editable block on the gutter: 110–111.142857cqw. */
    top: 110.5714285cqw;
    transform: translateY(-50%);
  }
}
/* Mobile: address, calibrated scale, then the distance table. */
@container (max-width: 990px) {
  .dp-ept-section.dp-map-kp3 .dp-map-distances {
    display:flex;
    flex-direction:column;
    padding-top:12px;
  }
  .dp-ept-section.dp-map-kp3 .dp-map-scale {
    order:-1;
    position:static;
    align-self:flex-end;
    margin:0 0 24px;
  }
}
/* Mobile: reduce excessive separation between copy and the following image. */
@media (max-width: 990px) {
  .dp-ept-section.dp-feature--parkanlage .dp-feature-layout {
    row-gap: 0;
  }
}

/* Mobile header: align the logo's optical apex with the panel peak. */
@container dp-hero (max-width:990px) {
  .dp-ept-section.dp-hero .dp-hero-brand {
    transform:translate(-0.65cqw,-6px);
  }
}

/* The 50px desktop trim needs to shrink with the header below 1400px.
   Keep the original diagonal and reserve space for the three-line intro. */
@container dp-hero (990px < width < 1400px) {
  .dp-ept-section.dp-hero .dp-hero-band {
    --dp-hero-bottom-cut: clamp(0px, calc(10cqw - 90px), 50px);
  }
}
