:root {
    --vbv-red: #be1a1a;
    --vbv-gold: #f59e00;
}

/* Flex Layout nicht mehr nötig für Footer */
html, body {
    margin: 0;
    height: 100%;
}

/* Globale Schrift wie Bootstrap */
body, .mud-typography, button, input {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    color: #212529;
}

/* HEADER */
.header-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    width: 100%;
    z-index: 100 !important;
    position: relative;
}

.header-left .nav-menu-horizontal .mud-link {
    font-weight: 500;
    text-decoration: none;
    color: #212529;
}

.header-left .nav-menu-horizontal .mud-link:hover {
    color: var(--vbv-red) !important;
}

.nav-menu-horizontal .nav-sep {
    color: #6c757d;
    user-select: none;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-shrink: 0;
    min-width: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding: 0 1rem;
}

.header-user-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--vbv-red);
    line-height: 1.35;
}

.header-user-sep {
    margin: 0 0.25rem;
}

@media (max-width: 600px) {
    .header-user-display {
        flex-direction: column;
        align-items: center;
    }

    .header-user-sep {
        display: none;
    }
}

.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-link-termine {
    color: var(--vbv-red);
    font-weight: 600;
    text-decoration: none;
}

.header-link-termine:hover {
    text-decoration: underline;
}

.header-logo {
    max-height: 60px;
}

.btn-header-logout {
    background-color: white !important;
    color: var(--vbv-red) !important;
    border: 2px solid var(--vbv-gold) !important;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-header-logout:hover {
    background-color: var(--vbv-gold) !important;
    color: white !important;
}

/* VBV Funktionäre Button */
.btn-header-hero {
    background-color: white !important;
    color: var(--vbv-red) !important;
    border: 2px solid var(--vbv-gold) !important;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: normal !important;
    z-index: 101 !important;
}

    .btn-header-hero:hover {
        background-color: var(--vbv-gold) !important;
        color: white !important;
        transform: scale(1.05);
    }

.btn-line-main,
.btn-line-sub {
    display: block;
}

.btn-line-main {
    font-size: 1rem;
    font-weight: 500;
}

.btn-line-sub {
    font-size: 0.7rem;
    color: var(--vbv-red);
    opacity: 0.9;
}

/* User Info Badge */
.user-info-badge {
    background-color: white;
    border: 2px solid var(--vbv-gold);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* HERO */
.hero-section {
    background-color: var(--vbv-red);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: -16px; /* gleicht das padding-top der main-content aus */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
    box-sizing: border-box;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #fff !important;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #fff !important;
}

/* Kontakt-Button */
.btn-contact {
    border: 2px solid white !important;
    color: white !important;
    border-radius: 8px;
    padding: 0.8rem 1.8rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

    .btn-contact:hover {
        background-color: white !important;
        color: var(--vbv-red) !important;
        border: 2px solid var(--vbv-gold) !important;
    }

/* FUNKTIONEN */
.vbv-container {
    max-width: 100%;
    margin: 32px 0;
    text-align: center;
}

.functions-title {
    font-size: 2rem;
    font-weight: 500;
    color: var(--vbv-red);
}

.btn-vbv {
    background-color: white !important;
    color: var(--vbv-red) !important;
    border: 2px solid var(--vbv-red) !important;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
    padding: 1rem;
    min-height: 70px;
    transition: all 0.3s ease;
}

    .btn-vbv:hover {
        background-color: var(--vbv-gold) !important;
        color: white !important;
        border-color: var(--vbv-gold) !important;
    }

.btn-admin {
    background-color: var(--vbv-gold) !important;
    color: #222 !important;
    font-weight: bold;
}

/* Bottom-Nav (Reiter unten, wenn nicht Startseite) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bottom-nav-tabs::-webkit-scrollbar {
    display: none;
}

.bottom-nav-tab {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.bottom-nav-tab:hover {
    background: rgba(0,0,0,0.06);
    color: var(--vbv-red);
}

.bottom-nav-tab.active {
    background: var(--vbv-red);
    color: white;
}

.bottom-nav-more {
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

.bottom-nav-more:hover {
    background: rgba(0,0,0,0.06);
    color: var(--vbv-red);
}

.bottom-nav-more-menu .mud-popover {
    margin-bottom: 0.5rem;
}

/* Footer über Bottom-Nav, wenn Bottom-Nav sichtbar */
.has-bottom-nav .footer {
    bottom: 52px;
}

.has-bottom-nav .main-content {
    padding-bottom: 132px; /* Footer + Bottom-Nav */
}

/* FOOTER fixiert */
.footer {
    background-color: var(--vbv-red);
    color: white;
    text-align: center;
    padding: 1.2rem;
    width: 100%;
    font-size: 1.1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100 !important;
}

.main-content {
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 80px; /* Footer-Höhe ausgleichen */
    padding-top: 16px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

    .footer a:hover {
        color: var(--vbv-gold);
    }

/* Responsive */
@media (max-width: 768px) {
    .header-bar {
        padding: 0.5rem 0.75rem;
    }

    .header-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-left {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .header-logo {
        max-height: 48px;
    }

    .header-user-display {
        font-size: 0.85rem;
    }

    .bottom-nav {
        height: 48px;
        padding: 0 0.25rem;
    }

    .bottom-nav-tab {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    .has-bottom-nav .footer {
        bottom: 48px;
    }

    .has-bottom-nav .main-content {
        padding-bottom: 128px;
    }

    .hero-section {
        padding: 2rem 0.5rem;
        font-size: 1rem;
    }

    .hero-content {
        max-width: 100%;
        margin: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-contact {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
