/* ==========================================================================
   ALIGA-TOR – eigene Anpassungen
   Wird nach dem Theme (vendor/plugins/style.min.css) geladen und überschreibt es.
   Am Theme selbst bitte nichts ändern, alle Anpassungen gehören hierher.
   ========================================================================== */

:root {
  --aliga-gruen: #003f24;
  --aliga-hell: #f2f2f2;
  --aliga-rahmen: #e7e7e7;
}


/* --- Allgemein ------------------------------------------------------------ */

img {
  height: auto;
}

h1, h2, h3, h4 {
  margin-bottom: 20px;
}

.section-padding-t90-b100 {
  padding-top: 80px;
  padding-bottom: 20px;
}

/* Erster Inhaltsbereich mit mehr Abstand nach oben, alle folgenden enger */
#page > .section-padding-t90-b100 {
  padding-top: 80px;
  padding-bottom: 10px;
}

#page > .section-padding-t90-b100 ~ .section-padding-t90-b100 {
  padding-top: 10px;
  padding-bottom: 50px;
}


/* Kopfbereich der Unterseiten: Titel etwas tiefer setzen */
.page-title-section .page-title {
  padding-top: 1rem;
}

/* Hinweis: Das Theme lässt alle Elemente mit der Klasse "section" floaten.
   Neue Seitenbereiche daher immer als <section class="section ..."> anlegen. */


/* --- Startseite: Aktions-/Messebutton (_data/aktion.json) ------------------ */

.aktion-button {
  position: fixed;
  top: 120px;
  right: 50px;
  z-index: 100;
  display: block;
  width: 190px;
}

.aktion-button img {
  display: block;
  width: 100%;
}

@media (max-width: 991px) {
  .aktion-button {
    display: none;
  }
}


/* --- Startseite: Einleitung und Produktkacheln ----------------------------- */

/* Hauptüberschrift (H1) der Startseiten */
.startseite-titel {
  max-width: 900px;
  margin: 2.5rem auto 1.5rem;
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem);
  line-height: 1.25;
  text-align: center;
  color: var(--aliga-gruen);
}

.startseite-titel::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 2px;
  background: #af3b3b;
}

.intro-text {
  margin-top: 0;
}

/* Englische Startseite: H1 steht in einem eigenen Abschnitt – Abstand zum folgenden Inhalt verringern */
.section:has(> .container > .startseite-titel:only-child) {
  padding-bottom: 0 !important;
}

.section:has(> .container > .startseite-titel:only-child) + .section .row.pt--100 {
  padding-top: 20px;
}

#produkte-anker {
  scroll-margin-top: 105px;
}

/* Rahmen um die Bilder der Produktkacheln */
.work .thumbnail {
  border: 1px solid var(--aliga-rahmen);
  border-bottom: none;
}

/* Gleich hohe Produktkacheln */
.work .doortypes {
  min-height: 425px;
}

/* Gleich hohe Kacheln auf der Seite "Einsatzgebiete" */
.work .area-of-application {
  min-height: 335px;
}


/* --- Bild-Text-Blöcke (Startseite) -----------------------------------------
   <section class="feature">                    Bild links, heller Hintergrund
   <section class="feature feature--dunkel">     grüner Hintergrund, helle Schrift
   <section class="feature feature--bild-rechts"> Bild rechts statt links
   -------------------------------------------------------------------------- */

.feature__inhalt {
  display: flex;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 12px;
  gap: 24px;
}

.feature__bild,
.feature__text {
  flex: 1 1 50%;
}

.feature__bild img {
  display: block;
  width: 100%;
}

.feature--bild-rechts .feature__inhalt {
  flex-direction: row-reverse;
}

.feature--dunkel {
  background: var(--aliga-gruen);
  color: var(--aliga-hell);
}

.feature--dunkel h2 {
  color: var(--aliga-hell);
}

@media (max-width: 767px) {
  .feature__inhalt,
  .feature--bild-rechts .feature__inhalt {
    flex-direction: column;
  }
}


/* --- Produktseiten -------------------------------------------------------- */

/* Merkmal-Listen mit hängendem Einzug */
.work-details-list {
  display: flex;
  padding-top: 10px;
  padding-bottom: 10px;
}

.work-details-list .details-list span {
  text-indent: -.65em;
  margin-left: 20px;
}

/* Bilder mit Bildunterschrift (partials/abbildung.njk) */
.content-image {
  margin: 1.5rem 0;
}

.content-image img {
  max-width: 100%;
}

.content-image figcaption {
  margin-top: .5rem;
  font-size: .9em;
}

/* Bildergalerie (Shortcode "galerie") */
.image-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  max-width: 600px;
  margin: 1.5rem 0;
}

.image-gallery a {
  overflow: hidden;
  display: block;
}

.image-gallery img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.image-gallery a:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Download-Buttons (Shortcode "downloads") */
.downloads {
  margin: 1.5rem 0;
}


/* --- Graue Infokästen (Shortcode "kaesten"/"kasten") ----------------------- */

.kaesten {
  margin: 2rem 0;
  row-gap: 24px;
}

.kasten {
  height: 100%;
  padding: 30px;
  background-color: #f5f5f5;
}

.kasten ul {
  padding-left: 1.2rem;
}


/* --- Ansprechpartner (partials/ansprechpartner.njk) ----------------------- */

.ansprechpartner__spalte {
  display: inline-block;
  text-align: left;
}

.ansprechpartner .col-md-4 {
  text-align: center;
  margin-bottom: 2rem;
}

.ansprechpartner__person {
  margin-bottom: 1.5rem;
}

.ansprechpartner__person img {
  margin-right: .4rem;
  vertical-align: middle;
}


/* --- Videos mit Zwei-Klick-Lösung (Shortcode "video") ---------------------- */

.video-block {
  margin-bottom: 2rem;
}

.video-zweiklick {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #333 center / cover no-repeat;
}

.video-zweiklick__hinweis {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, .55);
}

.video-zweiklick__hinweis p {
  max-width: 420px;
  margin: 0;
  color: #fff;
}

.video-zweiklick iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* --- Produktanimationen (Shortcode "animation") ---------------------------- */

.animation-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}

.animation-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* --- Karte "So finden Sie uns" (partials/karte.njk) ------------------------ */

.karte {
  width: 100%;
  height: 640px;
  margin-top: 2rem;
}


/* --- News ----------------------------------------------------------------- */

.news-eintrag {
  padding: 2rem 0;
  border-bottom: 1px solid var(--aliga-rahmen);
}

.news-eintrag img,
.news-bild {
  display: block;
  max-width: 100%;
}

.news-datum {
  margin-bottom: 1rem;
  font-size: .9em;
  color: #999;
}

.news-artikel .btn {
  margin-top: 1.5rem;
}


/* --- Formulare (Kontakt, ALIGA-Escape) ------------------------------------ */

.formular .form-group {
  margin-bottom: 1rem;
}

.formular label {
  display: block;
  margin-bottom: .3rem;
  font-weight: 600;
}

.formular .form-check label {
  display: inline;
  font-weight: 400;
}

/* Unsichtbares Feld gegen Spam-Bots */
.formular .feld-honig {
  position: absolute;
  left: -9999px;
}


/* --- Startseiten ohne Kopfbild: Abstand unter dem Header ------------------- */

#page > .header-section + .section-padding-t90-b100 {
  padding-top: 150px;
}


/* --- Datenschutz-Hinweis (partials/einwilligung.njk) ----------------------
   Nicht-blockierende Karte am unteren Rand. "Nur notwendige" und "Alle akzeptieren"
   sind bewusst gleich gestaltet (gleichwertige Wahl).
   -------------------------------------------------------------------------- */

.einwilligung {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.einwilligung[hidden] {
  display: none;
}

.einwilligung__karte {
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 32px 24px;
  border-top: 5px solid var(--aliga-gruen);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 48px rgba(0, 30, 17, .28);
  pointer-events: auto;
  transform: translateY(24px);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
  outline: none;
}

.einwilligung.ist-offen .einwilligung__karte {
  transform: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .einwilligung__karte { transition: none; }
}

.einwilligung__titel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.35rem;
  color: var(--aliga-gruen);
}

.einwilligung__symbol {
  flex: none;
  width: 28px;
  height: 28px;
  fill: var(--aliga-gruen);
}

.einwilligung__text {
  margin-bottom: 8px;
  font-size: .95rem;
  line-height: 1.6;
  color: #4a5560;
}

.einwilligung__links {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
  font-size: .9rem;
}

.einwilligung__links a {
  color: var(--aliga-gruen);
  text-decoration: underline;
}

.einwilligung__optionen {
  margin-bottom: 18px;
  border: 1px solid var(--aliga-rahmen);
  border-radius: 8px;
}

.einwilligung__option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 14px 16px;
  cursor: pointer;
}

.einwilligung__option + .einwilligung__option {
  border-top: 1px solid var(--aliga-rahmen);
}

.einwilligung__option strong {
  color: #1d2a33;
}

.einwilligung__option p {
  margin: 4px 0 0;
  font-size: .85rem;
  line-height: 1.5;
  color: #6a7680;
}

.einwilligung__immer {
  flex: none;
  padding-top: 2px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--aliga-gruen);
  white-space: nowrap;
}

/* Schalter (Checkbox in Schalter-Optik) */
.schalter {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
}

.schalter input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.schalter__bahn {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: #c9d0d6;
  transition: background .2s;
  pointer-events: none;
}

.schalter__bahn::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s;
}

.schalter input:checked + .schalter__bahn {
  background: var(--aliga-gruen);
}

.schalter input:checked + .schalter__bahn::after {
  transform: translateX(20px);
}

.schalter input:focus-visible + .schalter__bahn {
  outline: 3px solid #f0b400;
  outline-offset: 2px;
}

/* Knöpfe */
.einwilligung__knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.einwilligung__knopf {
  flex: 1 1 0;
  min-width: 150px;
  padding: 13px 18px;
  border: 2px solid var(--aliga-gruen);
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

/* Gleichwertige Wahl: beide gefüllt, gleiche Größe */
.einwilligung__knopf--wahl {
  background: var(--aliga-gruen);
  color: #fff;
}

.einwilligung__knopf--wahl:hover {
  border-color: #af3b3b;
  background: #af3b3b;
}

.einwilligung__knopf--neben {
  background: #fff;
  color: var(--aliga-gruen);
}

.einwilligung__knopf--neben:hover {
  background: #eef4f1;
}

.einwilligung__knopf:focus-visible,
.einwilligung__links a:focus-visible {
  outline: 3px solid #f0b400;
  outline-offset: 2px;
}

@media (max-width: 575px) {
  .einwilligung {
    padding: 0;
  }

  .einwilligung__karte {
    max-height: 85vh;
    padding: 22px 18px 18px;
    border-radius: 14px 14px 0 0;
  }

  .einwilligung__knopf {
    flex-basis: 100%;
  }
}

/* Footer-Link "Cookie-Einstellungen" */
.copyright__trenner {
  margin: 0 8px;
  opacity: .5;
}

/* Karte: Platzhalter, solange keine Einwilligung für externe Medien vorliegt */
.karte {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e8efeb;
  background-image:
    linear-gradient(rgba(0, 63, 36, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 63, 36, .06) 1px, transparent 1px),
    linear-gradient(115deg, transparent 46%, rgba(255, 255, 255, .9) 46%, rgba(255, 255, 255, .9) 50%, transparent 50%),
    linear-gradient(20deg, transparent 62%, rgba(255, 255, 255, .7) 62%, rgba(255, 255, 255, .7) 64%, transparent 64%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
}

.karte.ist-aktiv {
  display: block;
  background: none;
}

.karte__hinweis {
  max-width: 440px;
  padding: 24px;
  border-radius: 10px;
  text-align: center;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}

.karte__hinweis p {
  margin-bottom: 14px;
}


/* --- Icons: Font Awesome Free statt Pro -----------------------------------
   Das Theme war für Font Awesome Pro (kommerzielle Lizenz) gebaut. Eingebunden ist jetzt
   Font Awesome Free 5.15.4 (Icons CC BY 4.0, Schrift SIL OFL 1.1, Code MIT; siehe
   assets/fonts/fontawesome-free/LICENSE.txt). Free enthält nur die Stile Solid und Brands
   (Regular nur teilweise). Die Pro-Stile des Themes werden deshalb auf Solid abgebildet.
   -------------------------------------------------------------------------- */

.fal,
.far,
.fad {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Das Theme-CSS (style.min.css) spricht die Schrift unter dem Namen "Font Awesome 5 Pro" an
   (z. B. Pfeile im Menü). Dieser Name zeigt hier auf die freie Solid-Schrift. */
@font-face {
  font-family: "Font Awesome 5 Pro";
  font-style: normal;
  font-weight: 300 900;
  font-display: block;
  src: url("../fonts/fontawesome-free/fa-solid-900.woff2") format("woff2"),
       url("../fonts/fontawesome-free/fa-solid-900.woff") format("woff");
}

/* Feiner Pfeil im Nach-oben-Knopf (eigenes SVG, Optik wie das frühere Pro-Icon "Light") */
.pfeil-hoch {
  display: block;
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Seitenweite Hauptüberschrift (H1 über die volle Breite, z. B. „Stellenangebote“, „Ihre Ansprechpartner“).
   Im Theme sind H1 und H2 gleich groß – die H1 bekommt hier etwas mehr Gewicht.
   H1 in den Produktspalten (.work-details) bleiben unverändert. */
.section > .container > h1 {
  font-size: clamp(1.9rem, 1.45rem + 1.1vw, 2.5rem);
  line-height: 1.25;
}

/* Etikett "Testversion" (nur bei npm run build:test) */
.testversion-hinweis {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 100000;
  padding: 4px 12px;
  background: #c00;
  color: #fff;
  font: 700 12px/1.4 sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
