:root { --primary-color: #2c3e50; --accent-color: #c0392b; --bg-light: #f4f4f4; --white: #ffffff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Lato', sans-serif; background-color: var(--bg-light); color: #333; }
h1, h2, h3 { font-family: 'Playfair Display', serif; }
button { cursor: pointer; font-family: 'Lato', sans-serif; }

#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }
.toast { background: var(--primary-color); color: #fff; padding: 15px 25px; margin-top: 10px; border-radius: 5px; box-shadow: 0 4px 6px rgba(0,0,0,0.2); opacity: 0; transform: translateY(20px); transition: all 0.4s; display: flex; align-items: center; gap:10px; }
.toast.show { opacity: 1; transform: translateY(0); }

header { width: 90%; max-width: 1400px; margin: 20px auto 0 auto; background-color: var(--white); box-shadow: 0 4px 15px rgba(0,0,0,0.1); position: sticky; top: 20px; z-index: 100; padding: 0 30px; border-radius: 20px; height: 70px; display: flex; align-items: center; }
nav { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }
.logo img{ height: 35px; width: auto;}
.nav-center { display: flex; gap: 40px; position: relative; }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-color); text-decoration: none; transition: var(--transition-speed); cursor: pointer; position: relative; padding: 5px 0; }
.nav-item i { font-size: 1.2rem; transition: transform 0.3s ease; }
.nav-item span { font-size: 0.8rem; opacity: 0; transform: translateY(5px); transition: all 0.3s; position: absolute; bottom: -20px; white-space: nowrap; background: white; padding: 2px 8px; border-radius: 4px; z-index: 200; box-shadow: 0 2px 5px rgba(0,0,0,0.1); pointer-events: none; }
.nav-item:hover i { transform: translateY(-3px); }
.nav-item:hover span { opacity: 1; transform: translateY(0); bottom: -25px; }
.nav-right .btn-login { padding: 8px 20px; background: var(--primary-color); color: #fff; border: none; border-radius: 20px; text-decoration: none; }
.nav-right .btn-login:hover { background: var(--accent-color); }
.logout-btn { background: var(--accent-color); color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; }
#nav-logout-btn { display: none; }

#page-index { height: 100vh; width: 100%; background: url('00_ASSETS/IMGs/Chalet-01.jpg') no-repeat center center/cover; display: flex; justify-content: center; align-items: center; color: white; text-align: center; position: relative; }
#page-index::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.index-content { position: relative; z-index: 2; background: rgba(255,255,255,0.15); padding: 40px; border-radius: 10px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.18); }
.index-content h1 { font-size: 3rem; margin-bottom: 20px; }
.password-field { display: flex; gap: 10px; justify-content: center; }
.password-field input, .login-box input { padding: 10px; border-radius: 5px; border: none; width: 100%; }
.password-field button, .login-box button { padding: 10px 20px; background: white; border: none; border-radius: 5px; font-weight: bold; }
.login-box { max-width: 400px; margin: 30px auto; background: rgba(255,255,255,0.1); padding: 30px; border-radius: 10px; display: flex; flex-direction: column; gap: 15px; }
.login-box button:hover, .password-field button:hover { background: var(--accent-color); color: white; }

#hero { height: 100vh; background: url('https://picsum.photos/seed/chaletinterior/1920/1080') no-repeat center center/cover; display: flex; justify-content: center; align-items: center; text-align: center; color: white; position: relative; margin-top: -70px; }
#hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.3); }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 4rem; margin-bottom: 20px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.btn-scroll { margin-top: 30px; padding: 15px 30px; background: transparent; border: 2px solid white; color: white; border-radius: 30px; font-size: 1.1rem; transition: 0.3s; }
.btn-scroll:hover { background: white; color: var(--primary-color); }

.content-section { padding: 80px 5%; display: flex; align-items: center; gap: 50px; min-height: 600px; max-width: 1400px; margin: 0 auto; }
.content-section.reverse { flex-direction: row-reverse; }
.text-block h2 { font-size: 2.5rem; margin-bottom: 20px; color: var(--primary-color); }
.image-block { flex: 1; position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.1); height: 400px; }
.carousel-slide { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.carousel-slide.active { opacity: 1; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.7); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 10; font-size: 1.2rem; color: var(--primary-color); }
.carousel-btn:hover { background: white; }

.admin-box { background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 20px; border-left: 5px solid var(--accent-color); }
.admin-box h3 { margin-bottom: 10px; color: var(--primary-color); }

#page-reservations { padding-top: 20px; min-height: 100vh; padding-bottom: 50px; }
.calendar-container { width: 90%; max-width: 1000px; margin: 20px auto; background: var(--white); padding: 20px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid var(--bg-light); padding-bottom:10px; }
.month-nav-btn { background: none; border: 2px solid var(--primary-color); color: var(--primary-color); width: 35px; height: 35px; border-radius: 50%; font-weight: bold; cursor: pointer; }
.month-nav-btn:hover { background: var(--primary-color); color: white; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.day-name { font-weight: bold; color: #888; margin-bottom: 10px; font-size: 0.9rem; }
.day-cell { height: 120px; border: 1px solid #eee; border-radius: 5px; position: relative; background: #fff; display: flex; flex-direction: column; align-items: center; padding-top: 5px; transition: background 0.2s; }
.day-cell.today { border: 2px solid var(--accent-color); }
.day-cell.blocked-day { background-color: rgba(255, 0, 0, 0.1); border-color: rgba(255, 0, 0, 0.5); opacity: 0.6; pointer-events: none; }
.day-number { font-size: 0.9rem; font-weight: bold; margin-bottom: 5px; }
.markers-container { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 0 4px; overflow-y: auto; height: 100%; }
.reservation-marker { font-size: 0.65rem; color: white; border-radius: 3px; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; cursor: default; }
body.is-admin .reservation-marker { cursor: pointer; }
body.is-admin .reservation-marker:hover { transform: scale(1.05); opacity: 0.9; }

.reservation-form-container { width: 90%; max-width: 600px; margin: 40px auto; background: var(--white); padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; }
.btn-submit { width: 100%; padding: 12px; background: var(--primary-color); color: white; border: none; border-radius: 5px; font-size: 1rem; font-weight: bold; transition: 0.3s; }
.btn-submit:hover { background-color: #34495e; }

footer { background-color: var(--primary-color); color: white; text-align: center; padding: 20px; margin-top: 40px; }
#home-login-section { background-color: var(--primary-color); color: white; padding: 80px 5%; text-align: center; }

@media (max-width: 768px) {
    .content-section, .content-section.reverse { flex-direction: column; }
    .image-block { width: 100%; height: 300px; }
    .nav-center { display: none; }
}

/* Toast Farben */
.toast.success { background-color: #27ae60; border-left: 5px solid #2ecc71; }
.toast.error { background-color: #c0392b; border-left: 5px solid #e74c3c; }
.toast.info { background-color: var(--primary-color); }

.nav-right { 
    display: flex; 
    align-items: center; 
    gap: 10px; /* Abstand zwischen Elementen */
}

#user-display { 
    font-weight: bold; 
    color: var(--primary-color); 
    margin-right: 5px; 
}

/* --- 1. BURGER MENÜ (MOBILE) --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    margin-left: 15px;
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    
    /* Navigation Links ausblenden, bis aktiv */
    .nav-center {
        display: none;
        position: absolute;
        top: 70px; /* Unter dem Header */
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 200;
        gap: 0;
    }
    
    /* Wenn aktiviert (JS toggle) */
    .nav-center.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        padding: 15px 20px;
        text-align: center;
        border-bottom: 1px solid #eee;
        flex-direction: row; /* Icon und Text nebeneinander auf Mobile */
        justify-content: center;
        gap: 10px;
    }
    
    .nav-item span { 
        opacity: 1; 
        position: static; 
        transform: none; 
        font-size: 1rem; 
        color: #333;
    }
    
    .nav-item:hover span { transform: none; bottom: auto; }

    .nav-item:hover i { transform: none; }

    /* Rechten Bereich anpassen */
    .nav-right {
        margin-left: auto;
    }
}

/* --- 2. KALENDER RESPONSIVE --- */
@media (max-width: 600px) {
    .calendar-grid {
        gap: 2px;
    }
    .day-name {
        font-size: 0.7rem;
        padding: 5px 0;
    }
    .day-cell {
        height: 70px; /* Zellen kleiner */
        padding: 2px;
    }
    .day-number {
        font-size: 0.7rem;
    }
    .reservation-marker {
        font-size: 0.5rem;
        padding: 1px 2px;
    }
    .calendar-header h2 {
        font-size: 1.2rem;
    }
    .month-nav-btn {
        width: 30px;
        height: 30px;
    }
}

/* --- 3. ADMIN FORM FLEX (UNTEREINANDER) --- */
.admin-box .form-group {
    width: 100%; /* Sicherstellen, dass Felder volle Breite haben */
}
.admin-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- 4. PROFIL SEITE STYLES --- */
.profile-container {
    width: 90%;
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.profile-view p {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
}
.profile-view strong {
    display: inline-block;
    width: 120px;
    color: var(--primary-color);
}
.edit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    display: block;
    width: 100%;
}

/* --- BURGER LOGIN IN MOBILE MENU --- */
/* Login Link, der nur im Mobile Menu sichtbar ist */
#mobile-login-link {
    display: none;
}
@media (max-width: 768px) {
    #mobile-login-link {
        display: flex;
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        text-decoration: none;
        color: #333;
        justify-content: center;
    }
    /* Standarden Nav-Right Login Button ausblenden auf Mobile, da wir ihn im Menü haben */
    .nav-right .btn-login {
        display: none;
    }
}

/* --- MOBILE CALENDER (650px) --- */
@media (max-width: 650px) {
    .calendar-header {
        flex-direction: column;
        gap: 5px;
    }
    .calendar-header h2 {
        font-size: 1rem;
        line-height: 1.2;
    }
    .calendar-grid {
        gap: 1px;
    }
    .day-cell {
        height: 60px; /* Noch kleiner */
        font-size: 0.8rem;
    }
    .day-name {
        font-size: 0.6rem;
    }
    .reservation-marker {
        font-size: 0.5rem;
        padding: 0;
    }
}

/* --- PROFIL FARBE VORSCHAU --- */
.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 10px;
}

/* --- KALENDER ANSICHT SWITCHER --- */
.view-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.view-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.view-btn:hover {
    background: rgba(44, 62, 80, 0.1);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Optimierung für Wochenansicht (Zellen etwas höher auf Mobile) */
@media (max-width: 650px) {
    .day-cell {
        height: 90px; /* Wochenansicht braucht mehr Platz pro Tag */
    }
}

/* --- WOCHENANSICHT: VERTIKAL LISTE --- */

/* 1. Container zur Liste umbauen */
.calendar-grid.view-week {
    display: flex;
    flex-direction: column; /* Untereinander */
    gap: 15px; /* Abstand zwischen den Tagen */
    padding: 10px 0;
}

/* 2. Zellen in der Wochenansicht */
.calendar-grid.view-week .day-cell {
    display: flex; /* Flexbox für nebeneinander (Tag | Inhalt) */
    flex-direction: row; /* Nebeneinander */
    height: auto; /* Höhe passt sich Inhalt an, nicht fix */
    min-height: 80px;
    align-items: flex-start; /* Oben bündig */
    padding: 10px;
}

/* 3. Linke Seite: Tag & Datum */
.week-header {
    width: 60px; /* Feste Breite für den Kopfbereich */
    min-width: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    border-right: 2px solid #eee; /* Trennlinie */
    margin-right: 15px;
}

.week-dayname {
    font-size: 1.1rem;
    text-transform: uppercase;
}

.week-date {
    font-size: 1.2rem;
    margin-top: 5px;
}

/* 4. Rechte Seite: Marker / Inhalt */
.calendar-grid.view-week .markers-container {
    display: flex;
    flex-direction: column; /* Marker in der Woche untereinander, falls mehrere */
    gap: 5px;
    width: 100%;
}

/* Der Standard "Tag-Nummer" oben in der Ecke ist in der Wochenansicht überflüssig, also verstecken wir ihn */
.calendar-grid.view-week .day-number {
    display: none;
}

/* Responsive Anpassung für sehr kleine Handys */
@media (max-width: 400px) {
    .week-header {
        width: 50px;
        min-width: 50px;
    }
}

/* --- HERO CAROUSEL --- */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 85vh; /* Volle Bildschirmhöhe minus Header */
    overflow: hidden;
    margin-top: -70px; /* Zieht den Slider hinter den Header (wie vorher) */
    z-index: -1; /* Damit Header drüber liegt */
}

.carousel-track {
    display: flex;
    transition: transform 0.8s ease-in-out; /* Sanfter Übergang */
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild füllt den Bereich aus, ohne zu verzernen */
    display: block;
}

/* Text Overlay (Titel) - Bleibt stehen, während Bilder wechseln */
.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* DOTS NAVIGATION */
.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background-color: white;
    transform: scale(1.1);
}

.dot.active {
    background-color: white;
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Buttons im Overlay */
.btn-scroll {
    margin-top: 30px;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid white;
    color: white;
    border-radius: 30px;
    font-size: 1.1rem;
    transition: 0.3s;
    cursor: pointer;
}
.btn-scroll:hover { background: white; color: var(--primary-color); }

/* Mobile Anpassung */
@media (max-width: 768px) {
    .hero-carousel { height: 70vh; }
    .hero-overlay h1 { font-size: 2rem; }
}