:root {
    --paper: #f2e6c8;
    --paper-light: #fbf4df;
    --ink: #2d2a22;
    --muted: #6d6254;

    --green: #45643b;
    --green-dark: #2f4a2b;
    --green-light: #71865d;

    --brown: #6b4d32;
    --brown-dark: #443123;
    --brown-light: #9a7652;

    --sand: #dfc99d;
    --sand-light: #eee0bd;

    --line: rgba(91, 68, 45, .28);
    --shadow: 0 7px 20px rgba(61, 45, 30, .10);
    --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.comedix-modern {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 3%, rgba(69,100,59,.10), transparent 24rem),
        radial-gradient(circle at 90% 15%, rgba(107,77,50,.08), transparent 28rem),
        linear-gradient(180deg, #f7efd9 0, var(--paper) 100%);
    font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header {
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--brown-dark);
    background:
        linear-gradient(90deg, rgba(47,74,43,.93), rgba(69,100,59,.90)),
        url('/grafik/header_hintergrund.jpg') repeat-x center;
}
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .12;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 38px,
            rgba(255,255,255,.18) 39px 40px
        );
}
.site-header::after {
    content: "";
    position: absolute;
    right: -3rem;
    bottom: -7rem;
    width: 20rem;
    height: 20rem;
    border-radius: 48% 52% 45% 55%;
    background: rgba(223,201,157,.10);
}
.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(--brown);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.site-header .eyebrow { color: #ead9ac; }
.site-claim {
    margin: 0;
    color: #fff7df;
    font-family: Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(0,0,0,.3);
}
.site-intro {
    max-width: 60ch;
    margin: .6rem 0 0;
    color: #eadfc6;
}

.main-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--brown-dark);
    box-shadow: 0 5px 16px rgba(49,36,24,.18);
}
.main-nav__bar {
    width: min(1180px, 100%);
    margin: auto;
}
.main-nav__inner {
    display: flex;
    justify-content: center;
    gap: .25rem;
    width: 100%;
    margin: auto;
    padding: .45rem 1rem;
}
.main-nav a {
    flex: 0 0 auto;
    padding: .6rem .88rem;
    border-radius: 3px;
    color: #fff5dd;
    text-decoration: none;
    font-size: .94rem;
}
.main-nav a:hover,
.main-nav a:focus-visible {
    background: rgba(238,224,189,.13);
}
.main-nav a.is-active {
    color: #fff;
    background: var(--green-dark);
    box-shadow: inset 0 -3px 0 var(--green-light);
}

.nav-toggle {
    display: none;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: .7rem;
    padding: .65rem 1rem;
    border: 0;
    color: #fff6df;
    background: transparent;
    font: inherit;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}
.nav-toggle__icon {
    display: inline-flex;
    width: 24px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) {
    transform: translateY(7px) 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(-7px) rotate(-45deg);
}

.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: 2px solid var(--brown-light);
    border-left: 7px solid var(--green-dark);
    border-radius: var(--radius);
    color: var(--ink);
    box-shadow: var(--shadow);
    background-color: #e8cf99;
    background-image:
        linear-gradient(rgba(255,248,225,.24), rgba(255,248,225,.24)),
        url("../assets/textures/hero-wood-fine.jpg");
    background-size: auto, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}
.hero-search .eyebrow { color: var(--brown); }
.hero-search h1 {
    margin: 0;
    color: var(--green-dark);
    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: 1px solid var(--brown-light);
    border-radius: 3px;
    background: #fffaf0;
    font: inherit;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
.hero-search input[type="search"]:focus {
    outline: 3px solid rgba(69,100,59,.18);
    border-color: var(--green);
}
.hero-search button {
    min-height: 52px;
    padding: 0 1.3rem;
    border: 1px solid #22351f;
    border-radius: 3px;
    color: #fff8e8;
    background: linear-gradient(#58734a, #344d2f);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.hero-search button:hover {
    background: linear-gradient(#68835a, #405c38);
}

.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(--brown-light);
    border-radius: var(--radius);
    background: rgba(251,244,223,.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, #f6ebcf, #efe0bd);
}
.card__heading--with-link {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}
.card h2,
.side-card h2 {
    margin: 0;
    color: var(--green-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 var(--brown-light);
    border-radius: 2px;
    color: var(--green-dark);
    background: linear-gradient(#eee0bd, #dbc394);
    text-decoration: none;
    font-weight: 800;
    transition: transform .15s ease, background .15s ease;
}
.alphabet a:hover,
.alphabet a:focus-visible {
    transform: translateY(-1px);
    color: #fff;
    background: var(--green);
}
.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 dashed rgba(107,77,50,.35);
}
.event:first-child { padding-top: 0; }
.event:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.event time {
    color: var(--brown-dark);
    font-size: .9rem;
    font-weight: 800;
}
.event p { margin: 0; }

.tag {
    display: inline-flex;
    justify-content: center;
    padding: .2rem .55rem;
    border: 1px solid rgba(68,49,35,.22);
    border-radius: 3px;
    color: var(--ink);
    font-size: .72rem;
    font-weight: 800;
}
.tag--geburtstag { background: #d8c89f; }
.tag--edition     { background: #bdc9a7; }
.tag--mundart     { background: #d2ba91; }
.tag--sonderband  { background: #afbc98; }
.tag--sonstiges   { background: #ddd0b3; }

.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(--brown);
    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(--brown-light);
    border-radius: 2px;
    background: #f3e5c3;
    text-decoration: none;
}
.social-links a:hover,
.quick-links a:hover {
    background: #e7d4a8;
}

.modern-footer {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto 2rem;
    padding-top: 1rem;
    border-top: 3px solid var(--brown-dark);
}
.modern-footer #footer-mitte { display: none; }
.modern-footer p.footer {
    position: static !important;
    top: auto !important;
    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; }

    
    .nav-toggle { display: flex; }
    .main-nav__inner {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .25rem .6rem .7rem;
        overflow: visible;
    }
    .main-nav__inner.is-open {
        display: flex;
    }
    .main-nav a {
        width: 100%;
        padding: .72rem .8rem;
        border-top: 1px solid rgba(238,224,189,.10);
        border-radius: 0;
    }

    .page-shell {
        width: min(calc(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);
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.eyebrow--icon,
.card__kicker--icon {
    display: inline-flex;
    align-items: center;
    gap: .58em;
}
.heading-icon {
    display: inline-block;
    width: auto;
    height: 2.15em;
    max-width: 2.8em;
    flex: 0 0 auto;
    object-fit: contain;
    vertical-align: -0.55em;
}

.card--lexikon .card__heading {
    background-color: #e9dfca;
    background-image:
        linear-gradient(rgba(244,237,220,.58), rgba(244,237,220,.58)),
        url("../assets/textures/marble.svg");
    background-size: auto, 320px 320px;
    background-position: center;
}
.card--lexikon .card__heading {
    border-bottom-color: rgba(91,68,45,.32);
}

.tag {
    color: #fff;
    border: 0;
    border-radius: 999px;
}
.tag--geburtstag { background: #bd3030; }
.tag--edition     { background: #39833d; }
.tag--mundart     { background: #3158a5; }
.tag--sonderband  { background: #7e2030; }
.tag--sonstiges   { background: #8a3ca3; }

.news-list {
    font-size: .88rem;
    line-height: 1.4;
}
.news-list time {
    font-size: .74rem;
}

.card--lexikon .card__body {
    background: rgba(251,244,223,.96);
}

.site-header {
    min-height: 170px;
    overflow: hidden;
    border-bottom: 0;
    background:
        radial-gradient(circle at 35% 20%, rgba(255,255,255,.35), transparent 22rem),
        linear-gradient(180deg, #f8efd9 0%, #f1e1bb 100%);
}

.site-header::before,
.site-header::after {
    display: none;
}

.site-header__inner {
    display: grid;
    grid-template-columns: 95px 360px minmax(330px, 1fr) minmax(300px, 520px);
    align-items: center;
    gap: 0;
    width: min(1500px, calc(100% - 2rem));
    min-height: 170px;
    padding: 0;
}

.header-menhir {
    align-self: end;
    justify-self: start;
    width: 92px;
    max-height: 168px;
    object-fit: contain;
    object-position: bottom;
}

.brand {
    align-self: center;
    justify-self: start;
}

.brand img {
    display: block;
    width: 320px;
    max-width: 100%;
}

.site-header__text {
    align-self: center;
    max-width: 540px;
    padding: 0 1.5rem;
    color: #2f4a2b;
}

.site-since {
    margin: 0 0 .18rem;
    color: #30482a;
    font-size: 1.05rem;
    font-weight: 650;
}

.site-claim {
    margin: 0;
    color: #3f2b1c;
    font-family: Georgia, serif;
    font-size: clamp(1.35rem, 2.15vw, 2rem);
    font-weight: 700;
    line-height: 1.12;
    text-shadow: none;
}

.site-intro {
    max-width: 44ch;
    margin: .55rem 0 0;
    color: #30482a;
    font-size: 1rem;
    line-height: 1.4;
}

.header-trees {
    align-self: end;
    justify-self: end;
    width: min(500px, 34vw);
    max-height: 165px;
    object-fit: contain;
    object-position: right bottom;
}

.main-nav {
    background:
        linear-gradient(rgba(54,31,16,.10), rgba(54,31,16,.10)),
        url("../assets/header/nav-wood.jpg") center/cover no-repeat;
    border-top: 1px solid #3b2415;
    border-bottom: 2px solid #2b190f;
}

.main-nav__bar {
    width: min(1500px, calc(100% - 1.5rem));
}

.main-nav__inner {
    justify-content: flex-start;
}

.main-nav a {
    border-right: 1px solid rgba(255,255,255,.08);
    border-radius: 0;
}

.main-nav a.is-active {
    background: rgba(47,74,43,.94);
    box-shadow: inset 0 -3px 0 #71865d;
}

.hero-search__title {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    min-width: 0;
}

.section-icon {
    display: block;
    width: auto;
    height: 42px;
    flex: 0 0 auto;
    object-fit: contain;
}

.comedix-modern img.section-icon--hero {
    width: auto;
    height: 10.5px;
    max-width: 13px;
}

.section-icon--door {
    height: 52px;
    max-width: 58px;
}

.section-icon--standard {
    height: 54px;
    max-width: 46px;
}

.card__heading--icon {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: .9rem;
}

.card__heading--with-link.card__heading--icon {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.card__heading--icon .card__kicker {
    display: block;
}

.card__heading-text {
    min-width: 0;
}

.heading-icon {
    display: none;
}

@media (max-width: 1100px) {
    .site-header__inner {
        grid-template-columns: 75px 300px minmax(300px, 1fr) 280px;
    }

    .header-menhir {
        width: 72px;
    }

    .brand img {
        width: 285px;
    }

    .header-trees {
        width: 280px;
    }
}

@media (max-width: 850px) {
    .site-header__inner {
        grid-template-columns: 68px minmax(230px, 300px) 1fr;
        min-height: 150px;
    }

    .header-trees {
        display: none;
    }

    .header-menhir {
        width: 64px;
        max-height: 145px;
    }

    .site-header__text {
        padding-right: 0;
    }
}

@media (max-width: 680px) {
    .site-header {
        min-height: auto;
    }

    .site-header__inner {
        grid-template-columns: 56px 1fr;
        gap: .5rem;
        min-height: auto;
        padding: .8rem 0;
    }

    .header-menhir {
        grid-row: 1 / span 2;
        width: 52px;
        max-height: 115px;
    }

    .brand img {
        width: min(270px, 78vw);
    }

    .site-header__text {
        grid-column: 2;
        padding: 0;
    }

    .site-since {
        font-size: .82rem;
    }

    .site-claim {
        font-size: 1.16rem;
    }

    .site-intro {
        display: none;
    }

    .hero-search__title {
        align-items: flex-start;
        gap: .75rem;
    }

    .comedix-modern img.section-icon--hero {
        width: auto;
        height: 8px;
        max-width: 9.5px;
    }

    .section-icon {
        height: 34px;
    }

    .section-icon--door {
        height: 40px;
    }

    .section-icon--standard {
        height: 42px;
    }

    .card__heading--with-link.card__heading--icon {
        grid-template-columns: auto 1fr;
    }

    .card__heading--with-link.card__heading--icon .text-link {
        grid-column: 2;
        justify-self: start;
    }
}

.hero-search {
    background-color: #ead3a0;
}


.comedix-modern img.section-icon,
.comedix-modern img.section-icon--hero,
.comedix-modern img.section-icon--door,
.comedix-modern img.section-icon--standard {
    width: auto;
    height: auto;
    max-height: 100px;
    max-width: 100px;
}
