/* Kälte Klima Dörl – Theme für Contao 6.1 (Neuaufbau 2026, Optik 1:1 wie 2025).
   Werte aus dem alten Theme "doerl-basic" übernommen (Farben, Größen, Abstände, Umbrüche),
   Selektoren auf die neuen Templates umgestellt. Quelle: theme/doerl.css im Projektordner. */

:root {
    --breite: 61%;
    --blau: #165FB4;
    --blau-dunkel: #002756;
    --text: #333333;
    font-family: "Roboto", sans-serif;
}

html { overflow-x: hidden; }
body { margin: 0; }
figure { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: var(--blau); }

h1 { color: var(--blau); font-size: 44px; margin-top: 0; }
h2, h3, h4, h5, h6 { color: var(--blau); font-size: 30px; margin-top: 0; }
p { font-size: 19px; line-height: 32px; }

.sr-only, .invisible {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

/* Inhaltsbreite: alle Elemente im Artikel auf Containerbreite, Bänder volle Breite */
main .mod_article > *, main .content-article > * { width: var(--breite); margin-left: auto; margin-right: auto; }
main .mod_article > .seitenkopf, main .mod_article > .buehne,
main .mod_article > .band, main .mod_article > .laufband { width: 100%; }

/* Knöpfe */
.knopf, .content-hyperlink a, .button-blue, .button-blue-phone, .button-blue-mail {
    display: inline-block;
    background-color: var(--blau);
    color: #fff;
    padding: 11px 25px;
    border-radius: 8px;
    font-weight: bold;
    transition: background .3s ease;
}
.knopf:hover, .content-hyperlink a:hover, .button-blue:hover, .button-blue-phone:hover, .button-blue-mail:hover { background: var(--blau-dunkel); }
.button-blue-mail::before { content: url("/files/themes/default/images/envelope-footer.svg"); padding-right: 10px; }
.button-blue-phone::before { content: url("/files/themes/default/images/phone-footer.svg"); padding-right: 10px; }
.group-flex { display: flex; gap: 30px; }
.container-80p { padding: 80px 0; }

/* ---------- Kopf ---------- */
.kopf { padding-top: 1vw; margin-bottom: 10px; }
.kopf__innen { display: flex; width: var(--breite); margin: auto; justify-content: space-between; }
.kopf__rechts { display: flex; flex-direction: column; justify-content: space-between; }
.kopf__kontakt { display: flex; gap: 2vw; flex-direction: row-reverse; }
.kopf__kontakt a { color: var(--text); font-size: 16px; }
.kopf__kontakt img { margin-right: 1px; width: 16px; height: 16px; }

.hauptnavigation__kopf, .menue-knopf { display: none; }
.hauptnavigation .invisible { display: none; }
.hauptnavigation ul { display: flex; gap: 22px; list-style: none; padding: 0; margin: 0; }
.hauptnavigation li { position: relative; }
.hauptnavigation a, .hauptnavigation strong { color: var(--blau); font-size: 18px; padding: 4px 7px; font-weight: normal; }
.hauptnavigation a:hover, .hauptnavigation strong, .hauptnavigation .trail { background: #00449424; }
.hauptnavigation .level_2 {
    position: absolute; top: 100%; left: 0; z-index: 100;
    display: block; min-width: 200px; background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.hauptnavigation li:hover > .level_2, .hauptnavigation li:focus-within > .level_2 { opacity: 1; visibility: visible; transform: translateY(0); }
.hauptnavigation .level_2 a, .hauptnavigation .level_2 strong { display: block; white-space: nowrap; padding: 10px 12px; }
.hauptnavigation .level_2 a { background: #fff; }
.hauptnavigation .level_2 a:hover, .hauptnavigation .level_2 strong { background: #00449424; }

/* ---------- Seitenkopf (Unterseiten) und Bühne (Startseite) ---------- */
.seitenkopf, .buehne { position: relative; padding-bottom: 40px; }
.buehne { padding-bottom: 0; margin-bottom: 50px; font-weight: bold; }
.seitenkopf img, .buehne img { display: block; width: 100%; height: auto; transform: scaleX(-1); }
.seitenkopf img { opacity: .7; }
.seitenkopf__text, .buehne__text {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    width: var(--breite); margin: auto;
}
.seitenkopf__text { top: calc(50% - 20px); }   /* mittig im Bild (Bild ohne die 40 px Abstand darunter) */
.seitenkopf h1, .seitenkopf h2, .buehne h1 { margin: 0; }
/* Bühne wie früher: Text sitzt in festem Abstand zum Seitenanfang (nicht zum Bild), daher kein positionierter Rahmen */
.buehne { position: static; }
.buehne .buehne__text { top: 15rem; left: 19%; right: auto; margin: 0; transform: none; }
.buehne__text p { font-size: 25.5px; line-height: 1.3; margin: .5em 0 0; }

/* ---------- Bild (wie früher über die volle Inhaltsbreite) ---------- */
.content-image:not(.seitenkopf) figure, .content-image:not(.seitenkopf) img { display: block; width: 100%; height: auto; }

/* ---------- Text mit Bild ---------- */
.content-text:not(.buehne):not(.zitat):not(.zahl):not(.kasten) { padding: 10px 0; }
.content-text .knopf, .content-text .button-blue { padding: 14px 25px; }
.content-text:is(.media--left, .media--right) figure { max-width: 470px; }
.content-text.media img { box-shadow: 4px 4px 8px #00000091; }
.content-text:is(.media--left, .media--right) { display: grid; column-gap: 2vw; align-items: start; grid-template-rows: auto 1fr; }
.content-text:is(.media--left, .media--right) { grid-template-columns: 1fr 1fr; }
.content-text.media--right > figure { grid-column: 2; grid-row: 1 / span 2; }
.content-text.media--left > figure { grid-column: 1; grid-row: 1 / span 2; }
.content-text.media--right > :not(figure) { grid-column: 1; }
.content-text.media--left > :not(figure) { grid-column: 2; }
.content-text.media--above { display: flex; flex-direction: column; gap: 1vw; }

/* Text ohne Bild, aber mit "Bild links/rechts": im alten Theme 60 % breit (siehe struktur.php, Klasse schmal) */
.content-text.schmal > :is(h1, h2, h3, h4, .rte) { width: 60%; }

/* ---------- Zitat (Vorwort) ---------- */
.zitat { position: relative; padding: 80px 0; }
.zitat__text { position: relative; z-index: 1; }
.zitat figure { position: absolute; top: 8.5rem; left: 0; z-index: 0; pointer-events: none; }
.zitat figure img { display: block; }

/* ---------- Stellenanzeige (Abstände wie die alte Stellen-Erweiterung) ---------- */
.stelle { margin-bottom: 29px; }
.stelle > h2 { margin-bottom: 54px; }
.stelle__arten { margin-top: 48px; }
.stellenliste__titel { margin: 0 0 1rem; }

/* ---------- Bänder ---------- */
.band { background: linear-gradient(104deg, #0044941A 0%, #00449408 100%); }

/* Zahlen */
.zahlen__innen { width: var(--breite); margin: auto; display: flex; justify-content: space-between; gap: 2vw; padding: 40px 0; }
.zahlen__text { width: 40%; }
.zahlen__kaesten { width: 60%; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 1vw; align-content: start; }
.zahlen__kaesten > .zahl:first-child { grid-column: 1 / -1; justify-self: center; }
.zahl { padding: 30px; background: #F2F5FA; border: 1px solid #00000026; box-shadow: 4px 4px 8px #00000040; min-width: 270px; box-sizing: border-box; }
.zahl h3, .zahl h2 { font-size: 44px; margin: 0; }
.zahl p { font-size: 22px; line-height: 1.3; margin: 0; }

/* Partner */
.partner { padding: 50px 0; }
.partner .content-text { width: var(--breite); margin: auto; text-align: center; }

/* ---------- Laufbänder (Fotos, Logos) ---------- */
.laufband--fotos { margin-top: 40px; }
.laufband .swiper-wrapper { transition-timing-function: linear; }
.laufband figure { margin: 0; }
.laufband--fotos img { display: block; width: 100%; height: auto; }
/* Seitenpunkte wie beim alten Slider: kleine graue Punkte unten mittig, aktiver Punkt etwas größer */
.laufband .swiper-pagination { position: absolute; left: 0; right: 0; bottom: .5em; width: 100%; text-align: center; line-height: 0; z-index: 10; }
.laufband .swiper-pagination-bullet { cursor: pointer; border: 0; padding: 0; width: 8px; height: 8px; margin: 3px !important; background: #ccc; opacity: .7; transition: transform .2s linear; }
.laufband .swiper-pagination-bullet-active { background: #fff; opacity: 1; transform: scale(1.4); }
.laufband--logos { padding-bottom: 10px; }
.laufband--logos picture, .laufband--logos img { display: block; width: 100%; height: auto; }
.laufband--logos .swiper-slide { width: 270px; height: auto; padding: 0 0 12px; }
.laufband--logos figure {
    display: flex; align-items: center; justify-content: center; height: 100%;
    padding: 23px 50px; background: #fff; box-shadow: 4px 4px 8px #00000040; border: 1px solid #00000040; box-sizing: border-box;
}

/* ---------- Aufruf (Kontakt-Band): Bild, Text und Knopf liegen in derselben Rasterzelle ---------- */
.aufruf { display: grid; margin-top: 80px; background: var(--blau); text-align: center; color: #fff; overflow: hidden; }
.aufruf > *, .aufruf > .content-text > * { grid-area: 1 / 1; }
.aufruf > .content-text.media--above { display: grid; gap: 0; padding: 0; }
.aufruf figure { width: auto; height: 100%; }
.aufruf img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .2; box-shadow: none; }
.aufruf h2 { align-self: start; z-index: 1; margin: 0; padding: 40px 20px 0; color: #fff; font-size: 34px; }
.aufruf .rte { align-self: start; z-index: 1; padding: 100px 200px 110px; }
.aufruf .rte p { color: #fff; margin: 0; }
.aufruf .content-hyperlink { align-self: end; z-index: 1; padding-bottom: 40px; }
.aufruf .content-hyperlink a { background: #fff; color: var(--blau); padding: 14px 25px; font-size: 18px; }
.aufruf .content-hyperlink a:hover { background: var(--blau-dunkel); color: #fff; }

/* ---------- Verlinkte Kästen ---------- */
.kaesten { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; padding: 40px 0; text-align: center; }
.kasten { position: relative; overflow: hidden; width: 370px; height: 279px; box-shadow: 4px 4px 8px #00000040; }
.kasten figure, .kasten img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kasten__titel, .kasten figcaption {
    position: absolute; bottom: 0; left: 0; right: 0;
    margin: 0; background: #fff; color: var(--blau); font-size: 22px; line-height: 1.4; font-weight: bold; padding: 9px 20px;
    transition: opacity .5s ease-in-out, visibility .5s ease-in-out;
}
.kasten__ueberlagerung {
    position: absolute; inset: 0; padding: 25px 20px; box-sizing: border-box;
    background: rgba(255, 255, 255, .9); color: var(--blau);
    display: flex; flex-direction: column; justify-content: flex-end;
    transform: translateY(100%); transition: transform .5s ease-in-out;
}
.kasten:hover .kasten__ueberlagerung, .kasten:focus-within .kasten__ueberlagerung { transform: translateY(0); }
.kasten:hover .kasten__titel, .kasten:focus-within .kasten__titel { opacity: 0; visibility: hidden; }
.kasten h3 { font-size: 22px; margin: 0 0 8px; }
.kasten__ueberlagerung .rte p { color: #000; text-align: left; font-size: 19px; line-height: 1.5; margin: 0 0 1vw; }
.kasten .knopf { font-size: 18px; align-self: center; }

/* ---------- Formulare (gemeinsam) ---------- */
.formular { margin-bottom: 5vw; }
.formular fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.formular .widget label { display: block; margin-bottom: .5vw; }
.formular input, .formular textarea { border: 1px solid #707070; border-radius: 8px; padding: .5vw; font: inherit; box-sizing: border-box; }
.formular .widget-explanation p { margin: 1em 0; }
.formular .widget-submit button {
    background-color: var(--blau); border-radius: 5px; padding: .8vw 1.2vw; color: #fff; font-size: 18px; font-weight: bold; border: 0; cursor: pointer;
}
.formular .widget-submit button:hover { background-color: #004985; }
.formular .widget-altcha { margin-bottom: 1vw; }

/* Spamschutz: Honeypot außerhalb des sichtbaren Bereichs (nicht display:none, Dieter 19.10.).
   Die Sicherheitsfrage löst sich mit JavaScript selbst; Contaos Skript blendet sie per display:none aus,
   hier wird sie stattdessen ebenfalls aus dem Bild geschoben, damit der Honeypot nie display:none ist.
   Ohne JavaScript und nach einer Abweisung (Klasse error) bleibt die Frage sichtbar und beantwortbar. */
.honigtopf, .js .formular .widget-captcha:not(.error) {
    position: absolute !important; left: -10000px !important; top: auto !important;
    width: 1px !important; height: 1px !important; overflow: hidden !important; display: block !important;
}

/* Kontaktformular wie früher: Anschrift links, Einleitung und Felder rechts, sobald beides nebeneinander passt
   (ab etwa 1600 px Fensterbreite), sonst untereinander */
.formular--kontakt .formbody { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.formular--kontakt .formbody > fieldset:first-of-type { flex: 0 0 auto; }
.formular--kontakt .formbody > fieldset:last-of-type { flex: 0 1 auto; max-width: 100%; }   /* Breite aus dem Einleitungstext, wie früher */
.formular--kontakt fieldset fieldset { display: flex; justify-content: space-between; gap: 1vw; margin-bottom: 24px; }
.formular--kontakt fieldset fieldset .widget { width: 48%; }
.formular--kontakt input { width: 100%; }
.formular--kontakt textarea { width: 100%; }
.formular--kontakt .widget-textarea { margin-bottom: 1vw; }

/* Bewerbungsformular: zwei Spalten (Angaben | Anhänge und Nachricht) */
.formular--bewerbung .form-wrapper { display: flex; gap: 2vw; }
.formular--bewerbung .form-wrapper > fieldset { width: 50%; margin-bottom: 24px; }
.formular--bewerbung .widget { margin-bottom: 1vw; }
.formular--bewerbung input[type=text], .formular--bewerbung input[type=email], .formular--bewerbung input[type=tel], .formular--bewerbung textarea { width: 85%; }
.formular--bewerbung textarea { height: 5vw; min-height: 5rem; }
.formular--bewerbung .widget-explanation { padding-top: 0; }

/* ---------- Fuß ---------- */
.fuss { background: linear-gradient(101deg, #152550 0%, #19327D 100%); color: #BCBCBC; padding: 0 37px; font-size: 19px; line-height: 23.75px; }
.fuss a { color: #BCBCBC; }
.fuss p { line-height: 23.75px; }
.fuss__oben { padding: 61px 189px 51.5px; display: flex; justify-content: space-between; }
.fuss__titel { margin: 0 0 16px; color: #fff; font-size: 22px; }
.fuss__zeile { display: flex; margin: 0 0 13px; }
.fuss__zeile::before { padding-right: 10px; }
.fuss__zeile--ort::before { content: url("/theme/img/ort.svg"); }
.fuss__zeile--telefon::before { content: url("/theme/img/telefon.svg"); }
.fuss__zeile--mail::before { content: url("/theme/img/mail.svg"); }
.fuss__zeile--zeit::before { content: url("/theme/img/uhr.svg"); }
.fuss .mod_navigation .invisible { display: none; }
.fuss .mod_navigation ul { list-style: none; padding: 0; margin: 0; }
.fuss .mod_navigation li { position: relative; padding: 0 0 13px 24px; }
.fuss .mod_navigation li::before {
    content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px;
    background: url("/theme/img/pfeil-rechts.svg") no-repeat center / contain; transition: transform .2s ease;
}
.fuss .mod_navigation li:hover::before { transform: translateX(4px); }
.fuss .mod_navigation li:hover a { color: #fff; }
.notdienst {
    background: linear-gradient(297deg, #0513407A 0%, #01040D7A 100%);
    border: 1px solid #274392; padding: 20px; border-radius: 7px; color: #fff;
}
.notdienst p { margin: 0; padding: 13px 0; }
.notdienst .notdienst__titel, .notdienst .notdienst__telefon { color: #4876F9; font-weight: bold; padding: 0; }
.notdienst a { color: #4876F9; }
.fuss__unten { text-align: center; padding: 43px; border-top: 1px solid grey; font-size: 14px; color: #fff; }
.fuss__unten a { color: #fff; }

/* ---------- Mobilmenü ---------- */
@media screen and (max-width: 1200px) {
    .kopf__innen { width: 96%; }
    .kopf__navigation { display: flex; align-items: center; justify-content: flex-end; height: 100%; }
    .menue-knopf { display: block; color: #000; line-height: 0; }
    .hauptnavigation {
        position: fixed; inset: 0 0 0 auto; width: min(440px, 80vw); z-index: 300;
        background: #fff; box-shadow: -4px 0 16px rgba(0, 0, 0, .2); overflow-y: auto;
        transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s;
    }
    .menue-offen .hauptnavigation { transform: none; visibility: visible; }
    .hauptnavigation__kopf { display: flex; justify-content: center; position: relative; padding: 14px; border-bottom: 1px solid #0000001a; color: #00000080; }
    .menue-schliessen { position: absolute; right: 10px; top: 4px; font-size: 32px; background: none; border: 0; cursor: pointer; color: #00000080; line-height: 1; }
    .hauptnavigation ul { display: block; }
    .hauptnavigation li { border-bottom: 1px solid #0000001a; }
    .hauptnavigation a, .hauptnavigation strong { display: block; padding: 12px 20px; color: #444; }
    .hauptnavigation .level_2 { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
    .hauptnavigation .level_2 a, .hauptnavigation .level_2 strong { padding-left: 40px; }
    html:not(.js) .hauptnavigation:target { transform: none; visibility: visible; }
}

@media screen and (max-width: 1300px) {
    :root { --breite: 98%; }
    iframe { width: 100%; height: auto; }
    .fuss__oben { padding: 61px 89px 51.5px; }
    .buehne__text p, .seitenkopf__text p { font-size: 22px; }
    .buehne .buehne__text { top: 13rem; left: 1rem; }
    .aufruf .rte { padding: 100px 40px 110px; }
}

@media screen and (max-width: 800px) {
    h1, h2, h3, h4, h5, h6 { margin-top: 1rem; }
    .container-80p { padding: 40px 0; }
    .seitenkopf { padding-bottom: 2rem; }
    .seitenkopf__text { top: calc(50% - 1rem); }
    .seitenkopf img { height: 12rem; object-fit: cover; }
    .buehne img { height: 18rem; object-fit: cover; }
    .buehne__text { background: rgba(255, 255, 255, .65); }
    .buehne .buehne__text { top: 11rem; left: .3rem; }
    .buehne h1 { margin-top: 1rem; }
    .buehne__text p { font-size: 18px; }
    .content-text:not(.buehne):not(.zitat):not(.zahl):not(.kasten) { padding: 40px 0; }
    .content-text:is(.media--left, .media--right) { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 1rem; }
    .content-text.media--right > figure, .content-text.media--left > figure,
    .content-text.media--right > :not(figure), .content-text.media--left > :not(figure) { grid-column: 1; grid-row: auto; }
    .content-text.media--right > figure, .content-text.media--left > figure { order: -1; max-width: none; }
    .content-text.schmal > :is(h1, h2, h3, h4, .rte) { width: auto; }
    .zitat { padding: 40px 0; }
    .zahlen__innen { flex-direction: column; gap: 0; }
    .zahlen__text, .zahlen__kaesten { width: 100%; }
    .zahlen__text { padding: 0 1rem; box-sizing: border-box; }
    .zahlen__kaesten { grid-template-columns: 1fr; gap: 1rem; }
    .aufruf .rte { padding: 120px 20px 110px; }
    .kaesten { flex-direction: column; align-items: center; gap: 1rem; }
    .kasten { width: 100%; height: auto; aspect-ratio: 370 / 279; }
    /* wie früher: Feldpaare (Name/E-Mail, Telefon/Unternehmen) bleiben auch auf dem Handy nebeneinander */
    .formular--kontakt .formbody, .formular--bewerbung .form-wrapper { display: block; }
    .formular--kontakt .formbody > fieldset, .formular--bewerbung .form-wrapper > fieldset { width: auto; }
    .formular--bewerbung input[type=text], .formular--bewerbung textarea { width: 100%; }
    .formular input { padding: 2.5vw; }
}

@media screen and (max-width: 520px) {
    .kopf__kontakt { display: none; }
    .kopf__logo img { width: 80%; height: auto; }
    h1 { font-size: 30px; }
    h2, h3, h4, h5, h6 { font-size: 22px; }
    p { font-size: 16px; line-height: 24px; }
    .group-flex { flex-wrap: wrap; justify-content: center; }
    .fuss { padding: 0 20px; font-size: 16px; line-height: 24px; }
    .fuss__oben { padding: 61px 20px 51.5px; flex-direction: column-reverse; gap: 30px; }
    .fuss__unten { padding: 43px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .hauptnavigation, .hauptnavigation .level_2, .kasten__ueberlagerung, .kasten__titel, .kasten figcaption { transition: none; }
}
