/* Design 2 - grafisch, kontrastreich, informationsorientiert */

:root {
    --ink: #0f1c22;

    --brand: #5b818f;
    --brand-deep: #2c4a56;
    --brand-mid: #3d626f;

    --accent: #dbc58f;
    --accent-soft: #e7d6ac;
    --accent-strong: #b8994f;

    --paper: #ffffff;
    --paper-alt: #eef3f4;

    --line: #ccd9dd;

    --text: #14232a;
    --text-muted: #4a6672;

    --shadow-rgb: 9 26 33;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --gutter: max(32px, calc((100% - 1280px) / 2));
}

.activity-page {
    color: var(--text);
    background-color: var(--paper);

    overflow-x: clip;
}


/* Hero: hartes Zweifarbenfeld */

.activity-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 96px;

    padding: 104px var(--gutter) 112px;

    background: linear-gradient(
        90deg,
        var(--brand-deep) 0 47%,
        var(--paper) 47% 100%
    );
}

.activity-hero:not(:has(.activity-hero-image)) {
    grid-template-columns: minmax(0, 1fr);

    background: var(--paper);
}

.activity-hero-image {
    position: relative;
    min-width: 0;

    transform: translateX(7%);

    box-shadow: 0 34px 64px -30px rgb(var(--shadow-rgb) / 60%);

    animation: activity-slide 0.9s var(--ease) both;
}

.activity-hero-image img {
    width: 100%;
    height: clamp(340px, 40vw, 520px);

    object-fit: cover;
}

.activity-hero-content::before {
    content: "";

    display: block;
    width: 84px;
    height: 8px;
    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(--ink);

    font-size: clamp(2.6rem, 4.8vw, 4.5rem);
    line-height: 1.0;
    letter-spacing: -0.032em;
    text-wrap: balance;

    animation: activity-rise 0.8s var(--ease) 0.06s both;
}

.activity-subtitle {
    max-width: 34ch;
    margin: 26px 0 0;

    color: var(--text-muted);

    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
    line-height: 1.55;

    animation: activity-rise 0.8s var(--ease) 0.15s both;
}


/* Eckdaten: dunkles Info-Band ueber die volle Breite */

.activity-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;

    width: 100%;
    max-width: none;
    margin: 0 0 88px;
    padding: 0 var(--gutter);

    background-color: var(--brand-deep);
    border: 0;

    color: var(--paper);
}

.activity-meta-item {
    padding: 34px 34px 36px;

    background: none;

    border-left: 1px solid rgb(255 255 255 / 18%);
    border-radius: 0;

    text-align: left;

    transition: background-color 0.3s var(--ease);
}

.activity-meta-item:first-child {
    border-left: 0;
}

.activity-meta-item:hover {
    background-color: var(--brand-mid);
}

.activity-meta-label {
    margin-bottom: 10px;

    color: var(--accent);
    opacity: 1;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.activity-meta-value {
    color: var(--paper);

    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
}


/* Hauptinhalt */

.activity-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;

    font-size: 1.1rem;
    line-height: 1.78;
}

.activity-content > p:first-child {
    color: var(--text);

    font-size: clamp(1.22rem, 1.9vw, 1.42rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.activity-content p {
    max-width: 72ch;
    margin: 0 0 1.3em;
}

.activity-content h2 {
    margin-top: 66px;
    margin-bottom: 20px;

    color: var(--ink);

    font-size: clamp(1.8rem, 3vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.024em;
}

.activity-content h2::before {
    content: "";

    display: block;
    width: 72px;
    height: 6px;
    margin-bottom: 20px;

    background-color: var(--brand-deep);
}

.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: praezises Raster, harte Kanten */

.activity-gallery {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;

    width: min(1280px, calc(100vw - 64px)) !important;
    max-width: none !important;

    margin-top: 80px !important;
    margin-right: 0 !important;
    margin-bottom: 80px !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 4;

    overflow: hidden;
}

/* Ein Bild: volle Breite */
.activity-gallery figure:first-child:nth-last-child(1) {
    grid-column: span 12;
}

/* Zwei oder vier Bilder: Haelften */
.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 6;
}

/* Fuenf Bilder: zwei grosse, drei kleine */
.activity-gallery figure:first-child:nth-last-child(5),
.activity-gallery figure:first-child:nth-last-child(5) + figure {
    grid-column: span 6;
}

.activity-gallery figure::after {
    content: "";

    position: absolute;
    inset: 0;

    background-color: var(--brand-deep);

    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.activity-gallery img {
    height: clamp(230px, 25vw, 340px) !important;

    transition: transform 0.7s var(--ease);
}

.activity-gallery figure:hover img {
    transform: scale(1.06);
}

.activity-gallery figure:hover::after {
    opacity: 0.18;
}


/* Kontakt: warmes Farbfeld als Abschluss */

.activity-contact {
    position: relative;

    width: 100%;
    max-width: none;
    margin: 104px 0 0;
    padding: 84px var(--gutter) 92px;

    background:
        linear-gradient(
            120deg,
            var(--accent-soft) 0%,
            var(--accent) 100%
        );

    color: var(--ink);

    border-radius: 0;
    overflow: hidden;
}

.activity-contact::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 8px;

    background-color: var(--brand-deep);
}

.activity-contact h2,
.activity-contact h3 {
    margin: 0 0 16px;

    color: var(--ink);

    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.024em;
}

.activity-participation p {
    max-width: 62ch;
    margin: 0;

    color: #35301f;

    font-size: 1.08rem;
    line-height: 1.75;
}

.activity-contact-person,
.activity-contact-email {
    margin: 0;
    padding: 16px 0;

    border-top: 1px solid rgb(15 28 34 / 22%);

    font-size: 1rem;
}

.activity-contact-person {
    margin-top: 36px;
}

.activity-contact-person strong {
    display: inline-block;
    min-width: 160px;

    color: var(--brand-deep);

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.activity-contact a:not(.activity-cta) {
    color: var(--ink);

    text-decoration: underline;
    text-decoration-color: rgb(15 28 34 / 45%);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;

    transition: color 0.2s var(--ease);
}

.activity-contact a:not(.activity-cta):hover {
    color: var(--brand-deep);
}

.activity-cta {
    position: relative;

    margin-top: 34px;
    padding: 16px 36px;

    background-color: var(--ink);
    color: var(--paper);

    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 / 30%) 50%,
        rgb(255 255 255 / 0) 65%
    );

    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
}

.activity-cta:hover {
    background-color: var(--brand-deep);
    transform: translateY(-3px);

    box-shadow: 0 18px 34px -14px rgb(var(--shadow-rgb) / 55%);
}

.activity-cta:hover::after {
    transform: translateX(120%);
}

.activity-cta:focus-visible {
    outline: 2px solid var(--ink);
    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);
    }
}

/* Bild ragt ueber die Farbkante ins Weiss */
@keyframes activity-slide {
    from {
        opacity: 0;
        transform: translate(7%, 22px);
    }

    to {
        opacity: 1;
        transform: translate(7%, 0);
    }
}


/* Tablet */

@media (max-width: 900px) {
    .activity-hero {
        grid-template-columns: 1fr;
        gap: 0;

        padding: 0 0 72px;

        background: var(--paper);
    }

    .activity-hero-image {
        transform: none;
        animation-name: activity-rise;

        padding: 36px var(--gutter) 44px;

        background-color: var(--brand-deep);
        box-shadow: none;
    }

    .activity-hero-content {
        padding: 56px var(--gutter) 0;
    }

    .activity-meta {
        margin-bottom: 64px;
    }

    .activity-gallery figure {
        grid-column: span 6 !important;
    }

    .activity-contact {
        padding-top: 68px;
        padding-bottom: 76px;
    }
}


/* Smartphone */

@media (max-width: 600px) {
    .activity-hero-image {
        padding: 24px 20px 30px;
    }

    .activity-hero-content {
        padding: 44px 20px 0;
    }

    .activity-meta {
        padding: 0;
    }

    .activity-meta-item {
        padding: 24px 20px;

        border-left: 0;
        border-top: 1px solid rgb(255 255 255 / 18%);
    }

    .activity-meta-item:first-child {
        border-top: 0;
    }

    .activity-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .activity-gallery {
        width: calc(100vw - 40px) !important;
    }

    .activity-gallery figure {
        grid-column: span 12 !important;
    }

    .activity-contact {
        padding: 56px 20px 64px;
    }

    .activity-contact-person strong {
        display: block;
        margin-bottom: 6px;
    }
}


/* Reduzierte Bewegung */

@media (prefers-reduced-motion: reduce) {
    .activity-page *,
    .activity-page *::before,
    .activity-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
