/* Design 3 - dynamisch, community-orientiert, Full-Width Hero */

:root {
    --brand-blue: #5b818f;
    --brand-blue-dark: #385560;
    --brand-blue-soft: #eef4f6;

    --section-light: #ffffff;
    --section-alt: #e8eef0;

    --text-main: #1f2c33;
    --text-muted: #5f7480;
    --text-light: #ffffff;

    --accent: #dbc58f;
    --accent-deep: #b99e5f;

    --border-light: #d8e2e5;

    --overlay-rgb: 20 33 39;
    --shadow-rgb: 20 33 39;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.activity-page {
    color: var(--text-main);
    background-color: var(--section-light);

    overflow-x: clip;
}


/* Hero */

.activity-hero {
    position: relative;

    display: flex;
    align-items: flex-end;

    min-height: min(86vh, 760px);

    overflow: hidden;
}

/* Ohne Hauptbild braucht der helle Titel einen eigenen Hintergrund.
   Die leere Bildflaeche entfaellt und der Einstieg wird kompakter. */
.activity-hero:not(:has(.activity-hero-image)) {
    min-height: clamp(300px, 38vw, 480px);
    background: linear-gradient(145deg, var(--brand-blue), var(--brand-blue-dark));
}

.activity-hero-image {
    position: absolute;
    inset: 0;
}

.activity-hero-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgb(var(--overlay-rgb) / 12%) 0%,
            rgb(var(--overlay-rgb) / 24%) 45%,
            rgb(var(--overlay-rgb) / 88%) 100%
        ),
        radial-gradient(
            125% 85% at 50% 100%,
            rgb(var(--overlay-rgb) / 40%),
            rgb(var(--overlay-rgb) / 0) 72%
        );
}

.activity-hero-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    animation: activity-kenburns 20s ease-out both;
}

.activity-hero-content {
    position: relative;
    z-index: 1;

    width: min(1200px, calc(100% - 64px));
    margin: 0 auto;
    padding: 88px 0 96px;

    color: var(--text-light);
}

.activity-hero-content::before {
    content: "";

    display: block;
    width: 72px;
    height: 3px;
    margin-bottom: 26px;

    background: linear-gradient(90deg, var(--accent), rgb(219 197 143 / 0));

    transform-origin: left center;
    animation: activity-grow 0.8s var(--ease) both;
}

.activity-title {
    max-width: 16ch;
    margin: 0;

    color: var(--text-light);

    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    text-wrap: balance;
    text-shadow: 0 2px 40px rgb(var(--overlay-rgb) / 45%);

    animation: activity-rise 0.9s var(--ease) 0.08s both;
}

.activity-subtitle {
    max-width: 640px;
    margin: 24px 0 0;

    color: rgb(255 255 255 / 88%);

    font-size: clamp(1.15rem, 1.8vw, 1.42rem);
    line-height: 1.55;
    text-shadow: 0 2px 24px rgb(var(--overlay-rgb) / 40%);

    animation: activity-rise 0.9s var(--ease) 0.2s both;
}


/* Eckdaten */

.activity-meta {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;

    width: min(1200px, calc(100% - 64px));
    margin: -62px auto 84px;
    padding: 0;

    animation: activity-rise 0.9s var(--ease) 0.32s both;
}

.activity-meta-item {
    position: relative;

    padding: 28px 24px 26px;

    background-color: var(--section-light);

    border: 1px solid var(--border-light);
    border-radius: 18px;
    overflow: hidden;

    box-shadow: 0 26px 52px -30px rgb(var(--shadow-rgb) / 50%);

    text-align: center;

    transition:
        transform 0.3s var(--ease),
        box-shadow 0.3s var(--ease);
}

.activity-meta-item::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 3px;

    background: linear-gradient(90deg, var(--brand-blue), var(--accent));
}

.activity-meta-item:hover {
    transform: translateY(-6px);

    box-shadow: 0 34px 60px -28px rgb(var(--shadow-rgb) / 58%);
}

.activity-meta-label {
    margin-bottom: 9px;

    color: var(--brand-blue);
    opacity: 1;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.activity-meta-value {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
}


/* Hauptinhalt */

.activity-content {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 32px;

    font-size: 1.12rem;
    line-height: 1.8;
}

.activity-content > p:first-child {
    color: var(--text-main);

    font-size: clamp(1.22rem, 2vw, 1.45rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.activity-content p {
    margin: 0 0 1.3em;
}

.activity-content h2 {
    margin-top: 60px;
    margin-bottom: 18px;

    color: var(--brand-blue-dark);

    font-size: clamp(1.7rem, 3vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.018em;
}

.activity-content h2::after {
    content: "";

    display: block;
    width: 48px;
    height: 3px;
    margin-top: 16px;

    background: linear-gradient(90deg, var(--accent), rgb(219 197 143 / 0));
}

.activity-content a {
    color: var(--brand-blue-dark);

    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;

    transition: color 0.2s var(--ease);
}

.activity-content a:hover {
    color: var(--accent-deep);
}


/* Galerie */

.activity-gallery {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: clamp(170px, 19vw, 230px);
    gap: 14px;

    width: min(1200px, calc(100vw - 64px)) !important;
    max-width: none !important;

    margin-top: 76px !important;
    margin-right: 0 !important;
    margin-bottom: 76px !important;
    margin-left: 50% !important;

    transform: translateX(-50%);
}

.activity-content > .activity-gallery:last-child {
    margin-bottom: 0 !important;
}

.activity-gallery figure {
    position: relative;

    grid-column: span 2;

    border-radius: 14px;
    overflow: hidden;

    box-shadow: 0 20px 44px -28px rgb(var(--shadow-rgb) / 50%);
}

.activity-gallery figure:nth-child(5n + 1) {
    grid-column: span 4;
    grid-row: span 2;
}

.activity-gallery figure:nth-child(5n + 2),
.activity-gallery figure:nth-child(5n + 3) {
    grid-column: span 2;
    grid-row: span 1;
}

/* Ein Bild: breites Panorama */
.activity-gallery figure:first-child:nth-last-child(1) {
    grid-column: span 6;
    grid-row: span 2;
}

/* Zwei oder vier Bilder: gleichmaessiges Raster */
.activity-gallery figure:first-child:nth-last-child(2),
.activity-gallery figure:first-child:nth-last-child(2) ~ figure,
.activity-gallery figure:first-child:nth-last-child(4),
.activity-gallery figure:first-child:nth-last-child(4) ~ figure {
    grid-column: span 3;
    grid-row: span 1;
}

.activity-gallery figure::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        180deg,
        rgb(var(--overlay-rgb) / 0) 50%,
        rgb(var(--overlay-rgb) / 34%) 100%
    );

    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.activity-gallery img {
    height: 100% !important;

    transition: transform 0.7s var(--ease);
}

.activity-gallery figure:hover img {
    transform: scale(1.06);
}

.activity-gallery figure:hover::after {
    opacity: 1;
}


/* Kontakt und CTA */

.activity-contact {
    position: relative;

    width: min(1200px, calc(100% - 64px));
    max-width: none;
    margin: 96px auto 104px;
    padding: 64px 56px 68px;

    background:
        radial-gradient(
            90% 130% at 0% 0%,
            #f4f9fa 0%,
            rgb(244 249 250 / 0) 60%
        ),
        radial-gradient(
            90% 130% at 100% 100%,
            #dfe9ec 0%,
            rgb(223 233 236 / 0) 60%
        ),
        var(--section-alt);

    border: 1px solid var(--border-light);
    border-radius: 28px;
    overflow: hidden;

    text-align: center;
}

.activity-contact::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 4px;

    background: linear-gradient(
        90deg,
        var(--brand-blue),
        var(--accent),
        var(--brand-blue)
    );
}

.activity-contact h2 {
    margin: 0 0 16px;

    color: var(--brand-blue-dark);

    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.022em;
}

.activity-participation p {
    max-width: 640px;
    margin: 0 auto;

    color: var(--text-muted);

    font-size: 1.08rem;
    line-height: 1.75;
}

.activity-contact-person {
    margin: 30px 0 0;

    color: var(--text-muted);
}

.activity-contact-person strong {
    color: var(--brand-blue-dark);
}

.activity-contact-email {
    margin: 6px 0 0;
}

.activity-contact-email a:not(.activity-cta) {
    color: var(--brand-blue-dark);

    text-decoration: none;
    border-bottom: 1px solid var(--accent);

    transition: color 0.2s var(--ease);
}

.activity-contact-email a:not(.activity-cta):hover {
    color: var(--accent-deep);
}

.activity-cta {
    position: relative;

    margin-top: 32px;
    padding: 16px 36px;

    background-color: var(--brand-blue);
    color: var(--text-light);

    border-radius: 999px;
    overflow: hidden;

    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;

    box-shadow: 0 16px 32px -14px rgb(var(--shadow-rgb) / 60%);

    transition:
        transform 0.25s var(--ease),
        background-color 0.25s var(--ease),
        box-shadow 0.25s var(--ease);
}

.activity-cta::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        120deg,
        rgb(255 255 255 / 0) 35%,
        rgb(255 255 255 / 32%) 50%,
        rgb(255 255 255 / 0) 65%
    );

    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
}

.activity-cta:hover {
    background-color: var(--brand-blue-dark);
    transform: translateY(-3px);

    box-shadow: 0 22px 40px -16px rgb(var(--shadow-rgb) / 65%);
}

.activity-cta:hover::after {
    transform: translateX(120%);
}

.activity-cta:focus-visible {
    outline: 2px solid var(--accent-deep);
    outline-offset: 3px;
}


/* Animationen */

@keyframes activity-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes activity-grow {
    from {
        opacity: 0;
        transform: scaleX(0);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes activity-kenburns {
    from {
        transform: scale(1.09);
    }

    to {
        transform: scale(1);
    }
}


/* Tablet */

@media (max-width: 900px) {
    .activity-hero {
        min-height: 600px;
    }

    .activity-hero-content {
        padding: 72px 0 80px;
    }

    .activity-meta {
        max-width: 640px;
        margin-bottom: 64px;
    }

    .activity-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
    }

    .activity-gallery figure {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .activity-contact {
        padding: 52px 32px 56px;
    }
}


/* Smartphone */

@media (max-width: 600px) {
    .activity-hero {
        min-height: 520px;
    }

    .activity-hero-content {
        width: calc(100% - 40px);
        padding: 56px 0 60px;
    }

    .activity-meta {
        width: calc(100% - 40px);
        margin-top: -48px;
    }

    .activity-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .activity-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 260px;

        width: calc(100vw - 40px);
    }

    .activity-contact {
        width: calc(100% - 40px);
        margin: 72px auto 80px;
        padding: 42px 24px 46px;

        border-radius: 20px;
    }
}


/* Reduzierte Bewegung */

@media (prefers-reduced-motion: reduce) {
    .activity-page *,
    .activity-page *::before,
    .activity-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
