/*
Theme Name: Vereins-Theme Basis
Author: Senior WP Architect
Description: Performantes, barrierefreies Theme für Sportvereine.
Version: 1.0.0
*/

:root {
    /* Vereinsfarben & Design */
    --club-red: #d6001c; /* Anpassen im Customizer möglich, hier Fallback */
    --text-main: #222222;
    --text-light: #666666;
    --bg-light: #f4f4f4;
    --white: #ffffff;
    
    /* Spacing & Layout */
    --sidebar-width: 25%;
    --gap: 2rem;
    --content-max-width: 900px;
}

/* Reset & Basics */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute; top: -9999px; left: 0;
    background: var(--white); color: var(--club-red); padding: 1rem; z-index: 9999;
}
.skip-link:focus { top: 0; }

/* Layout Grid (Desktop) */
.site-wrapper {
    display: grid;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .site-wrapper {
        grid-template-columns: var(--sidebar-width) 1fr;
    }
    .site-sidebar {
        background-color: var(--club-red);
        color: var(--white);
        padding: 3rem 2rem;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
}

/* Sidebar Content */
.site-sidebar {
    background-color: var(--club-red);
    color: var(--white);
}

.custom-logo-link img {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
    display: block;
}

/* Navigation */
.main-navigation ul { list-style: none; padding: 0; }
.main-navigation li { margin-bottom: 0.5rem; }
.main-navigation a {
    color: rgba(255,255,255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    padding: 0.3rem 0;
    transition: color 0.2s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--white);
    font-weight: 700;
    border-left: 3px solid var(--white);
    padding-left: 0.5rem;
}
/* Submenus */
.main-navigation .sub-menu {
    margin-left: 1rem;
    font-size: 0.95em;
    display: none; /* JS Toggle oder CSS Hover */
}
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .current-menu-ancestor > .sub-menu {
    display: block;
}

/* Content Area */
.site-content {
    padding: 3rem 5%;
    max-width: var(--content-max-width);
}

/* Headings */
h1, h2, h3 { line-height: 1.2; margin-bottom: 1rem; color: var(--text-main); }
h1 { font-size: clamp(2rem, 5vw, 3rem); border-bottom: 4px solid var(--club-red); padding-bottom: 0.5rem; display: inline-block; margin-bottom: 2rem; }
h2 { font-size: 1.8rem; margin-top: 2.5rem; }

/* Content Elements */
p { margin-bottom: 1.5rem; }
a { color: var(--club-red); text-decoration: underline; }
a:hover { text-decoration: none; }

/* Rote Trennlinie */
hr {
    border: 0;
    border-top: 2px solid var(--club-red);
    margin: 3rem 0;
    width: 100px;
}

/* Mobile Header (Nur sichtbar < 992px) */
.mobile-header-bar {
    display: none;
    background: var(--club-red);
    padding: 1rem;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.menu-toggle {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

/* Mobile Logic */
@media (max-width: 991px) {
    .site-wrapper { display: block; }
    .mobile-header-bar { display: flex; }
    
    .site-sidebar {
        position: fixed;
        top: 60px; /* Höhe der Bar */
        left: -100%;
        width: 80%;
        height: calc(100vh - 60px);
        transition: left 0.3s ease-in-out;
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    .site-sidebar.toggled { left: 0; }
    
    /* Logo in Sidebar auf Mobile ausblenden, da oben in Bar */
    .site-sidebar .custom-logo-link { display: none; }
}

/* Utility Classes for Patterns */
.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.person-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 4px;
    background: var(--bg-light);
}
.person-card img {
    border-radius: 50%;
    width: 100px; height: 100px;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--club-red);
}

/* Maps Helper */
.map-placeholder {
    background: #eee;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}
.btn-primary {
    background: var(--club-red);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1rem;
    display: inline-block;
    font-weight: bold;
}