/* Grund-Einstellungen */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #000;
    overflow-x: hidden;
}

:root {
    --cursor-color: orange;
}

.cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border: 0;
    border-radius: 50%;
    background: var(--cursor-color);
    mix-blend-mode: difference;
    filter: blur(8px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 2500;
    opacity: 1;
    display: block;
}

@media (pointer: coarse) {
    .cursor-circle {
        display: none;
    }
}

/* --- SPLIT SCREEN LAYOUT --- */
.split-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.h2 {
    font-size: 2rem;
    font-weight: normal;
    margin: 0;
    letter-spacing: -1px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

/* Linke Seite: Die zwei Bilder untereinander */
.image-side {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.carousel {
    position: relative;
    width: 100%;
    height: 50vh;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 16px;
    box-sizing: border-box;
    transition: opacity 0.6s ease;
    will-change: opacity;
}

.carousel img {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.carousel img.active {
    opacity: 1;
}

/* Rechte Seite: Titel und Navigation */
.content-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Zentriert das Menü vertikal */
    align-items: center;
    position: relative;
    background-color: #ffffff;
}

/* Der Titel oben rechts */
.main-title {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: clamp(2.5rem, 6vw, 3rem);
    text-transform: uppercase;
    font-weight: normal;
    margin: 0;
    letter-spacing: -1px;
    text-align: center;
    filter: blur(0);
    transition: opacity 0.45s ease-in-out, filter 0.45s ease-in-out;
    will-change: opacity;
}

.main-title.is-fading {
    opacity: 0;
    /* transform: translateY(-4px); */
}

.main-title:hover {
    filter: blur(5px);
}

/* Das Menü in der Mitte */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    justify-content: flex-start;
}

.nav-item {
    text-decoration: none;
    color: #000;
    font-size: clamp(2.5rem, 6vw, 3rem);
    filter: blur(0);
    transition: opacity 0.2s, filter 0.45s ease-in-out;
}

.nav-item:hover {
    filter: blur(5px);
}

/* --- SEITE 2: INHALT --- */
.content-page {
    min-height: auto;
    background-color: #d3d3d3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 80px;
}

[id="Über uns"].content-page,
[id="Saisonnierstatut"].content-page {
    background-color: #A6533B;
}

[id="Über uns"] .content-header,
[id="Saisonnierstatut"] .content-header {
    background-color: #A6533B;
    color: #E9E4D8;
}

[id="Führungen & Anlässe"].content-page {
    background-color: rgb(93, 37, 37);
}

[id="Führungen & Anlässe"] .content-header {
    background-color: rgb(63, 26, 26);
}

[id="Stimmen"].content-page {
    background-color: honeydew;
}

[id="Stimmen"] .content-header {
    background-color: rgb(194, 208, 194);
}

.content-header {
    width: 100%;
    background-color: black;
    padding: 15px 40px;
    box-sizing: border-box;
    text-align: center;
    font-family: Arial, sans-serif;
    color: white;
    font-size: 3rem;
    margin: 0;
    position: relative;
}

.back-to-top {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    color: black;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    line-height: .8rem;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 4rem;
    z-index: 1000;
    mix-blend-mode: difference;
    /* filter: blur(1px); */
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); */
    transition: opacity 0.3s, background-color 0.2s;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: #333;
}

.text-container {
    max-width: 700px;
    padding: 40px 20px 0;
    line-height: 1.5;
    font-size: 1.15rem;
    color: #292B29;
    font-family: 'Times New Roman', Times, serif;
    width: 100%;
    box-sizing: border-box;
}

.text-container > p {
    margin: 0 0 1.5em;
    text-align: left;
    text-wrap: pretty;
}

.text-container > p:last-of-type {
    margin-bottom: 0;
}

.qr-code-container {
    width: 100%;
    max-width: 700px;
    padding: 0px 0px 0;
    box-sizing: border-box;
    text-align: left;
}

.qr-code-container img {
    display: block;
    width: min(220px, 100%);
    height: auto;
    margin: 0 auto 0 0;
}

.text-container sup {
    font-size: 0.525em;
    line-height: 0;
    vertical-align: super;
}

.text-container sup a {
    display: inline-flex;
    width: 1.35em;
    height: 1.35em;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.text-container sup a:hover {
    background-color: #000;
    color: #fff;
}

.image-caption {
    margin: 6px 0 24px;
    font-size: .9rem;
    line-height: 1.2;
    color: #555;
}

.ueber-uns-text {
    max-width: 700px;
    padding: 0 20px;
    line-height: 1.5;
    font-size: 1.75rem;
    font-family: 'Times New Roman', Times, serif;
    width: 100%;
    box-sizing: border-box;
    color: #3c2923;
}
.text-container-2-1 {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.2em;
    letter-spacing: -.05em;
    text-align: left;
    color: black;
    font-size: clamp(1.25rem, 6vw, 2.25rem);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: normal;
    width: 100%;
    box-sizing: border-box;
}

.chapter-title {
    font-family: Arial, sans-serif;
    text-align: center;
    margin-top: 20px;
    padding-top: 40px;
    font-size: 1.8rem;
}

.sources-list {
    margin-top: 10px;
    padding-left: 28px;
    font-size: 1.2rem;
    line-height: 1.35;
}

.sources-list li {
    margin-bottom: 10px;
}

.map-iframe {
    width: 100%;
    flex: 1;
    /* Nimmt den restlichen vertikalen Platz in .content-page ein */
    min-height: 60vh;
    /* Mindesthöhe für kleine Bildschirme */
    border: none;
    margin-bottom: -80px;
    /* Kompensiert das padding-bottom von .content-page, damit es unten bündig abschliesst */
}

.map-iframe-program {
    margin-bottom: 0;
}

.program-container {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    padding: 0px 0 0px;
    font-family: Arial, sans-serif;
    color: #f2f2f2;
}



.program-section-label {
    margin: 0;
    padding: 10px 24px;
    font-size: 2rem;
    letter-spacing: 0.04em;
    color: #b7b7b7;
    /* border-top: 1px solid #5a5a5a; */
    /* border-bottom: 2px solid #5a5a5a; */
    /* background: #0e0e0e; */
}

.program-email {
    color: #f0b39f;
    text-decoration: none;
}

.program-email:hover {
    color: #ffffff;
}

.program-row {
    display: grid;
    grid-template-columns: 260px 1fr 170px;
    column-gap: 18px;
    align-items: start;
    padding: 16px 24px;
    /* border-bottom: 2px solid #5a5a5a; */
}

.program-date-main {
    font-size: clamp(1.9rem, 3.2vw, 2.35rem);
    /* font-weight: 700; */
    line-height: 1.05;
    color: #f3f3f3;
}

.program-date-sub {
    margin-top: 8px;
    font-size: 1.7rem;
    color: #d6d6d6;
}

.program-focus {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: #cecece;
    /* font-weight: 700; */
}

.program-event-title {
    margin: 0;
    font-weight: normal;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.08;
    color: #ffffff;
}

.program-event-person {
    margin: 6px 0 0;
    font-size: 1.05rem;
    color: #d6d6d6;
}

.program-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.program-tag {
    display: inline-block;
    border: 1px solid #bfbfbf;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.9rem;
    color: #f0f0f0;
}

.program-action {
    display: flex;
    justify-content: flex-end;
}

.program-btn {
    display: inline-block;
    margin-top: 4px;
    border: 1px solid #d8d8d8;
    color: #fff;
    text-decoration: none;
    padding: 9px 18px;
    font-size: 1.05rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.program-btn:hover {
    background-color: #f2f2f2;
    color: #111;
}

.program-archive-box {
    /* background: #111; */
    border-top: 1px solid #4b0000;
    border-bottom: 1px solid #5a5a5a;
    margin-top: 20px;
}

.program-archive-list {
    margin: 0;
    padding: 16px 70px 18px;
    font-size: clamp(1.9rem, 3.2vw, 2.35rem);
    line-height: 1.05;
}

.program-archive-list a {
    color: #e6e6e6;
}

.program-archive-list a:hover {
    color: #ffffff;
}

.archiv-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Zwei Spalten nebeneinander */
    gap: 10px;
    /* Abstand zwischen den Bildern */
    width: 100%;
    padding: 40px 20px;
    /* Etwas Abstand zum Rand */
    box-sizing: border-box;
}

.archiv-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile Optimierung */
@media (max-width: 900px) {

    .back-to-top {
        width: 60px;
        height: 60px;
    }

    .content-page {
        min-height: auto;
        padding-bottom: 24px;
    }

    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100svh;
        padding-top: 0;
        margin-top: 0;
    }
    .ueber-uns-text {
        font-size: 1.25rem;
        line-height: 1.2;
        padding: 0 20px;
    }

    .image-side {
        order: 2;
        flex: 0 0 auto;
        height: calc(100svh - 170px);
        min-height: 0;
    }

    .carousel {
        height: calc((100svh - 170px) / 2);
        flex: 0 0 calc((100svh - 170px) / 2);
        min-height: 0;
    }

    .image-side .carousel {
        padding: 0;
    }

    .image-side .carousel img {
        object-position: 50% 100% !important;
        top: auto !important;
        bottom: 0 !important;
    }

    .content-side {
        padding: 0 20px;
        position: static;
        order: 1;
    }

    .main-title {
        position: static;
        font-size: 2rem;
        padding: 0;
        margin: 0;
        line-height: 1.1;
        text-align: center;
        transform: none;
        transition: opacity 0.6s ease;
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100px;
        max-height: 100px;
        min-height: 100px;
    }

    .nav-menu {
        flex-direction: row;
        align-self: stretch;
        justify-content: flex-start;
        gap: 30px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 10px 20px;
        margin: 0;
        margin-left: -20px;
        width: calc(100% + 40px);
        box-sizing: border-box;
        border-top: 2px solid #000;
        /* border-bottom: 2px solid #000; */
        background-color: #ffffff;
        position: static;
        order: 2;
        text-align: left !important;
    }

    .nav-item {
        font-size: 1.7rem;
        margin: 0;
        flex-shrink: 0;
        align-self: flex-start;
        filter: blur(0) !important;
    }

    .nav-item:hover {
        filter: blur(0) !important;
    }

    .content-header {
        padding: 12px 14px;
        font-size: clamp(1.35rem, 7vw, 2rem);
        line-height: 1.15;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .text-container {
        padding: 20px 20px 0 20px;
        font-size: clamp(1rem, 4vw, 1.4rem);
        line-height: 1.4;
    }

    .image-caption {
        font-size: 0.9rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .chapter-title {
        margin-top: 10px;
        padding-top: 12px;
    }

    .program-container {
        padding: 24px 0 10px;
    }

    .program-intro {
        margin: 0 16px 14px;
    }

    .program-section-label {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .program-row {
        grid-template-columns: 1fr;
        row-gap: 12px;
        padding: 14px 16px;
    }

    .program-date-main {
        font-size: 1.8rem;
    }

    .program-date-sub {
        font-size: 1.15rem;
        margin-top: 2px;
    }

    .program-event-title {
        font-size: 1.7rem;
    }

    .program-action {
        justify-content: flex-start;
    }

    .program-archive-list {
        padding: 14px 28px 18px;
    }
}

/* Kleinere Screens - Titel reduzieren wenn zu viele Zeilen */
@media (max-width: 1000px) {
    .main-title {
        font-size: 1.7rem;
        line-height: 1.15;
    }
}
