/* ============================================================
   Baumdienst Betz — Design-System & Basis
   Waldgrün & Eiche · natürlich-organisch · mobile-first
   ============================================================ */

/* ---- Design-Tokens ---- */
:root {
  /* Farben (Spec §6) */
  --gruen-tief:  #2f4a34;   /* Primär: Header, Überschriften */
  --gruen:       #3c5a3f;
  --gruen-hell:  #7d9166;   /* Sekundär, Schafe-Akzent */
  --gold:        #c9a15a;   /* Akzent / CTA ("Eiche") */
  --gold-dunkel: #a8823f;   /* Gold-Hover */
  --creme:       #f4f1ea;   /* Hintergrund */
  --creme-tief:  #ebe6da;   /* abgesetzte Sektionen */
  --text:        #2b2b26;
  --text-leise:  #5c5c52;
  --weiss:       #ffffff;

  /* Typografie */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Maße */
  --container: 1180px;
  --radius:    14px;
  --radius-gross: 24px;
  --schatten:  0 6px 24px rgba(47, 74, 52, 0.10);
  --schatten-stark: 0 12px 40px rgba(47, 74, 52, 0.16);
  --abstand-sektion: clamp(3.5rem, 8vw, 6.5rem);
}

/* ---- Reset / Basis ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--creme);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gruen); text-decoration-color: rgba(60,90,63,0.35); text-underline-offset: 3px; }
a:hover { color: var(--gruen-tief); }

h1, h2, h3 { font-family: var(--serif); color: var(--gruen-tief); line-height: 1.12; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 .4em; letter-spacing: .3px; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0 0 .5em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin: 0 0 .4em; }
p  { margin: 0 0 1.1em; }

/* ---- Layout-Helfer ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section  { padding-block: var(--abstand-sektion); }
.section--creme-tief { background: var(--creme-tief); }
.section--gruen { background: var(--gruen-tief); color: #e9efe1; }
.section--gruen h2, .section--gruen h3 { color: var(--weiss); }
.section__intro { max-width: 60ch; margin-inline: auto; text-align: center; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section__intro p { color: var(--text-leise); }
.section--gruen .section__intro p { color: #cdd8c2; }

.eyebrow {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-dunkel); margin-bottom: .8rem;
}
.section--gruen .eyebrow { color: var(--gold); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold); color: #3a2c10; }
.btn--gold:hover { background: var(--gold-dunkel); color: #fff; box-shadow: var(--schatten); }
.btn--gruen { background: var(--gruen-tief); color: #fff; }
.btn--gruen:hover { background: var(--gruen); box-shadow: var(--schatten); }
.btn--outline { background: transparent; border-color: currentColor; color: var(--gruen-tief); }
.btn--outline:hover { background: var(--gruen-tief); color: #fff; }
.btn--ghost-hell { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost-hell:hover { background: #fff; color: var(--gruen-tief); }

/* ---- Karten (Grundstil) ---- */
.card {
  background: var(--weiss); border-radius: var(--radius);
  box-shadow: var(--schatten); overflow: hidden;
}

/* ---- Fokus-Sichtbarkeit (A11y) ---- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---- Skip-Link ---- */
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--gruen-tief); color: #fff; padding: .6em 1em; border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---- Utility ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   Komponenten
   ============================================================ */

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid rgba(47,74,52,0.08);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--gruen-tief); }
.brand img { border-radius: 50%; }
.site-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 1.4rem; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; font-weight: 500; color: var(--gruen-tief); }
.nav-list a:hover { color: var(--gold-dunkel); }
.nav-list__cta a { color: #3a2c10; }
.nav-toggle { display: none; }

/* ---- Hero ---- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: center 30%; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,35,22,.25) 0%, rgba(20,35,22,.10) 40%, rgba(20,35,22,.78) 100%); }
.hero__content { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem); color: #fff; max-width: 42rem; }
.hero__content h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero__eyebrow { color: #f4d99a; background: rgba(20,35,22,.55); padding: .45em 1em; border-radius: 999px; backdrop-filter: blur(2px); }
.hero__lead { font-size: 1.2rem; color: #eef2e8; text-shadow: 0 1px 10px rgba(0,0,0,.35); max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

/* ---- Über uns ---- */
.ueber { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
.trust__item { display: flex; align-items: center; gap: .7rem; background: var(--weiss); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--schatten); font-weight: 600; color: var(--gruen-tief); }
.trust__icon { font-size: 1.5rem; }

/* ---- Leistungen ---- */
.leistungen-grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.leistung-card { position: relative; display: block; background: var(--weiss); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.leistung-card:hover { transform: translateY(-4px); box-shadow: var(--schatten-stark); }
.leistung-card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.leistung-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.leistung-card:hover .leistung-card__media img { transform: scale(1.05); }
.leistung-card__body { padding: 1.2rem 1.3rem 1.5rem; }
.leistung-card__icon { font-size: 1.8rem; display: block; margin-bottom: .3rem; }
.leistung-card h3 { margin-bottom: .3rem; }
.leistung-card p { color: var(--text-leise); margin: 0; font-size: .98rem; }
.leistung-card--neu { outline: 2px solid var(--gruen-hell); outline-offset: -2px; }
.badge-neu { position: absolute; top: .8rem; right: .8rem; z-index: 2; background: var(--gold); color: #3a2c10; font-weight: 700; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; padding: .3em .8em; border-radius: 999px; }

/* ---- Detail-Abschnitte ---- */
.detail__row { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.detail__media img { width: 100%; border-radius: var(--radius-gross); box-shadow: var(--schatten); aspect-ratio: 3/2; object-fit: cover; }
.detail__text .leistung-card__icon { font-size: 2.2rem; }
.detail__text p { color: var(--text-leise); }

/* ---- Beweidung ---- */
.beweidung__grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; margin-bottom: 2rem; }
.beweidung__grid figure { margin: 0; }
.beweidung__grid img { width: 100%; border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; box-shadow: var(--schatten); }
.beweidung__grid figcaption { margin-top: .6rem; font-size: .9rem; color: #cdd8c2; text-align: center; }
.beweidung__text { max-width: 60ch; margin-inline: auto; text-align: center; }
.beweidung__text p { color: #dfe7d6; }

/* ---- Galerie ---- */
.galerie { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.galerie__item { padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; box-shadow: var(--schatten); }
.galerie__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.galerie__item:hover img { transform: scale(1.07); }

/* ---- Kundenstimmen ---- */
.stimmen-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.stimme { margin: 0; padding: 1.6rem 1.6rem 1.3rem; font-family: var(--serif); }
.stimme p { font-size: 1.15rem; font-style: italic; color: var(--gruen-tief); }
.stimme cite { font-family: var(--sans); font-style: normal; font-size: .9rem; color: var(--text-leise); }

/* ---- Einsatzgebiet / Karte ---- */
.gebiet { display: grid; grid-template-columns: 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.orte { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem .7rem; }
.orte li { background: var(--creme-tief); border-radius: 999px; padding: .35em 1em; font-weight: 500; font-size: .95rem; }
.gebiet__map iframe, .gebiet__map #map { width: 100%; aspect-ratio: 4/3; border: 0; border-radius: var(--radius-gross); box-shadow: var(--schatten); overflow: hidden; background: var(--creme-tief); }
.gebiet__map #map { z-index: 0; }

/* ---- Kontakt ---- */
.kontakt-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 720px; margin-inline: auto; }
.kontakt-card { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius); padding: 1.6rem 1rem; text-decoration: none; color: #fff; transition: background .2s ease, transform .2s ease; }
.kontakt-card:hover { background: #fff; color: var(--gruen-tief); transform: translateY(-3px); }
.kontakt-card__icon { font-size: 2rem; }
.kontakt-card__label { font-weight: 600; letter-spacing: .03em; }
.kontakt-card__value { font-size: .95rem; opacity: .9; }
.kontakt-adresse { margin-top: 2rem; text-align: center; font-style: normal; color: #cdd8c2; }

/* ---- Footer ---- */
.site-footer { background: #24382a; color: #cdd8c2; }
.site-footer__inner { display: grid; grid-template-columns: 1fr; gap: 1.8rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
.site-footer__brand img { background: #fff; border-radius: 50%; padding: 8px; }
.site-footer__brand p { max-width: 34ch; margin-top: 1rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-content: start; }
.site-footer__nav a { color: #cdd8c2; text-decoration: none; font-weight: 500; }
.site-footer__nav a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.2rem; font-size: .88rem; color: #9fb094; }

/* ---- Lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(20,30,22,.92); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 60px rgba(0,0,0,.5); }
.lightbox__close { position: absolute; top: 1rem; right: 1.2rem; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }

/* ============================================================
   Responsiv
   ============================================================ */
@media (min-width: 640px) {
  .leistungen-grid { grid-template-columns: repeat(2, 1fr); }
  .beweidung__grid { grid-template-columns: 1fr 1fr; }
  .stimmen-grid { grid-template-columns: repeat(3, 1fr); }
  .kontakt-grid { grid-template-columns: repeat(3, 1fr); }
  .galerie { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .ueber { grid-template-columns: 1.4fr 1fr; }
  .detail__row { grid-template-columns: 1fr 1fr; }
  .detail__row--reverse .detail__media { order: 2; }
  .gebiet { grid-template-columns: 1fr 1fr; }
  .galerie { grid-template-columns: repeat(4, 1fr); }
  .site-footer__inner { grid-template-columns: 1.5fr 1fr; }
}
@media (min-width: 1024px) {
  .leistungen-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Mobil-Navigation ---- */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle::before, .nav-toggle::after {
    content: ""; display: block; width: 26px; height: 3px; background: var(--gruen-tief);
    border-radius: 3px; transition: transform .25s ease, opacity .2s ease; margin-inline: auto;
  }
  .nav-toggle[aria-expanded="true"]::before { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { opacity: 0; }
  .nav-toggle[aria-expanded="true"]::after { transform: translateY(-8px) rotate(-45deg); }

  .nav-list {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--creme); padding: .5rem 1.2rem 1.4rem;
    box-shadow: var(--schatten); border-bottom: 1px solid rgba(47,74,52,0.1);
    transform: translateY(-120%); transition: transform .28s ease; visibility: hidden;
  }
  .nav-list.open { transform: translateY(0); visibility: visible; }
  .nav-list li { border-bottom: 1px solid rgba(47,74,52,0.08); }
  .nav-list a { display: block; padding: .9rem .2rem; }
  .nav-list__cta { border-bottom: 0; margin-top: .8rem; }
  .nav-list__cta a { text-align: center; }
}

/* ---- Reduzierte Bewegung ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---- Rechtstexte (Impressum / Datenschutz) ---- */
.container--schmal { max-width: 760px; }
.rechtstext h1 { margin-bottom: 1.2rem; }
.rechtstext h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin-top: 2.2rem; }
.rechtstext p, .rechtstext li { color: var(--text-leise); }
.rechtstext a { color: var(--gruen); }

/* ---- Overflow-Schutz & Umbruch (Mobil-Fix) ---- */
html, body { overflow-x: hidden; }
h1, h2, h3 { overflow-wrap: break-word; }
.hero__eyebrow { text-shadow: 0 1px 8px rgba(0,0,0,.7); }

/* ---- Grid-Overflow-Fix ----
   1fr == minmax(auto,1fr): das auto-Minimum lässt Spalten über den
   Container hinauswachsen. min-width:0 auf Grid-Kinder verhindert das. */
.ueber > *, .detail__row > *, .gebiet > *,
.leistungen-grid > *, .beweidung__grid > *,
.stimmen-grid > *, .kontakt-grid > *, .galerie > * { min-width: 0; }
