:root {
    --ink: #211d1f;
    --muted: #695f63;
    --line: #e8ded8;
    --paper: #fffaf6;
    --soft: #f4ece6;
    --brand: #a42a66;
    --brand-dark: #702047;
    --green: #35685a;
    --gold: #c79337;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(33, 29, 31, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
    padding: 12px clamp(18px, 4vw, 54px);
    background: rgba(255, 250, 246, 0.92);
    border-bottom: 1px solid rgba(232, 222, 216, 0.85);
    backdrop-filter: blur(14px);
}

.brand img {
    width: min(230px, 48vw);
    height: auto;
}

nav {
    display: flex;
    gap: clamp(12px, 3vw, 32px);
    font-size: 0.95rem;
    font-weight: 700;
}

nav a,
.site-footer a {
    text-decoration: none;
}

nav a:hover,
.site-footer a:hover {
    color: var(--brand);
}

.hero {
    position: relative;
    min-height: calc(100vh - 74px);
    display: grid;
    align-items: end;
    overflow: hidden;
    isolation: isolate;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(33, 29, 31, 0.74), rgba(33, 29, 31, 0.24) 58%, rgba(33, 29, 31, 0.08));
}

.hero-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("../img/hero.jpg") center 44% / cover no-repeat;
}

.hero-content {
    width: min(760px, calc(100% - 36px));
    margin: 0 0 clamp(54px, 8vw, 120px) clamp(18px, 6vw, 86px);
    color: var(--white);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffd7e8;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.08;
}

h1 {
    max-width: 720px;
    font-size: clamp(2.6rem, 7vw, 6.6rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
    font-size: 1.18rem;
}

.hero-content p:not(.eyebrow) {
    max-width: 650px;
    margin: 22px 0 0;
    font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.hero-actions,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    color: var(--white);
    background: var(--brand);
}

.button.primary:hover {
    background: var(--brand-dark);
}

.button.secondary {
    color: var(--ink);
    background: var(--white);
    border-color: var(--line);
}

.section {
    padding: clamp(58px, 9vw, 108px) clamp(18px, 5vw, 68px);
}

.section-copy {
    max-width: 780px;
    margin-bottom: 34px;
}

.section-copy p:last-child {
    color: var(--muted);
    font-size: 1.08rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-grid article,
.course-item,
.course-info,
.contact-form,
.admin-shell,
.editor-row,
.admin-login {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.feature-grid article {
    overflow: hidden;
}

.feature-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.feature-grid h3,
.feature-grid p {
    margin-left: 18px;
    margin-right: 18px;
}

.feature-grid h3 {
    margin-top: 18px;
}

.feature-grid p {
    margin-bottom: 22px;
    color: var(--muted);
}

.courses {
    background: var(--soft);
}

.course-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.course-list {
    display: grid;
    gap: 14px;
}

.course-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 20px;
}

.course-item time {
    color: var(--green);
    font-weight: 800;
}

.course-item h3 {
    margin-top: 4px;
}

.course-item p {
    margin: 8px 0 0;
    color: var(--muted);
}

.course-meta {
    display: grid;
    align-content: start;
    justify-items: end;
    gap: 8px;
    min-width: 130px;
}

.course-meta span {
    color: var(--brand-dark);
    font-size: 0.9rem;
    font-weight: 800;
}

.course-meta span.is-available {
    color: #2f7a4d;
}

.course-meta span.is-booked-out {
    color: #b32634;
}

.course-info {
    padding: 24px;
}

.course-info ul {
    padding-left: 20px;
}

.course-info li + li {
    margin-top: 8px;
}

.course-info h3 + ul {
    margin-top: 12px;
}

.course-info ul + h3 {
    margin-top: 26px;
}

.gallery {
    display: grid;
    grid-template-columns: 0.8fr 1.1fr 1fr;
    min-height: 420px;
    background: var(--green);
    color: var(--white);
}

.gallery img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.gallery div {
    display: grid;
    align-content: center;
    padding: clamp(30px, 5vw, 68px);
}

.gallery .eyebrow {
    color: #d8efe7;
}

.gallery h2 {
    font-size: clamp(1.8rem, 3.2vw, 3rem);
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: clamp(28px, 6vw, 70px);
    align-items: start;
}

address {
    margin-top: 18px;
    color: var(--muted);
    font-style: normal;
    font-size: 1.08rem;
}

address a {
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
}

.contact-form,
.admin-login {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 4vw, 34px);
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--white);
    font: inherit;
}

select {
    appearance: auto;
}

textarea {
    resize: vertical;
}

.hidden-field {
    position: absolute;
    left: -9999px;
}

.form-status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 800;
}

.form-status.success {
    color: #174f32;
    background: #ddf5e7;
}

.form-status.error {
    color: #7a2032;
    background: #ffe4ea;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px clamp(18px, 5vw, 68px);
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0;
}

.admin-page {
    background: var(--soft);
}

.admin-shell {
    width: min(980px, calc(100% - 28px));
    margin: 28px auto;
    padding: clamp(20px, 4vw, 34px);
}

.admin-shell h1 {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.admin-help,
.section-hint {
    max-width: 760px;
    color: var(--muted);
}

.admin-help {
    margin: 8px 0 24px;
}

.section-hint {
    margin: -4px 0 18px;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
}

.course-editor {
    display: grid;
    gap: 24px;
}

.editor-section h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.editor-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 0 0 22px;
    padding: 0;
    overflow: hidden;
}

.editor-row .wide {
    grid-column: 1 / -1;
}

.course-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    color: var(--white);
    background: var(--green);
}

.course-card-header div {
    display: grid;
    gap: 4px;
}

.course-card-header span,
.course-card-header small {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.course-card-header strong {
    font-size: 1.2rem;
}

.course-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
}

.course-fields h3 {
    grid-column: 1 / -1;
    font-size: 1.05rem;
}

.participants-editor {
    margin: 0 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.participants-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.participants-heading h3 {
    font-size: 1rem;
}

.participants-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.participant-list {
    display: grid;
    gap: 10px;
}

.participant-list:empty::before {
    content: "Noch keine Teilnehmer eingetragen.";
    color: var(--muted);
    font-size: 0.94rem;
}

.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.participant-summary {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.participant-summary span,
.participant-summary small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.participant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.participant-actions .button {
    min-height: 38px;
    padding: 8px 12px;
}

.remove-row,
.remove-participant {
    width: fit-content;
    border: 0;
    color: #8a2030;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.remove-row {
    margin: -4px 20px 20px;
}

.past-courses {
    margin-top: 4px;
    padding: 0 2px;
}

.past-courses summary {
    cursor: pointer;
    font-weight: 900;
    padding: 16px 0;
    color: var(--brand-dark);
}

.participant-dialog {
    width: min(520px, calc(100% - 28px));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    color: var(--ink);
    background: var(--white);
    box-shadow: var(--shadow);
}

.participant-dialog::backdrop {
    background: rgba(33, 29, 31, 0.42);
}

.participant-dialog-form {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 4vw, 30px);
}

.participant-dialog-form h2 {
    font-size: 1.45rem;
}

code {
    font-family: Consolas, Monaco, monospace;
}

@media (max-width: 880px) {
    .feature-grid,
    .course-layout,
    .gallery,
    .contact {
        grid-template-columns: 1fr;
    }

    .gallery img {
        min-height: 260px;
    }

    .course-item {
        grid-template-columns: 1fr;
    }

    .course-meta {
        justify-items: start;
    }

    .editor-row {
        grid-template-columns: 1fr 1fr;
    }

    .course-fields {
        grid-template-columns: 1fr 1fr;
    }

    .participant-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .participant-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        min-height: 680px;
    }

    .hero::after {
        background: linear-gradient(180deg, rgba(33, 29, 31, 0.2), rgba(33, 29, 31, 0.78));
    }

    .hero-content {
        margin: 0 18px 42px;
    }

    .button {
        width: 100%;
    }

    .editor-row {
        grid-template-columns: 1fr;
    }

    .course-fields {
        grid-template-columns: 1fr;
    }

    .course-card-header,
    .participants-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
