/*
|--------------------------------------------------------------------------
| Öffentliches Standard-Stylesheet
|--------------------------------------------------------------------------
|
| Dieses Stylesheet enthält die grundlegende Gestaltung für alle
| öffentlichen Seiten der Software.
|
| Es bleibt bewusst neutral, damit es später leicht an ein konkretes
| Produkt oder Projekt angepasst werden kann.
|
*/

/*
|--------------------------------------------------------------------------
| CSS-Variablen
|--------------------------------------------------------------------------
*/

:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;

    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-heading: #111827;

    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;

    --color-success: #15803d;
    --color-success-background: #f0fdf4;
    --color-success-border: #bbf7d0;

    --color-danger: #b91c1c;
    --color-danger-background: #fef2f2;
    --color-danger-border: #fecaca;

    --color-warning: #a16207;
    --color-warning-background: #fefce8;
    --color-warning-border: #fde68a;

    --color-info: #1d4ed8;
    --color-info-background: #eff6ff;
    --color-info-border: #bfdbfe;

    --font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --container-width: 1200px;
    --content-width: 1200px;

    --border-radius-small: 4px;
    --border-radius: 8px;
    --border-radius-large: 12px;

    --shadow-small:
        0 1px 2px rgba(15, 23, 42, 0.05);

    --shadow:
        0 4px 18px rgba(15, 23, 42, 0.08);

    --transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

/*
|--------------------------------------------------------------------------
| Reset und Grundwerte
|--------------------------------------------------------------------------
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

[hidden] {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Links
|--------------------------------------------------------------------------
*/

a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

/*
|--------------------------------------------------------------------------
| Typografie
|--------------------------------------------------------------------------
*/

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    letter-spacing: -0.02em;
}

h2 {
    margin-top: 2.25rem;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    letter-spacing: -0.015em;
}

h3 {
    margin-top: 2rem;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
}

h4 {
    margin-top: 1.75rem;
    font-size: 1.25rem;
}

h5 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

h6 {
    margin-top: 1.5rem;
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

small {
    font-size: 0.875rem;
}

strong,
b {
    font-weight: 700;
}

blockquote {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    box-shadow: var(--shadow-small);
}

blockquote > :last-child {
    margin-bottom: 0;
}

hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

code {
    padding: 0.15rem 0.4rem;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.9em;
    background-color: #eef2f7;
    border-radius: var(--border-radius-small);
}

pre {
    max-width: 100%;
    margin: 1.5rem 0;
    padding: 1.25rem;
    overflow-x: auto;
    color: #f8fafc;
    background-color: #111827;
    border-radius: var(--border-radius);
}

pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

/*
|--------------------------------------------------------------------------
| Listen
|--------------------------------------------------------------------------
*/

ul,
ol {
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

li + li {
    margin-top: 0.4rem;
}

/*
|--------------------------------------------------------------------------
| Seitenstruktur
|--------------------------------------------------------------------------
*/

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    width: 100%;
}

.container {
    width: min(
        calc(100% - 2rem),
        var(--container-width)
    );
    margin-right: auto;
    margin-left: auto;
}

.content-container {
    width: min(
        calc(100% - 2rem),
        var(--content-width)
    );
    margin-right: auto;
    margin-left: auto;
}

.site-content {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.page {
    padding: clamp(1.5rem, 4vw, 3rem);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    margin-bottom: 0.75rem;
}

.page-description {
    margin-bottom: 0;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.page-content::after {
    display: block;
    clear: both;
    content: "";
}

.page-content > :first-child {
    margin-top: 0;
}

.page-content > :last-child {
    margin-bottom: 0;
}

/*
|--------------------------------------------------------------------------
| Öffentlicher Header
|--------------------------------------------------------------------------
*/

.site-header {
    position: relative;
    z-index: 10;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 2rem;
}

.site-branding {
    flex: 0 0 240px;
    width: 240px;
    min-height: 54px;
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: var(--color-heading);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--color-primary);
}

/*
|--------------------------------------------------------------------------
| Öffentliche Navigation
|--------------------------------------------------------------------------
*/

.site-navigation {
    margin-left: auto;
}

.site-navigation-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navigation-item {
    margin: 0;
}

.site-navigation-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 0 transparent;
    transition:
        color var(--transition),
        background-color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.site-navigation-link:hover {
    color: var(--color-primary);
    background-color: #eff6ff;
    border-color: transparent;
}

.site-navigation-link.is-active,
.site-navigation-item.is-active .site-navigation-link {
    color: #ffffff;
    background-color: var(--color-primary);
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/*
|--------------------------------------------------------------------------
| Öffentlicher Footer
|--------------------------------------------------------------------------
*/

.site-footer {
    margin-top: auto;
    padding: 2rem 0;
    color: var(--color-text-muted);
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    text-align: center;
}

.site-footer-text {
    margin: 0;
    max-width: 800px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.site-footer-navigation {
    width: 100%;
}

.site-footer-navigation-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-navigation-item {
    margin: 0;
}

.site-footer-navigation-link {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.site-footer-navigation-link:hover {
    color: var(--color-primary);
}

/*
|--------------------------------------------------------------------------
| Schaltflächen
|--------------------------------------------------------------------------
*/

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 1.1rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.button:hover {
    color: var(--color-heading);
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.button-primary {
    color: #ffffff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.button-primary:hover {
    color: #ffffff;
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.button-danger {
    color: #ffffff;
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.button-danger:hover {
    color: #ffffff;
    background-color: #991b1b;
    border-color: #991b1b;
}

.button-small {
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    font-size: 0.875rem;
}

.button-large {
    min-height: 50px;
    padding: 0.8rem 1.4rem;
    font-size: 1.05rem;
}

.button:disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

/*
|--------------------------------------------------------------------------
| Formulare
|--------------------------------------------------------------------------
*/

.form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-label {
    color: var(--color-heading);
    font-weight: 600;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.85rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:hover {
    border-color: #94a3b8;
}

.form-control:focus {
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    min-height: 150px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/*
|--------------------------------------------------------------------------
| Tabellen
|--------------------------------------------------------------------------
*/

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    margin: 1.5rem 0;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

th,
td {
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
}

th {
    color: var(--color-heading);
    font-weight: 700;
    background-color: #f8fafc;
}

tr:last-child td {
    border-bottom: 0;
}

/*
|--------------------------------------------------------------------------
| Hinweise und Meldungen
|--------------------------------------------------------------------------
*/

.alert {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert > :last-child {
    margin-bottom: 0;
}

.alert-success {
    color: var(--color-success);
    background-color: var(--color-success-background);
    border-color: var(--color-success-border);
}

.alert-danger {
    color: var(--color-danger);
    background-color: var(--color-danger-background);
    border-color: var(--color-danger-border);
}

.alert-warning {
    color: var(--color-warning);
    background-color: var(--color-warning-background);
    border-color: var(--color-warning-border);
}

.alert-info {
    color: var(--color-info);
    background-color: var(--color-info-background);
    border-color: var(--color-info-border);
}

/*
|--------------------------------------------------------------------------
| Karten
|--------------------------------------------------------------------------
*/

.card {
    padding: 1.5rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-small);
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-content > :last-child {
    margin-bottom: 0;
}

/*
|--------------------------------------------------------------------------
| Fehlerseiten
|--------------------------------------------------------------------------
*/

.error-page {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 145px);
    padding-top: 4rem;
    padding-bottom: 4rem;
    text-align: center;
}

.error-page-content {
    width: min(100%, 700px);
    margin-right: auto;
    margin-left: auto;
}

.error-page-code {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: 800;
    line-height: 1;
}

.error-page-title {
    margin-bottom: 1rem;
}

.error-page-description {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/*
|--------------------------------------------------------------------------
| Hilfsklassen
|--------------------------------------------------------------------------
*/

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-small {
    gap: 0.5rem;
}

.gap {
    gap: 1rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/*
|--------------------------------------------------------------------------
| Barrierefreiheit
|--------------------------------------------------------------------------
*/

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

.screen-reader-text:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow: visible;
    color: var(--color-heading);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    clip: auto;
}

/*
|--------------------------------------------------------------------------
| Mobile Darstellung
|--------------------------------------------------------------------------
*/

@media (max-width: 800px) {
    .site-header-inner {
        align-items: flex-start;
        flex-direction: column;
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
        gap: 1rem;
    }

    .site-branding {
        flex-basis: auto;
        width: 100%;
        min-height: 54px;
    }

    .site-navigation {
        width: 100%;
        margin-left: 0;
    }

    .site-navigation-list {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .site-navigation-link {
        width: 100%;
    }



    .page {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .container,
    .content-container {
        width: min(
            calc(100% - 1.25rem),
            var(--container-width)
        );
    }

    .site-content {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }

    .page {
        padding: 1.25rem;
        border-radius: var(--border-radius);
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    th,
    td {
        padding: 0.7rem 0.75rem;
    }
}

/*
|--------------------------------------------------------------------------
| Druckansicht
|--------------------------------------------------------------------------
*/

@media print {
    body {
        color: #000000;
        background-color: #ffffff;
    }

    .site-header,
    .site-footer,
    .site-navigation,
    .button,
    .form-actions {
        display: none !important;
    }

    .site-content {
        padding: 0;
    }

    .page {
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}

/* Version 1.0.2: Website-Branding */
.site-brand-link { display:inline-flex; align-items:center; color:inherit; text-decoration:none; }
.site-logo { display:block; width:auto; max-width:240px; height:54px; max-height:54px; object-fit:contain; object-position:left center; }
.site-footer-logo { width:auto; max-width:190px; max-height:52px; margin:0 auto 1rem; object-fit:contain; }
.site-footer-copyright { margin:.75rem 0 0; color:var(--color-text-muted); font-size:.875rem; text-align:center; }


/* Version 0.9.12 – öffentlicher UI-Feinschliff */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .26);
    outline-offset: 2px;
}

.page-content,
.public-content {
    overflow-wrap: anywhere;
}

.page-content img,
.public-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .footer-social-links,
    .site-footer__social-list {
        justify-content: center;
    }
}
