:root {
    --primary-color: #004d99; /* Deep medical blue */
    --primary-light: #e6f0ff;
    --secondary-color: #f8f9fa; /* Off white background */
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #dddddd;
    --danger-color: #d9534f;
    --danger-light: #fdf0f0;
    --white: #ffffff;
    --max-width: 1000px;
}

/* Dark mode variables (applied via .dark on <html>) */
.dark {
    --primary-color: #74a9ff;
    --primary-light: rgba(116,169,255,0.12);
    --secondary-color: #071026; /* page background */
    --white: #0b1220; /* surface */
    --text-color: #e6eef8;
    --text-light: #9fb3d6;
    --border-color: rgba(255,255,255,0.06);
    --danger-color: #ff6b6b;
    --danger-light: rgba(255,107,107,0.08);
}

/* Note: system preference handling is intentionally disabled so the site
   always opens in light mode unless the user explicitly toggles dark mode. */

/* Theme toggle button */
.theme-toggle {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    z-index: 105;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Smooth transitions for theme changes */
html, body, header, main, footer, section {
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Lokale Systemschriften: Keine Google Fonts, 100% DSGVO-konform! */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #003366;
    text-decoration: underline;
}

header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.site-logo {
    max-height: 80px;
    width: auto;
    flex-shrink: 0;
}

.logo-text h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.logo-text p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.main-nav {
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    text-decoration: none;
}

.alert-banner {
    background-color: var(--danger-light);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
    padding: 1rem 2rem;
    max-width: var(--max-width);
    margin: 2rem auto;
    border-radius: 4px;
    font-weight: 500;
}

.alert-banner strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

main {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 300px);
}

section {
    background-color: var(--white);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

h3 {
    color: #444;
    margin: 1.5rem 0 1rem;
}

p, ul {
    margin-bottom: 1rem;
}

ul {
    padding-left: 1.5rem;
}

ul li {
    margin-bottom: 0.5rem;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
}

.button:hover {
    background-color: #003366;
    color: var(--white);
    text-decoration: none;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    background: var(--primary-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.value-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-col h3 {
    color: var(--white);
    border-bottom: none;
    margin-top: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li a {
    color: #b3d9ff;
    text-decoration: none;
}

.footer-links li a:hover {
    color: var(--white);
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #b3d9ff;
}

/* Legal text formatting for impressum and datenschutz */
.legal-text h3 {
    margin-top: 2rem;
}

.legal-text strong {
    color: #222;
}

@media (max-width: 850px) {
    .header-container {
        align-items: flex-start;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
        margin-top: 0.2rem;
    }

    .main-nav {
        width: 100%;
        margin-top: 0.5rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-0.5rem);
        transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }

    .main-nav.active {
        max-height: 480px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.35rem;
        padding-top: 0.75rem;
    }

    .main-nav ul li a {
        display: block;
        padding: 0.9rem 1rem;
        border: 1px solid var(--border-color);
        background-color: var(--secondary-color);
    }
    
    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        border-color: var(--primary-color);
        background-color: var(--primary-light);
        transform: none;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }

    .site-logo {
        max-height: 60px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

.page-hero {
    background: linear-gradient(135deg, var(--primary-light), #ffffff 60%);
    border: 1px solid rgba(0, 77, 153, 0.12);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.page-hero h2 {
    margin-bottom: 0.75rem;
}

.page-hero p:last-child {
    margin-bottom: 0;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 2rem;
    align-items: start;
}

.content-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.content-card h3 {
    margin-top: 0;
}

.legal-text {
    max-width: 860px;
    margin: 0 auto;
}

.legal-text p,
.legal-text ul {
    max-width: 100%;
}

.legal-text h4 {
    color: #444;
    margin: 1.25rem 0 0.75rem;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

.split-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.notice-box {
    border-left: 4px solid var(--primary-color);
    background: var(--primary-light);
    padding: 1rem 1.25rem;
    border-radius: 8px;
}
