@font-face {
    font-family: 'Lato';
    src: url('/assets/Lato-Regular.woff2') format('woff2'),
         url('/assets/Lato-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('/assets/Lato-Bold.woff2') format('woff2'),
         url('/assets/Lato-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url('/assets/Rubik-Regular.woff') format('woff'),
         url('/assets/Rubik-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.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:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    clip: auto;
    background: #003694;
    color: white;
    z-index: 1000;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    margin-bottom: 20px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-logo {
    width: 200px;
    height: auto;
    flex-shrink: 0;
}

h1, h2, h3 {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #003694;
}

header p {
    margin: 5px 0;
    line-height: 1.5;
}

hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 20px 0;
}

main {
    margin: 20px 0;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.2rem;
}

label {
    font-weight: 500;
    color: #1e293b;
}

.form-group > label {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
    min-width: 120px;
}

.form-group > input,
.form-group > .input-euro-wrapper,
.form-group > .datetime-row,
.form-group > .radio-group {
    flex: 1;
    min-width: 0;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[name="data"] {
    width: 100%;
    height: 44px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: #003694;
}

input[type="submit"] {
    font-family: inherit;
    font-size: 1rem;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary,
input[type="submit"] {
    background: #003694;
    color: white;
    font-weight: 600;
}

.btn-primary:hover,
input[type="submit"]:hover {
    background: #002a7a;
}

.error {
    background: #fee;
    border: 2px solid #c33;
    color: #c33;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error a {
    color: #003694;
    font-weight: bold;
}

footer {
    margin-top: 20px;
    color: #64748b;
    font-size: 0.95rem;
}

footer p {
    margin: 10px 0;
}

.small {
    font-size: 0.9rem;
}

footer a {
    color: #003694;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Tab-Navigation */
.tab-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tab {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    color: #1e293b;
}

.tab:hover {
    border-color: #003694;
}

.tab:focus-visible {
    outline: 3px solid #003694;
    outline-offset: 2px;
}

.tab.active {
    background: #003694;
    color: white;
    border-color: #003694;
}

/* Formular-Sektionen */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

/* Radio-Buttons */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin: 0;
}

/* vCard-Formular */
.vcard-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.vcard-select {
    flex: 0 0 150px;
    height: 44px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: white;
}

.vcard-select:focus {
    outline: none;
    border-color: #003694;
}

.vcard-input {
    flex: 1;
    height: 44px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.vcard-input:focus {
    outline: none;
    border-color: #003694;
}

.vcard-remove {
    flex: 0 0 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s;
}

.vcard-remove:hover {
    border-color: #c33;
    color: #c33;
    background: #fee;
}

.btn-secondary {
    font-family: inherit;
    font-size: 1rem;
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #003694;
    color: #003694;
}

/* Termin-Formular */
.datetime-row {
    display: flex;
    gap: 8px;
}

.datetime-row input[type="date"],
.datetime-row input[type="time"] {
    flex: 1;
    height: 44px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.datetime-row input[type="date"]:focus,
.datetime-row input[type="time"]:focus {
    outline: none;
    border-color: #003694;
}

/* Payment-Formular */
.input-iban,
.input-bic {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 1px;
}

.input-euro-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.input-euro-prefix {
    background: #e2e8f0;
    height: 44px;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.input-euro-wrapper input[type="number"] {
    flex: 1;
    height: 44px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 0 4px 4px 0;
    font-size: 1rem;
    font-family: inherit;
}

.input-euro-wrapper input[type="number"]:focus {
    outline: none;
    border-color: #003694;
}

/* SEO-Texte */
.page-content {
    margin-top: 20px;
    overflow: hidden;
}

.example-image {
    float: right;
    width: 300px;
    height: auto;
    margin: 0 0 1rem 1.5rem;
    border-radius: 4px;
}

.page-content h2,
.page-content h3 {
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}

.page-content p {
    margin-bottom: 0.8em;
}

.page-content ul {
    margin: 0.5em 0 0.8em 1.5em;
}

.page-content li {
    margin-bottom: 0.3em;
}

/* Nutzungsstatistik */
.stat-hero {
    margin: 1.5em 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-hero-number {
    font-family: 'Rubik', sans-serif;
    font-size: 2.5rem;
    line-height: 1.1;
    color: #003694;
}

.stat-hero-label {
    color: #64748b;
}

.chart {
    margin: 1em 0 1.5em;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.chart-label {
    flex: 0 0 90px;
    text-align: right;
    color: #1e293b;
}

.chart-track {
    flex: 1;
    min-width: 0;
    background: #f1f5f9;
    border-radius: 0 4px 4px 0;
}

.chart-bar {
    height: 16px;
    background: #003694;
    border-radius: 0 4px 4px 0;
    min-width: 2px;
}

.chart-value {
    flex: 0 0 130px;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.chart-share {
    color: #64748b;
    font-size: 0.9rem;
}

.stat-code {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    padding: 12px;
    margin: 0.5em 0 0.8em;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.stat-empty {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    padding: 15px;
    margin: 1em 0 1.5em;
    color: #64748b;
}

@media (max-width: 768px) {
    .chart-label {
        flex: 0 0 70px;
    }

    .chart-value {
        flex: 0 0 100px;
        font-size: 0.9rem;
    }

    .stat-hero-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .example-image {
        float: none;
        width: 100%;
        margin: 0 0 1rem 0;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    body {
        padding: 10px;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .form-group > label {
        text-align: left;
        white-space: normal;
    }

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

    .vcard-select {
        flex: 1 1 100%;
    }

    .vcard-input {
        flex: 1 1 calc(100% - 52px);
    }
}
