/* Design 1 - dunkel, elegant, bildstark */

:root {
    --ink: #0f1c22;
    --ink-2: #16272f;

    --brand: #5b818f;
    --brand-deep: #2e4c58;

    --accent: #dbc58f;
    --accent-strong: #c9a959;

    --paper: #ffffff;
    --paper-alt: #f1f5f6;

    --line: #cfdadd;

    --text: #14232a;
    --text-muted: #4a6672;

    --shadow-rgb: 10 22 28;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --gutter: max(32px, calc((100% - 1240px) / 2));
}

.activity-page {
    color: var(--text);
    background-color: var(--paper);

    overflow-x: clip;
}


/* Hero: dunkles Farbfeld, Bild laeuft zum linken Seitenrand */

.activity-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 72px;

    padding: 0 var(--gutter) 0 0;

    background:
        radial-gradient(
            80% 120% at 100% 0,
            rgb(91 129 143 / 32%) 0%,
            rgb(91 129 143 / 0) 60%
        ),
        linear-gradient(155deg, var(--ink-2) 0%, var(--ink) 100%);

    color: var(--paper);
}

/* Ohne Beitragsbild bleibt der Titel im Raster */
.activity-hero:not(:has(.activity-hero-image)) {
    grid-template-columns: minmax(0, 1fr);

    padding: 0 var(--gutter);
}

.activity-hero-image {
    position: relative;
    min-width: 0;

    box-shadow: 30px 0 70px -40px rgb(0 0 0 / 70%);

    animation: activity-reveal 1.1s var(--ease) both;
}

.activity-hero-image img {
    width: 100%;
    height: 100%;
    min-height: clamp(420px, 50vw, 640px);

    object-fit: cover;
}

.activity-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 96px 0 116px;
}

.activity-hero-content::before {
    content: "";

    width: 88px;
    height: 4px;
    margin-bottom: 30px;

    background-color: var(--accent);

    transform-origin: left center;
    animation: activity-grow 0.8s var(--ease) both;
}

.activity-title {
    margin: 0;

    color: var(--paper);

    font-size: clamp(2.9rem, 5.2vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.028em;
    text-wrap: balance;

    animation: activity-rise 0.9s var(--ease) 0.08s both;
}

.activity-subtitle {
    max-width: 34ch;
    margin: 26px 0 0;

    color: rgb(255 255 255 / 80%);

    font-size: clamp(1.12rem, 1.6vw, 1.35rem);
    line-height: 1.55;

    animation: activity-rise 0.9s var(--ease) 0.18s both;
}


/* Eckdaten: weisse Karte, die ins Farbfeld ragt */

.activity-meta {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;

    width: min(1240px, calc(100% - 64px));
    margin: -64px auto 0;

    background-color: var(--paper);
    border-top: 5px solid var(--accent);

    box-shadow: 0 34px 64px -34px rgb(var(--shadow-rgb) / 45%);

    animation: activity-rise 0.9s var(--ease) 0.3s both;
}

.activity-meta-item {
    padding: 30px 32px;

    background: none;
    border-left: 1px solid var(--line);
    border-radius: 0;

    text-align: left;
}

.activity-meta-item:first-child {
    border-left: 0;
}

.activity-meta-label {
    margin-bottom: 10px;

    color: var(--brand-deep);
    opacity: 1;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.activity-meta-value {
    color: var(--text);

    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.35;
}


/* Hauptinhalt */

.activity-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 104px 32px 0;

    font-size: 1.12rem;
    line-height: 1.8;
}

.activity-content > p:first-child {
    color: var(--text);

    font-size: clamp(1.24rem, 1.9vw, 1.45rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.activity-content p {
    margin: 0 0 1.35em;
}

.activity-content h2 {
    margin-top: 64px;
    margin-bottom: 20px;

    color: var(--ink);

    font-size: clamp(1.8rem, 3vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.022em;
}

.activity-content h2::before {
    content: "";

    display: block;
    width: 64px;
    height: 5px;
    margin-bottom: 20px;

    background-color: var(--accent);
}

.activity-content a {
    color: var(--brand-deep);

    text-decoration: underline;
    text-decoration-color: var(--accent-strong);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;

    transition: color 0.2s var(--ease);
}

.activity-content a:hover {
    color: var(--ink);
}


/* Galerie: versetztes Zweispalten-Raster */

.activity-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 28px;

    width: min(1240px, calc(100vw - 64px)) !important;
    max-width: none !important;

    margin-top: 84px !important;
    margin-right: 0 !important;
    margin-bottom: 84px !important;
    margin-left: 50% !important;

    transform: translateX(-50%);
}

.activity-content > .activity-gallery:last-child {
    margin-bottom: 0 !important;
}

.activity-gallery figure {
    position: relative;

    overflow: hidden;

    box-shadow: 0 26px 50px -30px rgb(var(--shadow-rgb) / 55%);
}

/* Jedes zweite Bild versetzt */
.activity-gallery figure:nth-child(even),
.activity-gallery.wp-block-gallery figure.wp-block-image:nth-child(even) {
    margin-top: 64px !important;
}

/* Ungerade Bildanzahl: letztes Bild ueber beide Spalten */
.activity-gallery figure:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.activity-gallery figure:last-child:nth-child(odd) img {
    height: clamp(260px, 30vw, 420px) !important;
}

.activity-gallery figure::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        180deg,
        rgb(var(--shadow-rgb) / 0) 50%,
        rgb(var(--shadow-rgb) / 45%) 100%
    );

    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.activity-gallery img {
    height: clamp(260px, 32vw, 430px) !important;

    transition: transform 0.7s var(--ease);
}

.activity-gallery figure:hover img {
    transform: scale(1.05);
}

.activity-gallery figure:hover::after {
    opacity: 1;
}


/* Kontakt: dunkler Abschlussblock ueber die volle Breite */

.activity-contact {
    position: relative;

    width: 100%;
    max-width: none;
    margin: 112px 0 0;
    padding: 96px max(32px, calc((100% - 860px) / 2)) 104px;

    background:
        radial-gradient(
            70% 120% at 0 0,
            rgb(91 129 143 / 30%) 0%,
            rgb(91 129 143 / 0) 60%
        ),
        linear-gradient(155deg, var(--ink-2) 0%, var(--ink) 100%);

    color: var(--paper);

    text-align: center;
}

.activity-contact::before {
    content: "";

    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);

    width: 120px;
    height: 5px;

    background-color: var(--accent);
}

.activity-contact h2,
.activity-contact h3 {
    margin: 0 0 18px;

    color: var(--paper);

    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.022em;
}

.activity-participation p {
    max-width: 60ch;
    margin: 0 auto;

    color: rgb(255 255 255 / 82%);

    font-size: 1.08rem;
    line-height: 1.75;
}

.activity-contact-person {
    margin: 34px 0 0;

    color: rgb(255 255 255 / 82%);
}

.activity-contact-person strong {
    color: var(--accent);
}

.activity-contact-email {
    margin: 8px 0 0;
}

.activity-contact a:not(.activity-cta) {
    color: var(--paper);

    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;

    transition: color 0.2s var(--ease);
}

.activity-contact a:not(.activity-cta):hover {
    color: var(--accent);
}

.activity-cta {
    position: relative;

    margin-top: 34px;
    padding: 16px 38px;

    background-color: var(--accent);
    color: var(--ink);

    border-radius: 2px;
    overflow: hidden;

    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;

    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 / 55%) 50%,
        rgb(255 255 255 / 0) 65%
    );

    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
}

.activity-cta:hover {
    background-color: #ecdcb4;
    transform: translateY(-3px);

    box-shadow: 0 18px 34px -14px rgb(0 0 0 / 55%);
}

.activity-cta:hover::after {
    transform: translateX(120%);
}

.activity-cta:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}


/* Animationen */

@keyframes activity-rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes activity-grow {
    from {
        opacity: 0;
        transform: scaleX(0);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes activity-reveal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* Tablet */

@media (max-width: 900px) {
    .activity-hero {
        grid-template-columns: 1fr;
        gap: 0;

        padding: 0;
    }

    .activity-hero-image img {
        min-height: clamp(300px, 52vw, 420px);
    }

    .activity-hero-content {
        padding: 56px var(--gutter) 88px;
    }

    .activity-meta {
        width: calc(100% - 40px);
    }

    .activity-content {
        padding-top: 80px;
    }

    .activity-gallery figure:nth-child(even),
    .activity-gallery.wp-block-gallery figure.wp-block-image:nth-child(even) {
        margin-top: 0 !important;
    }

    .activity-contact {
        padding-top: 72px;
        padding-bottom: 80px;
    }
}


/* Smartphone */

@media (max-width: 600px) {
    .activity-hero-content {
        padding: 44px 20px 72px;
    }

    .activity-meta-item {
        padding: 22px 24px;

        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .activity-meta-item:first-child {
        border-top: 0;
    }

    .activity-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .activity-gallery {
        grid-template-columns: 1fr;
        gap: 20px;

        width: calc(100vw - 40px) !important;
    }

    .activity-contact {
        margin-top: 88px;
        padding: 60px 24px 68px;
    }
}


/* Reduzierte Bewegung */

@media (prefers-reduced-motion: reduce) {
    .activity-page *,
    .activity-page *::before,
    .activity-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
