/* TerraTrim – Einsatzbereich-Unterseiten (/einsatzbereiche/<slug>/)
   Alle Regeln sind auf body.eb-page begrenzt. Header kommt unverändert aus
   styles.min.css + content-pages.css, Verhalten aus main.js. */

.eb-page {
  --eb-ink: #050806;
  --eb-text: #3a433c;
  --eb-mute: #6b776d;
  --eb-green: #315f26;
  --eb-forest: #0e2c16;
  --eb-line: #e3e8e0;
  --eb-sep: #c9d4c4;
  --eb-ease: cubic-bezier(.22, 1, .36, 1);
  /* Höhe des fixierten Seiten-Headers (wie .header__inner in styles.min.css) */
  --eb-header: clamp(112px, 10vw, 124px);
  /* Seitenränder wie im Entwurf (96px / 64px). Ab 1600px Breite bleibt der
     Inhalt als 1600px-Rahmen zentriert, damit Textspalte, Foto und Band auf
     großen Monitoren nicht auseinanderlaufen. */
  --eb-pad-in: max(96px, calc(50% - 704px));
  --eb-pad-out: max(64px, calc(50% - 736px));
  background: #fff;
  color: var(--eb-ink);
}

@media (min-width: 981px) and (max-height: 720px) {
  .eb-page { --eb-header: 96px; }
}
@media (max-width: 980px) {
  .eb-page { --eb-header: 72px; }
}
@media (max-width: 560px) {
  .eb-page { --eb-header: 76px; }
}

/* Smart-Header ausgeblendet: Schatten mit ausblenden, sonst bleibt am oberen
   Fensterrand ein grauer Streifen über Inhaltsverzeichnis und Text stehen. */
.eb-page .header.is-hidden { box-shadow: none; }

/* Header-Trefferflächen auf Telefonen auf mindestens 44px erweitern (ohne Optikänderung) */
@media (max-width: 980px) {
  .eb-page .header .logo,
  .eb-page .header__cta,
  .eb-page .nav-toggle { position: relative; }
  .eb-page .header .logo::after,
  .eb-page .header__cta::after,
  .eb-page .nav-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 44px;
    min-height: 44px;
    transform: translate(-50%, -50%);
  }
}

/* ---------- Bewegung ---------- */
@keyframes eb-rise { from { transform: translateY(104%); } to { transform: translateY(0); } }
@keyframes eb-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes eb-wide { from { clip-path: inset(8% 6% 8% 6% round 24px); } to { clip-path: inset(0 0 0 0 round 24px); } }
@keyframes eb-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes eb-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.eb-page .eb-up { animation: eb-up .9s var(--eb-ease) both; }
.eb-page .eb-d1 { animation-delay: .3s; }

/* ---------- Grundgerüst ---------- */
.eb-page .eb-main {
  display: block;
  padding-top: var(--eb-header);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: normal;
  color: var(--eb-ink);
}

/* ---------- Einstieg ---------- */
.eb-page .eb-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 72px;
  align-items: end;
  padding: 72px var(--eb-pad-in) 0;
}

.eb-page .eb-crumb {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--eb-mute);
}
.eb-page .eb-crumb ol { display: block; margin: 0; padding: 0; list-style: none; }
.eb-page .eb-crumb li { display: inline; }
.eb-page .eb-crumb a { color: var(--eb-mute); text-decoration: none; transition: color .3s ease; }
.eb-page .eb-crumb a:hover { color: var(--eb-green); }
.eb-page .eb-crumb__sep { margin: 0 6px; }
.eb-page .eb-crumb__current { white-space: nowrap; }

.eb-page .eb-title {
  margin: 0;
  /* bewusst etwas kleiner als die Hero-Headline der Startseite
     (dort clamp(40px, min(4.1vw, 6.7vh), 64px)) */
  font-size: clamp(36px, min(3.8vw, 6.4vh), 58px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.048em;
  color: var(--eb-ink);
}
.eb-page .eb-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.eb-page .eb-line > span { display: block; animation: eb-rise 1s var(--eb-ease) both; }
.eb-page .eb-line + .eb-line > span { animation-delay: .1s; }
.eb-page .eb-title__accent { color: var(--eb-green); }

.eb-page .eb-lead__text {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--eb-text);
}
.eb-page .eb-lead__text strong { font-weight: 700; color: var(--eb-ink); }

/* Fakten als umbrechende Zeile. Jeder Trenner sitzt vor seinem Eintrag; beginnt ein
   Eintrag eine neue Zeile, schiebt ihn der negative Rand links aus der Liste und
   overflow: hidden schneidet ihn ab – keine verwaisten "/" am Zeilenanfang. */
.eb-page .eb-facts {
  --eb-sep-w: 21px;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--eb-sep-w);
  row-gap: 4px;
  overflow: hidden;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--eb-mute);
}
.eb-page .eb-facts li { display: block; white-space: nowrap; }
.eb-page .eb-facts li + li { margin-left: calc(-1 * var(--eb-sep-w)); }
.eb-page .eb-facts__sep { display: inline-block; width: var(--eb-sep-w); text-align: center; color: var(--eb-sep); }

/* ---------- Großes Foto ---------- */
.eb-page .eb-figure { margin: 0; padding: 48px var(--eb-pad-out) 0; }
.eb-page .eb-wide {
  height: 440px;
  border-radius: 24px;
  overflow: hidden;
  background: #e9ede6;
  animation: eb-wide 1.4s .35s var(--eb-ease) both;
}
.eb-page .eb-wide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--eb-pos, 50% 50%);
  animation: eb-zoom 2.4s .35s var(--eb-ease) both;
}
.eb-page .eb-cap {
  margin-top: 14px;
  padding: 0 32px;
  font-size: 14px;
  color: var(--eb-mute);
}

/* ---------- Inhalt mit Inhaltsverzeichnis ---------- */
.eb-page .eb-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  gap: 120px;
  padding: 72px var(--eb-pad-in) 0;
}

.eb-page .eb-aside {
  position: sticky;
  top: calc(var(--eb-header) + 32px);
  align-self: start;
  transition: top .24s var(--eb-ease);
}
/* Header per Smart-Header ausgeblendet: Inhaltsverzeichnis rückt nach oben */
.eb-page .header.is-hidden ~ .eb-main .eb-aside { top: 32px; }

.eb-page .eb-toc-label {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--eb-ink);
}
.eb-page .eb-toc { border-left: 1px solid var(--eb-line); }
.eb-page .eb-toc ul { margin: 0; padding: 0; list-style: none; }
.eb-page .eb-toc a {
  position: relative;
  display: block;
  padding: 9px 0 9px 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--eb-mute);
  text-decoration: none;
  transition: color .3s ease;
}
.eb-page .eb-toc a::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--eb-green);
  transform: scaleY(0);
  transition: transform .45s var(--eb-ease);
}
.eb-page .eb-toc a:hover,
.eb-page .eb-toc a.is-active { color: var(--eb-ink); }
.eb-page .eb-toc a.is-active::before { transform: scaleY(1); }

.eb-page .eb-aside-cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--eb-forest);
  text-decoration: none;
  transition: transform .3s var(--eb-ease), color .3s ease;
}
.eb-page .eb-aside-cta:hover { color: var(--eb-green); transform: translateY(-2px); }
.eb-page .eb-aside-cta svg { flex: none; transition: transform .3s var(--eb-ease); }
.eb-page .eb-aside-cta:hover svg { transform: translateX(3px); }

.eb-page .eb-art h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--eb-ink);
}
.eb-page .eb-art p {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.75;
  color: var(--eb-text);
}
.eb-page .eb-art section + section { margin-top: 60px; }

/* Sprungziele: Abstand zum fixierten Header. Bei Klick-Sprüngen blendet main.js
   den Header aus, dann genügt der kleine Abstand (Klasse eb-jump am <html>). */
.eb-page .eb-art section { scroll-margin-top: calc(var(--eb-header) + 24px); }
.eb-jump .eb-page .eb-art section { scroll-margin-top: 32px; }

.eb-page .eb-inline {
  font-weight: 700;
  color: var(--eb-forest);
  text-decoration: none;
  border-bottom: 1.5px solid var(--eb-sep);
  transition: border-color .3s ease, color .3s ease;
}
.eb-page .eb-inline:hover { color: var(--eb-green); border-color: var(--eb-green); }
.eb-page .eb-nowrap { white-space: nowrap; }

.eb-page .eb-main a:focus-visible,
.eb-page .eb-foot a:focus-visible,
.eb-page .eb-q:focus-visible {
  outline: 2px solid var(--eb-green);
  outline-offset: 3px;
}

/* ---------- Häufige Fragen ---------- */
.eb-page .eb-faq { margin-top: 20px; border-top: 1px solid var(--eb-line); }
.eb-page .eb-faq details { border-bottom: 1px solid var(--eb-line); }
.eb-page .eb-q {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  text-align: left;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--eb-ink);
}
.eb-page .eb-q::-webkit-details-marker { display: none; }
.eb-page .eb-q::marker { content: ""; }
.eb-page .eb-q svg { flex: none; transition: transform .45s var(--eb-ease); }
.eb-page .eb-faq details[open] > .eb-q svg { transform: rotate(45deg); }
.eb-page .eb-a { padding: 0 48px 24px 0; }
.eb-page .eb-faq details[open] > .eb-a { animation: eb-open .5s var(--eb-ease) both; }
.eb-page .eb-art .eb-a p { margin: 0; }
.eb-page .eb-a .eb-inline { display: inline-block; margin-top: 12px; font-size: 16px; }

/* ---------- Weitere Einsatzbereiche ---------- */
.eb-page .eb-rel-list { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--eb-line); }
.eb-page .eb-rel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 16px 0;
  border-bottom: 1px solid var(--eb-line);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--eb-ink);
  text-decoration: none;
  transition: color .3s ease;
}
.eb-page .eb-rel:hover { color: var(--eb-green); }
.eb-page .eb-rel svg { flex: none; color: var(--eb-green); transition: transform .35s var(--eb-ease); }
.eb-page .eb-rel:hover svg { transform: translateX(4px); }

/* ---------- Abschluss-Band ---------- */
.eb-page .eb-cta-wrap { padding: 104px var(--eb-pad-out) 88px; }
.eb-page .eb-cta {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--eb-forest);
  color: #fff;
  padding: 60px 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.eb-page .eb-cta__media { position: absolute; inset: 0; }
.eb-page .eb-cta__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: right 40%;
  opacity: .28;
}
.eb-page .eb-cta__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0e2c16 0%, rgba(14, 44, 22, .92) 45%, rgba(14, 44, 22, .55) 100%);
}
.eb-page .eb-cta__copy { position: relative; max-width: 620px; }
.eb-page .eb-cta h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.045em;
  color: #fff;
}
.eb-page .eb-cta p {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .8);
}
.eb-page .eb-cta__actions { position: relative; display: flex; flex-wrap: wrap; gap: 12px; }
.eb-page .eb-cta__btn {
  display: inline-flex;
  align-items: center;
  height: 54px;
  border-radius: 12px;
  font-size: 15px;
  text-decoration: none;
  transition: transform .3s var(--eb-ease), background-color .3s ease, border-color .3s ease, color .3s ease;
}
.eb-page .eb-cta__btn:hover { transform: translateY(-2px); }
.eb-page .eb-cta__btn--wa { gap: 10px; padding: 0 28px; background: #fff; color: var(--eb-forest); font-weight: 800; }
.eb-page .eb-cta__btn--wa:hover { color: var(--eb-green); }
.eb-page .eb-cta__btn--tel { padding: 0 26px; border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 700; }
.eb-page .eb-cta__btn--tel:hover { color: #fff; border-color: rgba(255, 255, 255, .7); }
.eb-page .eb-main .eb-cta a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Fußzeile ---------- */
.eb-page .eb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px var(--eb-pad-in);
  border-top: 1px solid var(--eb-line);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: normal;
  color: var(--eb-mute);
}
.eb-page .eb-foot a { color: var(--eb-text); transition: color .3s ease; }
.eb-page .eb-foot a:hover { color: var(--eb-green); }
.eb-page .eb-foot__mail { text-decoration: underline; }
.eb-page .eb-foot__legal { display: flex; gap: 24px; }
.eb-page .eb-foot__legal a { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .eb-page .eb-intro { grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
  .eb-page .eb-lead { max-width: 680px; }
  .eb-page .eb-body { grid-template-columns: 200px minmax(0, 1fr); gap: 64px; }
}

@media (max-width: 900px) {
  .eb-page .eb-intro { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px 0; }
  .eb-page .eb-figure { padding-left: 20px; padding-right: 20px; }
  .eb-page .eb-body { grid-template-columns: 1fr; gap: 48px; padding-left: 20px; padding-right: 20px; }
  .eb-page .eb-aside { position: static; }
  .eb-page .eb-wide { height: 300px; }
  .eb-page .eb-wide img { object-position: var(--eb-pos-m, var(--eb-pos, 50% 50%)); }
  .eb-page .eb-art h2 { font-size: 27px; }
  .eb-page .eb-art p { font-size: 17px; }
  .eb-page .eb-rel,
  .eb-page .eb-q { font-size: 17px; }
  .eb-page .eb-cap { padding: 0; }
  .eb-page .eb-cta-wrap { padding-left: 20px; padding-right: 20px; }
  .eb-page .eb-cta { padding: 44px 24px; }
  .eb-page .eb-cta h2 { font-size: 36px; }
  .eb-page .eb-foot { flex-direction: column; align-items: flex-start; padding-left: 20px; padding-right: 20px; }
  .eb-page .eb-toc a { padding: 12px 0 12px 18px; }
  .eb-page .eb-aside-cta { min-height: 44px; }
  .eb-page .eb-crumb a { padding: 14px 0; }
  .eb-page .eb-inline {
    padding: 12px 0;
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-color: var(--eb-sep);
    text-decoration-thickness: 1.5px;
    text-underline-offset: .32em;
    transition: text-decoration-color .3s ease, color .3s ease;
  }
  .eb-page .eb-inline:hover { text-decoration-color: var(--eb-green); }
  .eb-page .eb-a .eb-inline { display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin-top: 2px; }
  .eb-page .eb-foot a { padding: 14px 0; }
}

@media (min-width: 561px) and (max-width: 980px) {
  .eb-page .eb-title { font-size: clamp(36px, 5.2vw, 44px); }
}

@media (max-width: 560px) {
  /* Telefone: Überschrift unter der Hero-Headline der Startseite (31–34px) */
  .eb-page .eb-title { font-size: clamp(29px, 8vw, 34px); }
}

@media (prefers-reduced-motion: reduce) {
  .eb-page *,
  .eb-page *::before,
  .eb-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
