/* EJ Bild-Vorschau 2026 — frontend styles for all visitors (1.5.0).
   Brand: --wp--preset--color--primary / --quaternary = #97251b
   Base text: #16243e. Headings: Jost 800. Body: Kumbh Sans. */

/* 1.3.7: CSS Hero / AOS entrance animations are allowed again (a global
   opacity/transform override here used to switch them all off). They are
   only disabled for visitors who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  [data-aos], .aos-init, .aos-animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
  }
}

.ej-v-hide {
  display: none !important;
}

html.ej-vorschau-root,
body.ej-vorschau {
  overflow-x: hidden;
}

/* Hide original overlaid homepage heroes (desktop cover + mobile media-text). */
body.ej-vorschau-home .wp-block-cover.block-visibility-hide-small-screen:has(img.wp-image-308),
body.ej-vorschau-home .wp-block-media-text.block-visibility-hide-large-screen:has(img.wp-image-308),
body.ej-vorschau-home .wp-block-cover:has(> img.wp-image-308),
body.ej-vorschau-home .wp-block-cover:has(> .wp-block-cover__image-background.wp-image-308) {
  display: none !important;
}

/* ============== SPLIT HERO (Variant B) ============== */
.ej-split-hero {
  display: grid;
  grid-template-columns: 45fr 55fr;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  box-sizing: border-box;
  /* Height follows the 4:3 photo so both people stay fully visible. */
  height: auto;
  min-height: 0;
  max-height: none;
}
.ej-split-hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.25rem, 5vw, 4.75rem) clamp(1.75rem, 4.2vw, 4.5rem);
  box-sizing: border-box;
  background: #97251b;
  color: #ffffff;
}
.ej-split-hero__text h1,
.ej-split-hero__text h2 {
  font-family: Jost, var(--wp--preset--font-family--heading), sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(2rem, 3.15vw, 3.2rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  margin: 0 0 1.15rem !important;
  color: #ffffff !important;
}
.ej-split-hero__text p {
  font-family: "Kumbh Sans", var(--wp--preset--font-family--base), sans-serif !important;
  font-size: clamp(1rem, 1.05vw, 1.125rem) !important;
  line-height: 1.65 !important;
  margin: 0 0 1.85rem !important;
  max-width: 36em;
  color: #ffffff !important;
  opacity: 0.92;
}
.ej-split-hero__btn {
  display: inline-block !important;
  font-family: "Kumbh Sans", var(--wp--preset--font-family--base), sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  padding: 0.85rem 1.55rem !important;
  text-decoration: none !important;
  border-radius: 2px !important;
  width: fit-content !important;
  border: 2px solid #ffffff !important;
  background: #ffffff !important;
  color: #97251b !important;
  transition: none !important;
}
.ej-split-hero__photo {
  position: relative;
  min-height: 0;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a1a1a;
}
.ej-split-hero__photo picture,
.ej-split-hero__photo img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.ej-split-hero__photo img {
  object-fit: cover !important;
  object-position: 50% 50% !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 781px) {
  .ej-split-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 0;
    max-height: none;
    height: auto;
  }
  .ej-split-hero__photo {
    grid-row: 1;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .ej-split-hero__text {
    grid-row: 2;
    padding: 1.75rem 1.25rem 2.1rem;
  }
  .ej-split-hero__text h2 {
    font-size: clamp(1.7rem, 7vw, 2.05rem) !important;
  }
}

/* ============== PAGE TITLE BANNERS ============== */
body.ej-vorschau-leistungen .wp-block-cover:has(.wp-block-post-title),
body.ej-vorschau-ueber .wp-block-cover:has(.wp-block-post-title),
body.ej-vorschau-aktuelles .wp-block-cover:has(.wp-block-post-title) {
  display: none !important;
}
.ej-page-hero {
  display: grid;
  grid-template-columns: 42fr 58fr;
  min-height: 0;
  height: auto;
  width: 100%;
  margin: var(--wp--preset--spacing--30, 1.5rem) 0;
  padding: 0;
  box-sizing: border-box;
}
.ej-page-hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #97251b;
  color: #ffffff;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem);
  box-sizing: border-box;
  align-self: stretch;
}
.ej-page-hero__text h1 {
  font-family: Jost, var(--wp--preset--font-family--heading), sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(2rem, 3.4vw, 3.4rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  margin: 0 !important;
  color: #ffffff !important;
  text-transform: none !important;
}
.ej-page-hero__photo {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  width: 100%;
  align-self: start;
}
.ej-page-hero__photo picture,
.ej-page-hero__photo img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.ej-page-hero__photo img {
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.ej-page-hero--leistungen .ej-page-hero__photo img {
  /* Prefer the seated colleague on the left if the box is not exactly 4:3. */
  object-position: 32% 50% !important;
}
.ej-page-hero--ueber .ej-page-hero__photo img {
  object-position: 32% 42% !important;
}
.ej-page-hero--aktuelles .ej-page-hero__photo img {
  /* Face sits in the left third (~x 28%, y 26%); keep it fully in frame. */
  object-position: 28% 28% !important;
}
@media (max-width: 781px) {
  .ej-page-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 0;
    height: auto;
    margin: 0 0 1rem;
  }
  .ej-page-hero__photo {
    grid-row: 1;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .ej-page-hero__text {
    grid-row: 2;
    padding: 1.25rem 1.25rem 1.4rem;
  }
  .ej-page-hero__text h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.2rem) !important;
  }
}

/* Team covers (Unser Team + home) */
body.ej-vorschau .wp-block-cover img.wp-image-490.wp-block-cover__image-background,
body.ej-vorschau img.wp-image-490.wp-block-cover__image-background,
body.ej-vorschau img.ej-team-cover {
  object-fit: cover !important;
  object-position: 50% 18% !important;
}

/* No theme/CSS-Hero overlay, fade or blend on preview photos. */
body.ej-vorschau .ej-split-hero img,
body.ej-vorschau .ej-page-hero img,
body.ej-vorschau .ej-preview-seated img,
body.ej-vorschau .ej-card-photo,
body.ej-vorschau img.ej-team-cover,
body.ej-vorschau .wp-block-cover img.wp-image-490.wp-block-cover__image-background {
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  image-rendering: auto;
}

/* Home cards */
body.ej-vorschau .ej-card-photo {
  object-fit: cover !important;
  object-position: 50% 30% !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 2;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.ej-vorschau .ej-card-photo-leistungen {
  object-position: 30% 32% !important;
}
body.ej-vorschau .ej-card-photo-ueber {
  object-position: 50% 40% !important;
}

/* Door sign only — NOT the nested info icon in #move-notice (white "i"
   on the bordeaux tile; a previous rule set background:#eee on every
   #move-notice media image and washed the red tile out). */
body.ej-vorschau img.ej-door-sign,
body.ej-vorschau img.wp-image-512,
body.ej-vorschau .ej-preview-sign img {
  object-fit: contain !important;
  object-position: 50% 50% !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  background: #eee;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  image-rendering: auto;
}

/* Seated team in Grundstein */
.ej-preview-seated {
  margin: 1.5rem auto 2rem;
  max-width: 920px;
}
.ej-preview-seated img {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover;
  object-position: 50% 30%;
  opacity: 1 !important;
  visibility: visible !important;
}
.ej-preview-sign {
  margin: 1.75rem auto 2rem;
  max-width: 640px;
}

/* Preview badge */
.ej-vorschau-badge {
  position: fixed;
  z-index: 100000;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #97251b;
  color: #fff;
  font-family: "Kumbh Sans", Jost, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.7rem 0.45rem 0.8rem;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.ej-vorschau-badge strong {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ej-vorschau-badge a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.92;
}
.ej-vorschau-badge a:hover,
.ej-vorschau-badge a:focus {
  opacity: 1;
}

/* Michael: keep font size, role on one line */
body.ej-vorschau-team .ej-tile-michael .wp-block-button__link,
body.ej-vorschau-team .ej-tile-front .wp-block-button__link {
  white-space: normal;
}
body.ej-vorschau-team .ej-role-nowrap {
  white-space: nowrap;
}
/* First-row tiles (Michael + Marco) share typography/height */
body.ej-vorschau-team .ej-tile-front .wp-block-button__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 8.5em;
  box-sizing: border-box;
}


/* ============== KONTAKT HEADER (1.3.1, two composed photos) ============== */
body.ej-vorschau-kontakt .wp-block-cover:has(.wp-block-post-title) {
  display: none !important;
}
.ej-kontakt-top {
  width: 100%;
  margin: 0 0 1.5rem;
  padding: 0;
  box-sizing: border-box;
  background: #97251b;
}
.ej-kontakt-title {
  background: transparent;
  color: #ffffff;
  padding: 0;
}
.ej-kontakt-title h1 {
  font-family: Jost, var(--wp--preset--font-family--heading), sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(2rem, 3.4vw, 3.4rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  margin: 0 !important;
  color: #ffffff !important;
  text-transform: none !important;
}
.ej-kontakt-hero {
  position: relative;
  min-width: 0;
}
.ej-kontakt-fig {
  margin: 0;
  min-width: 0;
  background: #ffffff;
  padding: 4px;
  box-sizing: border-box;
  box-shadow: 0 8px 22px rgba(40, 12, 10, 0.28);
}
.ej-kontakt-fig picture,
.ej-kontakt-fig img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: 50% 50%;
  background: #f4f1ed;
}

/* Variant A: smaller overlapping photos beside the title, on burgundy. */
.ej-kontakt-top--overlap {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.35fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.35rem, 3vw, 2.1rem) clamp(1.4rem, 4vw, 3.5rem);
}
.ej-kontakt-top--overlap .ej-kontakt-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0.85rem 0.4rem 1.05rem;
}
.ej-kontakt-top--overlap .ej-kontakt-fig {
  width: min(48%, 300px);
  flex: 0 1 auto;
}
.ej-kontakt-top--overlap .ej-kontakt-fig--1 {
  position: relative;
  z-index: 2;
  transform: rotate(-2.1deg) translate(10px, -10px);
}
.ej-kontakt-top--overlap .ej-kontakt-fig--2 {
  position: relative;
  z-index: 1;
  transform: rotate(2deg) translate(-10px, 14px);
}

/* Variant B: two equal 4:3 photos with a gap in a modest band (not full-bleed). */
.ej-kontakt-top--band {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(300px, 1.4fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.75rem);
  padding: clamp(1.2rem, 2.6vw, 1.85rem) clamp(1.4rem, 4vw, 3.5rem);
}
.ej-kontakt-top--band .ej-kontakt-hero {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.7rem, 1.6vw, 1.15rem);
}
.ej-kontakt-top--band .ej-kontakt-fig {
  width: min(48%, 320px);
  flex: 0 1 320px;
  transform: none;
  box-shadow: 0 6px 18px rgba(40, 12, 10, 0.22);
}

@media (max-width: 781px) {
  .ej-kontakt-top--overlap,
  .ej-kontakt-top--band {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 1.1rem 1.15rem 1.25rem;
  }
  .ej-kontakt-title h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.2rem) !important;
  }
  .ej-kontakt-top--overlap .ej-kontakt-hero,
  .ej-kontakt-top--band .ej-kontakt-hero {
    justify-content: center;
    padding: 0.35rem 0 0.15rem;
    gap: 0.65rem;
  }
  .ej-kontakt-top--overlap .ej-kontakt-fig,
  .ej-kontakt-top--band .ej-kontakt-fig {
    width: calc(50% - 0.4rem);
    flex: 1 1 calc(50% - 0.4rem);
  }
  .ej-kontakt-top--overlap .ej-kontakt-fig--1,
  .ej-kontakt-top--overlap .ej-kontakt-fig--2 {
    transform: none;
  }
}

/* Team layout v2: last row centered; spacers hidden on small screens */
body.ej-vorschau-team .ej-team-row-center {
  justify-content: center !important;
}
body.ej-vorschau-team .ej-tile-spacer {
  min-height: 0 !important;
}
body.ej-vorschau-team .ej-team-row-center > .wp-block-column:not(.ej-tile-spacer) {
  flex-basis: 33.33% !important;
  max-width: 33.33%;
}
@media (max-width: 781px) {
  body.ej-vorschau-team .ej-team-row-center .ej-tile-spacer {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
    min-width: 0 !important;
  }
  body.ej-vorschau-team .ej-team-row-center > .wp-block-column:not(.ej-tile-spacer) {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}


/* ============== 1.3.2: slim page title bands ==============
   1.3.0/1.3.1 sized the band by a 4:3 photo in a 58% column (≈626px tall
   at 1440). Back to the live band height (~225px): the photo is a small
   4:3 tile at the right edge whose width sets the band height, so the
   photo is never cropped. Kontakt (.ej-kontakt-top) is not affected. */
.ej-page-hero {
  grid-template-columns: minmax(0, 1fr) clamp(240px, 21vw, 340px);
  align-items: stretch;
}
.ej-page-hero__text {
  padding: clamp(1.25rem, 2.4vw, 2.25rem) clamp(1.5rem, 4.6vw, 4.2rem);
}
.ej-page-hero__photo {
  align-self: stretch;
  aspect-ratio: 4 / 3;
  height: auto;
}
.ej-page-hero--leistungen .ej-page-hero__photo img,
.ej-page-hero--ueber .ej-page-hero__photo img,
.ej-page-hero--aktuelles .ej-page-hero__photo img {
  object-position: 50% 50% !important;
}
@media (max-width: 781px) {
  .ej-page-hero {
    grid-template-columns: minmax(0, 1fr) 44%;
    grid-template-rows: auto;
  }
  .ej-page-hero__photo {
    grid-row: 1;
    grid-column: 2;
    aspect-ratio: 4 / 3;
  }
  .ej-page-hero__text {
    grid-row: 1;
    grid-column: 1;
    padding: 1rem 1rem 1rem 1.15rem;
  }
  .ej-page-hero__text h1 {
    font-size: clamp(1.35rem, 6vw, 1.9rem) !important;
    hyphens: auto;
    overflow-wrap: break-word;
  }
}

/* ============== 1.3.2: home team photo, nobody cropped ==============
   The theme cover has a fixed min-height of 782px, so object-fit:cover
   cut people off at the sides (≤1160px) or heads/feet (wide screens).
   The photo has no spare margin, so the box now follows the photo's
   own ratio (1500x1009) and the whole photo is always shown. On very
   wide screens the height is capped and the photo is centred. */
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) {
  min-height: 0 !important;
  aspect-ratio: auto !important;
  /* 1009/1500 = 67.27% of the width, capped at 960px. */
  height: min(67.27vw, 960px) !important;
  background: #ffffff;
}
/* Wide screens: soft, blurred copy of the same photo fills the side bands. */
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) {
  overflow: hidden;
}
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover)::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: 0;
  background: url("../img/01-team-stehend-v2.webp") 50% 50% / cover no-repeat;
  filter: blur(30px);
  pointer-events: none;
}
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) > img.ej-team-cover {
  object-fit: contain !important;
  object-position: 50% 50% !important;
}

/* ============== 1.3.2: Kontakt, remove logo box "Wir betreuen Sie." ============== */
body.ej-vorschau-kontakt .wp-block-media-text:has(img.wp-image-76) {
  display: none !important;
}

/* ============== 1.3.3: robust band photo ==============
   No absolute positioning: picture and img are normal blocks that fill
   the 4:3 slot. Light placeholder colour instead of near-black, so a
   slow load never looks like a black box. */
.ej-page-hero__photo {
  background: #d8d4cf;
  display: block;
  line-height: 0;
}
.ej-page-hero__photo picture {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
.ej-page-hero__photo img {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  transform: none !important;
  clip-path: none !important;
}

/* ============== 1.3.4: all title bands like Kontakt ==============
   Über / Leistungen / Aktuelles / Team now use the Kontakt band markup
   (.ej-kontakt-top--overlap), so height, padding and title style are
   identical. One framed photo instead of two; it keeps the layout box of
   one Kontakt photo (=> same band height) and is drawn a bit larger and
   tilted via transform (transforms do not change the layout height). */
.ej-kontakt-top--single .ej-kontakt-hero {
  justify-content: center;
}
.ej-kontakt-top--single .ej-band-fig {
  position: relative;
  z-index: 1;
  transform: rotate(-2.2deg) scale(1.16) !important;
  transform-origin: 50% 50%;
}
.ej-kontakt-top--single.ej-band--leistungen .ej-band-fig {
  transform: rotate(1.9deg) scale(1.16) !important;
}
.ej-kontakt-top--single .ej-band-fig picture,
.ej-kontakt-top--single .ej-band-fig img {
  object-fit: cover;
  background: #d8d4cf;
}
/* Unser Team: invisible 4:3 placeholder of the same size, no photo. */
.ej-kontakt-top--single .ej-band-spacer {
  visibility: hidden;
  background: transparent;
  box-shadow: none;
  transform: none !important;
}
.ej-kontakt-top--single .ej-band-spacer > span {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}
@media (max-width: 781px) {
  /* Same layout box as one Kontakt photo (half width), no flex-grow. */
  .ej-kontakt-top--single .ej-kontakt-fig {
    /* Kontakt: 2 x (50% - 0.4rem) + 0.65rem gap, flex-grow shares the
       remaining 0.15rem => each photo is 50% - 0.325rem wide. */
    flex: 0 0 calc(50% - 0.325rem) !important;
    width: calc(50% - 0.325rem) !important;
  }
  .ej-kontakt-top--single .ej-band-fig {
    transform: translateY(5px) rotate(-1.8deg) scale(1.15) !important;
  }
  .ej-kontakt-top--single.ej-band--leistungen .ej-band-fig {
    transform: translateY(5px) rotate(1.7deg) scale(1.15) !important;
  }
  /* Long titles stay on one line, like "Kontakt", so the height matches. */
  .ej-kontakt-top--single .ej-kontakt-title h1 {
    white-space: nowrap;
  }
}

/* ============== 1.3.5: Unser Team band, full group photo ==============
   Layout box = one Kontakt photo (invisible 4:3 sizer) => same band height.
   The landscape photo (1500x1009) is shown whole, centred over that box,
   in its own white frame, tilted +1.5deg. */
.ej-kontakt-top--single .ej-band-fig--wide {
  background: transparent !important;
  box-shadow: none !important;
  transform: rotate(1.5deg) scale(1.12) !important;
}
.ej-band-fig--wide .ej-band-sizer {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}
.ej-band-fig--wide picture {
  position: absolute !important;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto !important;
  display: block !important;
  padding: 4px;
  box-sizing: border-box;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(40, 12, 10, 0.28);
}
.ej-band-fig--wide picture img {
  display: block !important;
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  aspect-ratio: 1500 / 1009 !important;
  object-fit: contain !important;
  background: #d8d4cf;
}
@media (max-width: 781px) {
  .ej-kontakt-top--single .ej-band-fig--wide {
    transform: translateY(5px) rotate(1.5deg) scale(1.08) !important;
  }
}

/* ============== 1.3.6: Unser Team band uses the seated team photo
   (02-team-sitzend, 1500x1165, a bit taller than 4:3). Same frame
   mechanism as 1.3.5; whole photo, nothing cropped. */
.ej-band--team .ej-band-fig--wide picture img {
  aspect-ratio: 1500 / 1165 !important;
}

/* ============== 1.3.6: home, larger logo + "Wir betreuen Sie." on the
   faded team photo (desktop/tablet cover). Scales with the viewport. ===== */
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) img.wp-image-76 {
  width: clamp(349px, 36vw, 580px) !important;
  height: auto !important;
  max-width: 100%;
}
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) .wp-block-heading {
  font-size: clamp(2.4rem, 4.2vw, 4.4rem) !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}
body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) .wp-block-group.is-nowrap {
  /* keep the overlay below the faces, proportional to the photo height */
  margin-top: clamp(5rem, 13vw, 14rem) !important;
  gap: clamp(1rem, 2.4vw, 2.75rem);
}

/* ============== 1.3.6 / 1.3.9: compact mobile menu (core/navigation) =====
   1.3.9 (smoothness): below 600px the drawer is ALWAYS rendered off-canvas
   (no display:none -> flex switch, no core keyframe), so opening only
   changes transform/opacity on two composited layers:
   - backdrop = ::before of the container, plain rgba, opacity transition
   - panel    = .wp-block-navigation__responsive-close, translate3d
   visibility/pointer-events keep it inert and invisible while closed.
   Open/close logic stays the theme's (core) own; X and backdrop close. */
@media (max-width: 599px) {
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 100002 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    background: transparent !important;
    color: #16243e !important;
    animation: none !important;
    overflow: hidden !important;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.26s;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container.is-menu-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s linear 0s;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(22, 36, 62, 0.45);
    opacity: 0;
    transition: opacity 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container.is-menu-open::before {
    opacity: 1;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-close {
    position: absolute !important;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(82vw, 340px);
    max-width: none !important;
    margin: 0 !important;
    background: #ffffff;
    border-left: 4px solid #97251b;
    box-shadow: -10px 0 30px rgba(22, 36, 62, 0.25);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    backface-visibility: hidden;
    animation: none !important;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
    transform: translate3d(0, 0, 0);
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-dialog {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100%;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-dialog::before {
    content: "Menü";
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    font-family: Jost, var(--wp--preset--font-family--heading), sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0;
    text-transform: none;
    color: #97251b;
    border-bottom: 2px solid #97251b;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border-radius: 50%;
    color: #97251b !important;
    background: transparent;
    z-index: 2;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container-close:focus-visible {
    background: rgba(151, 37, 27, 0.08);
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container-content {
    padding: 6px 0 24px !important;
    margin: 0 !important;
    display: block !important;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100%;
    text-align: left;
    background: transparent !important;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .wp-block-navigation-item {
    display: flex !important;
    width: 100%;
    margin: 0 !important;
    border-bottom: 1px solid #ece7e2;
    justify-content: flex-start !important;
    background: transparent !important;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .wp-block-navigation-item__content {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 12px 20px 12px 22px !important;
    box-sizing: border-box;
    font-size: 14px !important;
    letter-spacing: 0.08em;
    color: #16243e !important;
    text-decoration: none !important;
    border-left: 4px solid transparent;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus-visible {
    background: #f7f3ef;
    color: #97251b !important;
  }
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .current-menu-item > .wp-block-navigation-item__content,
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .wp-block-navigation-item__content[aria-current="page"] {
    color: #97251b !important;
    background: #f7f0ee;
    border-left-color: #97251b;
  }
  /* The "Wir sind umgezogen" banner (z-index 99999) must not cover the open
     drawer (it hid the X). Simple class rules only, no :has(). */
  html.has-modal-open #simple-banner,
  html.has-modal-open .simple-banner,
  html.has-modal-open .ej-vorschau-badge,
  html.ej-nav-closing #simple-banner,
  html.ej-nav-closing .simple-banner,
  html.ej-nav-closing .ej-vorschau-badge {
    z-index: 0 !important;
  }
  /* The sticky header row (z-index 10) is the drawer's stacking context. */
  html.has-modal-open header.wp-block-template-part,
  html.ej-nav-closing header.wp-block-template-part {
    position: relative;
    z-index: 100001 !important;
  }
  /* Scroll lock without jump (core sets overflow:hidden on html). */
  html.has-modal-open {
    overscroll-behavior: none;
  }
}
@media (max-width: 599px) and (hover: hover) {
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container .wp-block-navigation-item__content:hover {
    background: #f7f3ef;
    color: #97251b !important;
  }
}
@media (max-width: 599px) and (prefers-reduced-motion: reduce) {
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container,
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-container::before,
  body.ej-vorschau nav.is-responsive .wp-block-navigation__responsive-close {
    transition: none !important;
  }
}

/* ============== 1.3.7: entrance animations on the preview's own home blocks
   (attributes are set by the preview script after CSS Hero's AOS setup). */
.ej-split-hero__btn[data-aos] {
  transition: opacity 0.6s ease 0.25s, transform 0.6s ease 0.25s !important;
}
.ej-split-hero__photo picture[data-aos] {
  position: absolute;
}
html.ej-aos-wait .ej-split-hero__text > *,
html.ej-aos-wait .ej-split-hero__photo picture {
  opacity: 0 !important;
}

/* ============== 1.3.8: subtle motion on the band pages ==============
   Band: the framed photo(s) tilt/fade into place once on load (pure CSS;
   uses the individual translate/rotate properties, so the existing
   transforms with !important stay untouched and the end state is exactly
   the 1.3.7 look). Scroll: headings, images and team tiles fade in lightly
   (classes set by the preview script; without JS nothing is hidden). */
@keyframes ej-band-in {
  from { opacity: 0; translate: 0 14px; rotate: -2.5deg; }
  to   { opacity: 1; translate: 0 0;    rotate: 0deg; }
}
@keyframes ej-title-in {
  from { opacity: 0; translate: 0 8px; }
  to   { opacity: 1; translate: 0 0; }
}
.ej-kontakt-top .ej-kontakt-fig:not(.ej-band-spacer) {
  animation: ej-band-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}
.ej-kontakt-top .ej-kontakt-fig--2 {
  animation-delay: 0.32s;
}
.ej-kontakt-top .ej-kontakt-title h1 {
  animation: ej-title-in 0.6s ease-out both;
}
html.ej-fx-on .ej-fx {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.7s ease, translate 0.7s ease;
}
html.ej-fx-on .ej-fx.ej-fx-in {
  opacity: 1;
  translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .ej-kontakt-top .ej-kontakt-fig,
  .ej-kontakt-top .ej-kontakt-title h1 {
    animation: none !important;
  }
  html.ej-fx-on .ej-fx {
    opacity: 1 !important;
    translate: none !important;
    transition: none !important;
  }
}


/* ============== 1.4.0: audit fixes (header, contrast, remnants, overlay, CTA) == */

/* 1) Address bar: wrap instead of clipping / horizontal scroll at ~390px. */
@media (max-width: 599px) {
  body.ej-vorschau .patterns-agency-header--top .wp-block-group.is-layout-flex.is-nowrap {
    flex-wrap: wrap !important;
    row-gap: 0.4rem;
    column-gap: 0.75rem;
    justify-content: center;
    max-width: 100%;
  }
  body.ej-vorschau .patterns-agency-header--top > .wp-block-group {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  body.ej-vorschau .patterns-agency-header--top p {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* 2) "Persönliche Beratung" icon was clipped to a half-circle on narrow screens. */
body.ej-vorschau-home #about figure.wp-block-image,
body.ej-vorschau-home #about figure.wp-block-image img {
  overflow: visible !important;
  max-height: none !important;
  clip-path: none !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  height: auto !important;
}
body.ej-vorschau-home #about figure.wp-block-image img.wp-image-40,
body.ej-vorschau-home #about figure.wp-block-image img.wp-image-41,
body.ej-vorschau-home #about figure.wp-duotone-rgb1513727-ccc-4 img,
body.ej-vorschau-home #about figure.wp-duotone-rgb1513727-ccc-3 img {
  width: 112px !important;
  height: auto !important;
  max-width: 112px !important;
  filter: none !important;
  display: block !important;
  margin-left: auto;
  margin-right: auto;
}

/* 3) Main nav: one line at 1280+, tidier wrap at tablet. */
@media (min-width: 600px) {
  body.ej-vorschau header .wp-block-site-logo img.custom-logo,
  body.ej-vorschau header .wp-block-site-logo img {
    width: auto !important;
    height: auto !important;
    max-width: min(240px, 28vw) !important;
  }
  body.ej-vorschau header nav.wp-block-navigation {
    flex: 1 1 auto;
    min-width: 0;
  }
  body.ej-vorschau header nav.wp-block-navigation .wp-block-navigation__container {
    flex-wrap: nowrap !important;
    justify-content: center;
    gap: 0.15rem 0.7rem !important;
  }
  body.ej-vorschau header nav.wp-block-navigation .wp-block-navigation-item__content {
    white-space: nowrap !important;
    letter-spacing: 0.04em !important;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
  }
  body.ej-vorschau header .patterns-agency-phn-info {
    flex: 0 0 auto;
    min-width: 9.75rem;
  }
}
@media (min-width: 600px) and (max-width: 1279px) {
  /* Do not force a single nav line here: it overlapped the logo and hours at 768.
     Shrink the logo and let the nav wrap cleanly in the middle column. */
  body.ej-vorschau header .wp-block-site-logo img.custom-logo,
  body.ej-vorschau header .wp-block-site-logo img {
    max-width: min(155px, 20vw) !important;
  }
  body.ej-vorschau header nav.wp-block-navigation {
    flex: 1 1 0;
    min-width: 0;
  }
  body.ej-vorschau header nav.wp-block-navigation .wp-block-navigation-item__content {
    font-size: 11px !important;
    letter-spacing: 0.02em !important;
  }
  body.ej-vorschau header nav.wp-block-navigation .wp-block-navigation__container {
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 0.2rem 0.65rem !important;
  }
}
@media (min-width: 1280px) {
  body.ej-vorschau header .wp-block-site-logo img.custom-logo,
  body.ej-vorschau header .wp-block-site-logo img {
    max-width: min(280px, 20vw) !important;
  }
}

/* 4) Service card body: contrast >= 4.5:1 and at least 16px. */
body.ej-vorschau-home #about .wp-block-column p.has-accent-color,
body.ej-vorschau-home #about .wp-block-column p {
  color: #3d4240 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
}

/* 5) Opening hours in the header: no "Montag –" orphan. */
body.ej-vorschau header .patterns-agency-phn-info p strong {
  white-space: nowrap !important;
}
body.ej-vorschau header .patterns-agency-phn-info p {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* 6) Hide leftover logo+"Wir betreuen Sie." boxes (not the home overlay). */
body.ej-vorschau-leistungen .wp-block-media-text:has(img.wp-image-76),
body.ej-vorschau-aktuelles .wp-block-media-text:has(img.wp-image-76) {
  display: none !important;
}
body.ej-vorschau-leistungen .wp-block-separator:has(+ .wp-block-media-text img.wp-image-76),
body.ej-vorschau-leistungen .wp-block-media-text:has(img.wp-image-76) + .wp-block-separator,
body.ej-vorschau-aktuelles .wp-block-separator:has(+ .wp-block-media-text img.wp-image-76),
body.ej-vorschau-aktuelles .wp-block-media-text:has(img.wp-image-76) + .wp-block-separator {
  display: none !important;
}
/* The red Henssler bar on Aktuelles was not empty — make the heading readable. */
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color,
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color h3,
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color .has-default-color,
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color .has-text-color {
  color: #ffffff !important;
}
/* Empty red strip under the Umzug block on mobile = #about padding-top 80px. */
@media (max-width: 781px) {
  body.ej-vorschau-home #about {
    padding-top: 2rem !important;
  }
  body.ej-vorschau-home #move-notice + .wp-block-separator {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
}

/* 7) Home team overlay: keep full group on tablet (already contain);
      on mobile show logo + "Wir betreuen Sie." on the photo, not below it. */
@media (max-width: 599px) {
  body.ej-vorschau-home .wp-block-cover.block-visibility-hide-small-screen:has(> img.ej-team-cover),
  body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) {
    display: flex !important;
    visibility: visible !important;
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 1500 / 1009 !important;
    background: #ffffff;
  }
  body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) > img.ej-team-cover {
    object-fit: cover !important;
    object-position: 50% 28% !important;
  }
  body.ej-vorschau-home .wp-block-media-text.block-visibility-hide-large-screen:has(img.wp-image-490),
  body.ej-vorschau-home .wp-block-media-text.block-visibility-hide-large-screen:has(img.ej-team-cover),
  body.ej-vorschau-home .wp-block-media-text.block-visibility-hide-large-screen:has(img.wp-image-341) {
    display: none !important;
  }
  body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) img.wp-image-76 {
    width: min(210px, 56vw) !important;
    max-width: 56vw !important;
    height: auto !important;
  }
  body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) .wp-block-heading {
    font-size: clamp(1.25rem, 6.2vw, 1.8rem) !important;
    white-space: nowrap !important;
    line-height: 1.15 !important;
  }
  body.ej-vorschau-home .wp-block-cover:has(> img.ej-team-cover) .wp-block-group.is-nowrap {
    margin-top: clamp(4rem, 28vw, 9rem) !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.4rem 0.75rem !important;
  }
}

/* 8) Form submit in CTA style, larger tap targets. */
body.ej-vorschau input.wpcf7-submit,
body.ej-vorschau .wpcf7 input[type="submit"] {
  min-height: 44px !important;
  min-width: 7.5rem;
  padding: 0.85rem 1.55rem !important;
  font-family: "Kumbh Sans", var(--wp--preset--font-family--base), sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  background: #97251b !important;
  color: #ffffff !important;
  border: 2px solid #97251b !important;
  border-radius: 2px !important;
  cursor: pointer;
}
body.ej-vorschau input.wpcf7-submit:hover,
body.ej-vorschau .wpcf7 input[type="submit"]:hover,
body.ej-vorschau input.wpcf7-submit:focus-visible,
body.ej-vorschau .wpcf7 input[type="submit"]:focus-visible {
  background: #7a1d16 !important;
  border-color: #7a1d16 !important;
}
body.ej-vorschau .patterns-agency-header--top a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
body.ej-vorschau footer a,
body.ej-vorschau .wp-block-template-part a[href*="privacy"],
body.ej-vorschau .wp-block-template-part a[href*="impressum"],
body.ej-vorschau .wp-block-template-part a[href*="cookie"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
body.ej-vorschau .wpcf7 input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  min-height: 20px;
}
body.ej-vorschau .wpcf7 input[type="text"],
body.ej-vorschau .wpcf7 input[type="email"],
body.ej-vorschau .wpcf7 input[type="tel"],
body.ej-vorschau .wpcf7 textarea {
  min-height: 44px;
}

/* Long legal URLs must not force a horizontal scroll on narrow screens.
   1.4.1: scoped to links only — never headings or body copy. */
body.ej-vorschau .entry-content a[href] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Headings wrap at spaces or soft/auto hyphens, never mid-letter. */
body.ej-vorschau .entry-content :is(h1, h2, h3, h4, h5, h6),
body.ej-vorschau h1,
body.ej-vorschau h2,
body.ej-vorschau h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Henssler bar: scale type on narrow phones so "Fachinformationen" can
   sit on one line; soft hyphen is the fallback if it still wraps. */
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color h3 {
  font-size: clamp(1.15rem, 5.2vw, 1.875rem) !important;
  line-height: 1.25 !important;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: normal;
  word-break: normal;
}

/* Aktuelles: the Henssler bar is content, not an empty remnant. Keep it
   visible (white type) even if the 1.3.8 scroll fade would delay it. */
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color,
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color .ej-fx,
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color h3 {
  opacity: 1 !important;
  translate: none !important;
  color: #ffffff !important;
}
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color {
  padding: 1rem 1.25rem;
  align-items: center;
}

/* ============== 1.4.1: Leistungen card grid + contact section ============== */
body.ej-vorschau-leistungen .entry-content > .wp-block-separator {
  display: none !important;
}
body.ej-vorschau-leistungen .entry-content {
  padding-top: 0.35rem;
  padding-bottom: 0.5rem;
}
body.ej-vorschau-leistungen .ej-leist-intro {
  max-width: 40rem;
  margin: 0.15rem auto 2rem !important;
  text-align: center;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem) !important;
  line-height: 1.6 !important;
  color: #16243e;
}
body.ej-vorschau-leistungen .ej-leist-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0 auto 2.5rem;
  max-width: 1120px;
  width: 100%;
  align-items: stretch;
}
@media (min-width: 700px) {
  body.ej-vorschau-leistungen .ej-leist-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
@media (min-width: 1200px) {
  body.ej-vorschau-leistungen .ej-leist-grid {
    gap: 1.65rem 1.75rem;
  }
}
body.ej-vorschau-leistungen .ej-leist-card {
  background: #ffffff;
  border: 1px solid #e8e2de;
  border-top: 4px solid #97251b;
  border-radius: 2px;
  padding: 1.35rem 1.4rem 1.2rem;
  box-shadow: 0 1px 2px rgba(22, 36, 62, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
body.ej-vorschau-leistungen .ej-leist-card__title {
  font-family: Jost, var(--wp--preset--font-family--heading), sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem) !important;
  line-height: 1.25 !important;
  color: #97251b !important;
  margin: 0 0 0.85rem !important;
  padding: 0 0 0.7rem !important;
  border-bottom: 1px solid #eaded9;
  min-height: 2.8em;
  letter-spacing: 0.01em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
body.ej-vorschau-leistungen .ej-leist-card ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto;
}
body.ej-vorschau-leistungen .ej-leist-card li {
  position: relative;
  margin: 0 !important;
  padding: 0.45rem 0 0.45rem 1.15rem !important;
  line-height: 1.45 !important;
  font-size: 1rem !important;
  font-family: "Kumbh Sans", var(--wp--preset--font-family--base), sans-serif !important;
  color: #16243e !important;
  border-bottom: 1px solid #f3eeea;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
}
body.ej-vorschau-leistungen .ej-leist-card li:last-child {
  border-bottom: 0;
  padding-bottom: 0 !important;
}
body.ej-vorschau-leistungen .ej-leist-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  background: #97251b;
  border-radius: 1px;
}
body.ej-vorschau-leistungen .ej-leist-contact {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 1.75rem 1.5rem 2rem;
  background: #faf7f6;
  border-top: 4px solid #97251b;
  border-radius: 2px;
}
@media (min-width: 700px) {
  body.ej-vorschau-leistungen .ej-leist-contact {
    padding: 2rem 2.25rem 2.25rem;
  }
}
body.ej-vorschau-leistungen .ej-leist-contact > p {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem) !important;
  line-height: 1.55 !important;
  color: #16243e;
  margin: 0 0 1.35rem !important;
  text-align: left;
}
@media (max-width: 599px) {
  body.ej-vorschau-leistungen .ej-leist-card {
    padding: 1.15rem 1.15rem 1rem;
  }
  body.ej-vorschau-leistungen .ej-leist-card__title {
    min-height: 0;
  }
  body.ej-vorschau-leistungen .ej-leist-intro {
    margin-bottom: 1.35rem !important;
    text-align: left;
  }
}

/* Headings: never mid-letter, even if a theme rule uses break-word. */
body.ej-vorschau .entry-content :is(h1, h2, h3, h4, h5, h6),
body.ej-vorschau h1,
body.ej-vorschau h2,
body.ej-vorschau h3,
body.ej-vorschau h4,
body.ej-vorschau h5 {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

/* Henssler bar: keep the info icon visible on phones; heading uses the soft hyphen. */
body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color h3 {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: manual;
  -webkit-hyphens: manual;
}
@media (max-width: 599px) {
  body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    grid-template-columns: 1fr !important;
    gap: 0.35rem;
    padding: 1.15rem 1.1rem 1.2rem !important;
  }
  body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color > .wp-block-media-text__media,
  body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color figure {
    width: 72px !important;
    max-width: 72px !important;
    margin: 0 auto !important;
  }
  body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color img {
    width: 72px !important;
    max-width: 72px !important;
    height: auto !important;
  }
  body.ej-vorschau-aktuelles .wp-block-media-text.has-primary-background-color .wp-block-media-text__content {
    width: 100%;
    padding: 0 !important;
  }
}

/* ============== 1.4.2: card/panel language on Kontakt, home, Aktuelles ============== */

/* 1) Kontakt form panel — same treatment as Leistungen .ej-leist-contact. */
body.ej-vorschau-kontakt .ej-kontakt-contact {
  max-width: 720px;
  margin: 0.5rem auto 2.5rem;
  padding: 1.75rem 1.5rem 2rem;
  background: #faf7f6;
  border-top: 4px solid #97251b;
  border-radius: 2px;
}
@media (min-width: 700px) {
  body.ej-vorschau-kontakt .ej-kontakt-contact {
    padding: 2rem 2.25rem 2.25rem;
  }
}
body.ej-vorschau-kontakt .ej-kontakt-contact > p {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem) !important;
  line-height: 1.55 !important;
  color: #16243e;
  margin: 0 0 1.35rem !important;
  text-align: left;
}
body.ej-vorschau-kontakt .ej-preview-sign {
  margin-top: 0.5rem;
}

/* 2) Startseite service cards — burgundy top edge, aligned panels. */
body.ej-vorschau-home #about > .wp-block-columns {
  gap: 1.5rem !important;
  align-items: stretch;
}
body.ej-vorschau-home #about .wp-block-column {
  box-shadow: none !important;
}
body.ej-vorschau-home #about .wp-block-column > .wp-block-group {
  background: #ffffff !important;
  border: 1px solid #e8e2de !important;
  border-top: 4px solid #97251b !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 2px rgba(22, 36, 62, 0.04) !important;
  padding: 1.5rem 1.35rem 1.4rem !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}
body.ej-vorschau-home #about .wp-block-column h5 {
  font-family: Jost, var(--wp--preset--font-family--heading), sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem) !important;
  line-height: 1.25 !important;
  color: #97251b !important;
  margin: 0.35rem 0 0.75rem !important;
  letter-spacing: 0.01em;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
body.ej-vorschau-home #about .wp-block-column p {
  color: #3d4240 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
  flex: 1 1 auto;
}
@media (max-width: 599px) {
  body.ej-vorschau-home #about .wp-block-column > .wp-block-group {
    padding: 1.2rem 1.15rem 1.15rem !important;
  }
}

/* 3) Aktuelles: Henssler bar + teaser + button as one panel.
   The red bar is the card header; hyphenation/icon rules still apply. */
body.ej-vorschau-aktuelles .wp-block-separator.has-primary-background-color,
body.ej-vorschau-aktuelles .wp-block-separator:has(+ .ej-aktuelles-info),
body.ej-vorschau-aktuelles .ej-aktuelles-info + .wp-block-separator {
  display: none !important;
}
body.ej-vorschau-aktuelles .ej-aktuelles-info {
  max-width: 850px;
  margin: 1.75rem auto 2.5rem;
  background: #faf7f6;
  border: 1px solid #e8e2de;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(22, 36, 62, 0.04);
  overflow: hidden;
}
body.ej-vorschau-aktuelles .ej-aktuelles-info .wp-block-media-text.has-primary-background-color {
  margin: 0 !important;
  border-radius: 0;
}
body.ej-vorschau-aktuelles .ej-aktuelles-info > p {
  margin: 0 !important;
  padding: 1.4rem 1.6rem 1rem !important;
  background: transparent !important;
  color: #16243e !important;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem) !important;
  line-height: 1.55 !important;
  text-align: center;
}
body.ej-vorschau-aktuelles .ej-aktuelles-info > .wp-block-buttons {
  margin: 0 0 1.5rem !important;
  padding: 0 1.5rem 0.25rem !important;
  background: transparent !important;
  justify-content: center;
}
body.ej-vorschau-aktuelles .ej-aktuelles-info .wp-block-button__link {
  font-family: "Kumbh Sans", var(--wp--preset--font-family--base), sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  background: #97251b !important;
  color: #ffffff !important;
  border: 2px solid #97251b !important;
  border-radius: 2px !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem !important;
}
body.ej-vorschau-aktuelles .ej-aktuelles-info .wp-block-button__link:hover,
body.ej-vorschau-aktuelles .ej-aktuelles-info .wp-block-button__link:focus-visible {
  background: #7a1d16 !important;
  border-color: #7a1d16 !important;
}
@media (max-width: 599px) {
  body.ej-vorschau-aktuelles .ej-aktuelles-info > p {
    padding: 1.15rem 1.15rem 0.85rem !important;
    text-align: left;
  }
}

/* ============== 1.4.3: Aktuelles form panel + checkbox alignment ============== */
body.ej-vorschau-aktuelles .ej-aktuelles-contact,
body.ej-vorschau .ej-form-panel {
  max-width: 720px;
  margin: 0.5rem auto 2.5rem;
  padding: 1.75rem 1.5rem 2rem;
  background: #faf7f6;
  border-top: 4px solid #97251b;
  border-radius: 2px;
}
@media (min-width: 700px) {
  body.ej-vorschau-aktuelles .ej-aktuelles-contact,
  body.ej-vorschau .ej-form-panel {
    padding: 2rem 2.25rem 2.25rem;
  }
}
body.ej-vorschau-aktuelles .ej-aktuelles-contact > p,
body.ej-vorschau .ej-form-panel > p {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem) !important;
  line-height: 1.55 !important;
  color: #16243e;
  margin: 0 0 1.35rem !important;
  text-align: left;
}

/* Privacy checkbox: flush with the input field edge (CF7 list-item has a default indent). */
body.ej-vorschau .wpcf7 .wpcf7-list-item {
  margin: 0 !important;
  padding: 0 !important;
}
body.ej-vorschau .wpcf7 .wpcf7-form-control-wrap[data-name*="acceptance"],
body.ej-vorschau .wpcf7 .wpcf7-acceptance {
  display: block;
  margin: 0.35rem 0 0 !important;
  padding: 0 !important;
}
body.ej-vorschau .wpcf7 .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  text-indent: 0 !important;
}
body.ej-vorschau .wpcf7 .wpcf7-acceptance .wpcf7-list-item-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  text-indent: 0 !important;
}
body.ej-vorschau .wpcf7 input[type="checkbox"] {
  margin: 0.15rem 0 0 0 !important;
  flex: 0 0 auto;
}

/* ============== 1.4.3: Über – Tätigkeitsschwerpunkte + Leistungen CTA panel ============== */
body.ej-vorschau-ueber .ej-ueber-schwerpunkte {
  max-width: 850px;
  margin: 1.75rem auto 2.5rem;
  background: #faf7f6;
  border: 1px solid #e8e2de;
  border-top: 4px solid #97251b;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(22, 36, 62, 0.04);
  overflow: hidden;
}
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > h5,
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-heading {
  font-family: Jost, var(--wp--preset--font-family--heading), sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem) !important;
  line-height: 1.25 !important;
  color: #97251b !important;
  margin: 0 !important;
  padding: 1.4rem 1.6rem 0.65rem !important;
  letter-spacing: 0.01em;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > p {
  margin: 0 !important;
  padding: 0 1.6rem 1rem !important;
  color: #16243e !important;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem) !important;
  line-height: 1.65 !important;
}
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > p:last-of-type {
  padding-bottom: 1.4rem !important;
}
/* Red CTA is the card footer, flush with the panel. */
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color {
  margin: 0 !important;
  border-radius: 0;
  width: 100%;
}
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color,
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color h4,
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color .has-default-color,
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color .has-text-color {
  color: #ffffff !important;
}
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color a {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color a:hover,
body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color a:focus-visible {
  color: #ffffff !important;
  text-decoration-thickness: 2px;
}
@media (max-width: 599px) {
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > h5,
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > p {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    grid-template-columns: auto 1fr !important;
    padding: 0.9rem 1.1rem !important;
  }
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color > .wp-block-media-text__media,
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color figure {
    width: 56px !important;
    max-width: 56px !important;
    margin: 0 !important;
    flex: 0 0 56px;
  }
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color img {
    width: 56px !important;
    max-width: 56px !important;
    height: auto !important;
  }
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color .wp-block-media-text__content {
    padding: 0 !important;
    width: auto;
  }
  body.ej-vorschau-ueber .ej-ueber-schwerpunkte > .wp-block-media-text.has-primary-background-color h4 {
    font-size: 1.05rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }
}
