@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/manrope/manrope-latin.woff2') format('woff2');
}

/* --- FARBEN & DESIGN --- */
:root {
    --primary: #002B49;
    --accent: #BFA15F;
    --text: #333333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --beige-050: #f5f5f5;
    --beige-100: #f0f0f0;
    --beige-150: #e5e5e5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html {
    background-color: #111;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Platz für fixierten Header */
    overscroll-behavior-y: none;
    min-height: 100vh;
}

h1, h2, h3 { color: var(--primary); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- HEADER & NAV --- */
header {
    background: rgba(255, 255, 255, 0.98);
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.logo-img {
    height: 50px; 
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-wrap: nowrap;
    white-space: nowrap; /* verhindert Zeilenumbruch in der Navigation */
}

nav a {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    white-space: nowrap; /* z.B. "Über uns" darf nie umbrechen */
}

nav a:hover, nav a.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

/* --- HAMBURGER MENÜ (erscheint automatisch, sobald Nav nicht mehr passt) --- */
.nav-toggle {
    display: none; /* wird per JS (body.nav-collapsed) eingeblendet */
    width: 54px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
}
.nav-toggle span {
    display: block;
    width: 34px;
    height: 4px;
    background: var(--primary);
    border-radius: 3px;
}

body.nav-collapsed .nav-toggle { display: flex; }
body.nav-collapsed nav { display: none; }
body.nav-collapsed nav.open {
    display: block;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    z-index: 999;
}
body.nav-collapsed nav.open ul {
    flex-direction: column;
    gap: 12px;
    padding: 18px 5%;
}

/* --- SEITENLAYOUT --- */
.page {
    min-height: 80vh;
    animation: fadeIn 0.5s;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- HERO BEREICH (PANORAMA) --- */
.hero {
    height: 75vh;
    /* Robust: verwendet das vorhandene JPG und eine Farbfläche als Rückfall */
    background: linear-gradient(rgba(0, 43, 73, 0.5), rgba(0, 43, 73, 0.5)),
                url('../bilder/startseite/panorama.webp') center/cover,
                linear-gradient(135deg, #07527d 0%, #002b49 55%, #00192c 100%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero h1 { color: white; font-size: 3rem; margin-bottom: 6px; text-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.hero p { font-size: 1.2rem; max-width: 800px; color: #f0f0f0; margin: 0; }

/* Firefox-spezifische Darstellung zur Vermeidung von Scroll-Artefakten */
@supports (-moz-appearance:none) {
    header {
        background: #ffffff;
    }
    #home .hero {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        contain: paint;
        background: none;
        background-color: var(--primary);
    }
    #home .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image:
            url('../bilder/startseite/panorama.webp'),
            linear-gradient(135deg, #07527d 0%, #002b49 55%, #00192c 100%);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        z-index: 0;
    }
    #home .hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 43, 73, 0.5);
        z-index: 0;
        pointer-events: none;
    }
    #home .hero > * {
        position: relative;
        z-index: 1;
    }

    /* Firefox: schwere Effekte auf langen Seiten reduzieren */
    .page {
        animation: none !important;
    }
    #services .card,
    #services .faq-item,
    #projects .project-card {
        transition: none !important;
        box-shadow: 0 6px 16px rgba(0,0,0,0.08) !important;
    }
    #projects .project-card:hover {
        transform: none !important;
        border-bottom-color: var(--beige-150) !important;
    }
}

/* --- CONTENT CONTAINER --- */
.container {
    max-width: none;
    margin: 0 auto;
    padding: 80px 5%;
}

.bg-light { background-color: var(--light-bg); }

.alt-bg { background-color: var(--light-bg); }

.section-title { text-align: center; margin-bottom: 50px; font-size: 2.2rem; }

/* --- GRIDS & CARDS --- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); gap: 50px; align-items: center; }

.card {
    background: white;
    padding: 30px;
    border: 1px solid var(--beige-150);
    border-bottom: 3px solid transparent; /* verhindert "Hüpfen" */
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--accent);
}
.card h2,
.card h3 {
    margin-bottom: 15px;
    font-size: 1.17em;
}

.btn-link {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-top: 15px;
    display: inline-block;
    cursor: pointer;
}

	        /* Kompetenzen/Dienstleistungen: 3 (Desktop) -> 2+1 (Tablet) -> 1 (mobil) */
.grid-competences {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

@media(max-width: 1150px) {
    .grid-competences {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-competences > .card:nth-child(3) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - 30px) / 2);
    }
}

/* --- STATISTIK --- */
.stats-bar {
    background: var(--primary);
    color: #fff;
    padding: 60px 5%;
    text-align: center;
}
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    text-align: center;
    max-width: none;
    margin: 0 auto;
    gap: 20px;
}
.stat-box .stat-value {
    color: var(--accent);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 5px;
}
.stat-box p {
    margin: 0;
    color: #fff;
    opacity: 0.95;
}

/* --- PROJEKTE (2 nebeneinander, Bild breiter, Balken schmäler) --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

#referenzen .reference-section-bar {
    width: 100%;
    margin: 0 0 20px;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
#referenzen .reference-section-bar-spaced {
    margin-top: 44px;
}

.project-card {
    display: grid;
    grid-template-columns: 0.65fr 1.35fr;
    background: var(--beige-050);
    border: 1px solid var(--beige-150);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
    border-radius: 0;
    overflow: hidden;
    min-height: 420px;
}

.project-side {
    background: var(--beige-100);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    border-right: 1px solid var(--beige-150);
}

.project-side h2,
.project-side h3 {
    color: var(--primary);
    margin: 0 0 2px 0;
    font-size: 1.18rem;
    line-height: 1.28;
}

.project-kv {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}
.project-kv strong { color: #111; }
.project-location { white-space: nowrap; }
.project-location.project-location-breakable { white-space: normal; }
.project-location-lead { white-space: nowrap; }
.project-pdf-link { margin-top: auto; align-self: flex-start; color: #0b63c9; font-size: 0.95rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.project-pdf-link:hover { color: #084b98; }

/* Konstantes 16:9-Format verhindert Layoutsprünge im Slider */
.project-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--beige-150);
}
.project-slider::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}
.project-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: none;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
}
.project-slider img.active {
    display: block;
}
.project-slider .video-slide {
    position: absolute;
    inset: 0;
    display: none;
    background: #000;
}
.project-slider .video-slide.active {
    display: block;
}
.project-slider .video-slide video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}
.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(0, 43, 73, 0.86);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    padding: 0 0 2px 6px;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
}
.video-play-button:hover {
    background: rgba(0, 43, 73, 1);
    transform: translate(-50%, -50%) scale(1.06);
}
.video-slide.is-playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}
.chromium-browser .project-slider[data-slider="ref-riva-havelterrassen"] img {
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0) scale(1.001);
    transform: translateZ(0) scale(1.001);
}


/* Wiederverwendbarer flacher Banner für Unterseiten */
#projects .projects-flat-hero,
.subpage-flat-hero {
    width: 100%;
    height: 6cm;
    min-height: 6cm;
    border-bottom: 1px solid var(--beige-150);
    overflow: hidden;
    background: linear-gradient(135deg, #07527d 0%, #002b49 55%, #00192c 100%);
    position: relative;
    isolation: isolate;
}
#projects .projects-flat-hero::after,
.subpage-flat-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 43, 73, 0.28), rgba(0, 43, 73, 0.16));
    z-index: 1;
    pointer-events: none;
}
#projects .projects-flat-hero-img,
.subpage-flat-hero-img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    -o-object-fit: cover;
    vertical-align: middle;
    transform: translateZ(0);
}
#projects .projects-flat-hero-copy,
.subpage-flat-hero-copy {
    position: absolute;
    top: 50%;
    left: 6%;
    transform: translateY(-50%);
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
    pointer-events: none;
}
#projects .projects-flat-hero-copy h1,
.subpage-flat-hero-copy h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5.4vw, 3.6rem);
    line-height: 1.05;
    color: #fff;
    font-weight: 800;
}
#projects .projects-flat-hero-copy p,
.subpage-flat-hero-copy p {
    margin: 8px 0 0;
    font-size: clamp(1rem, 1.9vw, 1.35rem);
    line-height: 1.3;
    color: rgba(255,255,255,0.95);
    font-weight: 600;
}
/* Das Kontakt-Banner berücksichtigt eine längere Unterzeile */
#contact .contact-flat-hero .subpage-flat-hero-copy {
    left: 6.5%;
    max-width: min(1240px, 88%);
}
#contact .contact-flat-hero .subpage-flat-hero-copy h1 {
    font-size: clamp(2rem, 4.8vw, 3.35rem);
}
#contact .contact-flat-hero .subpage-flat-hero-copy p {
    max-width: 1120px;
    font-size: clamp(0.78rem, 1.2vw, 1rem);
    line-height: 1.4;
}
#projects .project-card,
#referenzen .project-card {
    border: 1px solid var(--beige-150);
    border-bottom: 3px solid var(--beige-150);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
    background: var(--beige-050);
}
#projects .project-card {
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
#referenzen .project-card {
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
#projects .project-card:hover {
    transform: translateY(-1px);
    border-bottom-color: var(--accent);
}
#referenzen .project-card:hover {
    transform: translateY(-1px);
    border-bottom-color: var(--accent);
}
#referenzen .project-slider {
    transition: none;
}
#referenzen .project-slider img {
    inset: 0;
    transition: none;
}
.chromium-browser #projects .project-card:hover {
    transform: none;
}
#projects .project-side,
#referenzen .project-side {
    background: var(--beige-100);
}
/* Gemeinsame Grundhöhe für Projekte und Referenzen */
#projects .project-card,
#referenzen .project-card {
    height: 420px;
}
/* Projekte + Referenzen: Textspalte bleibt ab kleiner Breite stabil,
   Bildspalte darf weiter schrumpfen bis ca. 3:4 */
#projects .project-card,
#referenzen .project-card {
    grid-template-columns: minmax(250px, 0.65fr) minmax(315px, 1.35fr);
}
@media (min-width: 1501px) {
    #projects .project-card {
        height: 420px;
    }
    #projects .project-side {
        justify-content: center;
        gap: 5px;
    }
}
#referenzen .project-side {
    overflow-y: auto;
    padding: 14px 18px;
    gap: 8px;
}
#referenzen .project-side h3 {
    font-size: 1.1rem;
    margin: 0 0 1px 0;
    line-height: 1.22;
}
#referenzen .project-kv {
    font-size: 0.92rem;
    line-height: 1.34;
}
#referenzen .project-kv strong {
    display: block;
    margin-bottom: 1px;
    color: #111;
}
#referenzen .project-pdf-link {
    font-size: 0.9rem;
    margin-top: auto;
    margin-bottom: 0;
}
#projects .project-pdf-link {
    font-size: 0.9rem;
    margin-top: 2px;
}
@media (max-width: 1700px) {
    #projects .project-pdf-link-havelschanze {
        margin-top: -4px;
    }
}
@media (min-width: 1501px) and (max-width: 1700px) {
    #projects .project-side {
        justify-content: flex-start;
    }
}
#referenzen .project-side::-webkit-scrollbar {
    width: 6px;
}
#referenzen .project-side::-webkit-scrollbar-thumb {
    background: #c3c3c3;
    border-radius: 3px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    user-select: none;
    z-index: 2;
}
.slider-arrow:hover {
    background: rgba(0,0,0,0.65);
    transform: translateY(-50%) scale(1.03);
}
.slider-arrow.left { left: 14px; }
.slider-arrow.right { right: 14px; }

/* CTA Block (wie Startseite) */
.cta-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 22px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 4px;
    display: inline-block;
    margin-top: 18px;
}
.cta-btn:hover {
    transform: translateY(-2px);
    background: #001f34;
}
.cta-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.15;
    margin: 0 0 12px;
}
.cta-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center;
    background: var(--beige-150);
    border-radius: 5px;
    display: block;
}

.projects-cta-wrap {
    margin-top: 60px;
    background: var(--beige-100);
    border: 1px solid var(--beige-150);
    border-radius: 10px;
    padding: 36px 36px;
}

/* =======================
   "Substanz entscheidet"
   ======================= */
.home-substanz-section.container {
    padding-top: clamp(8px, 2.2vw, 22px);
    padding-bottom: clamp(46px, 5.4vw, 62px);
}
.about-like-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 10px;
}
.about-like-underline {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-bottom: 18px;
}
.about-like-text {
    max-width: 1100px;
    color: #444;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 28px;
}
.about-like-panel {
    background: var(--beige-100);
    border-radius: 6px;
    padding: 24px;
}
.about-like-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.about-like-box {
    background: var(--beige-150);
    border-radius: 6px;
    padding: 18px;
}

/* Kompaktes, einheitliches Bildformat für Philosophie und Expertise */
.about-like-img {
    width: 100%;
    aspect-ratio: 24 / 9;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    margin-bottom: 12px;
    display: block;
    background: var(--beige-150);
}

.ai-image-wrap {
    position: relative;
    margin-bottom: 12px;
}
.ai-image-wrap .about-like-img {
    margin-bottom: 0;
}
.ai-service-image-wrap {
    margin-bottom: 14px;
}
.ai-service-image-wrap .service-card-img {
    margin-bottom: 0;
}
.ai-cta-image-wrap {
    margin-bottom: 0;
}
.ai-generated-label {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.78);
    color: #1a1a1a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    pointer-events: none;
    z-index: 3;
}
.project-slider img:not(.active) + .slider-image-label {
    display: none;
}

.about-like-box h3 {
    margin-bottom: 8px;
    color: #111;
    font-size: 1.05rem;
    font-weight: 800;
}
.about-like-box p {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Blocksatz mit sprachgerechter, responsiver Silbentrennung */
.home-substanz-section .about-like-text,
.home-substanz-section .about-like-box p,
#about .about-intro-text p,
#about .workweise-card p,
.service-intro p,
.service-intro li,
.faq-answer-inner {
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 5 2 2;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Einheitliches 16:9-Format für Dienstleistungsbilder */
.service-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    margin-bottom: 14px;
    display: block;
    background: var(--beige-150);
}

/* Typografie der Dienstleistungs-Einleitungen */
.service-intro h2 {
    margin: 0 0 10px;
    color: #111;
    font-size: 1.25rem;
    font-weight: 900;
}
.service-intro p {
    margin-bottom: 14px;
    color: #444;
    font-size: 1.02rem;
    line-height: 1.75;
}
.service-intro ul {
    margin: 0 0 10px 18px;
    color: #444;
    font-size: 1.02rem;
    line-height: 1.75;
}
.service-intro li { margin: 6px 0; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--beige-150);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 6px;
    overflow: hidden;
}

.contact-card-head {
    padding: 22px 22px 14px;
    background: var(--beige-100);
    border-bottom: 1px solid var(--beige-150);
}

.contact-card-head h2 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: var(--primary);
}

.contact-details {
    padding: 18px 22px 22px;
    color: #333;
    font-size: 0.98rem;
    line-height: 1.6;
}
.contact-details strong { color: #111; }

.contact-map {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}

.google-map-slot {
    width: 100%;
    height: 320px;
    background: var(--beige-100);
}

.google-map-placeholder {
    width: 100%;
    height: 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #3f4c56;
    border-top: 1px solid var(--beige-150);
}

.google-map-placeholder-symbol {
    width: 42px;
    height: 42px;
    border: 3px solid var(--primary);
    border-radius: 50% 50% 50% 8px;
    transform: rotate(-45deg);
    position: relative;
    margin-bottom: 5px;
}

.google-map-placeholder-symbol::after {
    content: '';
    width: 10px;
    height: 10px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.google-map-placeholder strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.google-map-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.map-consent-button {
    margin-top: 4px;
    padding: 10px 15px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background: #fff;
    color: var(--primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.map-consent-button:hover,
.map-consent-button:focus-visible {
    background: var(--primary);
    color: #fff;
}

/* =======================
   Über uns Inhalte
   ======================= */
.about-intro-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}
.about-intro-text h2 {
    font-size: 2.0rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 14px;
}
.about-intro-text p {
    color: #444;
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0;
}
.about-intro-text {
    padding-right: max(10px, calc(5vw - 40px));
    box-sizing: border-box;
}

.about-intro-section {
    padding-block: 45px;
}

/* Bewahrt die ursprüngliche Größe des weißen Bereichs */
.about-office-frame {
    width: 100%;
    aspect-ratio: 1600 / 1147;
    display: flex;
    align-items: center;
}

/* Nur das Bild wird etwas flacher und leicht hineingezoomt */
.about-office-img {
    width: 100%;
    height: 87%;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    display: block;
}

.about-work-title {
    text-align: center;
    margin: 0 0 35px;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.workweise-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr 1fr;
    gap: 26px;
    align-items: center;
}
.workweise-col {
    display: grid;
    gap: 18px;
}
.workweise-card {
    background: #fff;
    border: 1px solid var(--beige-150);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 6px;
    padding: 18px 18px;
}
.workweise-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
}
.workweise-card p {
    margin: 0;
    color: #444;
    font-size: 0.98rem;
    line-height: 1.6;
}
.workweise-center-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: contain;
    background: var(--beige-150);
    border-radius: 6px;
    display: block;
}

.team-subtitle {
    text-align: center;
    max-width: 900px;
    margin: -35px auto 40px;
    color: #444;
    font-size: 1.05rem;
    line-height: 1.7;
}
.team-card {
    text-align: center;
    background: transparent;
    box-shadow: none;
    border: none;
}
.team-img {
    width: 100%;
    aspect-ratio: 5 / 6;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
    filter: grayscale(20%);
}
.team-image-wrap {
    position: relative;
    margin-bottom: 20px;
}
.team-image-wrap .team-img {
    display: block;
    margin-bottom: 0;
}
.ai-modified-disclosure {
    position: absolute;
    left: 6px;
    bottom: 6px;
    z-index: 4;
    text-align: left;
}
.ai-modified-trigger {
    display: block;
    margin: 0;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
}
.ai-modified-trigger:hover,
.ai-modified-trigger:focus-visible {
    background: #fff;
}
.ai-modified-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.ai-modified-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    width: min(330px, calc(100vw - 48px));
    padding: 14px 15px;
    border: 1px solid rgba(14, 42, 87, 0.14);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    color: #242424;
    font-size: 0.82rem;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}
.ai-modified-panel::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
}
.ai-modified-panel strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 0.9rem;
}
.ai-modified-panel p {
    margin: 0;
}
.ai-modified-disclosure:hover .ai-modified-panel,
.ai-modified-disclosure.is-open .ai-modified-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.position {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-top: 5px;
}
.team-email {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.team-email:hover,
.team-email:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(300px, 1fr));
    gap: 30px;
}
@media(max-width: 1440px) {
    .team-grid { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
}
@media(max-width: 700px) {
    .team-grid { grid-template-columns: 1fr; }
}

/* =======================
   FAQ (Accordion)
   ======================= */
.faq-wrap {
    max-width: 1100px;
    margin: 0 auto;
}
.faq-kicker {
    text-align: center;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.faq-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: #111;
    margin-top: 0;
    margin-bottom: 40px;
}
/* Lange FAQ-Überschriften dürfen nicht seitlich abgeschnitten werden */
.faq-kicker,
.faq-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}
.faq-title {
    max-width: min(980px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
    line-height: 1.16;
}
.faq-list {
    background: transparent;
}
.faq-item {
    border-bottom: 2px solid var(--primary);
    padding: 0;
}
	        .faq-btn {
	            width: 100%;
	            text-align: left;
	            background: transparent;
	            border: none;
	            padding: 18px 0;
	            cursor: pointer;
	            display: flex;
	            align-items: center;
	            justify-content: space-between;
	            gap: 20px;
	        }
	        .faq-q {
	            font-size: 1.2rem;
	            font-weight: 700;
	            color: #111;
	            line-height: 1.25;
	        }
.faq-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: 0.25s;
    color: var(--primary);
    font-size: 0; /* Verbirgt das Textzeichen zugunsten des einheitlichen CSS-Pfeils */
    user-select: none;
}
/* Browserübergreifend einheitliches Pfeil-Icon */
.faq-arrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    display: inline-block;
    transform: rotate(45deg);
}
.faq-item.open .faq-arrow {
    transform: rotate(180deg);
    border-color: rgba(0, 43, 73, 0.35);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}
	        .faq-answer-inner {
	            padding: 0 0 18px 0;
	            color: #444;
	            font-size: 1.03rem;
	            line-height: 1.75;
	            max-width: 980px;
	        }

/* --- FOOTER (SCHWARZER BALKEN) --- */
footer {
    background: #111;
    color: #ccc;
    padding: 60px 5% 20px;
    margin-top: auto;
}
.footer-grid {
    max-width: none;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
}
.footer-grid .footer-col:nth-child(2) { text-align: center; }
.footer-grid .footer-col:nth-child(3) { text-align: right; }
.footer-col h2 {
    color: var(--accent);
    font-size: 1rem;
    margin: 0 0 20px;
    text-transform: uppercase;
}
.footer-col p { line-height: 1.8; font-size: 0.9rem; color: #fff; opacity: 0.8; }
.footer-bottom {
    max-width: none;
    margin: 20px auto 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.6;
}
.legal-links a { cursor: pointer; margin-left: 20px; color: #fff; }
.legal-links a:hover { color: var(--accent); }

/* --- DATENSCHUTZEINSTELLUNGEN --- */
.privacy-settings-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2100;
    width: 52px;
    height: 52px;
    padding: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.privacy-settings-button svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.privacy-settings-button:hover,
.privacy-settings-button:focus-visible {
    background: #001f34;
    transform: translateY(-2px);
}

.privacy-consent-layer {
    position: fixed;
    inset: 0;
    z-index: 2200;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.privacy-consent-panel {
    width: min(1080px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.34fr);
    gap: 24px;
    padding: 26px;
    background: #fff;
    color: #26343e;
    border: 1px solid #cfd7dc;
    border-radius: 10px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
}

.privacy-consent-panel:focus {
    outline: none;
}

.privacy-consent-copy h2 {
    margin: 2px 42px 10px 0;
    font-size: 1.55rem;
    color: var(--primary);
}

.privacy-consent-copy > p {
    margin: 0 0 11px;
    line-height: 1.55;
    font-size: 0.93rem;
}

.privacy-consent-kicker {
    color: #6a5220;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.privacy-consent-copy details {
    margin: 11px 0;
    padding: 11px 13px;
    background: var(--beige-050);
    border: 1px solid var(--beige-150);
    border-radius: 6px;
}

.privacy-consent-copy summary {
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
}

.privacy-consent-details {
    padding-top: 9px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.privacy-consent-details p {
    margin: 0 0 8px;
}

.privacy-consent-withdrawal {
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

.privacy-consent-storage {
    color: #52616c;
    font-size: 0.83rem !important;
}

.privacy-consent-status {
    color: var(--primary);
    font-weight: 800;
}

.privacy-consent-link {
    color: #0b5ca8;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.privacy-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 11px;
}

.privacy-consent-choice {
    width: 100%;
    min-height: 48px;
    padding: 11px 15px;
    border: 2px solid var(--primary);
    border-radius: 5px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.privacy-consent-deny {
    background: #fff;
    color: var(--primary);
}

.privacy-consent-allow {
    background: var(--primary);
    color: #fff;
}

.privacy-consent-choice:hover,
.privacy-consent-choice:focus-visible {
    box-shadow: 0 0 0 3px rgba(191, 161, 95, 0.38);
}

.privacy-consent-close {
    position: absolute;
    top: 13px;
    right: 15px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #c3ccd2;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    font-size: 0;
    cursor: pointer;
}

.privacy-consent-close::before,
.privacy-consent-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2.5px;
    border-radius: 2px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
}

.privacy-consent-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media(max-width: 760px) {
    .privacy-consent-layer {
        padding: 10px;
    }

    .privacy-consent-panel {
        max-height: calc(100vh - 20px);
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    .privacy-consent-copy h2 {
        font-size: 1.3rem;
    }

    .privacy-consent-actions {
        grid-template-columns: 1fr 1fr;
    }

    .privacy-settings-button {
        right: 12px;
        bottom: 12px;
        width: 48px;
        height: 48px;
    }
}

@media(max-width: 520px) {
    .privacy-consent-actions {
        grid-template-columns: 1fr;
    }
}

/* --- RECHTSTEXTE (Langform) --- */
.legal-text {
    white-space: pre-wrap;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
    text-align: left;
}

.privacy-legal,
.imprint-legal {
    white-space: normal;
    max-width: 1050px;
    margin: 0 auto;
}

.privacy-legal h2,
.imprint-legal h2,
.privacy-legal h3,
.imprint-legal h3 {
    margin: 30px 0 12px;
    color: var(--primary);
    font-size: 1.15rem;
    line-height: 1.35;
}

.privacy-legal p,
.imprint-legal p {
    margin: 0 0 13px;
}

.privacy-legal ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.privacy-legal li {
    margin-bottom: 6px;
}

.privacy-legal address,
.imprint-legal address {
    margin: 0 0 16px;
    font-style: normal;
}

.privacy-legal a,
.imprint-legal a {
    color: #0b5ca8;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.privacy-legal code {
    padding: 1px 4px;
    border-radius: 3px;
    background: #edf1f4;
    color: #253b4a;
    font-size: 0.9em;
}

.privacy-legal .legal-updated {
    color: #52616c;
}

.imprint-legal .legal-kicker {
    color: #52616c;
    font-weight: 700;
}

.imprint-company {
    margin: 22px 0;
    padding: 20px 22px 8px;
    border: 1px solid #d8e0e6;
    border-radius: 5px;
    background: #f7f9fa;
}

.imprint-company h2 {
    margin-top: 0;
}

.privacy-pdf-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none !important;
}

.privacy-pdf-link:hover,
.privacy-pdf-link:focus-visible {
    background: var(--primary);
    color: #fff;
}

@media(max-width: 1500px) {
    #referenzen .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        align-items: stretch;
    }
    #referenzen .project-card {
        --reference-image-height: clamp(300px, 34vw, 480px);
        grid-template-columns: 1fr;
        grid-template-rows: var(--reference-info-height, auto) var(--reference-image-height);
        height: auto;
        min-height: 0;
        align-self: stretch;
        align-content: stretch;
    }
    #referenzen .project-side {
        border-right: none;
        border-bottom: 1px solid var(--beige-150);
        box-sizing: border-box;
        height: auto;
        min-height: 320px;
        padding-bottom: 36px;
        overflow-y: visible;
        max-height: none;
    }
    #referenzen .project-side > * {
        flex-shrink: 0;
    }
    #referenzen .project-slider {
        min-height: 0;
        height: 100%;
        aspect-ratio: auto;
        align-self: stretch;
    }
    #referenzen .project-slider::before {
        display: none;
    }
}

@media(max-width: 1500px) {
    #projects .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        align-items: stretch;
    }
    #projects .project-card {
        --project-image-height: clamp(300px, 34vw, 480px);
        grid-template-columns: 1fr;
        grid-template-rows: var(--project-info-height, auto) var(--project-image-height);
        height: auto;
        min-height: 0;
        align-self: stretch;
        align-content: stretch;
    }
    #projects .project-side {
        border-right: none;
        border-bottom: 1px solid var(--beige-150);
        box-sizing: border-box;
        height: auto;
        min-height: 320px;
        padding-bottom: 36px;
        overflow-y: visible;
        max-height: none;
    }
    #projects .project-side > * {
        flex-shrink: 0;
    }
    #projects .project-slider {
        min-height: 0;
        height: 100%;
        aspect-ratio: auto;
        align-self: stretch;
    }
    #projects .project-slider::before {
        display: none;
    }
}

/* Mobile */
@media(max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .about-like-grid { grid-template-columns: 1fr; }

    .projects-grid { grid-template-columns: 1fr; gap: 18px; }

    .contact-grid { grid-template-columns: 1fr; }
    #contact .contact-flat-hero { min-height: 6.8cm; height: 6.8cm; }
    #contact .contact-flat-hero .subpage-flat-hero-copy p {
        max-width: 92vw;
        font-size: clamp(0.72rem, 2.1vw, 0.9rem);
        line-height: 1.34;
    }

    .about-intro-grid { grid-template-columns: 1fr; }
    .about-intro-text { padding-right: 0; }
    .workweise-grid { grid-template-columns: 1fr; }
    .team-subtitle { margin-top: -30px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-grid .footer-col:nth-child(2),
    .footer-grid .footer-col:nth-child(3) { text-align: left; }

    .faq-title { font-size: 2.0rem; }
	            .faq-q { font-size: 1.0rem; }
	            .faq-btn { padding: 16px 0; }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
	        }

/* Wenn 3 Karten mobil zu eng werden: untereinander */
@media(max-width: 700px) {
    #referenzen .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: max-content;
        align-items: start;
    }
    #referenzen .project-card {
        grid-template-rows: max-content max-content;
        height: max-content;
        min-height: 0;
        align-self: start;
        align-content: start;
    }
    #referenzen .project-side {
        height: auto;
        min-height: 0;
        overflow-y: visible;
    }
    #referenzen .project-slider {
        min-height: 0;
        height: auto;
        aspect-ratio: 3 / 2;
        align-self: start;
        line-height: 0;
    }
    #referenzen .project-slider img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    #projects .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: max-content;
        align-items: start;
    }
    #projects .project-card {
        grid-template-rows: max-content max-content;
        height: max-content;
        min-height: 0;
        align-self: start;
        align-content: start;
    }
    #projects .project-side {
        height: auto;
        min-height: 0;
        overflow-y: visible;
    }
    #projects .project-slider {
        min-height: 0;
        height: auto;
        aspect-ratio: 3 / 2;
        align-self: start;
        line-height: 0;
    }
    #projects .project-slider img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    #projects .project-slider .video-slide {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
    }

    .grid-competences { grid-template-columns: 1fr; }
    .grid-competences > .card:nth-child(3) {
        grid-column: auto;
        justify-self: stretch;
        width: 100%;
    }
}
