/* ==========================================================
   STYLE.CSS – AUFGERÄUMTE VERSION

   Jede Einstellung steht nur einmal an der passenden Stelle.
   Es gibt keine nachträglichen Reparatur- oder Überschreibungsblöcke.

   SCHNELLFINDER:
   - Schrift:              Abschnitt 1
   - Farben:               Abschnitt 2
   - Seitenhintergrund:    Abschnitt 3
   - Kopfgrafik:           Abschnitt 4
   - Einleitung:           Abschnitt 5
   - Veranstaltung:        Abschnitt 6
   - Teams:                Abschnitt 7
   - Anmeldung/Formular:   Abschnitt 8
   - Impressum:            Abschnitt 9
   - Adminbereich:         Abschnitt 10
   - Tablet/Smartphone:    Abschnitt 11

   CSS-BEGRIFFE:
   margin       = äußerer Abstand
   padding      = innerer Abstand
   gap          = Abstand zwischen Elementen
   width        = Breite
   max-width    = maximale Breite
   font-size    = Schriftgröße
   line-height  = Zeilenhöhe
   border-radius = Rundung
   ========================================================== */


/* ==========================================================
   1. SCHRIFT
   ========================================================== */

@font-face {
    font-family: "BlockFont";
    src: url("fonts/block.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ==========================================================
   2. FARBEN UND DESIGNWERTE
   ========================================================== */

:root {
    --surface: #ffffff;       /* Karten und helle Flächen */
    --text: #171821;          /* normale Textfarbe */
    --muted: #6f7180;         /* zurückhaltende Nebenfarbe */
    --line: #ded9cf;          /* Linien und Rahmen */
    --accent: #ff7a1a;        /* Hauptorange */
    --accent-dark: #d95313;   /* dunkleres Orange */
    --ink: #181a27;           /* sehr dunkle Flächen */
    --success: #146c43;       /* Erfolgsmeldungen */
    --danger: #a52a2a;        /* Fehlermeldungen */
    --shadow: 0 18px 50px rgba(24, 26, 39, 0.10);
    --radius: 24px;
}


/* ==========================================================
   3. GRUNDEINSTELLUNGEN DER SEITE
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    letter-spacing: normal;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 221, 113, 0.58), transparent 28%),
        radial-gradient(circle at 88% 22%, rgba(255, 123, 34, 0.38), transparent 30%),
        linear-gradient(135deg, #ffb52e 0%, #ff7a1a 50%, #f05a24 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: "BlockFont", sans-serif;
    line-height: 1.2;
}

a {
    color: inherit;
}

.container {
    width: min(1520px, calc(100% - 36px));
    margin-inline: auto;
}

.section {
    padding-block: 0;
}

/* Diese kleinen Zwischenüberschriften sollen nicht sichtbar sein. */
.section-kicker,
.eyebrow {
    display: none;
}

/* Gemeinsame Grundeinstellungen für große Überschriften. */
.hero h1,
.event-section h2,
.section h2,
.signup-section h2,
.admin-section h2,
.login-card h1 {
    margin: 0;
    font-family: "BlockFont", sans-serif;
    line-height: 1.05;
}


/* ==========================================================
   4. KOPFGRAFIK
   ========================================================== */

.hero {
    padding-top: 0;
}

.hero-image {
    display: block;
    width: min(100%, 620px);  /* maximale Breite des Bildes */
    aspect-ratio: 4 / 5;      /* Hochformat */
    margin: 0 auto 0rem;      /* 3rem Abstand zum Text darunter */
    object-fit: contain;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}


/* ==========================================================
   5. EINLEITUNGSTEXT UNTER DER KOPFGRAFIK
   ========================================================== */

.intro-section {
    display: block;
    width: min(90vw, 1200px);    /* 70 % der sichtbaren Bildschirmbreite */
    max-width: none;
    margin: 0 auto;
    padding: -50;
    text-align: center;
}

.intro-section .prose,
.intro-section .lead {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
 	font-size: clamp(1.1rem, 1.7vw, 2.3rem);
    line-height: 1.2;
    text-align: center;
}


/* ==========================================================
   6. KOMMENDE VERANSTALTUNG
   ========================================================== */

.event-panel {
    padding-block: 0;
    background: transparent;
    color: inherit;
}

.event-section {
    padding-top: 30px;        /* Abstand vor der Überschrift */
    text-align: center;
}

.event-centered {
    max-width: 820px;
    margin-inline: auto;
}

.event-section h2 {
    margin: 0 0 0px;
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    line-height: 1.05;
}

/* Datum und Ort bleiben in PHP erhalten, werden aber nicht gezeigt. */
.event-facts,
.event-facts.centered {
    display: none;
}

.event-copy,
.centered-copy {
    max-width: 820px;
    margin: 0px auto 0;
    padding: 0;
    color: var(--text);
    font-size: clamp(1.1rem, 1.7vw, 2.3rem); /* wie Einleitungstext */
    line-height: 1.2;
    text-align: center;
}


/* ==========================================================
   7. TEAMLISTE
   ========================================================== */

#teams {
    padding-top: 30px;     /* Platz vor „Wer ist dabei?“ */
    padding-bottom: 30px;  /* Platz nach den Teams */
}

#teams .section-heading {
    display: block;
    width: 100%;
    margin-bottom: 36px;
    text-align: center;
}

#teams .section-heading > div {
    width: 100%;
    text-align: center;
}

#teams h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    text-align: center;
}

.count-badge {
    display: none;
}

.team-list {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;                /* Abstand zwischen den Teams */
    list-style: none;
    counter-reset: teams;
}

.team-list li {
    width: fit-content;
    max-width: 100%;
    min-height: auto;
    padding: 30px;            /* Innenabstand der Teamfelder */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 30px;       /* deutlich weniger rund als bisher */
    box-shadow: 0 18px 40px rgba(37, 24, 71, 0.18);
    color: #ffffff;
    font-family: "BlockFont", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.08;
    text-align: center;
    counter-increment: teams;
}

.team-list li::before {
    content: counter(teams) ".";
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-family: "BlockFont", sans-serif;
    font-size: 0.8em;
}

.team-list li:nth-child(odd) {
    background: linear-gradient(135deg, #175fe8 0%, #00bfae 100%);
}

.team-list li:nth-child(even) {
    background: linear-gradient(135deg, #6d4dff 0%, #245fff 100%);
}

.team-list li span {
    position: relative;
    z-index: 1;
}

.empty-state {
    padding: 38px;
    border: 1px dashed #bdb6aa;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}


/* ==========================================================
   8. ANMELDEBEREICH UND FORMULAR
   ========================================================== */

.signup-section {
    padding-block: 92px;
    background: #ffffff;
    backdrop-filter: blur(10px);
}

.signup-grid {
    width: min(900px, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;                 /* Absatz zwischen Text und Formular */
    align-items: start;
}

.signup-grid > div:first-child {
    position: static;
    text-align: center;
}

.signup-section h2 {
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    text-align: center;
}

.signup-grid > div:first-child p {
    max-width: 720px;
    margin: 24px auto 0;
    font-size: 1.15rem;
    line-height: 1.4;
    text-align: center;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-card,
.content-form,
.login-card {
    padding: clamp(24px, 4vw, 42px);
}

.form-card {
    border-radius: 30px;
    box-shadow: 0 24px 60px rgba(101, 47, 0, 0.16);
}

.form-card .button {
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbc7be;
    border-radius: 13px;
    outline: none;
    background: #fbfaf7;
    color: var(--text);
    font: inherit;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.14);
}

textarea {
    resize: vertical;
}

small,
.optional {
    color: var(--muted);
    font-weight: 400;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.checkbox {
    grid-template-columns: auto 1fr;
    align-items: start;
    font-weight: 400;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
}

.button,
.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.button {
    min-height: 48px;
    padding: 11px 20px;
}

.button.primary {
    background: linear-gradient(135deg, #6d4dff 0%, #245fff 100%);
    box-shadow: 0 12px 28px rgba(57, 76, 255, 0.28);
    color: #ffffff;
}

.button.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.button.danger {
    background: #8c2f2f;
    color: #ffffff;
}

.button.ghost {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #ffffff;
}

.button:disabled {
    opacity: 0.42;
    box-shadow: none;
    cursor: not-allowed;
    filter: grayscale(0.15);
    transform: none;
}

.text-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--muted);
}

.alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 14px;
}

.alert.success {
    background: #e4f6ec;
    border: 1px solid #b8e6cc;
    color: var(--success);
}

.alert.error {
    background: #fbe8e8;
    border: 1px solid #efc1c1;
    color: var(--danger);
}

.closed-card {
    padding: 32px;
}

.captcha-field input.is-valid {
    border-color: #15946c;
    box-shadow: 0 0 0 4px rgba(21, 148, 108, 0.13);
}

.captcha-field input.is-invalid {
    border-color: #b95050;
}

.captcha-field small.is-valid {
    color: #14734f;
    font-weight: 700;
}


/* ==========================================================
   9. IMPRESSUM UND ADMIN-LOGIN
   ========================================================== */

.site-footer {
    padding-block: 48px 60px;
    border-top: 1px solid rgba(23, 24, 33, 0.16);
    background: transparent;
    color: var(--text);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 36px;
}

.imprint {
    margin-top: 14px;
    color: var(--text);
    font-size: 0.9rem;
    opacity: 0.72;
}

.admin-login-button {
    min-height: 46px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(23, 24, 33, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: var(--text);
    text-decoration: none;
}

.admin-login-button:hover {
    background: rgba(255, 255, 255, 0.44);
}

.admin-icon-placeholder {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ff9d28, #5f57ff);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}


/* ==========================================================
   10. ADMINBEREICH
   ========================================================== */

.admin-body {
    background: #efede7;
    background-image: none;
}

.admin-header {
    padding-block: 20px;
    background: var(--ink);
    color: #ffffff;
}

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.admin-nav > div:first-child {
    display: grid;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.admin-main {
    padding-block: 40px 90px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-family: "BlockFont", sans-serif;
    font-size: 2.3rem;
}

.admin-section {
    margin-top: 52px;
}

.inline-control {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.inline-control p {
    margin: 4px 0 0;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    box-shadow: none;
}

.admin-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px 14px;
    border-bottom: 1px solid #ece8df;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.note-cell {
    max-width: 220px;
    color: var(--muted);
}

.status {
    padding: 5px 9px;
    display: inline-flex;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.status.approved {
    background: #dff3e8;
    color: #176b45;
}

.status.pending {
    background: #fff0d8;
    color: #8b5a12;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.table-actions form {
    margin: 0;
}

.mini-button {
    padding: 7px 10px;
    background: #ebe9e3;
    color: var(--text);
    font-size: 0.78rem;
}

.mini-button.approve {
    background: #dff3e8;
    color: #176b45;
}

.mini-button.delete {
    background: #f8dddd;
    color: #8e2525;
}

.login-wrap {
    min-height: 100vh;
    padding: 28px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(480px, 100%);
}


/* ==========================================================
   11. RESPONSIVE DARSTELLUNG
   ========================================================== */

/* Tablet */
@media (max-width: 820px) {
.dashboard-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid,
    .admin-nav,
    .inline-control {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-actions {
        width: 100%;
    }
}

/* Smartphone */
@media (max-width: 580px) {
    .container {
        width: min(calc(100% - 24px), 1120px);
    }

    .intro-section {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
    }

    .event-section {
        padding-top: 64px;
    }

    .signup-section {
        padding-block: 64px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-image {
        width: 100%;
        min-height: 0;
        border-radius: 0;
    }
}
