/* ==========================================================================
   Anton Seeger – Metall- und Gewächshausbau
   Statische Website · Layoutbasis: FireShot-Captures 318–324 (1920 px)
   ========================================================================== */

:root {
  --green: #20603d;          /* Hauptgrün (Headlines, Buttons, aktive Navigation) */
  --green-top: #225f40;      /* Linie oberhalb des Headers */
  --green-line: #8eaf9d;     /* Linien Header / Navigation */
  --nav-sep: #8aab9c;        /* Trennstriche Navigation */
  --nav-bg: #f5f5f5;
  --yellow: #cfc15e;         /* Footer */
  --grey-section: #ededed;   /* Info-Sektion */
  --box-bg: #f8f8f8;
  --box-border: #e6e6e6;
  --field-bg: #f8f8f8;
  --field-border: #f1f1f1;
  --placeholder: #919191;
  --text: #000;
  --container: 904px;        /* Boxed-Layout aus den Vorlagen */
  --gutter: 44px;            /* Innenabstand links/rechts → Inhaltsbreite 816 px */
  --col-gap: 49px;           /* Spaltenabstand (3er- und 2er-Raster) */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, "Liberation Sans", sans-serif;
  font-size: 14px;           /* Fließtext Desktop */
  line-height: 22px;
  color: var(--text);
  background: #e9e4dc;
}

/* Fixierter Seitenhintergrund (als Pseudo-Element, damit es auch auf iOS steht) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../img/hintergrund.jpg") center center / cover no-repeat;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Rahmen ---------- */
.page {
  max-width: var(--container);
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid var(--green-top);
}

.inner { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Header ---------- */
.site-header { position: relative; background: #fff; }

.logo-bar {
  height: 103px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--green-line);
}
.logo-bar a { display: block; }
.logo-bar img { width: 364px; height: 102px; }

.main-nav { background: var(--nav-bg); border-bottom: 1px solid var(--green-line); }
.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center;
}
.main-nav li { position: relative; }
.main-nav li + li::before {
  content: ""; position: absolute; left: 0; top: 15px;
  width: 1px; height: 14px; background: var(--nav-sep);
}
.main-nav a {
  display: block;
  padding: 0 12.5px;
  height: 44px;
  line-height: 44px;
  font-size: 12px;
  color: var(--green);
  white-space: nowrap;
  position: relative;
}
.main-nav a:hover { text-decoration: none; background: #ececec; }
.main-nav a[aria-current="page"] { background: var(--green); color: #fff; z-index: 1; }
.main-nav li.is-active + li::before { display: none; }

.nav-toggle { display: none; }

/* ---------- Hero / Slider ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: #2b4a2c;
  margin-top: -1px;              /* liegt auf der Navigationslinie auf */
}
.hero--home { aspect-ratio: 1024 / 350; }
.hero--page { aspect-ratio: 1024 / 450; }

.hero img, .slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.slides { position: absolute; inset: 0; display: flex; transition: transform .7s ease; }
.slide { overflow: hidden; }

/* Leichter Zoom (Ken Burns) im Header */
@keyframes header-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.slide img { transform-origin: 50% 50%; }
.slide.is-active img { animation: header-zoom 6s ease-out forwards; }
.hero--page img { animation: header-zoom 9s ease-out forwards; transform-origin: 50% 60%; }
.slide { flex: 0 0 100%; height: 100%; }
.hero--page img { position: absolute; inset: 0; }

.hero-caption {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.hero-caption span {
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 24px;
  line-height: 44px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0 12px;
  letter-spacing: .25px;
  text-shadow: 0 0 1px rgba(0,0,0,.4);
}

.hero-caption { transition: opacity .4s; }
.hide-caption .hero-caption { opacity: 0; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 60px; border: 0; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 22px;
  opacity: 0; transition: opacity .3s; z-index: 2;
}
.slider-arrow--prev { left: 0; border-radius: 0 3px 3px 0; }
.slider-arrow--next { right: 0; border-radius: 3px 0 0 3px; }
.hero:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }

.slider-dots {
  position: absolute; bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px; z-index: 2;
  opacity: 0; transition: opacity .3s;
}
.hero:hover .slider-dots, .slider-dots:focus-within { opacity: 1; }
.slider-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.5); cursor: pointer;
}
.slider-dots button[aria-current="true"] { background: #fff; }

/* ---------- Inhalt ---------- */
.content { padding-top: 41px; padding-bottom: 55px; }
.content--home { padding-bottom: 56px; }

h1, .h1 {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.content p { margin: 0 0 11px; }
.content p:last-child { margin-bottom: 0; }
.content strong, .content b { color: var(--green); font-weight: 700; }
.content .lead { color: var(--green); font-weight: 700; }
.content a.u { color: var(--text); text-decoration: underline; }

/* Seitenüberschrift: mittig, durch dünne Linie vom Text getrennt (alle Seiten) */
.content h1 {
  text-align: center;
  text-wrap: balance;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--green-line);
}

/* Fließtext zweispaltig (Desktop) */
.text-cols {
  column-count: 2;
  column-gap: var(--col-gap);
  column-rule: 1px solid var(--yellow);   /* feine farbige Trennlinie */
  orphans: 3;
  widows: 3;
}
.text-cols p { margin: 0 0 11px; }
.text-cols p:last-child { margin-bottom: 0; }

/* ---------- Grüne Sektion: Leistungsliste (Startseite) ---------- */
.services {
  position: relative;
  color: #fff;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='226' height='226'%3E%3Cpath d='M0 0L226 226M226 0L0 226' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 226px 226px,
    linear-gradient(180deg, #2a6144 0%, #5c8a72 100%);
  padding: 81px 0 87px;
  border-bottom: 1px solid #759e8a;
}
.services__cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--col-gap); }
.services ul { list-style: none; margin: 0; padding: 0; }
.services li {
  position: relative;
  display: flex; align-items: center;
  height: 55px;
  margin-bottom: 31px;
  padding-left: 2px;
  font-size: 16.5px;
}
.services li:last-child { margin-bottom: 0; }
.services li:not(:last-child)::after {           /* Timeline-Linie */
  content: ""; position: absolute; left: 29px; top: 55px;
  height: 31px; border-left: 1px dashed rgba(255,255,255,.55);
}
.services .icon {
  flex: 0 0 55px; width: 55px; height: 55px; border-radius: 50%;
  background: #fff; color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-right: 27px;
  overflow: hidden;                 /* Pfeil fährt in den Kreis hinein */
}
.services .icon svg { width: 24px; height: 24px; }   /* 20 % größer */
.services .label { display: block; }

/* Scroll-Animation: Pfeil von links, Text von rechts (Werte setzt main.js je nach Scrollposition) */
.js-anim .services .icon svg {
  opacity: var(--p, 0);
  transform: translateX(calc((1 - var(--p, 0)) * -42px));
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1), opacity 1.1s ease;   /* läuft dem Scrollen gemächlich hinterher */
  will-change: transform, opacity;
}
.js-anim .services .label {
  opacity: var(--t, 0);
  transform: translateX(calc((1 - var(--t, 0)) * 60px));
  transition: transform 1.3s cubic-bezier(.22,.61,.36,1) .15s, opacity 1.3s ease .15s;
  will-change: transform, opacity;
}
.services__cols { overflow: hidden; }

/* ---------- Grüne Sektion: Bildkreise (Unterseiten) ---------- */
.gallery { background: var(--green); padding: 44px 0 45px; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--col-gap); }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%;
}
.gallery .col-2 { grid-column: 2; }
.gallery .col-3 { grid-column: 3; }

/* ---------- Info-Sektion (Adresse / Öffnungszeiten / Telefon) ---------- */
.info { background: var(--grey-section); padding: 39px 0 44px; border-top: 1px solid #f4f4f4; }
.info__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  column-gap: var(--col-gap); align-items: start;
}
.info-box {
  position: relative;
  margin-top: 22px;
  min-height: 165px;
  background: var(--box-bg);
  border: 1px solid #e9e9e9;
  border-radius: 3px;
  box-shadow: 0 0 2px rgba(0,0,0,.04);
  padding: 38px 16px 15px;
  text-align: center;
}
.info-box .icon {
  position: absolute; top: -23px; left: 50%; transform: translateX(-50%);
  width: 47px; height: 47px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.info-box .icon svg { width: 16px; height: 16px; }

/* ---------- Info-Piktogramme animiert ---------- */
.info-box .icon--pin { overflow: hidden; }
.js-anim .icon--pin svg {                       /* fliegt wie die Pfeile von links ein (scrollgesteuert) */
  opacity: var(--p, 0);
  transform: translateX(calc((1 - var(--p, 0)) * -36px));
  transition: transform 1.2s cubic-bezier(.22,.61,.36,1), opacity 1.2s ease;
}
.icon--clock .hand-m, .icon--clock .hand-h { transform-box: view-box; transform-origin: 8px 8px; }
.in-view .icon--clock .hand-m { animation: clock-m 4.5s cubic-bezier(.3,.1,.2,1) .8s both; }
.in-view .icon--clock .hand-h { animation: clock-h 4.5s cubic-bezier(.3,.1,.2,1) .8s both; }
@keyframes clock-m { from { transform: rotate(-720deg); } to { transform: rotate(0); } }
@keyframes clock-h { from { transform: rotate(-60deg); } to { transform: rotate(0); } }
.info-box:hover .icon--clock .hand-m { animation: clock-m 3s ease-in-out; }
.info-box:hover .icon--clock .hand-h { animation: clock-h 3s ease-in-out; }
.in-view .icon--phone svg { animation: phone-ring 5s ease-in-out 1.2s infinite; transform-origin: 50% 50%; }
@keyframes phone-ring {
  0%, 36%, 100% { transform: rotate(0); }
  4%, 12%, 20%, 28% { transform: rotate(-14deg) translateX(-1px); }
  8%, 16%, 24%, 32% { transform: rotate(14deg) translateX(1px); }
}
.info-box h2 {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 16px; line-height: 22px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.info-box p { margin: 0; }
.info-box a { color: var(--text); }

/* ---------- Karte ---------- */
.map { position: relative; height: 350px; border-top: 1px solid #d4dbd7; background: #24683f; overflow: hidden; }
.map img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; }
.map__link {
  position: absolute; left: 10px; top: 10px;
  background: #fff; color: #333; font-size: 13px; line-height: 20px;
  padding: 9px 14px; border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.map__link:hover { text-decoration: none; color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--yellow); font-size: 10px; line-height: 16px; }
.site-footer .inner {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; }
.site-footer li + li { border-left: 1px solid rgba(0,0,0,.15); margin-left: 9px; padding-left: 9px; }
.site-footer a { color: var(--text); }

/* ---------- Kontaktformular ---------- */
.content--form { padding-top: 40px; padding-bottom: 68px; }
.form-title {
  margin: 0 0 22px; color: var(--green);
  font-size: 18px; line-height: 28px; font-weight: 700;
  text-transform: none; letter-spacing: 0;
}
.form-row { display: flex; gap: 8px; margin-bottom: 13.4px; }
.form-row > * { flex: 1 1 auto; }
.form-row .w-third { flex: 0 0 calc((100% - 8px) * .33); }
.field, .select-wrap select, textarea.field {
  width: 100%;
  height: 40px;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  background: var(--field-bg);
  color: #333;
  font: inherit;
  font-size: 14px;
  padding: 0 12px;
  margin: 0;
}
textarea.field { height: 163px; padding-top: 10px; padding-bottom: 10px; resize: vertical; display: block; }
.field::placeholder { color: var(--placeholder); opacity: 1; }
.field:focus { outline: none; border-color: var(--green-line); background: #fff; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; cursor: pointer; color: var(--placeholder); }
.select-wrap select.has-value { color: #333; }
.select-wrap::after {
  content: ""; position: absolute; right: 12px; top: 13px; width: 1px; height: 14px;
  border-left: 1px solid #ddd; transform: translateX(-12px);
}
.select-wrap svg { position: absolute; right: 12px; top: 15px; width: 6px; height: 10px; pointer-events: none; }

.check {
  display: flex; align-items: center; gap: 8px;
  margin: 20px 0 19px 3px; font-weight: 700; font-size: 13px;
}
.check input { width: 13px; height: 13px; margin: 0; accent-color: var(--green); }
.check .req { color: var(--green); }
.consent p { margin: 0 0 14px; }
.consent { border-bottom: 1px solid #f0f0f0; padding-bottom: 3px; margin-bottom: 49px; }

.captcha {
  display: flex; align-items: center; height: 40px; margin-bottom: 13px;
  background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 2px;
  padding-left: 9px;
}
.captcha label { white-space: nowrap; color: #000; padding-right: 10px; }
.captcha input { border: 0; background: transparent; height: 38px; flex: 1; font: inherit; padding: 0 6px; }
.captcha input:focus { outline: none; }

.hp { position: absolute !important; left: -9999px !important; }

.btn {
  display: block; border: 0; cursor: pointer;
  width: 125px; height: 44px; border-radius: 2px;
  background: var(--green); color: #fff; font: inherit; font-size: 13px;
}
.btn:hover { background: #2c7a4f; }

.form-msg { margin-top: 14px; padding: 10px 14px; border-radius: 2px; display: none; }
.form-msg.ok { display: block; background: #e8f2ec; color: var(--green); }
.form-msg.err { display: block; background: #fbecec; color: #8a1f1f; }
.field.invalid { border-color: #c96b6b; }

/* ---------- Rechtstexte ---------- */
.legal h2 {
  margin: 26px 0 8px; color: var(--green);
  font-size: 15px; line-height: 22px; font-weight: 700;
}
.legal h3 { margin: 18px 0 6px; font-size: 14px; line-height: 22px; }
.legal ul { margin: 0 0 11px; padding-left: 20px; }
.text-cols h2, .text-cols h3 { break-after: avoid; }
.text-cols h2:first-child { margin-top: 0; }
.text-cols li { break-inside: avoid; }
.consent.text-cols p { margin-bottom: 14px; }
.legal li { margin-bottom: 4px; }

/* ==========================================================================
   Tablet (Hamburger-Menü wie im Original-Theme ab ≤ 989 px)
   ========================================================================== */
@media (max-width: 989px) {
  .page { max-width: none; border-top: 0; }
  .logo-bar { height: auto; padding: 10px 70px 10px var(--gutter); justify-content: flex-start; }
  .logo-bar img { width: 250px; height: auto; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 3px; background: var(--green); border-radius: 2px; transition: transform .25s, opacity .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .site-header .logo-wrap { position: relative; }

  .main-nav { display: none; border-bottom: 1px solid var(--green-line); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav li + li::before { display: none; }
  .main-nav li + li { border-top: 1px solid #e3e3e3; }
  .main-nav a { height: auto; line-height: 24px; padding: 12px 16px; font-size: 16px; }
  .hero { margin-top: 0; }
}

/* ==========================================================================
   Smartphone
   ========================================================================== */
@media (max-width: 599px) {
  .text-cols { column-count: 1; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --col-gap: 24px; }
  body { font-size: 16px; line-height: 26px; }   /* Fließtext Mobil */
  body::before { background-position: 30% center; }

  .logo-bar img { width: 210px; }

  .hero--home, .hero--page { aspect-ratio: 4 / 3; }
  .hero-caption span { font-size: 16px; line-height: 24px; padding: 6px 10px; margin: 0 16px; text-align: center; }

  .content { padding-top: 30px; padding-bottom: 36px; }
  h1, .h1 { font-size: 18px; line-height: 26px; letter-spacing: 1px; margin-bottom: 14px; }
  .content p { margin-bottom: 14px; }

  .services { padding: 36px 0; }
  .services__cols { grid-template-columns: 1fr; row-gap: 31px; }
  .services li { font-size: 16px; }

  .gallery { padding: 32px 0; }
  .gallery__grid { grid-template-columns: 1fr; row-gap: 24px; justify-items: center; }
  .gallery figure { width: 100%; max-width: 260px; }
  .gallery .col-2, .gallery .col-3 { grid-column: auto; }

  .info { padding: 24px 0 36px; }
  .info__grid { grid-template-columns: 1fr; row-gap: 26px; }
  .info-box { padding: 38px 16px 26px; min-height: 0; }

  .map { height: 260px; }

  .site-footer { font-size: 14px; }
  .site-footer .inner { height: auto; padding-top: 14px; padding-bottom: 14px; flex-direction: column; gap: 6px; text-align: center; }

  .content--form { padding-top: 30px; padding-bottom: 40px; }
  .form-row { flex-wrap: wrap; }
  .form-row .w-third { flex: 0 0 100%; }
  .form-row--plz .w-third { flex: 0 0 38%; }
  .form-row--plz .grow { flex: 1 1 0; min-width: 0; }
  .field, .select-wrap select { font-size: 16px; height: 46px; }   /* verhindert iOS-Zoom */
  textarea.field { font-size: 16px; height: 180px; }
  .select-wrap::after { top: 16px; }
  .select-wrap svg { top: 18px; }
  .captcha { height: 46px; }
  .captcha input { height: 44px; font-size: 16px; }
  .check { font-size: 16px; }
  .check input { width: 18px; height: 18px; }
  .btn { width: 100%; height: 48px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .slides { transition: none; }
  .slide.is-active img, .hero--page img, .in-view .icon--clock .hand-m, .in-view .icon--clock .hand-h, .in-view .icon--phone svg { animation: none !important; }
}

@media print {
  body::before, .main-nav, .nav-toggle, .slider-arrow, .slider-dots, .map { display: none !important; }
  .page { max-width: none; border: 0; }
}
