*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: #f4f6f7;
    color: #161616;
    max-width: 100%;
    overflow-x: hidden;
}

/* HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 999;

    display: flex;
    align-items: center;        /* vertikal zentriert */
    justify-content: space-between;

    height: 80px;               /* feste Höhe */
    padding: 0 40px;            /* kein oben/unten Padding */

    background: #195c2f;
}


.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: bold;
    font-size: 20px;
    color: white;
}

.logo img {
    height: 45px;
    background: white;
    border-radius: 100%;
    transform: scale(1.5);
}

/* DESKTOP NAV BUTTONS */

nav a {
    text-decoration: none;
    color: white;
    font-weight: 600;

    padding: clamp(6px, 1vw, 10px) clamp(12px, 2vw, 20px);
    font-size: clamp(14px, 1vw, 16px);

    border-radius: 30px;
    transition: all .3s ease;
    white-space: nowrap;
}

/* Hover */
nav a:hover {
    background: linear-gradient(120deg, #2e7d32, #4caf50);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}



/* Klick Feedback */
nav a:active {
    transform: scale(.96);
}

/* BURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 28px;
    background: white;
    margin: 4px 0;
    transition: .3s;
}

.close-menu {
    display: none;
    color: white;
}



/* HERO */
.hero {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;

    filter: brightness(0.75) contrast(1.1);
}

.hero-slide.active {
    opacity: 1;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 10px;
}


/* EVENT BOX */
.event-box {
    position: relative;
    max-width: 1100px;
    margin: 40px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.event-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Overlay */
.event-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.event-overlay h2 {
    margin: 0;
    font-size: 32px;
}

.event-overlay p {
    margin-top: 10px;
    opacity: .9;
}



/* SECTIONS */
section {
    max-width: 1100px;
    overflow-wrap: break-word;
    word-break: break-word;
    margin: auto;
    padding: 70px 20px;
    opacity: 0;
    transform: none;
    transition: all .7s ease;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    transition: .3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
}

.img {
    height: 250px;
    background: #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.impressum {
    max-width: 800px;
    margin: auto;
    padding: 70px 20px;
}

#datenschutz {
    opacity: 1 !important;
    transform: none !important;
}

body:has(#datenschutz) .header {
    position: sticky;
    top: 0;
}


/* FOOTER */
footer {
    background: #1f5e34;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.premium-footer {
    background: #195c2f;
    color: white;
    padding: 60px 20px 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: auto;
}

.footer-col h3,
.footer-col h4 {
    margin-top: 0;
}

.footer-col p {
    opacity: .9;
}

.footer-col.social a {
    font-size: 24px;
    margin-right: 15px;
    color: white;
    transition: .3s;
    text-decoration: none;
}

.footer-col.social a:hover {
    color: #a5d6a7;
    transform: translateY(-3px);
}

.footer-col.social {
    text-align: center;
}

.footer-col.social a {
    margin: 0 10px;
}


.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    font-size: 14px;
    opacity: .8;
}

.footer-link {
    color: white;
    text-decoration: none;

}

.footer-link:hover {
    color: #a5d6a7;
}

/* MOBILE */
@media(max-width:900px) {

    .header {
        position: sticky;
        top: 0;
        z-index: 9999;
        background: #195c2f;
    }

    .menu-toggle {
        display: flex
    }

    .close-menu {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }



    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(180deg, #1f5e34, #2e7d32);
        padding-top: 100px;
        transition: right .35s ease;
        box-shadow: -10px 0 25px rgba(0, 0, 0, .3);
    }

    nav.show {
        right: 0;
    }

    nav a {
        display: block;
        margin: 12px 20px;
        padding: 14px;
        border-radius: 12px;
        text-align: center;
        background: rgba(255, 255, 255, .08);
        border: 1px solid rgba(255, 255, 255, .3);
        color: white;
        font-weight: 600;
        transition: .3s;
    }

    nav a:hover {
        background: rgba(255, 255, 255, .18);
        transform: translateY(-2px);
    }

    .hero h2 {
        font-size: 28px
    }

    .slide {
        height: 300px;
    }

    a,
    button {
        -webkit-tap-highlight-color: transparent;
    }

        .info-card {
        height: auto;          /* Höhe automatisch */
        min-height: 320px;     /* Mindesthöhe */
    }

    

}
.info-card .card-front,
    .info-card .card-back {
        position: relative;    /* kein Overlay mehr mobil */
        height: auto;
    }

    .info-card .card-back {
        display: none;
        opacity: 1;
        transform: none;
    }

    .info-card.active .card-front {
        display: none;
    }

    .info-card.active .card-back {
        display: block;
    }

/* CARD */

.wohnung-card {
    overflow: hidden;
    border-radius: 18px;
    margin-top: 60px;
}

.wohnung-card:first-of-type {
    margin-top: 60px;
}


/* Info Card */

.info-card {
    position: relative;
    height: 420px; /* gleiche Höhe immer */
    cursor: pointer;
    overflow: hidden;
}

.info-card .card-front,
.info-card .card-back {
    position: absolute;
    inset: 0;
    padding: 25px;
    background: white;
    border-radius: 16px;

    transition: opacity .35s ease, transform .35s ease;
}

.info-card .card-back {
    opacity: 0;
    pointer-events: none;
    transform: scale(.95);
}

.info-card.active .card-front {
    opacity: 0;
    pointer-events: none;
    transform: scale(.95);
}

.info-card.active .card-back {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.info-card .card-back {
    overflow-y: auto;
}


/* SLIDER IN CARD */

.wohnung-slider {
    position: relative;
    width: 100%;
    max-width: 700px;
    aspect-ratio: 16/9;
    margin: auto;
    overflow: hidden;
    border-radius: 12px;
}

/* Bilder übereinander */

.wohnung-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .4s ease;
}

/* aktives Bild sichtbar */

.wohnung-slider img.active {
    opacity: 1;
    z-index: 1;
}

/* TEXT IN CARD */

.wohnung-card h3,
.wohnung-card p {
    padding: 15px 20px;
    margin: 0;
}

/* BUTTONS */

.wohnung-slider button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,.6);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

.wohnung-slider:has(img:only-child) button {
    display:none;
}


/* LIGHTBOX SLIDER */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

#lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 35px;
    color: white;
    cursor: pointer;
}

#lb-prev,
#lb-next {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.2);
    border: none;
    color: white;
    font-size: 40px;
    padding: 10px 18px;
    cursor: pointer;
}

#lb-prev { left: 30px; }
#lb-next { right: 30px; }


.event-card {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0; /* wichtig sonst doppelter Abstand */
}

.event-card .event-box {
    margin: 0;
    border-radius: 16px;
}

.event-overlay h2 {
    font-size: 28px;
    letter-spacing: .5px;
}