/* EventApp – Startseite */
/* Seitencontainer */
.home-page {
    width: min(1500px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0;
}

/* Begrüßungsbereich */
.home-welcome {
    margin-bottom: 32px;
}

    .home-welcome h1 {
        margin: 0 0 12px;
        font-size: 2.4rem;
    }

    .home-welcome p {
        margin: 0;
        color: var(--text-secondary);
        font-size: 1.1rem;
    }

/* Event-Slider */
.home-slider {
    width: 100%;
    margin-bottom: 24px;
    overflow: hidden;
    background: transparent;
}

.home-slider-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.home-slider-slide {
    display: none;
    flex: 0 1 100%;
    min-width: 0;
    text-align: center;
}

    .home-slider-slide.active {
        display: block;
    }

    .home-slider-slide img {
        display: block;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 240px;
        object-fit: contain;
        margin: 0 auto;
    }

.home-slider-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-secondary);
    text-align: center;
}

    .home-slider-placeholder h2 {
        margin: 0 0 8px;
        color: var(--text);
    }

    .home-slider-placeholder p {
        margin: 0;
    }

/* Hauptaufteilung: News 50 %, Events 30 %, Partner 20 % */
.home-content.home-content-news-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: 24px;
    width: 100%;
}

/* News links */
.home-news-section {
    grid-column: auto;
    min-width: 0;
}

/* Events in der Mitte */
.home-upcoming-column {
    display: contents;
}

/* Events-Container */
.home-upcoming-section {
    grid-column: auto;
    min-width: 0;
}

/* Partner rechts */
.home-partners {
    grid-column: auto;
    min-width: 0;
    margin-top: 0;
}

/* Allgemeine Bereichskarten */
.home-section {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

    .home-section h2 {
        margin: 0 0 18px;
        font-size: 1.25rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

/* News- und Eventlisten */
.home-news-list,
.home-event-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* Eventkarten */
.home-event-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
}

    .home-event-item h3 {
        margin: 8px 0;
        font-size: 1rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .home-event-item p {
        margin: 0 0 8px;
        color: var(--text-secondary);
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

        .home-event-item p:last-child {
            margin-bottom: 0;
        }

    /* Eventlinks */
    .home-event-item a,
    .home-event-item a:link,
    .home-event-item a:visited,
    .home-event-item a:active {
        display: inline-block;
        margin-top: 8px;
        color: var(--accent);
        text-decoration: none;
        overflow-wrap: anywhere;
    }

        .home-event-item a:hover {
            color: var(--text);
            text-decoration: none;
        }

        .home-event-item a:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 3px;
            border-radius: 2px;
        }

/* Partnerbereich */
.home-partners {
    min-width: 0;
}

/* Partnerkarte und Rotation */
.home-partner-rotator {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 150px;
    padding: 12px 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
}

.home-partner-item,
.home-partner-item:link,
.home-partner-item:visited,
.home-partner-item:hover,
.home-partner-item:active {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 8px 4px;
    border-radius: 8px;
    color: var(--text);
    text-align: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms ease;
}

    .home-partner-item.is-active {
        opacity: 1;
        visibility: visible;
    }

    .home-partner-item[hidden] {
        display: none;
    }

    .home-partner-item:hover {
        background: var(--surface-hover);
    }

    .home-partner-item:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

/* Partnerbilder */
.home-partner-image,
.home-partner-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    max-width: 100%;
    flex: 0 0 56px;
    border-radius: 10px;
    object-fit: contain;
}

.home-partner-placeholder {
    background: var(--surface);
    font-size: 28px;
}

/* Partnername */
.home-partner-name {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Partneranfrage-Button */
.home-partner-contact {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.home-partner-contact-button {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: var(--text);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: filter 200ms ease;
}

    .home-partner-contact-button:hover {
        filter: brightness(1.1);
    }

    .home-partner-contact-button:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 3px;
    }

/* Alle drei Container dürfen schrumpfen */
.home-content-news-layout > .home-section,
.home-upcoming-column > .home-section {
    width: 100%;
    min-width: 0;
}

/* Animationen reduzieren, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
    .home-partner-item {
        transition: none;
    }
}

/* Tablet und mobile Navigation */
@media (max-width: 1000px) {
    .home-content.home-content-news-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-news-section {
        grid-column: 1;
    }

    .home-upcoming-column {
        display: contents;
        grid-column: 1;
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    }
}

/* Kleine Displays */
@media (max-width: 600px) {
    .home-page {
        width: calc(100% - 24px);
        padding: 20px 0;
    }

    .home-slider-placeholder {
        min-height: 160px;
        padding: 16px;
    }

    .home-section {
        padding: 16px;
    }

    .home-content.home-content-news-layout {
        gap: 16px;
    }

    .home-upcoming-column {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .home-event-item {
        padding: 12px;
    }
}