/* ===========================================================
   1. GRUNDEINSTELLUNGEN & VARIABLEN
=========================================================== */
:root {
    /* Farben */
    --color-bg: #f5f7fb;
    --color-bg-dark: #10141f; /* Dunkelblau für Kontakt/Footer */
    --color-primary: #e42323; /* Rot (Akzente) */
    --color-secondary: #006bb3; /* Blau (Hauptfarbe) */
    --color-text: #1d2636;    /* Dunkles Grau-Blau */
    --color-muted: #6b7280;   /* Helles Grau (Nebentext) */

    /* Layout */
    --container-width: 1120px;
    --radius: 12px;
    --shadow-card: 0 12px 24px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 18px 35px rgba(15, 23, 42, 0.12);

    /* Safe-Area Padding (iOS) */
    --safe-right: env(safe-area-inset-right);
    --safe-bottom: env(safe-area-inset-bottom);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===========================================================
   2. HEADER & NAVIGATION
=========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(241, 245, 249, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 0;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 0.8rem; }
.logo-figur { height: 48px; width: auto; }
.logo-schrift { height: 36px; width: auto; }

/* Navigation Desktop */
.main-nav { display: flex; align-items: center; gap: 1.5rem; font-weight: 500; }
.main-nav a { position: relative; color: var(--color-text); font-size: 0.95rem; }
.main-nav a:hover { color: var(--color-secondary); }

/* Burger Menü Button */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1100;
}
.nav-toggle i {
    color: var(--color-text);
    font-size: 1.8rem;
    line-height: 1;
}

/* ===========================================================
   3. HERO SEKTION
=========================================================== */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    background: #fff;
    overflow: hidden;
    min-height: 650px;
    display: flex;
    align-items: center;
}

.hero-background { position: absolute; inset: 0; z-index: 0; }
.hero-slider { position: relative; width: 100%; height: 100%; }

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay-light {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.hero-content-centered {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content-centered h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin: 0 0 1.5rem;
    color: var(--color-text);
    font-weight: 700;
}

.hero-content-centered p {
    font-size: 1.15rem;
    color: var(--color-text);
    margin: 0 auto 2.5rem;
    max-width: 650px;
}

.hero-actions-centered { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.hero-slider-dots-centered {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 3;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-secondary);
    background: transparent;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: 0.3s;
}
.hero-dot.active { background: var(--color-secondary); transform: scale(1.2); }

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f5f7fb' fill-opacity='1' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,261.3C960,256,1056,224,1152,197.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
}

/* ===========================================================
   4. LAYOUT SECTIONS & UI
=========================================================== */
.section { padding: 5rem 0; }
.section-light { background: #f5f7fb; }
.section-accent { background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); color: #fff; }
.section-dark { background: var(--color-bg-dark); color: #cbd5e1; }

.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--color-text); }
.section-dark .section-head h2 { color: #fff; }
.section-head p { max-width: 600px; margin: 0 auto; color: var(--color-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(228, 35, 35, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(228, 35, 35, 0.4); }

.btn-ghost-dark {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}
.btn-ghost-dark:hover { background: var(--color-secondary); color: #fff; }

.inline-icon { margin-right: 0.5rem; }

/* ===========================================================
   5. KACHELN / LEISTUNGEN
=========================================================== */
.flex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.flex-grid > article {
    flex: 0 1 calc(33.333% - 1.5rem);
    min-width: 300px;
    display: flex;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s;
    width: 100%;
}
.card:hover { transform: translateY(-5px); }
.card-highlight { border: 1px solid rgba(0, 107, 179, 0.1); }

/* Nur Karten im Flex-Grid stapeln sich */
.flex-grid .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 107, 179, 0.1);
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.card h3 { margin: 0 0 1rem; font-size: 1.25rem; color: var(--color-text); }

/* Inhalt in Leistungs-Karten verteilen */
.flex-grid .card ul, .flex-grid .card p { flex-grow: 1; }

/* Listen */
.list-with-icon { padding-left: 0; }
.list-with-icon li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-muted);
}
.list-with-icon li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 50%;
}
.list-with-icon-light li { color: rgba(255,255,255,0.9); }
.list-with-icon-light li::before { background: #fff; }

/* ===========================================================
   6. KONTAKT, NOTFALL & ÜBER UNS
=========================================================== */
.notfall-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.notfall-call {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    color: #fff;
    white-space: nowrap;
}
.notfall-number { display: block; font-size: 1.8rem; font-weight: 700; margin: 0.5rem 0; color: #fff; }
.notfall-label { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

.about-images { position: relative; height: 350px; }
.about-photo {
    position: absolute;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}
.about-photo-main { width: 85%; height: 85%; top: 0; left: 0; z-index: 1; }
.about-photo-small { width: 50%; height: 50%; bottom: 0; right: 0; border: 4px solid #fff; z-index: 2; }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-block { margin-top: 2rem; }
.contact-block h3 {
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.contact-block p, .contact-block a { color: #cbd5e1; margin: 0; }
.contact-block a:hover { color: var(--color-primary); }

.contact-form-wrapper h3 { color: #fff; margin-top: 0; margin-bottom: 1.5rem; }
.contact-form {
    background: #020617;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}
.form-row { display: flex; gap: 1rem; }
.form-field { flex: 1; margin-bottom: 1.2rem; display: flex; flex-direction: column; }
.form-field label { color: #cbd5e1; font-size: 0.9rem; margin-bottom: 0.4rem; }
.form-field input, .form-field select, .form-field textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.8rem;
    color: #fff;
    font-family: inherit;
    width: 100%;
}
.form-field input:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255,255,255,0.1);
}
.form-hint { font-size: 0.8rem; color: #64748b; margin-bottom: 1.5rem; }
.form-submit { width: 100%; }

/* ===========================================================
   7. FOOTER & EXTRAS
=========================================================== */
.site-footer {
    background: #020617;
    color: #64748b;
    padding: 2rem 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-copyright p { margin: 0; }
.footer-credits { display: flex; align-items: center; gap: 0.8rem; }
.credits-text { font-size: 0.8rem; opacity: 0.7; }
.footer-logo { height: 30px; width: auto; opacity: 0.8; transition: 0.3s ease; }
.footer-credits a:hover .footer-logo { opacity: 1; transform: scale(1.05); }

/* Floating Call Button (mit iOS Safe-Area Fix) */
.floating-call {
    position: fixed;
    right: calc(20px + var(--safe-right));
    bottom: calc(20px + var(--safe-bottom));
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(228, 35, 35, 0.5);
    z-index: 900;
    overflow: visible;
}

.floating-call:hover { transform: scale(1.1); }

/* Fallback für ältere iOS/Safari (wo env(...) teils zickt) */
@supports (padding: constant(safe-area-inset-bottom)) {
    :root {
        --safe-right: constant(safe-area-inset-right);
        --safe-bottom: constant(safe-area-inset-bottom);
    }
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===========================================================
   8. RESPONSIVE DESIGN (Tablets & Smartphones)
=========================================================== */
@media (max-width: 900px) {
    .contact-grid, .notfall-inner, .about-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .flex-grid > article {
        flex: 0 0 100%;
        max-width: 450px;
        margin-bottom: 2rem;
    }
    .flex-grid > article:last-child { margin-bottom: 0; }

    .nav-toggle { display: block; color: var(--color-text); }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 900;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a {
        color: #1d2636;
        font-size: 1.1rem;
        padding: 0.8rem 0;
        display: block;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        width: 100%;
    }

    .hero { padding-top: 6rem; min-height: auto; padding-bottom: 4rem; }
    .hero-content-centered h1 { font-size: 2.2rem; }
    .hero-actions-centered { flex-direction: column; width: 100%; max-width: 320px; margin: 0 auto; }
    .btn { width: 100%; margin-bottom: 0.5rem; }

    .footer-inner { flex-direction: column; text-align: center; justify-content: center; }

    .about-images { margin-top: 2rem; height: 300px; width: 100%; }
}

/* ===========================================================
   9. reCAPTCHA v3 BADGE (Fix: links unten + klappt wieder zu)
   WICHTIG: KEIN transform setzen, sonst bleibt es immer offen!
=========================================================== */
.grecaptcha-badge{
    left: 16px !important;
    right: auto !important;
    bottom: calc(16px + var(--safe-bottom)) !important;
    z-index: 950 !important;
    /* KEIN transform hier! */
}

/* Falls du global iframe { width:100% } hast, bleibt das Badge sonst "gross" */
.grecaptcha-badge iframe{
    width: 256px !important;
    height: 60px !important;
}

/* Optional: auf Mobile etwas höher, damit es nie über dem Footer hängt */
@media (max-width: 900px){
    .grecaptcha-badge{
        bottom: calc(86px + var(--safe-bottom)) !important;
    }
}

/* reCAPTCHA v3 Badge ausblenden (mit Hinweistext auf der Seite) */
.grecaptcha-badge{
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* reCAPTCHA Hinweis im Footer */
.recaptcha-notice{
  margin-top: 12px;
  padding-bottom: 6px;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
}
.recaptcha-notice a{
  color: #94a3b8;
  text-decoration: underline;
}
.recaptcha-notice a:hover{
  color: #e2e8f0;
}

/* reCAPTCHA v3 Badge ausblenden (zulässig, weil Hinweis sichtbar vorhanden) */
.grecaptcha-badge{
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}