:root {
    color-scheme: light;
    --blue: #0752b8;
    --blue-dark: #063b82;
    --blue-deep: #082b59;
    --cream: #f4eee3;
    --paper: #faf9f6;
    --white: #fff;
    --ink: #242630;
    --muted: #62636a;
    --line: #dedbd3;
    --content-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.container { width: min(var(--content-width), calc(100% - 44px)); margin-inline: auto; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; z-index: 30; top: -60px; left: 12px;
    padding: 9px 13px; background: var(--white); color: var(--ink);
}
.skip-link:focus { top: 12px; }

/* Kopfbereich */
.site-header {
    position: relative;
    z-index: 10;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
}
.brand__symbol {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    background: var(--blue);
    color: var(--cream);
    border-radius: 3px;
    font-size: 1.25rem;
    font-weight: 850;
    font-style: italic;
}
.brand__name { font-size: 1.12rem; font-weight: 800; letter-spacing: -.04em; }
.brand__name span { color: var(--blue); }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    color: #50515a;
    font-size: .94rem;
    font-weight: 600;
    text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
    color: var(--blue);
    border-color: var(--blue);
}
.nav-toggle {
    display: none;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--white);
    cursor: pointer;
}
.nav-toggle__line { display: block; width: 22px; height: 2px; margin: 4px; background: var(--ink); }

/* Startbereich */
.hero {
    overflow: hidden;
    background: var(--blue);
    color: var(--cream);
}
.hero__layout {
    min-height: 520px;
    display: grid;
    grid-template-columns: 1fr .78fr;
    align-items: center;
    gap: 60px;
    padding-block: 55px;
}
.eyebrow {
    margin: 0 0 13px;
    color: var(--blue);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hero .eyebrow { color: #d8e5ff; }
.hero h1 {
    max-width: 650px;
    margin: 0 0 22px;
    color: var(--cream);
    font-size: clamp(2.65rem, 5.5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}
.hero__lead {
    max-width: 560px;
    margin: 0;
    color: #e5edfb;
    font-size: 1.12rem;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.button {
    display: inline-block;
    padding: 12px 19px;
    border: 2px solid transparent;
    border-radius: 3px;
    background: var(--blue);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.button:hover { background: var(--blue-dark); }
.button--light { background: var(--cream); color: var(--blue-deep); }
.button--light:hover { background: var(--white); color: var(--blue-deep); }
.text-link { font-weight: 650; }
.text-link--light { color: var(--white); }
.hero__logo-wrap {
    justify-self: end;
    width: min(100%, 390px);
    padding: 9px;
    background: var(--cream);
    box-shadow: 12px 12px 0 rgba(4, 35, 83, .28);
    transform: rotate(1.2deg);
}
.hero__logo { display: block; width: 100%; }

/* Inhaltsbereiche */
.section { padding-block: 82px; }
.section__intro { max-width: 700px; margin-bottom: 34px; }
.section__intro h2, .appointment-layout h2 {
    margin: 0 0 15px;
    font-size: clamp(1.9rem, 3.5vw, 2.7rem);
    line-height: 1.15;
    letter-spacing: -.04em;
}
.section__intro > p:last-child { max-width: 650px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
    min-height: 220px;
    padding: 25px 25px 27px;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--blue);
}
.card__number {
    display: block;
    margin-bottom: 23px;
    color: var(--blue);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
}
.card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }

/* Terminbereich */
.appointment-section { padding-block: 70px; background: var(--cream); }
.appointment-layout {
    display: grid;
    grid-template-columns: 1fr .75fr;
    align-items: center;
    gap: 60px;
}
.appointment-layout > div:first-child > p:last-child { max-width: 540px; color: var(--muted); }
.appointment {
    display: grid;
    gap: 5px;
    padding: 26px 28px;
    background: var(--white);
    border-left: 5px solid var(--blue);
}
.appointment__label {
    margin: 0 0 7px;
    color: var(--blue);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.appointment strong { font-size: 1.25rem; }
.appointment span { color: var(--muted); }
.appointment a { margin-top: 13px; font-weight: 700; text-decoration: none; }

/* Unterseiten */
.page { min-height: 65vh; padding-block: 66px 90px; }
.page h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -.05em;
}
.lead { max-width: 720px; margin-top: 22px; color: var(--muted); font-size: 1.12rem; }
.content-narrow { max-width: 740px; margin-top: 34px; }
.content-narrow h2 { margin: 35px 0 12px; font-size: 1.5rem; }
.content-narrow li { margin: 7px 0; }
.contact-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-top: 28px;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--line);
}
.contact-details p { margin: 0; }

/* Fußbereich */
.site-footer { background: var(--blue-deep); color: var(--cream); }
.footer-main {
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.footer-brand { color: var(--white); font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.footer-main p { margin: 4px 0 0; color: #c6d5ed; font-size: .9rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--cream); font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.17); }
.footer-bottom .container {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #c6d5ed;
    font-size: .82rem;
}

@media (max-width: 800px) {
    .hero__layout { grid-template-columns: 1fr .7fr; gap: 28px; }
    .hero__logo-wrap { width: min(100%, 300px); }
    .site-nav { gap: 18px; }
}
@media (max-width: 650px) {
    .container { width: min(var(--content-width), calc(100% - 34px)); }
    .header-inner { min-height: 68px; flex-wrap: wrap; }
    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 0 12px;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 11px 2px; border-bottom: 1px solid var(--line); }
    .hero__layout { grid-template-columns: 1fr; gap: 34px; padding-block: 58px 48px; }
    .hero h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
    .hero__logo-wrap { justify-self: start; width: min(76%, 300px); margin-left: 8px; }
    .section { padding-block: 58px; }
    .cards, .appointment-layout, .contact-details { grid-template-columns: 1fr; }
    .appointment-layout { gap: 25px; }
    .card { min-height: 0; }
    .footer-main { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}

/* =========================
   Bildergalerie
   ========================= */

.gallery-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.gallery-page .page-intro {
    margin-bottom: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    background: var(--surface, #eee);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* =========================
   Lightbox
   ========================= */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
}

.lightbox button {
    position: absolute;
    border: none;
    background: transparent;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: opacity 0.2s;
}

.lightbox button:hover {
    opacity: 0.65;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .lightbox {
        padding: 1rem;
    }

    .lightbox img {
        max-width: 100%;
        max-height: 80vh;
    }
}

/* =========================================
   Account-System: Login, Registrierung
========================================= */

.content-main {
    width: min(100% - 40px, 900px);
    min-height: 65vh;
    margin: 0 auto;
    padding: 55px 0 80px;
}

.content-main > h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
}

.content-main > h3 {
    margin: 0 0 35px;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
}

/* Formulare */

.content-main form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 25px;
}

.content-main form > div {
    margin-bottom: 17px;
}

.content-main label {
    display: inline-block;
    margin-bottom: 5px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
}

.content-main input {
    width: 100%;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}

.content-main input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(7, 82, 184, .12);
}

.content-main input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.content-main button {
    width: 100%;
    min-height: 43px;
    padding: 9px 15px;
    border: 0;
    border-radius: 3px;
    background: var(--blue);
    color: var(--white);
    font: inherit;
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s;
}

.content-main button:hover:not(:disabled) {
    background: var(--blue-dark);
}

.content-main button:focus-visible {
    outline: 3px solid rgba(7, 82, 184, .3);
    outline-offset: 3px;
}

.content-main button:disabled,
.content-main .button-disabled {
    background: #a5a5a5;
    color: #eee;
    cursor: not-allowed;
}

/* Links */

.content-main .link {
    color: var(--blue-dark) !important;
    font-size: .9rem;
    text-decoration: none;
}

.content-main .link:hover {
    text-decoration: underline;
}

/* Statusmeldungen */

.content-main p[style*="color:red"] {
    color: #b42318 !important;
    font-weight: 500;
}

.content-main p[style*="color:green"] {
    color: #287345 !important;
    font-weight: 500;
}


/* =========================================
   Dashboard
========================================= */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.dashboard-title {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.2;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: min(60%, 600px);
    gap: 10px;
}

.dashboard-actions button {
    min-height: 43px;
    padding: 9px 14px;
    border: 0;
    border-radius: 3px;
    background: var(--blue);
    color: var(--white);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.dashboard-actions button:hover:not(:disabled) {
    background: var(--blue-dark);
}

.dashboard-actions .button-disabled,
.dashboard-actions button:disabled {
    background: #a5a5a5;
    color: #eee;
    cursor: not-allowed;
}

/* Begrüßung */

.dashboard-header + h3 {
    margin: 0 0 25px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 600;
}

/* App-Karten */

.app-card {
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 3px;
    background: var(--white);
    transition: box-shadow .15s;
}

.app-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
}

.app-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.app-card-text {
    flex: 1;
    padding: 0;
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.7;
}

.app-card-text strong {
    display: inline-block;
    margin-bottom: 3px;
    color: var(--ink);
    font-size: 1.08rem;
}

.app-card-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.app-card-actions button {
    width: 100%;
    min-height: 43px;
    padding: 9px 15px;
    border: 0;
    border-radius: 3px;
    background: var(--blue);
    color: var(--white);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s;
}

.app-card-actions button:hover {
    background: var(--blue-dark);
}


/* =========================================
   Responsive
========================================= */

@media (max-width: 900px) {

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .dashboard-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .app-card-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .app-card-actions {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 500px) {

    .content-main {
        width: calc(100% - 32px);
        padding-top: 38px;
    }

    .content-main > h3 {
        font-size: 1rem;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-actions button {
        width: 100%;
    }

    .dashboard-title {
        font-size: 1.7rem;
    }

    .app-card {
        padding: 15px;
    }
}
.statistics-chart {
    background: var(--card, #1e293b);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.statistics-chart h2 {
    margin-top: 0;
}

.statistics-chart__container {
    position: relative;
    width: 100%;
    height: 350px;
}

@media (max-width: 600px) {
    .statistics-chart {
        padding: 1rem;
    }

    .statistics-chart__container {
        height: 280px;
    }
}
.statistics-summary {
    text-align: center;
    margin: 1.5rem 0 2rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.statistics-summary strong {
    color: #16a34a;
    font-size: 1.3rem;
}
