/* Grundlegende Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-image: url('back.jpeg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Banner Styles */
.banner {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hauptcontainer */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar/Desktop-Menü */
.sidebar {
    width: 250px;
    background-color: rgba(51, 51, 51, 0.9);
    height: 100%;
    padding: 20px 0;
    backdrop-filter: blur(5px);
    display: flex;           /* Neu */
    flex-direction: column;  /* Neu */
}

/* Impressum Link Style */
.impressum-link {
    padding: 15px 20px;      /* Geändert */
    font-size: 0.8em;
    color: #888;
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Neu */
    text-align: left;        /* Neu */
    flex-shrink: 0;         /* Neu */
}

.impressum-link:hover {
    color: #4CAF50;
}

/* Tree Menu Styles */
.tree-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #e0e0e0;
    overflow-y: auto;        /* Neu */
    flex: 1;                 /* Neu */
}

.tree-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
    letter-spacing: 0.5px;
    border-left: 4px solid transparent;
}

.tree-menu > li {
    font-size: 1.1em;
    font-weight: 400;
    text-transform: uppercase;
}

.tree-menu li:hover {
    background-color: rgba(81, 81, 81, 0.9);
    border-left: 4px solid #4CAF50;
    color: #4CAF50;
}

.tree-menu li.active {
    background-color: rgba(85, 85, 85, 0.9);
    border-left: 4px solid #4CAF50;
}

/* Content Bereich */
.content {
    flex: 1;
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.95);
    margin: 20px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

/* Submenü Styles */
.submenu {
    list-style: none;
    padding-left: 20px;
    display: block;
    font-size: 0.9em;
}

.submenu li {
    padding: 8px 20px;
    color: #bcbcbc;
}

.submenu li:hover {
    color: #4CAF50;
}

.submenu a {
    color: #bcbcbc;
    text-decoration: none;
    display: block;
    width: 100%;
}

.submenu a:hover {
    color: #4CAF50;
}

/* Menü-Item Styles */
.menu-item {
    position: relative;
}

.menu-item::after {
    content: '›';
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
    transform: rotate(90deg);
}

.menu-item:not(.expanded)::after {
    transform: rotate(0deg);
}

/* Subpage Styles */
.subpage-content {
    background-color: rgba(240, 240, 240, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subpage-title {
    color: #333;
    font-size: 2em;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4CAF50;
}

/* Impressum Styles */
.impressum-content {
    max-width: 800px;
    margin: 0 auto;
}

.impressum-section {
    margin-bottom: 30px;
}

.impressum-section h2 {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.impressum-section p {
    margin: 10px 0;
    line-height: 1.6;
}
/* Mobile Menü Styles */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(76, 175, 80, 0.9);
    border-radius: 50%;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    margin: 6px auto;
    transition: 0.3s;
}

/* Mobile Menü Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mobile Menü Content */
.mobile-menu-content {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Mobile Footer entfernen falls vorhanden */
.mobile-footer {
    display: none;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #4CAF50;
    color: white;
    flex-shrink: 0;
}

.mobile-menu-title {
    font-size: 1.2em;
    font-weight: 500;
}

.mobile-menu-close {
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 10px;
}

/* Mobile Navigation */
.mobile-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0 0 0; /* Padding oben, kein Padding unten */
    -webkit-overflow-scrolling: touch;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid #eee;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 1em;
}

.mobile-nav .submenu {
    background: #f5f5f5;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.mobile-nav .submenu a {
    padding-left: 40px;
    font-size: 0.95em;
}

.mobile-nav .has-submenu {
    position: relative;
}

.mobile-nav .has-submenu::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.2em;
}

.mobile-nav .has-submenu.active::after {
    content: '-';
}

/* Mobile Footer */
.mobile-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    flex-shrink: 0;
}

/* Mobile Impressum Link */
.mobile-impressum-link {
    display: block;
    padding: 10px 20px;
    color: #888;
    text-decoration: none;
    font-size: 0.75em;
    text-align: left;
    background: #f5f5f5;
    border-top: 1px solid #eee;
    margin-top: auto; /* Drückt den Link nach unten */
}


.mobile-impressum-link:hover {
    color: #4CAF50;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar,
.mobile-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track,
.mobile-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
.mobile-nav::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.5);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover,
.mobile-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.7);
}

/* Media Queries */
@media screen and (max-width: 768px) {
    body {
        overflow: auto;
    }

    body.menu-active {
        overflow: hidden;
    }

    .banner {
        height: 120px;
    }

    .sidebar {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .content {
        margin: 60px 10px 10px 10px;
        width: auto;
    }

    .menu-active .mobile-menu-overlay {
        display: block;
        opacity: 1;
    }

    .menu-active .mobile-menu-content {
        right: 0;
    }

    .menu-active .mobile-menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-active .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-active .mobile-menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .subpage-title {
        font-size: 1.5em;
    }
}

/* Kleine Mobilgeräte */
@media screen and (max-width: 480px) {
    .banner {
        height: 100px;
    }

    .content {
        margin: 5px;
        padding: 10px;
    }

    .subpage-title {
        font-size: 1.3em;
    }

    .mobile-menu-content {
        width: 100%;
        right: -100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mobile-menu-content {
        background: #333;
    }

    .mobile-nav a {
        color: #fff;
    }

    .mobile-nav .submenu {
        background: #444;
    }

    .mobile-nav li {
        border-bottom: 1px solid #444;
    }

    .mobile-footer {
        background: #2a2a2a;
        border-top-color: #444;
    }

     .mobile-impressum-link {
        background: #2a2a2a;
        border-top-color: #444;
        color: #888;
    }

    .subpage-content {
        background-color: rgba(45, 45, 45, 0.95);
        color: #e0e0e0;
    }

    .subpage-title {
        color: #fff;
    }
}

/* Print Styles */
@media print {
    .banner, .sidebar, .mobile-menu-toggle, .mobile-menu-overlay {
        display: none;
    }

    .content {
        margin: 0;
        padding: 20px;
        width: 100%;
        background: none;
    }

    .subpage-content {
        box-shadow: none;
    }
}
/* Kleine Bildschirme */
@media screen and (max-height: 600px) {
    .mobile-impressum-link {
        padding: 8px 20px;
        font-size: 0.7em;
    }
}
