/* ============================================================
   Fortbildung Anmeldung – Stylesheet
   Passend zum sachverstaendigenring.de Design
   ============================================================ */

:root {
    --color-primary: #2c3e50;
    --color-accent: #8b0000;
    --color-accent-light: #a52a2a;
    --color-bg: #f8f7f5;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #d4d0c8;
    --color-success: #27ae60;
    --color-error: #c0392b;
    --color-input-bg: #fafafa;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --max-width: 800px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-accent-light);
}

/* Header */
.site-header {
    background: var(--color-white);
    border-bottom: 3px solid var(--color-accent);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-link {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.3px;
}

.logo-link:hover {
    color: var(--color-accent);
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-nav a {
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 500;
}

.header-nav a:hover {
    color: var(--color-accent);
}

.nav-cta {
    background: var(--color-accent);
    color: var(--color-white) !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--color-accent-light) !important;
    color: var(--color-white) !important;
}

/* Main content */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--color-accent);
    font-style: italic;
    margin-bottom: 16px;
}

.hero-contact {
    font-size: 14px;
    color: var(--color-text-light);
}

/* Alerts */
.alert {
    padding: 24px 28px;
    border-radius: var(--radius);
    margin: 24px 0;
    text-align: center;
}

.alert-success {
    background: #eafaf1;
    border: 1px solid var(--color-success);
    color: #1a7a3a;
}

.alert-success h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.alert-error {
    background: #fdecea;
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

/* Form */
.form-section {
    padding-bottom: 60px;
}

.anmelde-form {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

fieldset {
    border: none;
    padding: 28px 32px;
    border-bottom: 1px solid #eee;
}

fieldset:last-child {
    border-bottom: none;
}

legend {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-accent);
    display: block;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    flex: 1;
    margin-bottom: 16px;
}

.form-group-small {
    flex: 0 0 120px;
}

.form-group.full-width {
    width: 100%;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.hint {
    font-weight: 400;
    font-size: 12px;
    color: var(--color-text-light);
    display: block;
}

.required {
    color: var(--color-accent);
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--font-sans);
    background: var(--color-input-bg);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    background: var(--color-white);
}

input::placeholder {
    color: #aaa;
}

/* Kurs-Auswahl */
.kurs-liste {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kurs-option {
    cursor: pointer;
    display: block;
}

.kurs-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.kurs-card {
    background: var(--color-input-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: all 0.25s ease;
}

.kurs-card:hover {
    border-color: var(--color-accent-light);
    box-shadow: var(--shadow-sm);
}

.kurs-option input[type="checkbox"]:checked + .kurs-card,
.kurs-option input[type="radio"]:checked + .kurs-card,
.kurs-card.selected {
    border-color: #2e7d32;
    background: #eaf7ec;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.18);
}

.kurs-card.selected::before {
    content: '\2713  ausgewählt';
    display: inline-block;
    background: #2e7d32;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.kurs-option--voll {
    cursor: not-allowed;
}

.kurs-option--voll .kurs-card {
    opacity: 0.72;
    background: #f5f5f5;
    border-color: #ccc;
    pointer-events: none;
}

.kurs-option--voll .kurs-card:hover {
    border-color: #ccc;
    box-shadow: none;
}

.kurs-voll-badge {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    border: 2px solid #c62828;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    letter-spacing: 0.4px;
}

.gesamt-summe {
    background: #f1f8e9;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    padding: 12px 18px;
    margin-right: auto;
    font-size: 16px;
    color: #33691e;
}

.gesamt-summe span {
    font-weight: 700;
    font-size: 18px;
    margin-left: 8px;
}

.kurs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kurs-header h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--color-primary);
}

.kurs-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-praesenz {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-online {
    background: #e3f2fd;
    color: #1565c0;
}

.kurs-details {
    margin-bottom: 12px;
}

.kurs-tag {
    font-size: 14px;
    padding: 4px 0;
    color: var(--color-text);
}

.referent {
    color: var(--color-text-light);
    font-style: italic;
}

.kurs-gebuehr {
    font-size: 15px;
    color: var(--color-primary);
    padding: 8px 0;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.kurs-hinweis {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff8e1;
    border-left: 3px solid #f0ad4e;
    font-size: 13px;
    color: #6b4f0a;
    font-style: italic;
    border-radius: 3px;
}

.kurs-referenten {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
    font-size: 13px;
    color: var(--color-text-light);
}

.kurs-referenten strong {
    display: block;
    margin-bottom: 4px;
    color: var(--color-text);
}

.kurs-referenten ul {
    list-style: none;
    padding: 0;
}

.kurs-referenten li {
    padding: 2px 0 2px 12px;
    position: relative;
}

.kurs-referenten li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* Checkbox */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

/* Buttons */
.form-actions {
    text-align: center;
    padding: 8px 0;
}

.btn {
    display: inline-block;
    padding: 12px 36px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 17px;
    padding: 14px 48px;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: var(--color-accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    margin-top: 16px;
}

.btn-secondary:hover {
    background: #fdf6f6;
}

.form-note {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 12px;
}

/* Legal pages (Datenschutz, etc.) */
.legal-text {
    line-height: 1.7;
    font-size: 15px;
    color: #333;
    max-width: 760px;
    margin: 0 auto;
}

.legal-text p {
    margin: 0 0 18px;
}

.legal-text .legal-source {
    font-size: 13px;
    color: #777;
    border-top: 1px solid #e2e2e2;
    padding-top: 16px;
    margin-top: 28px;
}

.legal-text .legal-back {
    margin-top: 32px;
    text-align: center;
}

/* Footer */
.site-footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 20px 24px;
    font-size: 13px;
    margin-top: auto;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
    color: var(--color-white);
}

/* Responsive */
@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
        gap: 8px;
    }

    .logo-link {
        font-size: 15px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group-small {
        flex: 1;
    }

    fieldset {
        padding: 20px 18px;
    }

    .kurs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .btn-primary {
        width: 100%;
        padding: 14px 24px;
    }
}

.no-courses {
    text-align: center;
    padding: 24px;
    color: var(--color-text-light);
    font-style: italic;
}
