:root {
    --red: #c8102e;
    --red-dark: #9e0c24;
    --gold: #f2b705;
    --ink: #1f2933;
    --muted: #5f6b7a;
    --bg: #fffaf3;
    --surface: #ffffff;
    --alt: #fdf0dc;
    --line: #eadfce;
    --green: #1e7a46;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(31, 41, 51, .08);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

a { color: var(--red); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.15rem; }

.container { width: min(1140px, 100% - 2rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.small { font-size: .875rem; color: var(--muted); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .5rem 1rem; }

/* Header */
.site-header { background: var(--surface); position: sticky; top: 0; z-index: 5; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-size: 1.2rem; }
.logo strong { color: var(--red); }
.main-nav { display: flex; align-items: center; gap: 1.25rem; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.main-nav a:hover { color: var(--red); }
.main-nav a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .8rem; font: inherit; cursor: pointer; }

/* Wimpelkette */
.bunting {
    height: 14px;
    background:
        linear-gradient(135deg, var(--red) 50%, transparent 50%) 0 0 / 28px 14px repeat-x,
        linear-gradient(225deg, var(--red) 50%, transparent 50%) 14px 0 / 28px 14px repeat-x;
    opacity: .9;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .7rem 1.4rem;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn-small { padding: .45rem 1rem; font-size: .95rem; }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: var(--alt); color: var(--red-dark); }
.btn-block { display: block; text-align: center; }

/* Hero */
.hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(242, 183, 5, .25), transparent 40%),
        radial-gradient(circle at 85% 0%, rgba(200, 16, 46, .15), transparent 45%),
        var(--alt);
    padding: 3.5rem 0 3rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-quick { margin: 1rem 0 0; color: var(--muted); }

/* Filter */
.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: .75rem;
    align-items: end;
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.filter-form-hero { margin: 1.5rem 0 0; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.filter-form .field { margin: 0; }
label { font-size: .9rem; font-weight: 600; }
input, select, textarea {
    font: inherit;
    padding: .6rem .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
[aria-invalid="true"] { border-color: var(--red); }
.field-error { color: var(--red); font-size: .875rem; margin: 0; }

/* Sections */
.section { padding: 2.5rem 0; }
.section-alt { background: var(--alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section-intro { color: var(--muted); max-width: 70ch; }
.page-head { background: var(--alt); padding: 2.5rem 0 2rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.fest-card {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    transition: transform .15s ease;
}
.fest-card:hover { transform: translateY(-2px); }
.fest-card-date {
    flex: 0 0 64px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: #fff;
    border-radius: 10px;
    line-height: 1.1;
}
.fest-card-date .day { font-size: 1.6rem; font-weight: 700; }
.fest-card-date .month { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.fest-card h3 { margin: .35rem 0 .25rem; }
.fest-card h3 a { color: var(--ink); text-decoration: none; }
.fest-card h3 a:hover { color: var(--red); }
.meta { margin: 0; font-size: .95rem; color: var(--muted); }

.badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; text-decoration: none; }
.badge-cat { background: #fde7ea; color: var(--red-dark); }
.badge-live { background: #dff3e7; color: var(--green); }
.badge-past { background: #eceff3; color: var(--muted); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.category-card {
    display: block;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--ink);
    border-top: 4px solid var(--gold);
}
.category-card:hover { border-top-color: var(--red); color: var(--ink); }
.category-card p { color: var(--muted); font-size: .95rem; margin: 0 0 .5rem; }
.count { font-size: .85rem; font-weight: 600; color: var(--red); }

.state-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.state-list a {
    display: flex;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .6rem .9rem;
    text-decoration: none;
    color: var(--ink);
}
.state-list a:hover { border-color: var(--red); }

.chip { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .7rem; margin: .15rem; font-size: .9rem; }
.synonyms { color: var(--muted); }

.result-count { color: var(--muted); font-weight: 600; }
.empty { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; text-align: center; }

.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination .current { padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }

.cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(120deg, var(--red), var(--red-dark));
    color: #fff;
    border-radius: var(--radius);
    padding: 2rem;
}
.cta p { margin: 0; opacity: .9; }

/* Detail */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
.detail-facts { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.detail-facts dl { margin: 0 0 1rem; }
.detail-facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .75rem; }
.detail-facts dd { margin: 0; font-weight: 500; }

.notice { background: #fff6d6; border-left: 4px solid var(--gold); padding: .75rem 1rem; border-radius: 6px; }
.notice-error { background: #fde7ea; border-left-color: var(--red); }
.success { background: #dff3e7; border-left: 4px solid var(--green); padding: 1.25rem 1.5rem; border-radius: 8px; }

/* Formular */
.submit-form { background: var(--surface); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-row .field-zip { max-width: 160px; }
.field-row:has(.field-zip) { grid-template-columns: 160px 1fr; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.prose h2 { margin-top: 1.5rem; }

/* Footer */
.site-footer { background: var(--ink); color: #d6dbe1; margin-top: 2rem; padding-top: 2.5rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer h2 { font-size: 1rem; color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .2rem 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr 1fr; gap: 2rem; }
.footer-brand { font-size: 1.2rem; color: #fff; margin-top: 0; }
.footer-brand strong { color: var(--gold); }
.footer-states { columns: 2; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2rem; padding: 1rem 0; font-size: .85rem; }

/* Responsive */
@media (max-width: 900px) {
    .filter-form { grid-template-columns: 1fr 1fr; }
    .filter-form .field-q, .filter-form .field-submit { grid-column: 1 / -1; }
    .filter-form .btn { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--surface);
        box-shadow: var(--shadow);
        padding: .5rem 1rem 1rem;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: .6rem 0; border-bottom: 1px solid var(--line); }
    .main-nav a.btn { margin-top: .75rem; text-align: center; border: 0; }
    .header-inner { position: relative; }
    .cta { flex-direction: column; align-items: flex-start; }
    .field-row, .field-row:has(.field-zip) { grid-template-columns: 1fr; }
    .field-row .field-zip { max-width: none; }
}

@media (max-width: 520px) {
    .filter-form { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
}
