/* ===== VARIABLES ===== */
:root {
    --orange: #F57C00;
    --orange-dark: #E65100;
    --red: #C62828;
    --dark: #1A1A1A;
    --white: #ffffff;
    --light: #FFFAF5;
    --text: #1A1A1A;
    --muted: #6B6B6B;
    --border: #E8DDD0;
    --radius: 4px;
    --max-w: 900px;
    --gap: 1.5rem;
    --rainbow: linear-gradient(to right, #E53935, #FB8C00, #FDD835, #43A047, #1E88E5, #8E24AA);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }
.site-main { flex: 1; }

/* ===== RAINBOW STRIPE ===== */
.rainbow-stripe { height: 6px; background: var(--rainbow); }

/* ===== HEADER & NAV ===== */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-logo {
    color: var(--orange);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.site-logo:hover { text-decoration: none; opacity: 0.8; }

.site-nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-nav > ul > li { position: relative; }

.site-nav a {
    display: block;
    color: var(--muted);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.site-nav .nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    min-width: 13rem;
    flex-direction: column;
    gap: 0;
    padding: 0.35rem 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--orange);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 120;
}

.site-nav .has-submenu:hover > .nav-submenu,
.site-nav .has-submenu:focus-within > .nav-submenu {
    display: flex;
}

.site-nav .nav-submenu a {
    border-radius: 0;
    padding: 0.65rem 0.9rem;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--orange);
    background: var(--light);
    text-decoration: none;
}

.site-nav a.active {
    color: var(--white);
    background: var(--orange);
    font-weight: 700;
    text-decoration: none;
}

/* ===== HERO ===== */
.hero {
    background: var(--orange);
    color: var(--white);
    padding: 4rem 0 3.5rem;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--rainbow);
}

.hero-tagline {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.hero-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.hero-badge {
    background: rgba(0, 0, 0, 0.22);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hero-badge--free {
    background: var(--red);
}

.hero-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 0.25rem;
    margin-bottom: 2rem;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-feature + .hero-feature::before {
    content: ' · ';
    opacity: 0.6;
}

.hero-description {
    max-width: 540px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.75;
    opacity: 0.9;
}

.hero-description p { margin-bottom: 0.5rem; }
.hero-description p:last-child { margin-bottom: 0; }

/* ===== PAGE H1 ===== */
.page-content h1,
.ablauf-page h1,
.kontakt-page h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--dark);
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 5px solid var(--orange);
}

/* ===== DEFAULT PAGE ===== */
.page-content { padding: 3.5rem 0; }

.content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2.5rem;
    margin-bottom: 0.9rem;
}

.content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--orange-dark);
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}

.content p { margin-bottom: 1rem; }
.content ul, .content ol { margin: 0.75rem 0 1rem 1.5rem; }
.content li { margin-bottom: 0.4rem; }
.content a { color: var(--orange); }

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.content th {
    background: var(--dark);
    color: var(--white);
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.content tr:nth-child(even) td { background: var(--light); }

/* ===== IMAGE GALLERY ===== */
.image-gallery {
    margin-top: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
}

.gallery-item {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
    background: var(--light);
    cursor: zoom-in;
    padding: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.04);
}

.gallery-item:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
}

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.82);
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox-inner {
    max-width: min(100%, 72rem);
    max-height: 100%;
}

.gallery-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 7rem);
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-caption {
    color: var(--white);
    margin-top: 0.8rem;
    text-align: center;
    font-weight: 700;
}

.gallery-lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: var(--white);
    color: var(--dark);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--dark);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-prev { left: 1rem; }
.gallery-lightbox-next { right: 1rem; }

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: var(--orange);
    color: var(--white);
}

/* ===== ABLAUF / TIMELINE ===== */
.ablauf-page { padding: 3.5rem 0; }
.ablauf-intro { color: var(--muted); margin-bottom: 2.5rem; font-size: 1rem; }
.ablauf-intro p { margin-bottom: 0; }

.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--border);
}

.timeline-item { position: relative; padding: 0 0 2rem 1.75rem; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.3rem;
    top: 0.3rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--orange);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px var(--orange);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-time {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.timeline-title { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 0.3rem; }
.timeline-title a {
    color: var(--dark);
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    text-decoration: none;
}

.timeline-title a::after {
    content: "";
    width: 0.45em;
    height: 0.45em;
    border-top: 2px solid var(--orange);
    border-right: 2px solid var(--orange);
    transform: translateY(-0.12em) rotate(45deg);
    opacity: 0.85;
}

.timeline-title a:hover { color: var(--orange); }
.timeline-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* ===== KONTAKT ===== */
.kontakt-page { padding: 3.5rem 0; }
.kontakt-text { font-size: 1.05rem; margin-bottom: 2rem; }
.kontakt-text p { margin-bottom: 0; }

.kontakt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    max-width: 44rem;
}

.kontakt-info {
    background: var(--light);
    border-radius: var(--radius);
    border-left: 4px solid var(--orange);
    padding: 1.75rem;
}

.kontakt-info h2 {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.kontakt-detail { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; font-size: 0.95rem; }

.kontakt-detail-label {
    font-weight: 700;
    color: var(--muted);
    min-width: 4.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.kontakt-detail-value { color: var(--text); }
.kontakt-detail-value a { color: var(--orange); }

.kontakt-form {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.kontakt-form h2 {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.kontakt-form .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.kontakt-form .form-input,
.kontakt-form .form-textarea,
.kontakt-form input[type="text"],
.kontakt-form input[type="email"],
.kontakt-form textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: calc(var(--radius) / 2);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.kontakt-form .form-input:focus,
.kontakt-form .form-textarea:focus,
.kontakt-form input[type="text"]:focus,
.kontakt-form input[type="email"]:focus,
.kontakt-form textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.kontakt-form .form-field { margin-bottom: 0.25rem; }

.kontakt-form button[type="submit"],
.kontakt-form input[type="submit"] {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: calc(var(--radius) / 2);
    cursor: pointer;
    transition: background 0.2s;
}

.kontakt-form button[type="submit"]:hover,
.kontakt-form input[type="submit"]:hover { background: var(--dark); }

.kontakt-form .form-messages { margin-top: 1rem; }
.kontakt-form .alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.75rem 1rem;
    border-radius: calc(var(--radius) / 2);
    font-weight: 600;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.4);
    padding: 1.5rem 0;
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-copy { margin: 0; }

.footer-nav { display: flex; gap: 1.5rem; }

.footer-social { display: flex; gap: 1rem; }

.site-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover { color: var(--primary); }

@media (max-width: 600px) {
    .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* ===== HAMBURGER (immer vorhanden, auf Desktop versteckt) ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    /* Header bleibt einzeilig: Logo links, Toggle rechts */
    .site-header .container {
        height: 60px;
    }

    .nav-toggle { display: flex; }

    /* Dropdown liegt über dem Content (position: absolute relativ zum sticky Header) */
    .site-nav > ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        border-top: 3px solid var(--orange);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
        padding: 0;
        z-index: 99;
    }

    .site-nav.is-open > ul { display: flex; }

    .site-nav .nav-submenu {
        display: flex;
        position: static;
        min-width: 0;
        padding: 0;
        border: none;
        border-top: 1px solid var(--border);
        border-radius: 0;
        box-shadow: none;
        background: var(--light);
    }

    .site-nav li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .site-nav li:last-child { border-bottom: none; }

    .site-nav a {
        display: block;
        padding: 1rem 1.5rem;
        border-radius: 0;
        font-size: 1rem;
        width: 100%;
        color: var(--text);
    }

    .site-nav .nav-submenu a {
        padding-left: 2.25rem;
        font-size: 0.95rem;
    }

    .site-nav a:hover { background: var(--light); color: var(--orange); }

    .site-nav a.active {
        color: var(--orange);
        background: var(--light);
        font-weight: 700;
        border-left: 3px solid var(--orange);
        padding-left: calc(1.5rem - 3px);
    }

    .hero { padding: 3rem 0 2.5rem; }
    .hero-meta { flex-direction: column; align-items: center; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-lightbox { padding: 1rem; }
    .gallery-lightbox-nav {
        top: auto;
        bottom: 1rem;
        transform: none;
        width: 2.75rem;
        height: 2.75rem;
    }
    .gallery-lightbox-prev { left: 1rem; }
    .gallery-lightbox-next { right: 1rem; }
    .kontakt-grid { grid-template-columns: 1fr; }
    .page-content, .ablauf-page, .kontakt-page { padding: 2.5rem 0; }
}

/* ===== HOME INTRO ===== */
.home-intro {
    padding: 3.5rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.home-intro-text {
    max-width: 680px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.home-intro-text p { margin-bottom: 1rem; }
.home-intro-text p:last-child { margin-bottom: 0; }
.home-intro-text strong { color: var(--orange); font-weight: 700; }

/* ===== HOME CARDS ===== */
.home-cards {
    padding: 3rem 0 4rem;
    background: var(--light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border-top: 4px solid var(--orange);
}

.card:nth-child(1) { border-top-color: #E53935; }
.card:nth-child(2) { border-top-color: #43A047; }
.card:nth-child(3) { border-top-color: #1E88E5; }
.card:nth-child(4) { border-top-color: #8E24AA; }
.card:nth-child(5) { border-top-color: #FDD835; }
.card:nth-child(6) { border-top-color: #FB8C00; }

.card-icon {
    margin-bottom: 0.75rem;
    line-height: 1;
    color: var(--orange);
}

.card:nth-child(1) .card-icon { color: #E53935; }
.card:nth-child(2) .card-icon { color: #43A047; }
.card:nth-child(3) .card-icon { color: #1E88E5; }
.card:nth-child(4) .card-icon { color: #8E24AA; }
.card:nth-child(5) .card-icon { color: #FDD835; }
.card:nth-child(6) .card-icon { color: #FB8C00; }

.card-title {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark);
    margin-bottom: 0.6rem;
}

.card-text {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ===== HOME SPONSORS ===== */
.home-sponsors {
    padding: 3rem 0 4rem;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.sponsors-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.5rem 2rem;
}

.sponsor-item {
    min-height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    color: var(--dark);
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.sponsor-item:hover {
    opacity: 0.78;
    transform: translateY(-1px);
    text-decoration: none;
}

.sponsor-item img {
    max-width: 100%;
    max-height: 7rem;
    object-fit: contain;
}

@media (max-width: 640px) {
    .cards-grid { grid-template-columns: 1fr; }
    .home-intro { padding: 2.5rem 0; }
    .home-cards { padding: 2.5rem 0 3rem; }
    .home-sponsors { padding: 2.5rem 0 3rem; }
    .sponsors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== BUTTON ===== */
.btn {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: calc(var(--radius) / 2);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: background 0.2s;
}
.btn:hover { background: var(--dark); color: #fff; }

/* ===== 404 / ERROR ===== */
.error-page {
    padding: 6rem 0;
    text-align: center;
}
.error-inner { max-width: 480px; margin: 0 auto; }
.error-code {
    font-size: 7rem;
    font-weight: 900;
    line-height: 1;
    color: var(--orange);
    margin-bottom: 0.25rem;
}
.error-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
.error-text {
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}
