:root {
    --green-900: #1b5e20;
    --green-700: #2e7d32;
    --green-500: #43a047;
    --green-100: #e8f5e9;
    --brown-800: #4e342e;
    --brown-700: #5d4037;
    --brown-500: #795548;
    --brown-100: #efebe9;
    --red-700: #8b1e1e;
    --red-500: #a52a2a;
    --ink: #26221f;
    --paper: #fbfaf7;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(38, 34, 31, .10);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--green-700);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrap {
    width: min(1100px, 92%);
    margin: 0 auto;
}

section {
    padding: 56px 0;
}

h1,
h2,
h3 {
    line-height: 1.25;
}

h2 {
    font-size: 1.7rem;
    color: var(--green-900);
    margin-bottom: 8px;
}

.section-intro {
    max-width: 92%;
    color: #4a443f;
    margin-bottom: 28px;
}

.kicker {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brown-700);
    margin-bottom: 6px;
}

/* ============ Header / Navigation ============ */
header.site {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
    border-bottom: 3px solid var(--green-700);
    box-shadow: var(--shadow);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--green-900);
    font-size: 1.05rem;
}

.brand svg {
    flex: 0 0 auto;
}

.brand small {
    display: block;
    font-weight: 500;
    font-size: .7rem;
    color: var(--brown-700);
    letter-spacing: .04em;
}

.burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    width: 24px;
    height: 3px;
    background: var(--green-900);
    border-radius: 2px;
}

nav.main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--green-100);
    box-shadow: var(--shadow);
}

header.site.nav-open nav.main {
    display: block;
}

nav.main ul {
    list-style: none;
}

nav.main a {
    display: block;
    padding: 14px 4%;
    font-weight: 600;
    color: var(--ink);
    border-left: 3px solid transparent;
}

nav.main a:hover {
    background: var(--green-100);
    text-decoration: none;
    border-left-color: var(--green-700);
}

@media (min-width:760px) {
    .burger {
        display: none;
    }

    nav.main {
        display: block;
        position: static;
        box-shadow: none;
        border-bottom: 0;
        background: none;
    }

    nav.main ul {
        display: flex;
        gap: 4px;
        list-style: none;
    }

    nav.main a {
        padding: 8px 14px;
        border-radius: 6px;
        border-left: 0;
    }

    nav.main a:hover {
        background: var(--green-100);
    }
}

/* ============ Hero ============ */
.hero {
    background:
        linear-gradient(rgba(27, 94, 32, .88), rgba(27, 94, 32, .92)),
        repeating-linear-gradient(45deg, #2e7d32 0 18px, #256b29 18px 36px);
    color: var(--white);
    padding: 72px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.2rem);
    margin-bottom: 14px;
}

.hero h1 em {
    font-style: normal;
    color: #c8e6c9;
}

.hero p {
    max-width: 560px;
    margin: 0 auto 28px;
    color: #e8f5e9;
    font-size: 1.05rem;
}

.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--red-700);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--red-500);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .15);
}

.hero .btn {
    margin: 6px;
}

/* ============ Platzhalter-Fotos ============ */
.photo {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    /*border:2px dashed rgba(255,255,255,.65);*/
    box-shadow: var(--shadow);
}

.photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, .06) 14px 28px);
    pointer-events: none;
}

.photo .label {
    position: relative;
    z-index: 1;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .55);
    color: var(--white);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 6px;
    max-width: 92%;
    text-align: center;
}

/* Echte Fotos in der Kachel: größer als 500x375, mittig eingepasst */
.photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Platzhalter-Beschriftung ausblenden, solange das Foto geladen ist */
.photo img+.label {
    display: none;
}

/* Kacheln mit Paar-Zugehörigkeit: klickbar zur Lightbox */
.photo[data-pair] {
    cursor: zoom-in;
}

.photo[data-pair]:focus-visible {
    outline: 3px solid var(--red-500);
    outline-offset: 2px;
}

/* ============ Leistungen ============ */
#leistungen {
    background: var(--white);
}

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

.card {
    background: var(--paper);
    border: 1px solid #e5e0da;
    border-top: 4px solid var(--green-700);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card h3 {
    color: var(--green-900);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.card p {
    font-size: .94rem;
    color: #4a443f;
}

.card ul {
    list-style: none;
    margin-top: 10px;
    font-size: .9rem;
}

.card ul li {
    padding: 4px 0 4px 22px;
    position: relative;
    color: #4a443f;
}

.card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-700);
    font-weight: 700;
}

@media (min-width:640px) {
    .grid-leistungen {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width:1024px) {
    .grid-leistungen {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============ Referenzen ============ */
#referenzen {
    background: var(--brown-100);
}

.ref {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.ref h3 {
    color: var(--brown-800);
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.ref-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}

.ref-pair .arrow {
    display: none;
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--white);
}

.badge.vorher {
    background: var(--brown-700);
}

.badge.nachher {
    background: var(--green-700);
}

.ref-caption {
    font-size: .85rem;
    color: #4a443f;
    margin-top: 10px;
    text-align: center;
}

@media (min-width:760px) {
    .ref-pair {
        grid-template-columns: 1fr 40px 1fr;
    }

    .ref-pair .arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        color: var(--red-700);
        font-weight: 800;
    }
}

/* ============ Geräte ============ */
#geraete {
    background: var(--white);
}

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

.geraet-card {
    background: var(--paper);
    border: 1px solid #e5e0da;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.geraet-card .photo {
    border: 0;
    border-radius: 0;
    aspect-ratio: 16/10;
}

.geraet-card .body {
    padding: 16px 18px 20px;
    flex: 1;
}

.geraet-card h3 {
    color: var(--red-700);
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.geraet-card p {
    font-size: .9rem;
    color: #4a443f;
}

@media (min-width:640px) {
    .grid-geraete {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width:1024px) {
    .grid-geraete {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============ Kontakt ============ */
#kontakt {
    background:
        linear-gradient(rgba(27, 94, 32, .93), rgba(27, 94, 32, .95)),
        repeating-linear-gradient(-45deg, #2e7d32 0 18px, #256b29 18px 36px);
    color: var(--white);
}

#kontakt h2 {
    color: var(--white);
}

#kontakt .section-intro {
    color: #e8f5e9;
}

.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.kontakt-liste {
    list-style: none;
}

.kontakt-liste li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.kontakt-liste li:last-child {
    border-bottom: 0;
}

.kontakt-liste .icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kontakt-liste strong {
    display: block;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #c8e6c9;
}

.kontakt-liste a {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 600;
}

.kontakt-cta {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    color: var(--ink);
    box-shadow: var(--shadow);
    align-self: start;
}

.kontakt-cta h3 {
    color: var(--green-900);
    margin-bottom: 8px;
}

.kontakt-cta p {
    font-size: .92rem;
    color: #4a443f;
    margin-bottom: 16px;
}

@media (min-width:820px) {
    .kontakt-grid {
        grid-template-columns: 1.2fr .8fr;
    }
}

/* ============ Footer ============ */
footer.site {
    background: var(--brown-800);
    color: #d7ccc8;
    padding: 28px 0;
    font-size: .85rem;
}

footer.site .wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

footer.site a {
    color: #fff;
}

.legal-notices {
    background: rgba(255, 255, 255, .08);
    /*border-left: 4px solid var(--red-500);*/
    padding: 10px 14px;
    border-radius: 4px;
}

@media (min-width:760px) {
    footer.site .wrap {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    flex: 0 0 auto;
}

/* ============ Lightbox ============ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(20, 18, 16, .93);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox.open {
    display: flex;
}

/* Bühne: nimmt nur den tatsächlich freien Platz ein und darf
   bei Bedarf schrumpfen (min-height:0 ist entscheidend!) –
   so kann das Bild nie mehr aus dem sichtbaren Viewport ragen. */
.lb-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 92vw;
    padding: 16px;
}

.lb-stage img {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    /* erlaubt Schrumpfen unter die natürliche Größe */
    max-width: 92vw;
    max-height: 78vh;
    /* Fallback für ältere Browser */
    max-width: 100%;
    max-height: 100%;
    /* maßgeblich: Bild passt in die Bühne */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .55);
}

/* Platzhalter ebenfalls in die Bühne einklemmen */
.lb-ph {
    width: min(80vw, 900px);
    max-height: 100%;
}

.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: var(--white);
    border: 0;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 101;
}

.lb-arrow:hover {
    background: rgba(255, 255, 255, .3);
}

.lb-prev {
    left: 16px;
}

.lb-next {
    right: 16px;
}

.lb-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: var(--white);
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 101;
}

.lb-close:hover {
    background: rgba(255, 255, 255, .3);
}

.lb-caption {
    flex: 0 0 auto;
    color: var(--white);
    margin-top: 14px;
    font-size: .95rem;
    text-align: center;
    padding: 0 64px;
    max-width: 100%;
}

.lb-counter {
    flex: 0 0 auto;
    color: #c8e6c9;
    font-size: .8rem;
    margin-top: 4px;
    margin-bottom: 12px;
}

/* Mobil: Buttons kompakter, Caption nicht von Pfeilen überdeckt */
@media (max-width:640px) {
    .lb-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        background: rgba(255, 255, 255, .22);
    }

    .lb-prev {
        left: 8px;
    }

    .lb-next {
        right: 8px;
    }

    .lb-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .lb-caption {
        padding: 0 56px;
        margin-top: 10px;
    }
}

/**/
