:root {
    --paper: #f7f1e4;
    --paper-light: #fffdf8;
    --ink: #2d2925;
    --muted: #71685f;
    --red: #8f1d1d;
    --red-dark: #671010;
    --gold: #c98228;
    --green: #486b3c;
    --line: #e3d5c0;
    --shadow: 0 12px 34px rgba(73, 45, 19, .10);
    --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.comedix-modern {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(201,130,40,.10), transparent 24rem),
        linear-gradient(180deg, #fffaf0 0, var(--paper) 100%);
    font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.comedix-modern a { color: var(--red); font-weight: 650; text-decoration-thickness: .08em; text-underline-offset: .18em; }
.comedix-modern a:hover { color: var(--red-dark); }
.comedix-modern img { max-width: 100%; height: auto; }

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 999;
    padding: .7rem 1rem;
    border-radius: .5rem;
    color: #fff !important;
    background: var(--red-dark);
}
.skip-link:focus { top: 1rem; }

.site-header {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(103,16,16,.2);
    background:
        linear-gradient(90deg, rgba(255,255,255,.94), rgba(255,249,235,.78)),
        url('/grafik/header_hintergrund.jpg') repeat-x center;
}
.site-header::after {
    content: "";
    position: absolute;
    right: -4rem;
    bottom: -8rem;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: rgba(201,130,40,.11);
}
.site-header__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    width: min(1180px, calc(100% - 2rem));
    min-height: 168px;
    margin: auto;
    padding: 1rem 0;
}
.brand { flex: 0 0 auto; }
.brand img { display: block; width: min(334px, 40vw); }
.site-header__text { max-width: 650px; }
.eyebrow, .card__kicker {
    margin: 0 0 .25rem;
    color: var(--gold);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.site-claim { margin: 0; color: var(--red-dark); font-family: Georgia, serif; font-size: clamp(1.55rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.1; }
.site-intro { max-width: 60ch; margin: .6rem 0 0; color: var(--muted); }

.main-nav { position: sticky; top: 0; z-index: 50; background: rgba(103,16,16,.97); box-shadow: 0 6px 20px rgba(49,14,8,.16); }
.main-nav__inner { display: flex; justify-content: center; gap: .25rem; width: min(1180px, 100%); margin: auto; padding: .45rem 1rem; overflow-x: auto; scrollbar-width: thin; }
.main-nav a { flex: 0 0 auto; padding: .6rem .88rem; border-radius: 999px; color: #fff; text-decoration: none; font-size: .94rem; }
.main-nav a:hover, .main-nav a:focus-visible { background: rgba(255,255,255,.14); }
.main-nav a.is-active { color: var(--red-dark); background: #fff2cf; }

.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto 3rem; }

.hero-search {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.15fr);
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: clamp(1.4rem, 4vw, 2.5rem);
    border: 1px solid rgba(143,29,29,.18);
    border-radius: calc(var(--radius) + 6px);
    color: #fff;
    background: linear-gradient(135deg, var(--red-dark), var(--red) 62%, #a83a24);
    box-shadow: var(--shadow);
}
.hero-search .eyebrow { color: #f5c46e; }
.hero-search h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.12; }
.hero-search__form { display: flex; gap: .65rem; }
.hero-search input[type="search"] { width: 100%; min-height: 52px; padding: 0 1rem; border: 0; border-radius: 12px; background: #fff; font: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.hero-search button { min-height: 52px; padding: 0 1.3rem; border: 0; border-radius: 12px; color: var(--red-dark); background: #ffd989; font: inherit; font-weight: 800; cursor: pointer; }
.hero-search button:hover { background: #ffe5aa; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 1.5rem; }
.content-column, .sidebar { display: grid; gap: 1.5rem; }

.card, .side-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.96); box-shadow: var(--shadow); overflow: hidden; }
.card__heading { padding: 1.25rem 1.4rem 1rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffdf8, #fbf4e8); }
.card__heading--with-link { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.card h2, .side-card h2 { margin: 0; color: var(--red-dark); font-family: Georgia, serif; font-size: 1.45rem; line-height: 1.25; }
.card__body { padding: 1.35rem 1.4rem; }
.quote-content { font-family: Georgia, serif; font-size: 1.12rem; }
.quote-content p:first-child { margin-top: 0; }
.text-link { white-space: nowrap; font-size: .9rem; }

.alphabet { display: grid; grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)); gap: .55rem; }
.alphabet a { display: grid; min-height: 46px; place-items: center; border: 1px solid #d8b77c; border-radius: 10px; color: var(--red-dark); background: #fff8e9; text-decoration: none; font-weight: 800; transition: transform .15s ease, background .15s ease; }
.alphabet a:hover, .alphabet a:focus-visible { transform: translateY(-2px); color: #fff; background: var(--red); }
.alphabet .alphabet__wide { grid-column: span 2; }

.events { display: grid; }
.event { display: grid; grid-template-columns: 130px 105px minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.event:first-child { padding-top: 0; }
.event:last-child { padding-bottom: 0; border-bottom: 0; }
.event time { color: var(--red-dark); font-size: .9rem; font-weight: 800; }
.event p { margin: 0; }
.tag { display: inline-flex; justify-content: center; padding: .2rem .55rem; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 800; }
.tag--geburtstag { background: #bd3030; }
.tag--edition { background: #39833d; }
.tag--mundart { background: #3158a5; }
.tag--sonderband { background: #7e2030; }
.tag--sonstiges { background: #8a3ca3; }

.side-card { padding: 1.25rem; }
.side-card h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.news-list { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.news-list li { display: grid; grid-template-columns: 70px 1fr; gap: .6rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.news-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.news-list time { color: var(--muted); font-size: .78rem; font-weight: 700; }
.news-list a { line-height: 1.35; }
.social-links, .quick-links { display: grid; gap: .65rem; }
.social-links a, .quick-links a { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; text-decoration: none; }
.social-links a:hover, .quick-links a:hover { background: #f8ead1; }

.modern-footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.modern-footer #footer-mitte { display: none; }
.modern-footer p.footer { position: static; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.55; text-align: center; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 900px) {
    .site-header__inner { min-height: 140px; }
    .hero-search { grid-template-columns: 1fr; gap: 1.2rem; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar .side-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .site-header__inner { align-items: flex-start; flex-direction: column; gap: .5rem; padding: 1rem 0 1.3rem; }
    .brand img { width: min(290px, 80vw); }
    .site-intro { display: none; }
    .main-nav__inner { justify-content: flex-start; }
    .page-shell { width: min(100% - 1rem, 1180px); margin-top: 1rem; }
    .hero-search { padding: 1.25rem; }
    .hero-search__form { flex-direction: column; }
    .hero-search button { width: 100%; }
    .card__heading--with-link { align-items: flex-start; flex-direction: column; }
    .event { grid-template-columns: 1fr; gap: .35rem; }
    .event .tag { justify-self: start; }
    .sidebar { grid-template-columns: 1fr; }
    .sidebar .side-card:first-child { grid-column: auto; }
    .alphabet { grid-template-columns: repeat(5, 1fr); }
}

/* Responsive Hauptnavigation: Umbruch auf Tablets, Hamburger-Menü auf Smartphones */
.main-nav__bar {
    width: min(1180px, 100%);
    margin: auto;
}

.main-nav__inner {
    flex-wrap: wrap;
    overflow: visible;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .65rem;
    width: calc(100% - 2rem);
    margin: .45rem 1rem;
    padding: .7rem .9rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 10px;
    color: #fff;
    background: transparent;
    font: inherit;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(255,255,255,.12);
}

.nav-toggle__icon {
    display: grid;
    gap: 4px;
    width: 22px;
}

.nav-toggle__icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 681px) and (max-width: 980px) {
    .main-nav__inner {
        justify-content: center;
        row-gap: .35rem;
        padding-block: .55rem;
    }
}

@media (max-width: 680px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav__inner {
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .4rem;
        padding: 0 1rem 1rem;
    }

    .main-nav__inner.is-open {
        display: grid;
    }

    .main-nav__inner a {
        display: block;
        width: 100%;
        padding: .72rem .8rem;
        border-radius: 9px;
        text-align: center;
        background: rgba(255,255,255,.07);
    }

    .main-nav__inner a.is-active {
        background: #fff2cf;
    }
}

@media (max-width: 420px) {
    .main-nav__inner {
        grid-template-columns: 1fr;
    }
}
