@font-face {
    font-family: Poppins;
    src: url('fonts/poppins-regular.woff2') format('woff2');
    font-display: swap;
    font-style: normal;
    font-weight: 400;
}

@font-face {
    font-family: Poppins;
    src: url('fonts/poppins-500.woff2') format('woff2');
    font-display: swap;
    font-style: normal;
    font-weight: 500;
}

@font-face {
    font-family: Poppins;
    src: url('fonts/poppins-600.woff2') format('woff2');
    font-display: swap;
    font-style: normal;
    font-weight: 600;
}

@font-face {
    font-family: Poppins;
    src: url('fonts/poppins-700.woff2') format('woff2');
    font-display: swap;
    font-style: normal;
    font-weight: 700;
}

:root {
    --green: #85bc23;
    --green-soft: #f5f9ed;
    --text: #282828;
    --heading: #121212;
    --muted: #999;
    --border: #e1e1e1;
    --error: #c23b3b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: #f2f2f2 url('transparent.png') 0 0 no-repeat fixed;
    font: 400 13px/1.35 Poppins, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text);
}

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

h1,
h2,
h3 {
    color: var(--heading);
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 1rem;
    padding: 0.7rem 1rem;
    color: #fff;
    background: var(--text);
    transform: translateY(-120%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Header */
.site-header {
    background: #fff;
}

.header-art {
    background: #fff url('rpa-header-background.jpg') center / auto 100% no-repeat;
}

.header-inner {
    width: min(1200px, calc(100% - 20px));
    min-height: 112px;
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
}

.brand img {
    display: block;
    width: 170px;
    height: auto;
}

.green-bar {
    min-height: 44px;
    background: var(--green);
}

/* Formularseite */
.hero-inner,
.content-shell,
.footer-inner {
    width: min(1040px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

.hero-inner {
    padding: 34px 0 22px;
}

.hero h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero-copy {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.content-shell {
    margin-bottom: 70px;
}

.form-card,
.success-card,
.admin-login,
.admin-dashboard {
    background: #fff;
}

.form-card {
    padding: clamp(26px, 5vw, 48px);
}

.form-heading {
    margin-bottom: 1.7rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--border);
}

.form-heading h2,
.success-card h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

.form-intro {
    max-width: 760px;
    margin: 0.75rem 0 0;
    line-height: 1.55;
}

.form-heading > p:last-child {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 12px;
}

.required-mark,
.security-note span {
    color: var(--green);
}

.information-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    margin-bottom: 2.2rem;
    padding: 1.15rem 1.25rem;
    background: var(--green-soft);
    border-left: 4px solid var(--green);
}

.info-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    font-weight: 700;
}

.information-box h3 {
    margin: 0 0 0.3rem;
    font-size: 13px;
}

.information-box p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.error-summary,
.admin-alert {
    color: var(--error);
    background: #fff6f6;
    border-left: 4px solid var(--error);
}

.error-summary {
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
}

.error-summary ul {
    margin: 0.45rem 0 0;
    padding-left: 1.2rem;
}

.field-grid,
.format-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.field-group,
.format-fieldset,
.privacy-field {
    margin: 0 0 1.8rem;
}

.field-group label,
.format-fieldset legend {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type='text'],
input[type='email'],
input[type='password'] {
    width: 100%;
    min-height: 40px;
    padding: 0.78rem 0.9rem;
    color: var(--text);
    background: #fff;
    border: 1px solid #bfc5bd;
    border-radius: 0;
    outline: 0;
    font: inherit;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgb(133 188 35 / 18%);
}

input[aria-invalid='true'],
.was-validated input:invalid {
    border-color: var(--error);
}

.field-hint,
.field-error {
    margin: 0.42rem 0 0;
    font-size: 11px;
    line-height: 1.5;
}

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

.field-error {
    color: var(--error);
    font-weight: 600;
}

.format-fieldset {
    padding: 0;
    border: 0;
}

.format-options {
    gap: 0.8rem;
}

.format-option {
    position: relative;
    min-height: 105px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.75rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    cursor: pointer;
}

.format-option:hover {
    border-color: #a9b5a3;
}

.format-option:has(input:checked) {
    background: var(--green-soft);
    border-color: var(--green);
}

.format-option input,
.privacy-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.radio-control {
    width: 21px;
    height: 21px;
    margin-top: 0.12rem;
    border: 2px solid #9aa197;
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px #fff;
}

.format-option input:checked + .radio-control {
    background: var(--green);
    border-color: var(--green);
}

.format-option input:focus-visible + .radio-control,
.privacy-field input:focus-visible + .checkbox-control {
    outline: 3px solid rgb(133 188 35 / 30%);
    outline-offset: 3px;
}

.format-option strong,
.format-option small {
    display: block;
}

.format-option strong {
    margin-bottom: 0.25rem;
    font-size: 14px;
}

.format-option small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
}

.conditional-field {
    padding: 1.3rem;
    background: #fafbf9;
    border: 1px solid var(--border);
}

.conditional-field[hidden] {
    display: none;
}

.privacy-field label {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.8rem;
    font-size: 12px;
    line-height: 1.55;
    cursor: pointer;
}

.checkbox-control {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: transparent;
    background: #fff;
    border: 1px solid #aeb5ab;
    border-radius: 2px;
    font-weight: 700;
}

.privacy-field input:checked + .checkbox-control {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}

.privacy-field a,
.back-link {
    text-decoration-color: var(--green);
    text-underline-offset: 3px;
}

.submit-button,
.admin-logout {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 0;
    font: 600 14px/1.35 Poppins, Arial, sans-serif;
    text-transform: uppercase;
    cursor: pointer;
}

.submit-button {
    min-height: 48px;
    gap: 0.75rem;
    color: #fff;
    background: var(--green);
    border: 0;
    text-decoration: none;
}

.submit-button:hover {
    color: #fff;
    background: #91ca2c;
}

.submit-button:focus-visible,
.back-link:focus-visible,
a:focus-visible {
    outline: 3px solid rgb(133 188 35 / 38%);
    outline-offset: 3px;
}

.security-note {
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 11px;
}

.honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

/* Footer */
.site-footer {
    color: #fff;
    background: var(--green);
}

.footer-inner {
    min-height: 260px;
    display: grid;
    grid-template-columns: 1.45fr 1fr 1.2fr;
    align-items: start;
    gap: clamp(2rem, 7vw, 6rem);
    padding: 3rem 0;
}

.footer-inner h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.footer-inner address,
.footer-inner p {
    margin: 0;
    font-size: 11px;
    font-style: normal;
    line-height: 1.55;
}

.footer-contact p,
.footer-legal {
    display: flex;
    flex-direction: column;
}

.footer-contact p {
    margin-top: 0.6rem;
}

.footer-inner a {
    color: #fff;
    text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-legal {
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 11px;
}

.footer-legal h2 {
    margin-bottom: 0.35rem;
}

.facebook-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 11px;
}

.facebook-link svg {
    width: 28px;
    height: 28px;
    padding: 5px;
    fill: var(--green);
    background: #fff;
    border-radius: 50%;
}

/* Erfolgsseite */
.success-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.success-main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 3rem 20px;
}

.success-card {
    width: min(680px, 100%);
    padding: clamp(32px, 7vw, 70px);
    text-align: center;
    border-top: 5px solid var(--green);
}

.step-label {
    margin: 0 0 0.85rem;
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.success-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 1.5rem;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
}

.success-card > p:not(.step-label, .reference) {
    max-width: 540px;
    margin: 1rem auto 0;
    color: var(--muted);
}

.reference {
    margin: 1.5rem 0;
    padding: 0.8rem;
    background: var(--green-soft);
}

.back-link {
    display: inline-flex;
    gap: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* Verwaltungsbereich */
.admin-main {
    width: min(1180px, calc(100% - 40px));
    margin: 42px auto 70px;
}

.admin-login {
    width: min(480px, 100%);
    margin: 0 auto;
    padding: 40px;
    border-top: 4px solid var(--green);
}

.admin-login h1,
.admin-dashboard h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
}

.admin-login > p:not(.admin-alert) {
    margin: 0.7rem 0 1.8rem;
    color: var(--muted);
    line-height: 1.55;
}

.admin-alert {
    margin: 0 0 1.2rem;
    padding: 0.9rem 1rem;
}

.admin-back-link {
    display: inline-block;
    margin-top: 1.4rem;
    color: var(--muted);
    text-decoration: none;
}

.admin-back-link:hover {
    color: var(--text);
    text-decoration: underline;
}

.admin-dashboard {
    padding: clamp(26px, 4vw, 48px);
}

.admin-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.admin-toolbar p:last-child,
.admin-empty p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-actions form {
    margin: 0;
}

.admin-actions .submit-button {
    min-height: 42px;
}

.admin-logout {
    border: 1px solid var(--green);
    text-decoration: none;
}

.admin-logout {
    color: var(--text);
    background: #fff;
    border-color: #bcbcbc;
}

.admin-logout:hover {
    text-decoration: underline;
}

.admin-empty {
    padding: 2.5rem;
    text-align: center;
    background: var(--green-soft);
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    font-size: 11px;
}

.admin-table th,
.admin-table td {
    padding: 0.9rem 0.8rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    color: #fff;
    background: var(--green);
    font-weight: 600;
    white-space: nowrap;
}

.admin-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 720px) {
    .header-inner {
        min-height: 86px;
    }

    .brand img {
        width: 160px;
    }

    .green-bar {
        min-height: 34px;
    }

    .hero-inner {
        padding: 28px 0 18px;
    }

    .field-grid,
    .format-options {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-legal {
        grid-column: 1 / -1;
    }

    .admin-main {
        width: min(100% - 28px, 1180px);
        margin-top: 28px;
    }

    .admin-login {
        padding: 28px 22px;
    }

    .admin-toolbar,
    .admin-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

@media (max-width: 430px) {
    .header-inner,
    .hero-inner,
    .content-shell,
    .footer-inner {
        width: min(100% - 28px, 1040px);
    }

    .brand img {
        width: 150px;
    }

    .content-shell {
        margin-bottom: 45px;
    }

    .form-card {
        padding: 26px 20px 30px;
    }

    .submit-button {
        width: 100%;
    }

    .information-box,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        gap: 2rem;
    }

    .footer-legal {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}
