/* =========================================
   1. GRUNDLEGENDE STYLES & VARIABLEN
   ========================================= */
:root {
    --primary-color: #748E63;
    --accent-color: #566b49;
    --text-color: #444;
    --bg-color: #faf9f6;
    --white: #ffffff;
    --occupied: #e74c3c;
    --free: #2ecc71;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Hilfsklasse: Verhindert Scrollen des Hintergrunds, wenn Menü offen ist */
body.no-scroll {
    overflow: hidden;
}

h1, h2, h3 { margin-bottom: 0.5em; }
ul { margin-bottom: 1em; padding-left: 1.2em; }
li { margin-bottom: 0.5em; }

/* =========================================
   2. HEADER & NAVIGATION (DESKTOP)
   ========================================= */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* Container für die Links */
.nav-links {
    display: flex;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

/* --- HAMBURGER BUTTON (Basis - auf PC unsichtbar) --- */
.hamburger {
    display: none;       /* Auf Desktop versteckt */
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 10001;      /* Über dem Menü */
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: 0.3s;
}

/* --- DROPDOWNS (DESKTOP) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 100%;
    width: max-content;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 2000;
    border-top: 3px solid var(--primary-color);
    border-radius: 0 0 4px 4px;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--text-color) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    margin-left: 0 !important;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: #f9f9f9; color: var(--primary-color) !important; }

/* Desktop: Hover zeigt Dropdown */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-content { display: block; }
}

.arrow-down {
    font-size: 0.7em;
    margin-left: 5px;
    vertical-align: middle;
}

/* =========================================
   3. HERO BEREICHE (Bilder)
   ========================================= */
.hero {
    background-color: #ddd;
    background-image: url('./Fotos/Burg - Blick 2.JPG'); /* Dein Bild */
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.hero h1 { font-size: 3rem; text-align: center; margin: 0; padding: 0 20px; }

/* Kleinerer Hero für Unterseiten */
.small-hero {
    height: 40vh;
    /* Dein Bild für Hausseite, andere Seiten nutzen Inline-Styles im HTML */
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)), url('./Fotos/Haus - Wohnzimmer 1.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.small-hero h1 { font-size: 2.5rem; margin: 0; }

/* =========================================
   4. LAYOUT & CONTENT
   ========================================= */
.container {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.intro-text {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
    font-weight: bold;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover { background-color: var(--accent-color); }
.btn.full-width { width: 100%; text-align: center; }

/* =========================================
   5. FEATURES GRID (Startseite)
   ========================================= */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-box {
    background: var(--white);
    padding: 0;
    border-radius: 4px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feature-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.feature-text { padding: 15px; }
.feature-box:hover { transform: translateY(-5px); }
.feature-box h3 { color: var(--primary-color); margin-top: 0; }

/* =========================================
   6. ROOM GRID & GALERIE (Haus Seite)
   ========================================= */
.room-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.room-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

@media(min-width: 768px) {
    .room-card { flex-direction: row; }
    /* Galerie links, Text rechts */
    .room-gallery { width: 45%; }
    .room-content { width: 55%; }
    /* Jedes zweite Element spiegeln */
    .room-card:nth-child(even) { flex-direction: row-reverse; }
}

.room-content { padding: 30px; }
.room-content h3 { color: var(--primary-color); margin-top: 0; }

/* Die Galerie in der Box */
.room-gallery {
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    min-height: 300px;
}

.gallery-main {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}
.gallery-main:hover { opacity: 0.9; }

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gallery-thumb {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
}
.gallery-thumb:hover { transform: scale(1.05); opacity: 1; }


/* =========================================
   7. UMGEBUNG / AKTIVITÄTEN KARTEN
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    position: relative;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}
.category-card:hover { transform: scale(1.02); }

.category-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
    z-index: 1;
}
.category-card:hover .category-bg { transform: scale(1.1); }

.category-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 2;
    transition: background 0.3s;
}
.category-card:hover .category-overlay { background: rgba(0,0,0,0.2); }

.category-content {
    position: relative;
    z-index: 3;
    color: white;
    text-align: center;
    padding: 20px;
}
.category-content h2 { color: white; margin: 0; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }

/* Sight Card (Unterseiten) */
.sight-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}
@media(min-width: 768px) {
    .sight-card { flex-direction: row; }
    .sight-img { width: 45%; min-height: 300px; background-size: cover; background-position: center; }
    .sight-content { width: 55%; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
    .sight-card:nth-child(even) { flex-direction: row-reverse; }
}
.sight-img { min-height: 250px; background-color: #ddd; background-size: cover; background-position: center; }
.sight-content { padding: 25px; }
.sight-content h3 { color: var(--primary-color); margin-top: 0; }


/* =========================================
   8. KALENDER, PREISE & FORMULAR
   ========================================= */
.calendar-section {
    margin-top: 80px;
    text-align: center;
    background-color: var(--white);
    padding: 50px 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.calendar-wrapper {
    margin: 0 auto;
    background: #fff;
    max-width: 1000px;
    overflow: hidden;
}

.calendar-wrapper iframe {
    max-height: 32em;
}

/* Preis Tabelle */
.table-wrapper { overflow-x: auto; }
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}
.price-table th, .price-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #eee; }
.price-table th { background-color: var(--primary-color); color: white; }

/* Kontakt Layout */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.contact-info { margin-bottom: 30px; }


/* =========================================
   9. FOOTER
   ========================================= */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}
footer a { color: #fff; text-decoration: underline; }
footer a:hover { color: #ccc; }


/* =========================================
   10. LIGHTBOX (Galerie Overlay)
   ========================================= */

/* Lightbox Modal */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 9999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 90%; /* Maximize width */
    max-width: 1200px; /* Limit max width */
}

/* Lightbox Image */
#lightbox-image {
    max-width: 100%;
    max-height: 80vh; /* Max height to allow space for caption */
    object-fit: contain; /* Maintain aspect ratio */
}

/* Lightbox Caption */
.lightbox-caption {
    text-align: center;
    color: #fff;
    padding: 10px;
    margin-top: 10px;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5); /* Optional background for better readability */
    width: 100%;
}

/* Close Button */
.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10000;
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


/* =========================================
   11. MOBILE NAVIGATION & ANPASSUNGEN
   (Bildschirme kleiner als 768px)
   ========================================= */
@media (max-width: 768px) {

    /* Navigationsleiste Layout */
    nav {
        padding: 10px 20px;
        position: relative;
        justify-content: space-between; /* Links Logo, Rechts Burger */
        align-items: center;
        flex-direction: row; /* WICHTIG: Nebeneinander! */
    }

    /* Hamburger sichtbar machen */
    .hamburger { display: flex; }

    /* Anpassungen Schriften & Iframes */
    .hero h1 { font-size: 2rem; }
    .calendar-wrapper iframe { max-height: 80em; height: 80em }

    /* Das Menü (versteckt) */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
        border-top: 1px solid #eee;
        z-index: 9999;
        margin-top: 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Menü aktiv (JS Klasse) */
    .nav-links.active { display: flex; }

    /* Links im mobilen Menü */
    .nav-links a {
        padding: 15px 20px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f5f5f5;
        display: block;
        box-sizing: border-box;
        margin-left: 0;
    }

    /* Dropdown Reset */
    .dropdown, .dropbtn { width: 100%; display: block; }

    .dropbtn {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Pfeil Button (große Klickfläche) */
    .arrow-down {
        padding: 10px 20px;
        font-size: 1.2rem;
        cursor: pointer;
        color: var(--primary-color);
        background: #f9f9f9;
        border-left: 1px solid #eee;
        margin-left: 0;
        display: block; /* Sicherstellen dass er Platz einnimmt */
    }

    /* Sub-Menü (Versteckt) */
    .dropdown-content {
        display: none;
        position: relative;
        width: 100%;
        background-color: #f4f4f4;
        box-shadow: none;
        padding-left: 0;
        top: 0;
        border: none;
    }

    .dropdown-content a {
        padding-left: 40px;
        font-size: 0.95rem;
        color: #555 !important;
    }

    /* Öffnen per JS (.show Klasse) */
    .dropdown-content.show { display: block; }

    /* Hover deaktivieren */
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown .dropdown-content.show { display: block; }
}

/* --- SUB-NAVIGATION (Preise Seite) --- */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.page-nav-link {
    display: inline-block;
    padding: 10px 25px;
    background-color: #e6e6e6; /* Helles Grau */
    color: var(--text-color);
    text-decoration: none;
    border-radius: 50px; /* Pillen-Form */
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.page-nav-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* --- BUCHUNGSFORMULAR DESIGN --- */
.booking-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08); /* Weicher Schatten */
    border-top: 6px solid var(--primary-color); /* Grüner Akzent oben */
    max-width: 800px;
    margin: 0 auto;
}

.booking-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Mobile Anpassung */
@media (max-width: 600px) {
    .booking-card { padding: 20px; }
    .page-nav { gap: 10px; }
    .page-nav-link { font-size: 0.85rem; padding: 8px 15px; }
}