/* Hauptdesign: Variablen speichern Farben und Abstände an einer zentralen Stelle. */
:root {
    --dark: #0b1422;
    --text: #263244;
    --muted: #687386;
    --orange: #e87528;
    --orange-light: #fff2e9;
    --green: #20a65a;
    --background: #f4f6f8;
    --white: #ffffff;
    --border: #dde3ea;
    --shadow: 0 20px 55px rgba(11, 20, 34, 0.1);
}

* {
    box-sizing: border-box;
}

/* Bilder und SVGs dürfen auf kleinen Displays nie über den Rand laufen. */
img,
svg {
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    /* Seitlich abschneiden, ohne den linken Hero-Text beim Scrollen zu lösen. */
    overflow-x: clip;
    color: var(--text);
    background: var(--background);
    font-family: "Nunito", sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

#serverMessage {
    font-family: "Nunito", sans-serif;
}

/* Zwei Spalten: links Erklärung, rechts Formular. */
.contactSection {
    width: min(90%, 1180px);
    margin: 100px auto;
    display: grid;
    grid-template-columns: 1fr minmax(360px, 500px);
    gap: clamp(50px, 8vw, 110px);
    align-items: center;
    scroll-margin-top: 104px;
}

.contactIntroBadge {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 999px;
    color: #9a4818;
    background: var(--orange-light);
    font-size: 0.85rem;
    font-weight: 900;
}

.contactIntroTitle {
    margin: 22px 0 16px;
    max-width: 560px;
    color: var(--dark);
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.contactIntroText {
    max-width: 580px;
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.75;
}

.contactIntroBenefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.contactIntroBenefits span {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    font-size: 0.9rem;
    font-weight: 850;
}

.contactIntroBenefits span::before {
    content: "✓ ";
    color: var(--green);
}

.field {
    padding: clamp(26px, 5vw, 42px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.field .title {
    margin: 0;
    color: var(--dark);
    font-size: 2rem;
}

.field .pflicht {
    margin: 6px 0 20px;
    color: var(--muted);
    font-size: 0.85rem;
}

.field label {
    margin: 12px 0 6px;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 900;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field textarea {
    min-height: 125px;
    max-height: 250px;
    resize: vertical;
    padding: 12px;
    
}

.field input:focus,
.field textarea:focus {
    border-color: var(--orange);
    background: white;
    box-shadow: 0 0 0 4px rgba(232, 117, 40, 0.13);
}

.sendButton {
    margin-top: 14px;
}

.sendButton #send {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 11px;
    color: white;
    background: var(--dark);
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sendButton #send:hover {
    transform: translateY(-2px);
    background: var(--orange);
    box-shadow: 0 13px 25px rgba(232, 117, 40, 0.24);
}

.sendButton #send:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* Schnelle Buchung als ruhige, grüne Karte. */
.whatsappContainer {
    width: min(90%, 1180px);
    margin: 0 auto 100px;
    padding: clamp(30px, 6vw, 65px);
    position: relative;
    border-radius: 24px;
    color: white;
    background: linear-gradient(130deg, #10261b, #174a2e);
    box-shadow: var(--shadow);
}

.iconPhone svg {
    width: 40px;
    height: 40px;
    color: #71dc9b;
}

.einfacheBuchung {
    margin: 16px 0 10px;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.whatsAppParagraph {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.08rem;
    line-height: 1.7;
}

.whatsappContainerLink {
    display: inline-flex;
    width: 62px;
    height: 62px;
    margin-top: 25px;
    transition: transform 0.2s ease;
}

.whatsappContainerLink:hover {
    transform: scale(1.08);
}

.whatsappContainerLink svg {
    width: 100%;
}

.ueberschriftOderKontaktformular {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

/* Vorteile werden als zwei übersichtliche Karten dargestellt. */
.sectionContainerUmrandung {
    width: min(90%, 1180px);
    margin: 0 auto 110px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    scroll-margin-top: 104px;
}

.ueberschrift,
.ueberschriftParagraph,
.horizontalLine {
    grid-column: 1 / -1;
}

.ueberschrift {
    margin: 0;
    color: var(--dark);
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
}

.ueberschriftParagraph {
    max-width: 780px;
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.horizontalLine {
    width: 70px;
    height: 4px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--orange);
}

.sectionContainerUmrandung > .icon,
.ueberschriftDreiShared-Container > .icon {
    display: none;
}

.ueberschriftZweiUmrandung,
.ueberschriftDreiUmrandung {
    height: 100%;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ueberschriftZweiUmrandung:hover,
.ueberschriftDreiUmrandung:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.ueberschriftZwei,
.ueberschriftDrei {
    margin: 0 0 10px;
    color: var(--dark);
    font-size: 1.25rem;
}

.ueberschriftParagraphZwei,
.ueberschriftParagraphDrei {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.leererContainer {
    padding: 45px max(5%, calc((100% - 1180px) / 2));
    display: flex;
    justify-content: space-between;
    gap: 30px;
    color: white;
    background: var(--dark);
}

.leererContainer strong {
    font-size: 1.3rem;
}

.leererContainer p {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.6);
}

/* Der orange Button setzt im dunklen Footer einen klaren, passenden Akzent. */
.leererContainer a {
    min-height: 44px;
    padding: 11px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;

    border-radius: 10px;
    color: white;
    background: var(--orange);
    text-decoration: none;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease;
}

.leererContainer a:hover {
    transform: translateY(-2px);
    background: #f0873f;
}

/* focus-visible hilft Personen, die mit der Tastatur navigieren. */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #f6a35e;
    outline-offset: 4px;
}

@media (max-width: 850px) {
    .contactSection,
    .sectionContainerUmrandung {
        grid-template-columns: 1fr;
    }

    .contactSection {
        margin: 70px auto;
        gap: 38px;
    }

    .ueberschrift,
    .ueberschriftParagraph,
    .horizontalLine {
        grid-column: 1;
    }
}

@media (max-width: 560px) {
    .contactSection,
    .whatsappContainer,
    .sectionContainerUmrandung {
        width: calc(100% - 28px);
    }

    .field,
    .whatsappContainer,
    .ueberschriftZweiUmrandung,
    .ueberschriftDreiUmrandung {
        border-radius: 16px;
    }

    .leererContainer {
        flex-direction: column;
        padding: 35px 20px;
    }
}

/* =========================================================
   Scroll-Reveal
   JavaScript fügt diese Klasse nur den animierten Elementen hinzu.
========================================================= */
.reveal-item {
    opacity: 0;
    --reveal-y: 28px;
    --reveal-scale: 1;
    transform: translateY(var(--reveal-y)) scale(var(--reveal-scale));
    transition:
        opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

/* Sobald das Element sichtbar ist, geht es an seine normale Position. */
.reveal-item.is-visible {
    opacity: 1;
    --reveal-y: 0px;
}

/* Hover und Scroll-Reveal benutzen gemeinsam dieselbe Transformation.
   So überschreiben sich die beiden Effekte nicht mehr. */
.whatsappContainerLink.reveal-item.is-visible:hover {
    --reveal-scale: 1.08;
}

.ueberschriftZweiUmrandung.reveal-item.is-visible:hover,
.ueberschriftDreiUmrandung.reveal-item.is-visible:hover {
    --reveal-y: -4px;
}

/* Weniger Bewegung, wenn dies im Betriebssystem gewünscht ist. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }

    .reveal-item {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   Zusätzliche responsive Verbesserungen
   Diese Regeln betreffen nur die Darstellung. Das Backend und
   die vorhandenen IDs des Kontaktformulars bleiben unverändert.
========================================================= */

/* Auch Auswahlfelder würden später automatisch die Nunito-Schrift übernehmen. */
button,
input,
textarea,
select {
    font: inherit;
}

/* min-width: 0 erlaubt Grid-Inhalten, auf kleinen Flächen wirklich zu schrumpfen. */
.contactSection > *,
.sectionContainerUmrandung > * {
    min-width: 0;
}

/* Lange Wörter oder E-Mail-Adressen dürfen umbrechen statt horizontal zu scrollen. */
main,
footer {
    overflow-wrap: break-word;
}

/* Auf kleineren Laptops wird die Lücke reduziert, damit das Formular mehr Platz hat. */
@media (max-width: 1100px) and (min-width: 851px) {
    .contactSection {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
        gap: clamp(36px, 5vw, 60px);
    }
}

/* Tablet: Abstände werden etwas ruhiger und beide Vorteilskarten bleiben gleich breit. */
@media (max-width: 850px) {
    .contactSection,
    .whatsappContainer,
    .sectionContainerUmrandung {
        width: min(calc(100% - 40px), 680px);
    }

    .contactSection {
        margin-block: 72px;
    }

    .sectionContainerUmrandung {
        gap: 18px;
    }
}

/* Handy: Weniger Innenabstand schafft Platz, ohne die Felder zu klein zu machen. */
@media (max-width: 560px) {
    .contactSection {
        margin-block: 58px;
        gap: 30px;
    }

    .contactIntroTitle {
        font-size: clamp(2.1rem, 11vw, 3rem);
    }

    .field {
        padding: 24px 18px;
    }

    .field input,
    .field textarea {
        /* 16px verhindert auf iPhones das automatische Hineinzoomen beim Tippen. */
        font-size: 16px;
    }

    .whatsappContainer {
        margin-bottom: 70px;
        padding: 28px 20px;
    }

    .sectionContainerUmrandung {
        margin-bottom: 75px;
    }

    .ueberschriftZweiUmrandung,
    .ueberschriftDreiUmrandung {
        padding: 24px 20px;
    }

    .sendButton #send {
        min-height: 52px;
    }
}

/* Sehr schmale Geräte erhalten noch kleinere sichere Außenabstände. */
@media (max-width: 360px) {
    .contactSection,
    .whatsappContainer,
    .sectionContainerUmrandung {
        width: calc(100% - 20px);
    }

    .contactIntroBenefits {
        flex-direction: column;
        align-items: stretch;
    }

    .contactIntroBenefits span {
        text-align: center;
    }
}
