/* ==========================================================================
   transformis® · Leistungsseite (Template)
   --------------------------------------------------------------------------
   Strategieberatung, Organisationsberatung etc.
   Titelbild (optional) + Above the Fold + Gutenberg Content.
   ========================================================================== */


/* ==========================================================================
   1. TITELBILD (optional)
   ========================================================================== */

.tm-leistung-hero {
  width: 100%;
  height: 484px;
  overflow: hidden;
}

.tm-leistung-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

@media (max-width: 700px) {
  .tm-leistung-hero {
    height: 280px;
  }
}


/* ==========================================================================
   2. ABOVE THE FOLD
   ========================================================================== */

.tm-leistung-atf {
  position: relative;
  background: var(--tm-blue);
  padding-top: 100px;
  padding-bottom: 100px;
  width: 100%;
  overflow: hidden;
}

/* Wenn kein Titelbild: padding-top muss Header-Hoehe (105px) kompensieren */
.tm-leistung-atf--no-hero {
  padding-top: calc(105px + 100px);
}


/* ── Textbereich: 947px Container ── */

.tm-leistung-atf__text {
  position: relative;
  z-index: 1;
  width: 947px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--tm-content-padding);
}

.tm-leistung-atf__title {
  margin: 0 0 47px;
  color: var(--tm-green);
}

.tm-leistung-atf__excerpt {
  color: var(--tm-white-soft);
  line-height: 1.5;
}

.tm-leistung-atf__excerpt p {
  margin: 0 0 16px;
  line-height: 2em;
}

.tm-leistung-atf__excerpt p:last-child {
  margin-bottom: 0;
}

.tm-leistung-atf__btn {
  margin-top: 32px;
}


/* ── Dekorative Pfeile (rechts oben, wie CTA-Banner) ── */

.tm-leistung-atf__arrows {
  display: contents;
}

.tm-leistung-atf__arrow-lg {
  position: absolute;
  top: 100px;
  right: 0;
  width: clamp(160px, 20vw, 300px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}

.tm-leistung-atf__arrow-sm {
  position: absolute;
  top: 225px;
  right: 160px;
  width: clamp(80px, 10vw, 140px);
  height: auto;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 1440px) {
  .tm-leistung-atf__arrow-lg,
  .tm-leistung-atf__arrow-sm {
    display: none;
  }
}


/* ── Leistungs-Boxen ── */

.tm-leistung-atf__boxes {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 1620px;
  max-width: 100%;
  margin: 100px auto 0;
  padding: 0 var(--tm-content-padding);
}


/* ── Einzelne Box ── */

.tm-leistung-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 0;
  min-width: 200px;
  max-width: 280px;
  height: 156px;
  padding: 16px;
  background: var(--tm-blue-600);
  text-decoration: none;
  transition: background var(--tm-transition);
}

.tm-leistung-box:hover,
.tm-leistung-box--active {
  background: var(--tm-green, #C8E61E);
}

.tm-leistung-box:hover .tm-leistung-box__title,
.tm-leistung-box--active .tm-leistung-box__title {
  color: var(--tm-blue);
}

.tm-leistung-box:hover .tm-leistung-box__arrow,
.tm-leistung-box--active .tm-leistung-box__arrow {
  filter: brightness(0) saturate(100%) invert(5%) sepia(30%) saturate(5000%) hue-rotate(210deg) brightness(20%);
}

.tm-leistung-box__title {
  font-family: var(--tm-font-body);
  font-weight: var(--tm-fw-bold);
  font-size: 16px;
  line-height: 1.4;
  color: var(--tm-white-soft);
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.tm-leistung-box__arrow {
  width: 24px;
  height: 24px;
  align-self: flex-end;
  display: block;
}


/* ==========================================================================
   3. GUTENBERG CONTENT
   ========================================================================== */

.tm-leistung__content {
  position: relative;
  width: 100%;
  padding: 64px 0 128px;
  overflow-x: clip;
}

/* Kein unteres Padding, wenn "Anderes Wissen" der letzte Block im Content ist
   (Modifier wird PHP-seitig gesetzt, fallback zusätzlich via :has()) */
.tm-leistung__content--no-bottom,
.tm-leistung__content:has(.tm-anderes-wissen:last-child) {
  padding-bottom: 0 !important;
}

/* ── Dekorative Pfeile links/rechts ── */
.tm-deco-arrow {
  position: absolute;
  width: clamp(180px, 18vw, 280px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}

/* Links: 0° (keine Drehung) */
.tm-deco-arrow--left {
  left: -40px;
  transform: rotate(0deg);
}

/* Rechts: 180° gedreht */
.tm-deco-arrow--right {
  right: -40px;
  transform: rotate(180deg);
}

/* Jeder zweite rechte Pfeil: doppelt so gross */
.tm-deco-arrow--right-large {
  right: -40px;
  transform: rotate(180deg);
  width: clamp(360px, 36vw, 560px);
}

@media (max-width: 1200px) {
  .tm-deco-arrow {
    display: none;
  }
}

.tm-leistung__content-inner {
  width: 947px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--tm-content-padding);
}

/* Gutenberg Absaetze + Headings */
.tm-leistung__content-inner p {
  font-family: var(--tm-font-body);
  font-weight: var(--tm-fw-regular);
  font-size: 18px;
  line-height: 1.6;
  color: var(--tm-black);
  margin: 0 0 24px;
}

.tm-leistung__content-inner h2 {
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-extrabold);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.3;
  color: var(--tm-blue);
  margin: 48px 0 24px;
}

.tm-leistung__content-inner h3 {
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-extrabold);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
  color: var(--tm-blue);
  margin: 40px 0 16px;
}

/* Erste Heading: kein margin-top */
.tm-leistung__content-inner > h2:first-child,
.tm-leistung__content-inner > h3:first-child {
  margin-top: 0;
}

/* Bilder: 48px Abstand nach oben, WP-Default-Margins resetten */
.tm-leistung__content-inner img,
.tm-leistung__content-inner figure,
.tm-leistung__content-inner .wp-block-image {
  margin-top: 48px;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
}

.tm-leistung__content-inner .wp-block-image {
  padding: 0;
}

.tm-leistung__content-inner .wp-block-image figure {
  margin: 0;
}

.tm-leistung__content-inner .wp-block-image img {
  margin-top: 0;
}


/* ==========================================================================
   4. KONTAKTIEREN SIE UNSERE EXPERTEN
   ========================================================================== */

.tm-experten {
  background: #F3F3F3;
  padding: var(--tm-section-py) 0;
}

.tm-experten__inner {
  width: 947px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--tm-content-padding);
  text-align: center;
}

/* ── Titel: head-l, blau ── */
.tm-experten__title {
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-extrabold);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.3;
  color: var(--tm-blue);
  margin: 0 0 18px;
}

/* ── Intro-Text ── */
.tm-experten__intro {
  font-family: var(--tm-font-body);
  font-weight: var(--tm-fw-regular);
  font-size: 18px;
  line-height: 1.6;
  color: var(--tm-black);
  margin: 0;
}

/* ── Kacheln-Container ── */
.tm-experten__cards {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 64px;
}

/* ── Einzelne Kachel ── */
.tm-experten-card {
  width: 359px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0;
  overflow: hidden;
  background: var(--tm-white);
}

/* Bild */
.tm-experten-card__img {
  display: block;
  width: 359px;
  height: 262px;
  overflow: hidden;
}

.tm-experten-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Content-Area */
.tm-experten-card__body {
  padding: 32px;
  text-align: left;
}

.tm-experten-card__name {
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-extrabold);
  font-size: 28px;
  line-height: 1.3;
  color: var(--tm-blue);
  margin: 0 0 16px;
}

.tm-experten-card__name a {
  color: inherit;
  text-decoration: none;
}

.tm-experten-card__name a:hover {
  text-decoration: underline;
}

.tm-experten-card__position {
  font-family: var(--tm-font-body);
  font-weight: var(--tm-fw-regular);
  font-size: 16px;
  line-height: 1.5;
  color: var(--tm-black);
  margin: 0;
}

/* Social Icons */
.tm-experten-card__social {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 24px;
}

.tm-experten-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tm-green);
  text-decoration: none;
  transition: opacity var(--tm-transition);
}

.tm-experten-card__icon:hover {
  opacity: 0.8;
}

.tm-experten-card__icon img {
  width: 20px;
  height: 20px;
  display: block;
}

/* ── Zentrale-Unterueberschrift ── */
.tm-experten__sub {
  font-family: var(--tm-font-heading);
  font-weight: var(--tm-fw-extrabold);
  font-size: 28px;
  line-height: 1.3;
  color: var(--tm-blue);
  margin: 64px 0 16px;
}

/* ── Zentrale Kontaktdaten ── */
.tm-experten__zentrale {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.tm-experten__contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--tm-font-body);
  font-weight: var(--tm-fw-regular);
  font-size: 18px;
  line-height: 1.5;
  color: var(--tm-blue);
  text-decoration: none;
  transition: opacity var(--tm-transition);
}

.tm-experten__contact:visited,
.tm-experten__contact:active,
.tm-experten__contact:hover {
  color: var(--tm-blue);
}

.tm-experten__contact:hover {
  opacity: 0.7;
}

.tm-experten__contact--mail span {
  text-decoration: underline;
}

.tm-experten__contact svg {
  flex-shrink: 0;
  width: 18px;
  height: auto;
}

/* ── CTA Button ── */
.tm-experten__cta {
  margin-top: 40px;
}


/* ==========================================================================
   5. WEITERE LEISTUNGEN (Slider mit dunklem Wasser-BG)
   ========================================================================== */

.tm-beitraege-wrap {
  position: relative;
  padding-top: var(--tm-section-py);
  padding-bottom: var(--tm-section-py);
  overflow-x: hidden;
  overflow-y: visible;
}

/* Hintergrundbild */
.tm-beitraege-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("https://www.transformis-consulting.de/wp-content/uploads/2026/03/Dunkles-Wasser-scaled.jpg")
    center / cover no-repeat;
  z-index: 0;
}

/* Dunkles Overlay */
.tm-beitraege-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* Inhalt ueber das Overlay heben */
.tm-beitraege-wrap > * {
  position: relative;
  z-index: 2;
}

/* Heading auf dunklem Hintergrund: weisse Schrift */
.tm-beitraege-wrap .tm-section-heading__title {
  color: var(--tm-white) !important;
}

/* Leistungen-Karten: kompaktere Textbox (kein Copy-Text, nur Titel + Button) */
.tm-beitraege-wrap .tm-slider {
  --tm-slider-text-h: 200px;
}

.tm-beitraege-wrap .tm-slider__title {
  min-height: 0;
  margin-bottom: 24px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ── Tablet (≤1440px): Boxen 3 pro Reihe, Titel kleiner ── */
@media (max-width: 1440px) {
  .tm-leistung-atf__boxes {
    width: 100%;
  }

  .tm-leistung-box {
    max-width: none;
    min-width: 180px;
  }
}

/* ── Tablet (≤900px): Titel + Spacing anpassen ── */
@media (max-width: 900px) {
  .tm-leistung-atf__title {
    font-size: 36px;
    margin-bottom: 32px;
  }

  .tm-leistung-atf {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .tm-leistung-atf--no-hero {
    padding-top: calc(90px + 56px);
  }

  .tm-leistung-atf__boxes {
    margin-top: 64px;
  }
}

/* ── Mobil (≤640px): Boxen 2 pro Reihe ── */
@media (max-width: 640px) {
  .tm-leistung-box {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
    max-width: none;
    height: 130px;
  }

  .tm-leistung-atf {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .tm-leistung-atf--no-hero {
    padding-top: calc(60px + 48px);
  }

  .tm-leistung-atf__title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .tm-leistung-atf__boxes {
    margin-top: 48px;
  }
}

/* ── Kleine Mobil (≤400px): Boxen 1 pro Reihe ── */
@media (max-width: 400px) {
  .tm-leistung-box {
    flex: 1 1 100%;
    min-width: 0;
    height: auto;
    min-height: 120px;
  }
}

/* ── Experten: Tablet (≤900px) ── */
@media (max-width: 900px) {
  .tm-experten__cards {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .tm-experten-card {
    width: 100%;
    max-width: 420px;
  }

  .tm-experten-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 359 / 262;
  }

  .tm-experten__zentrale {
    gap: 24px;
  }

  .tm-experten__sub {
    margin-top: 48px;
  }
}

/* ── Experten: Mobil (≤640px) ── */
@media (max-width: 640px) {
  .tm-experten__title {
    font-size: 26px;
  }

  .tm-experten__intro {
    font-size: 16px;
  }

  .tm-experten__cards {
    margin-top: 40px;
  }

  .tm-experten__zentrale {
    flex-direction: column;
    gap: 16px;
  }

  .tm-experten__contact {
    font-size: 16px;
  }

  .tm-experten__sub {
    margin-top: 40px;
    font-size: 20px;
  }
}
