/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    overflow-y: scroll; /* scrollbar always visible — prevents layout shift */
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    color: #2c2c2c;
    background: #f5f2ed;
    line-height: 1.7;
}

/* centered page container */
.site-body {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--page-bg, #fff);
    box-shadow: 0 0 40px rgba(0,0,0,.08);
}

a { color: inherit; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: 2rem;   margin-bottom: 1rem; }
h2 { font-size: 1.4rem; margin-bottom: .75rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout wrapper ───────────────────────────────────────── */
.site-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
    border-bottom: 3px solid #2c2c2c;
}

.site-header__top {
    width: 100%;
    display: block;
}

.site-header__identity {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: .9rem 1.5rem;
    background: #fff;
}

.site-header__logo-link {
    text-decoration: none;
    flex-shrink: 0;
}

.site-header__logo-img {
    height: 56px;
    width: auto;
}

.site-header__title-block {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1;
}

.site-header__title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #2c2c2c;
    line-height: 1;
}

.site-header__subtitle {
    font-family: Georgia, serif;
    font-size: .8rem;
    font-style: italic;
    color: #888;
    letter-spacing: .03em;
}

.site-header__banner {
    width: 100%;
    display: block;
}

/* hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 300; /* always above the nav overlay (z-index: 200) */
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #2c2c2c;
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
    transform-origin: center;
}

/* when nav is open, bars are on dark background — switch to white */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
    background: #fff;
}

/* animate bars into × when open */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Main nav ─────────────────────────────────────────────── */

/* sticky wrapper — nav sits outside .site-header so it can stick independently */
.main-nav {
    background: #2c2c2c;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-nav__item a {
    display: block;
    padding: .6rem 1rem;
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ccc;
    border-right: 1px solid #444;
    transition: background .15s, color .15s;
}

.main-nav__item:last-child a { border-right: none; }

.main-nav__item a:hover {
    background: #444;
    color: #fff;
    text-decoration: none;
}

.main-nav__item--active a,
.main-nav__item--active a:hover {
    background: #fff;
    color: #2c2c2c;
    font-weight: 700;
}

/* close button — desktop hidden */
.nav-close { display: none; }

/* ── Main content ─────────────────────────────────────────── */
.site-main {
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* ── Page layout: image left, text right ─────────────────── */
.page-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #d4cfc8;
}

.page-content:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.page-content__images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-content__images img {
    width: 100%;
}

.page-content__text { /* text column, no extra styles needed */ }

/* ── Two-column layout (wir.php) ──────────────────────────── */
.zwei-spalten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin: 1.5rem 0;
}

/* ── Aktuell ──────────────────────────────────────────────── */
.page-aktuell p {
    margin-bottom: 1rem;
    max-width: 70ch;
}

/* ── Kunst ────────────────────────────────────────────────── */
.page-kunst { display: flex; flex-direction: column; gap: 3rem; }

.kunst-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 3rem;
    border-bottom: 1px solid #d4cfc8;
}

.kunst-item:last-child { border-bottom: none; padding-bottom: 0; }

.kunst-item__bilder {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.kunst-item__bilder img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ── Termine ──────────────────────────────────────────────── */
.termine-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.termin {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #d4cfc8;
}

.termin:last-child { border-bottom: none; }

.termin-datum {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: .85rem;
    color: #888;
    padding-top: .2rem;
}

.termin-titel { margin-bottom: .25rem; }

/* ── Impressum ────────────────────────────────────────────── */
.page-impressum section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #d4cfc8;
}

.page-impressum section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.page-impressum address {
    font-style: normal;
    line-height: 1.9;
    margin: .75rem 0;
}

.page-impressum ul {
    margin: .5rem 0 1rem 1.5rem;
}

.page-impressum ul li {
    margin-bottom: .25rem;
}

/* ── Kontakt ──────────────────────────────────────────────── */
.kontakt-adresse {
    font-style: normal;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.kontakt-divider {
    border: none;
    border-top: 1px solid #d4cfc8;
    margin: 1.5rem 0;
}

.kontakt-webmaster {
    font-size: .9rem;
    color: #666;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    border-top: 3px solid #2c2c2c;
    margin-top: 3rem;
    background: #2c2c2c;
    color: #aaa;
    font-size: .82rem;
}

.site-footer__inner {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer__info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    line-height: 1.5;
}

.site-footer__info strong {
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: .85rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.site-footer__info a {
    color: #aaa;
}

.site-footer__info a:hover { color: #fff; }

.site-footer__copy { color: #666; }

.footer-nav__list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.footer-nav__list a {
    text-decoration: none;
    color: #aaa;
}

.footer-nav__list a:hover,
.footer-nav__list a[aria-current="page"] {
    color: #fff;
    text-decoration: underline;
}

/* ── Error pages (404 / 500) ──────────────────────────────── */
.page-error {
    text-align: center;
    padding: 4rem 1.5rem;
}

.page-error__code {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: #d4cfc8;
    margin-bottom: .5rem;
}

.page-error__title {
    font-size: 1.6rem;
    margin-bottom: .75rem;
}

.page-error__msg {
    color: #666;
    max-width: 40ch;
    margin: 0 auto 2rem;
}

.page-error__back {
    display: inline-block;
    padding: .6rem 1.5rem;
    background: #2c2c2c;
    color: #fff;
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.page-error__back:hover {
    background: #444;
    text-decoration: none;
}

/* ── Design – two images side by side ────────────────────── */
.kunst-item--two-col .kunst-item__bilder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.kunst-item--two-col .kunst-item__bilder img {
    aspect-ratio: auto; /* let natural proportions show */
}

/* ── Links ────────────────────────────────────────────────── */
.links-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.links-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #d4cfc8;
}

.links-item:last-child { border-bottom: none; padding-bottom: 0; }

.links-item__img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    flex-shrink: 0;
}

.links-item__body {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.links-item__titel {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: .9rem;
    font-weight: 600;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
    .page-content,
    .zwei-spalten,
    .kunst-item {
        grid-template-columns: 1fr;
    }

    .kunst-item--two-col .kunst-item__bilder {
        grid-template-columns: 1fr 1fr; /* keep side by side even on mobile */
    }

    .termin {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    /* hamburger visible — fixed from the start so no jump on open */
    .nav-toggle {
        display: flex;
        position: fixed;
        top: 2.75rem;
        right: 1.5rem;
        z-index: 300;
        background: rgba(255,255,255,.92);
        border-radius: 4px;
        padding: .5rem;
        box-shadow: 0 1px 6px rgba(0,0,0,.15);
    }

    body.nav-open .nav-toggle {
        background: rgba(60,60,60,.85);
    }

    /* compensate the space the toggle occupied in the identity bar */
    .site-header__identity {
        padding-right: 3.5rem;
    }

    /* fullscreen overlay nav */
    .main-nav {
        position: fixed;
        inset: 0;
        z-index: 200;
        background: #2c2c2c;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform .3s ease;
    }

    .main-nav--open {
        transform: translateX(0);
    }

    .main-nav__list {
        flex-direction: column;
        align-items: center;
        gap: .5rem;
        width: 100%;
    }

    .main-nav__item {
        width: 100%;
        text-align: center;
    }

    .main-nav__item a {
        font-size: 1.2rem;
        padding: .9rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid #444;
        letter-spacing: .1em;
    }

    .main-nav__item:last-child a { border-bottom: none; }

    .main-nav__item--active a,
    .main-nav__item--active a:hover {
        background: #fff;
        color: #2c2c2c;
    }

    /* prevent body scroll when nav open */
    body.nav-open {
        overflow: hidden;
    }
}
