:root {
    --green: #6D7D33;
    --brown: #493628;
    --bg: #FAF8F4;
    --accent: #C7D5A1;
    --beige: #F4D8B4;
    --gray: #afafaf;
    --darkgray: #777777;
    --soft: rgba(73, 54, 40, 0.08);
    --max-width: 1100px;
    --radius: 14px;
    --gap: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--brown);
    -webkit-tap-highlight-color: transparent;

}

.visually-hidden {
  position: absolute;
  left: -9999px;
}



header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--hero-bg);
    transition: background 0.3s ease, padding 0.3s ease;
    will-change: padding, background;
    user-select: none;
}

/* Header beim Scrollen */
header.scrolled {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 10%;
}

/* BRAND */


.header-logo {
    aspect-ratio: 1 / 1;
    width: auto;
    height: 56px;
    transition: height 0.3s ease;
}

header.scrolled .header-logo {
    height: 44px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 24px;
    cursor: pointer;
}

/* TEXT NEBEN LOGO */
.brand-text {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

header.scrolled .brand-text {
    opacity: 1;
    transform: translateX(0);
}

/* SITENAME */
.sitename {
    font-size: 18px;
    font-weight: 800;
    color: var(--green);
}

.subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--darkgray);
}

/* NAVIGATION LINKS */
.nav-links {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
    text-decoration: none;
}

.nav-links a {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--brown);
    transition: background 0.2s ease;
}

.nav-links a:hover {
    background: var(--soft);
}

.nav-links a.active {
    color: var(--green);
    font-weight: 600;
}

/* DROPDOWN */
.has-dropdown .dropdown {
    display: none;
    position: absolute;
    list-style: none;
    top: 150%;
    left: 0;
    padding: 8px;
    max-width: 200px;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 50;
}


.dropdown li {
    margin: 0;
    width: 100%;
}


.dropdown a {
    display: block;
    text-decoration: none;
    padding: 8px 12px;
    line-height: 1.4;
    white-space: normal;
    border-radius: 8px;
    font-weight: 600;
    color: var(--brown);
}

.has-dropdown:hover .dropdown {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.arrow {
    margin-left: 4px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .arrow {
    transform: rotate(180deg);
}

/* HAMBURGER BUTTON */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--brown);
}


/* PARALLAX HERO */
.hero {
    padding: 3rem 10%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    color: black;
    user-select: none;
    overflow: hidden;
}

.hero-top {
    display: flex;
    align-items: center;
    gap: 24px;
    max-height: 100vh;
}

/* Inhaltspalte */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1;
    min-width: 0;
}


.logo-wrapper {
    position: relative;
    display: inline-block;
    width: clamp(100px, 45vw, 180px);
    min-width: 90px;
    /* responsive */
    height: auto;
    /* video keeps its aspect, we use object-fit */
    cursor: pointer;
}

/* Logo innerhalb Hero */
.hero-logo {
    aspect-ratio: 1 / 1;
    /* quadratisch */
    width: 100%;
    height: auto;
    transition: opacity .22s ease;
    display: block;
}

.hero-video {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* füllt, vermeidet letterbox */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2;
    transition: opacity .18s ease, visibility .18s ease;
    background: transparent;
    /* falls container sichtbar wird */
}

.hero-video.visible {
    opacity: 1;
    visibility: visible;
}

/* Typographie: responsive */
.hero-title {
    font-size: clamp(1.6rem, 20vw, 2.8rem);
    margin: 0;
    font-weight: 800;
    line-height: 1.02;
}

.hero-sub {
    margin: 6px 0 0 0;
    font-size: clamp(1rem, 2.8vw, 1.4rem);
    color: var(--brown);
    font-weight: 600;
}

.hero-lead {
    margin-top: 10px;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    color: #5f4f44;
    line-height: 1.6;
    max-width: 56ch;
}

/* Hero-Bild: skalierbar und verhält sich vernünftig */
.hero-img {
    aspect-ratio: 3/2;
    flex: 0 0 48%;
    /* nimmt ca. 48% der Breite, schrumpft aber bei Bedarf */
    width: auto;
    max-width: 520px;
    max-height: 900px;
    height: 75vh;
    /* nie höher als Viewport minus Header (anpassen falls Headerhöhe anders) */
    object-fit: cover;
    /* füllt das Bildfeld ohne Verzerrung */
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 1;
    display: block;
    min-width: 0;
}

/* Buttons: kleiner auf sehr schmalen Displays */
.btn-group {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;

}

.btn-available {
    text-decoration: none;
    color: var(--gray);
    
}

.btn-available:hover{
    color: var(--green);
}

.btn-group button {
    padding: 12px 18px;
    background: #6d7d33;
    color: white;
    border-radius: 10px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;

}

.btn-group p {
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    font-weight: 800;
    
}


@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SECTION BASE STYLE */
section {
    padding: 80px 10%;
}

/* ABOUT SECTION */
.about {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    justify-content: center;
    background: white;
    height: 100%;
    animation: fadeUp 1s ease-out;
}

.about h3 {
    font-size: clamp(1rem, 1.6vw, 1.05rem);
    padding: 0;
}

.about p {
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.6;
}

.about ul {
    list-style: none;
    padding: 0;
}



.about-text {
    flex: 1 1 500px;
    /* Text nimmt mindestens 500px */
}

.about-img-container {
    min-width: 300px;
    display: grid;
    height: 100%;
    grid-template-areas:
        "main main"
        "small1 small2";
    grid-auto-rows: auto;
    gap: 20px;
}

.about-img-container img:nth-child(1) {
    grid-area: main;
    height: 300px;
}

.about-img-container img:nth-child(2),
.about-img-container img:nth-child(3) {
    height: 200px;
}



/* --- BILDER-LAYOUT --- */
.about-img {
    width: 100%;
    height: 240px;
    /* alle Bilder gleich hoch */
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: 0.2s;
}

.about-img:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}


/* ICON GRID */
.icons {
    background: #f2f4e6;
    user-select: none;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.icon-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: 0.2s;
}

.icon-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* TIMELINE */
.einrichtung {
    border-radius: 0;
}


.einrichtung-container {
    max-width: var(--max-width);
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: var(--gap);
    align-items: stretch;
    /* verhindert ungewolltes Dehnen */
}

.left-wrapper,
.right-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    flex: 1 1 400px;
}

.card {
    scroll-margin-top: 120px;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    animation: fadeUp 0.6s ease-out;
}

.einrichtung a {
    display: inline-block;
    text-decoration: none;
    color: white;
    background-color: var(--green);
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-top: 10px;
    font-weight: 600;
}


.card p {
    color: var(--brown);
    line-height: 1.7;
    margin-bottom: 12px;
}


/* Tagesplan */
.tagesplan {
    display: grid;
    gap: 12px;
}

.tagesplan div {
    background: var(--soft);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
}

/* SLIDER */
.slider-wrapper {
    scroll-margin-top: 120px;
    position: relative;
    margin-top: 50px;
}

.image-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    min-width: 0;
    /* Safari Fix */
}

.slide {
    flex: 0 0 auto;
    height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
}

.slide img {
    height: 100%;
    width: auto;
    /* wichtig! */
    object-fit: cover;
    /* verhindert iOS-Stretching */
    display: block;
}


/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s;
    z-index: 5;
}

.slider-btn:hover {
    transform: translateY(-50%) scale(1.08);
}

.slider-btn.left {
    left: -45px;
}

.slider-btn.right {
    right: -45px;
}

#fullscreenOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#fullscreenOverlay img {
    max-width: 90%;
    max-height: 90%;
}

#fullscreenOverlay .close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

#fullscreenOverlay .nav-btn {
    position: absolute;
    top: 50%;
    font-size: 40px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transform: translateY(-50%);
}

#fullscreenOverlay .nav-btn.left {
    left: 20px;
}

#fullscreenOverlay .nav-btn.right {
    right: 20px;
}


/* Section */
.reviews-section {
    background-color: white;
}


/* Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* Cards */
.review-card {
    justify-content: center;
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.review-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.review-card p {
    height: 100%;
    opacity: 0.8;
}

.review-date {
    display: block;
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 6px;
}

/* Popup Datum */
.popup-date {
    display: block;
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Popup */
.review-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    /* <-- komplett unsichtbar und nicht klickbar */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.review-popup.active {
    opacity: 1;
    pointer-events: auto;
    /* <-- Overlay reagiert jetzt nur bei active */
}

.review-popup.show {
    opacity: 1;
    display: flex;
    pointer-events: auto;
}

.review-popup:not(.show) {
    pointer-events: none;
}

/* WICHTIG: Popup-Box soll *nicht* schließen, wenn man in sie klickt */
.popup-inner {
    pointer-events: auto;
}

.popup-inner p {
    padding-right: 10px;
}

.review-popup.show {
    backdrop-filter: blur(2px);
}

.popup-inner {
    background: white;
    width: 90%;
    /* WICHTIG → kontrolliert Größe */
    max-height: 80vh;
    overflow: hidden;
    max-width: 900px;
    padding: 30px;
    margin: 0 20px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: popIn 0.25s ease;
}

.popup-text-wrapper {
    display: block;
    max-height: 60vh;
    overflow-y: auto;
}

/* X Button */
.close-popup {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
}

.close-popup:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.contact {
    background: #eff1e3;
    animation: fadeUp 1s ease-out;
}


.contact-wrapper {
    max-width: var(--max-width);
    margin: auto;
}

.contact-card {
    background: white;
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}


.contact-card p {
    font-size: 1rem;
}

.contact-card a {
    text-decoration: none;
    color: var(--brown);
    font-weight: 600;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item span {
    font-size: 1rem;
}

.free-spots h4 {
    margin: 0 0 4px;
}

.contact-btn {
    margin-top: 10px;
    background: var(--green);
    color: white;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.contact-btn:hover {
    background: #5c6a2e;
}

/* Map */
.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.footer {
    background: white;
    padding: 40px 10%;
    color: var(--brown);
    font-family: 'Montserrat', sans-serif;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-corp {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer img {
    height: 100px;
    width: auto;
    margin-left: 10px
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.footer-links {
    margin-top: 40px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer h4 {
    color: var(--green);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.footer p {
    margin: 4px 0;
    color: var(--darkgray);
}

.footer a {
    color: var(--brown);
    text-decoration: none;
    transition: color .2s;
}

.footer-col a:hover {
    color: var(--green);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--darkgray);
    font-size: 0.9rem;
}

.footer-bottom .dev {
    margin-top: 5px;
    color: var(--brown);
}


/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    z-index: 500;
}

/* Popup Box */
.popup {
    background: white;
    padding: 30px;
    width: min(90%, 420px);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: popupShow .25s ease;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--darkgray);
}

.popup h2 {
    color: var(--green);
    margin-bottom: 15px;
}

.input-group {
    width: 100%;
    margin-bottom: 15px;
}

.input-group label {
    font-weight: 600;
    color: var(--brown);
    display: block;
    margin-bottom: 4px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-family: inherit;
}

.popup-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--green);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.popup-btn:hover {
    background: #5e6d2a;
}

.status-message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

/* Farben */
.status-success {
    background: #e4f6df;
    color: #3f6b2f;
    border-left: 5px solid #6D7D33;
}

.status-error {
    background: #ffe0e0;
    color: #7a1f1f;
    border-left: 5px solid #c0392b;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}





@media (max-width: 1250px) and (min-width: 501px) {
    .about-img-container {
        grid-template-areas:
            "main small1 small2";
        grid-auto-rows: auto;
    }

    .about-img-container img {
        height: 250px;
    }

    .about-img-container img:nth-child(1) {
        height: 200px;
    }
}

@media (min-width: 900px) {
    .image-slider {
        overflow: hidden;
        /* Scrollbar weg */
        scrollbar-width: none;
        /* Firefox */
    }

    .image-slider::-webkit-scrollbar {
        display: none;
        /* Chrome, Edge, Safari */
    }
}

@media (max-width: 1200px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        display: none;
        padding: 10px 0;
        background: var(--header-bg);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    .nav-links a {
        display: block;
        width: 100%;
    }

    .nav-links.show {
        margin-top: 5px;
        display: flex;
        background-color: white;
        border-radius: 8px;
    }

    /* Dropdown auf Mobile */
    .has-dropdown .dropdown {
        position: static;
        transform: none;
        opacity: 1;
        display: none;
    }

    .has-dropdown.active .dropdown {
        display: flex;
    }

    .nav-links a:hover {
        background: none;
    }

    .has-dropdown:hover .dropdown {
        display: none;
        opacity: 1;
        transform: translateY(0);
    }

    .has-dropdown:hover .arrow {
        transform: rotate(0deg);
    }

    .has-dropdown:tap .dropdown {
        display: none;
        opacity: 1;
        transform: translateY(0);
    }

    .has-dropdown:hover .arrow {
        transform: rotate(0deg);
    }

    .has-dropdown.active .dropdown {
        display: flex;
        box-shadow: none;
        padding-left: 15px;
    }

    .has-dropdown.active .arrow {
        transform: rotate(180deg);
    }

    /* Hero auf Mobile */
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2.5rem 5%;
        min-height: auto;
    }

    .hero-top {
        flex-direction: column;
    }

    .hero-content {
        align-items: center;
    }

    .hero-img {
        display: none;
        aspect-ratio: 3 / 2;
    }

    .hero-lead {
        max-width: 70ch;
    }
}

@media (max-width: 900px) {
    header {
        flex-wrap: wrap;
    }



    

    .about-img {
        height: 200px;
    }

    .icon-card:hover {
        transform: translateY(0);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    }

    .einrichtung-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .card--raeume,
    .card--spiel,
    .card--tages {
        grid-column: 1;
        grid-row: auto;
    }

    .review-card:hover {
        transform: translateY(0);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .slider-btn {
        display: none;
        /* auf Mobil: Buttons ausblenden, Swipe reicht */
    }

}

/* Kleinste Geräte: Brand-Text ausblenden */
@media (max-width: 600px) {
    .brand-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.2rem, 6.2vw, 1.8rem);
    }

    .hero-sub {
        font-size: 1rem;
    }

    .btn-group p {
        display: none;
    }

    footer,
    section {
        padding: 80px 5%;
    }

    header.scrolled {
        padding: 8px 5%;
    }
}