/* ==========================================================================
   3. LAYOUT (Master Header & Sidebar)
   ========================================================================== */

/* --- MASTER HEADER (100% Breite) --- */
.master-header {
    width: 100%;
    background-color: #ffffff; 
    border-bottom: 1px solid #e2e8f0; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); 
    position: sticky; 
    top: 0;
    z-index: 1000;
    box-sizing: border-box; /* Verhindert horizontalen Scrollbalken */
}

.master-header-inner {
    max-width: 1400px; /* Gleiche Breite wie dein Dashboard-Wrapper */
    margin: 0 auto; 
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px; /* Sorgt für perfekten Abstand zwischen Burger-Menu, Logo und Profilbild */
}

.navbar-right {
    display: flex;
    align-items: center;
}

.burger-btn {
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.burger-btn:hover {
    color: #007bff;
}

.brand-logo {
    font-size: 1.4em;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.brand-logo span {
    color: #007bff;
}

.header-image {
    height: 35px; 
    width: auto;
    border-radius: 4px; 
}

.btn-portal-login {
    background: #007bff;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: 0.2s;
}

.btn-portal-login:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* --- SIDEBAR (Das eigentliche Menü) --- */
.sidebar {
    height: 100%;
    width: 300px;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: -300px;
    background-color: #2b3035;
    overflow-x: hidden;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: #1a1d20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3c4248;
}

.sidebar-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.2em;
}

.close-sidebar {
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.close-sidebar:hover {
    color: #fff;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-content a, .sidebar-dropdown-btn {
    padding: 16px 20px;
    text-decoration: none;
    font-size: 1.05em;
    color: #ced4da;
    display: block;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    outline: none;
    border-bottom: 1px solid #3c4248;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.sidebar-content a:hover, .sidebar-dropdown-btn:hover {
    color: #fff;
    background-color: #3c4248;
    border-left: 4px solid #007bff;
    padding-left: 16px;
}

/* Dropdown Container innerhalb der Sidebar (Verwaltung) */
.sidebar-dropdown-container {
    display: none;
    background-color: #212529;
}

.sidebar-dropdown-container a {
    padding-left: 50px;
    font-size: 0.95em;
    border-bottom: 1px solid #2b3035;
}

.sidebar-dropdown-container a:hover {
    padding-left: 46px;
}

.caret { 
    float: right; 
    transition: transform 0.3s; 
}

.sidebar-dropdown-btn.active .caret { 
    transform: rotate(180deg); 
}

/* --- OVERLAY (Hintergrund abdunkeln) --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.open {
    display: block;
    opacity: 1;
}

.spacer { 
    flex-grow: 1; 
}

.logout-link { 
    background: #dc3545 !important; 
    color: white !important; 
    font-weight: bold; 
    border-top: none !important;
    text-align: center !important;
    margin-top: auto;
}

.logout-link:hover { 
    background: #c82333 !important; 
    border-left: none !important;
    padding-left: 20px !important;
}

/* ==========================================================================
   4. PORTAL STARTSEITE (Spezifisches Layout)
   ========================================================================== */

/* --- HERO SECTION --- */
.hero { display: flex; align-items: center; justify-content: space-between; padding: 60px 5% 80px 5%; background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%); min-height: calc(100vh - 120px); gap: 50px; }
.hero-text { flex: 1; max-width: 600px; }
.hero-text h1 { font-size: 3.5em; line-height: 1.1; margin-bottom: 20px; color: var(--dark); letter-spacing: -1px; }
.hero-text p { font-size: 1.2em; color: var(--gray); margin-bottom: 30px; line-height: 1.6; }
.hero-login { flex: 0 0 400px; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.hero-login h2 { margin-bottom: 5px; font-size: 1.8em; }
.hero-login p { color: var(--gray); margin-bottom: 25px; font-size: 0.9em; }

/* --- SECTIONS GENERAL --- */
.section-padding { padding: 80px 5%; }
.section-title { font-size: 2.5em; margin-bottom: 20px; text-align: center; }
.section-subtitle { text-align: center; color: var(--gray); font-size: 1.1em; margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* --- FEATURES --- */
.features { background: white; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.feature-card { padding: 30px; border: 1px solid #e2e8f0; border-radius: 10px; transition: 0.3s; text-align: center; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.feature-icon { font-size: 3em; margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; font-size: 1.3em; }
.feature-card p { color: var(--gray); font-size: 0.95em; line-height: 1.6; }

/* --- ABOUT --- */
.about { background: white; }
.about-content { display: flex; align-items: center; gap: 60px; max-width: 1000px; margin: 0 auto; }
.about-text { flex: 1; }
.about-text h2 { font-size: 2.2em; margin-bottom: 20px; }
.about-text p { color: var(--gray); margin-bottom: 15px; font-size: 1.05em; line-height: 1.7; }
.about-image { flex: 1; text-align: center; }

/* --- RESPONSIVE PORTAL --- */
@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; padding: 40px 5%; }
    .hero-text { margin-bottom: 30px; }
    .hero-login { width: 100%; flex: auto; }
    .about-content { flex-direction: column; text-align: center; }
}

/* --- STRATEGIE & REBALANCING LAYOUT --- */
.split-layout { display: flex; gap: 25px; align-items: flex-start; flex-wrap: wrap; }
.box { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eee; flex: 1; min-width: 350px; }