/* ======== Grundfarben / Variablen ======== */
:root {
    --green: #66b032;
    --white: #ffffff;
    --light-green: #c4d600;
    --accent: #ffb703;
    --background: #5b5b5b;
    --text: #333;
}

/* ======== Grundlayout ======== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    color: var(--text);
    background-color: var(--white);
    scroll-behavior: smooth;
}

/* ======== Header-Bereich ======== */
header {
    background: url('../img/header1.webp') center center/cover no-repeat;
    height: 100vh;
    position: relative;
    color: white;
}

header .overlay {
    background: rgba(0, 0, 0, 0.36);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 40vh;
}

header h1 {
    font-size: 3em;
    margin: 0;
}

header p {
    font-size: 1.2em;
    margin: 10px 0 20px;
}

/* ======== Scroll-Button ======== */
.scroll-button {
    background: var(--green);
    color: white;
    margin-top: 50px;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s;
}

.scroll-button:hover {
    background: var(--light-green);
}

/* ======== Navigation ======== */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ab701682;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 10px 30px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

nav li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    padding: 10px 5px;
    display: inline-block;
    transition: color 0.3s ease;
    font-size: 1rem;
}

/* Unterstreichungs-Animation */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 0%;
    height: 2px;
    background: var(--white);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav a:hover,
nav a:focus {
    color: var(--white);
}

nav a:hover::after,
nav a:focus::after {
    width: 100%;
}


#nav-list li a.active::after {
    width: 100%;
}

/* ======== Hamburger-Menü ======== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px 20px;
    z-index: 1100;
    position: absolute;
    right: 10px;
    top: 10px;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background: var(--white);
    margin: 4px 0;
    transition: 0.4s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ======== Sektionen ======== */
.section {
    padding: 80px 20px;
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.section.white {
    background: var(--white);
}

.section.green {
    background: var(--green);
    color: white;
}

/* ======== Eventblöcke ======== */
.eventblock {
    margin: 3rem;
}

.event-item {
    margin: 1.6rem 0;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.event-header {
    padding: 12px 16px;
    background: rgba(0,0,0,0.12);
    border-radius: 6px;
    color: white;
    font-size: 1.05rem;
    cursor: default;
    user-select: none;
    transition: all 0.2s ease;
}

.event-item.past .event-header {
    cursor: pointer;
    background: rgba(0,0,0,0.18);
}

.event-item.past .event-header:hover {
    background: rgba(0,0,0,0.26);
}

.event-item.past .event-header::after {
    content: " ▼";
    float: right;
    font-size: 0.85em;
    transition: transform 0.3s ease;
}

.event-item.past .event-header.active::after {
    transform: rotate(180deg);
}

.event-details {
    padding: 0 16px;
    background: rgba(0,0,0,0.04);
    border-radius: 0 0 6px 6px;
    line-height: 1.5;
    overflow: hidden;
    transition: padding 0.25s ease, max-height 0.4s ease-out;
}

.event-item.future .event-details {
    padding: 16px;
    background: transparent;
}

.event-item.past .event-details {
    display: none;
    padding: 16px;                      /* ← fester Wert, wird nicht animiert */
    overflow: hidden;
    background: rgba(0,0,0,0.04);
    border-radius: 0 0 6px 6px;
    line-height: 1.5;
    /* Wichtig: KEINE Transition mehr auf height, padding, max-height */
    transition: none;                   /* ← das ist der Schlüssel */
}

.event-item.past .event-header.active + .event-details {
    padding: 16px;
}

/* ======== Formulare ======== */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 20px auto 0;
}

form input,
form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

form button, .btn {
    background: var(--green);
    color: white;
    padding: 10px;
    border: none;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover, .btn:hover{
    background: var(--light-green);
}
/* ======== Texte / Links ======== */

a[href] {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a[href]:hover {
    color: #288175;
    transform: scale(1.1);
}

.green {
    color: var(--green);
}
.bigtext {
    font-size: 2.0em;
}

/* ======== Bilder ======== */
img,
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
}

.centered-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@keyframes slideFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======== Footer ======== */
footer {
    background: var(--green);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}


/* ========== Responsive Media Queries ========== */

/* Smartphones */
@media (max-width: 600px) {
    header .overlay {
        padding-top: 60vh;
    }

    header h1 {
        font-size: 2em;
    }

    header p {
        font-size: 1em;
    }
}

/* Tablets und kleinere Laptops */
@media (max-width: 768px) {
    /* Hamburger sichtbar und oben rechts positionieren */
    .hamburger {
        display: flex;
        flex-direction: column;
        position: fixed;           /* <-- wichtig: fest positionieren */
        top: 15px;
        right: 20px;
        z-index: 2001;             /* über dem Menü */
        background: none;
        border: none;
    }

    .hamburger span {
        background: var(--white);
    }

    /* Navigation fix oben */
    nav {
        position: fixed;           /* <-- fixieren */
        top: 0;
        left: 0;
        width: 100%;
        background: #ab7016;
        z-index: 2000;
    }

    /* Standard-Zustand: versteckt */
    #nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
        margin: 0;
        background: #ab7016;

        max-height: 0;
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        overflow: hidden;

        transition:
                max-height 0.3s ease,
                opacity 0.3s ease,
                transform 0.3s ease;
    }

    #nav-list.show {
        max-height: 500px; /* genug Platz */
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
        padding: 60px 0 20px;
    }




    nav a {
        color: white;
        font-size: 1.2rem;
        padding: 10px 0;
    }

    .section {
        padding: 50px 15px;
    }

    header .overlay {
        padding-top: 40vh;
    }

    header h1 {
        font-size: 1.8em;
    }

    header p {
        font-size: 1em;
    }
}

/* Sehr kleine Smartphones */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    nav a {
        font-size: 0.95rem;
    }

    .eventblock {
        margin: 1.5rem;
    }
}
