/* Informatik Newsletter – modernes, professionelles Layout */

:root {
    /* Weißes Layout + Gradients als Blickfänger (dosiert) */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;
    --color-border: #e2e8f0;
    --color-border-focus: #6366f1;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-text-muted-light: gray;
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-primary-light: #eef2ff;
    --gradient-cta: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-cta-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
    --color-success-bg: #f0fdf4;
    --color-success-text: #166534;
    --color-success-border: #bbf7d0;
    --color-error-bg: #fef2f2;
    --color-error-text: #991b1b;
    --color-error-border: #fecaca;
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --gradient-danger: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
}

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

body {
    font-family: 'Liberation Sans', 'Nimbus Sans L', 'FreeSans', Arial, Helvetica, sans-serif;
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    line-height: 1.6;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 560px;
}

.form-wrapper {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 56px 48px;
    animation: fadeIn 0.5s ease-out;
    border: 1px solid var(--color-border);
}

/* Overlay bei Erfolgsmeldung: Rest der Seite ausgrauen, Buttons nicht bedienbar */
.success-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(120, 120, 120, 0.42);
    border-radius: var(--radius-xl);
    pointer-events: auto;
}

.alert-success-prominent {
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.form-wrapper > h1.page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--color-text);
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-title-icon {
    flex-shrink: 0;
}

/* Info-Text – Gradient als Blickfänger (Hero/Card) */
.info-text {
    margin-bottom: 32px;
    padding: 24px 28px;
    background: var(--gradient-hero);
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 92, 246, 0.12);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--color-text-muted);
}

.info-text p {
    margin-bottom: 0.75em;
}

.info-text p:last-child {
    margin-bottom: 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    margin-top: 8px;
    padding: 4px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.tab-button:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.8);
}

.tab-button.active {
    color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.tab-button.active:hover {
    color: var(--color-primary-hover);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.9375rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border: 1px solid var(--color-error-border);
}

.alert-info {
    background: var(--color-primary-light);
    color: var(--color-primary-hover);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Tab Content – nur der aktive Tab wird angezeigt */
.tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
    padding: 28px 0 0;
    margin-top: 4px;
}

.tab-content.active {
    display: block;
}

.tab-content .newsletter-form {
    margin-top: 0;
}

.tab-content > .newsletter-form > p {
    margin-bottom: 20px;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

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

/* Form */
.newsletter-form {
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.875rem;
}

input[type="email"],
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--color-surface);
    color: var(--color-text);
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input::placeholder {
    color: var(--color-text-muted-light);
}

.select-wrapper {
    position: relative;
    display: block;
}

.select-wrapper::after {
    content: "\25BC";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-muted);
    font-size: 0.65em;
    line-height: 1;
}

select {
    cursor: pointer;
    appearance: none;
    padding-right: 44px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

/* Buttons – Gradient für CTA (Blickfänger) */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--gradient-cta);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    background: var(--gradient-cta-hover);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: scale(0.99);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.btn-danger:hover {
    opacity: 0.95;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
    transform: scale(0.99);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Contact Footer */
.contact-footer {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.contact-footer > p:first-child {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.contact-footer .contact-region {
    margin-bottom: 20px;
}

.contact-footer .contact-region:last-child {
    margin-bottom: 0;
}

.contact-footer .region-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
    font-size: 0.8125rem;
}

.contact-footer ul {
    list-style: none;
    padding-left: 0;
}

.contact-footer li {
    margin-bottom: 0px;
    padding-left: 0;
}

.contact-footer li.sub {
    padding-left: 0;
    font-size: 0.75rem;
    color: var(--color-text-muted-light);
    margin-bottom: 8px;
}

.contact-footer li.sub:last-child {
    margin-bottom: 12px;
}

.contact-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-footer a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Footer-Links (z. B. Bestätigungsseiten) */
.footer-links {
    margin-top: 28px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.footer-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Dezente Footer-Links (z. B. Impressum / externe Links) */
.footer-links--muted {
    margin-top: 20px;
    padding-top: 16px;
    border-top-color: var(--color-border);
}

.footer-links--muted a {
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.8125rem;
}

.footer-links--muted a:hover {
    color: var(--color-text);
    text-decoration: none;
}

.footer-links--muted a:hover span {
    text-decoration: underline;
}

.footer-links--muted a + a::before {
    content: " · ";
    color: var(--color-text-muted-light);
    font-weight: 400;
    pointer-events: none;
}

/* Accessibility – Pflichtfelder */
input[required],
select[required] {
    border-left: 3px solid var(--color-primary);
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .form-wrapper {
        padding: 32px 24px;
    }

    .form-wrapper > h1 {
        font-size: 1.5rem;
    }

    .info-text {
        padding: 16px 18px;
        font-size: 0.875rem;
    }

    .tab-navigation {
        flex-direction: row;
    }

    .tab-button {
        padding: 10px 14px;
        font-size: 0.875rem;
    }

    .tab-content {
        padding-top: 24px;
    }

    input[type="email"],
    input[type="text"],
    input[type="number"],
    select {
        font-size: 16px;
    }

    .contact-footer {
        margin-top: 32px;
        padding-top: 24px;
    }
}
