/* Theme "Aufgefrischt": the facelift on top of the classic files (style.css … site.css, copied from themes/classic).
   Same structure and character – icon tiles, thin headings, red accents, grey footer – with the usability points of the
   UX analysis (CMS-UX-2026.md): readable text size, clear links and focus, names under the icons, large team photos,
   fact sheets stacked on phones, news and dates on the start page. */

:root {
    --red: #e42230; --red-ink: #c01a27; --red-dark: #9e1520; --red-soft: #fdf0f1;
    --ink: #1d1f23; --text: #2b2d31; --muted: #62666d; --line: #e4e4e2; --soft: #f4f4f2; --grey: #ececea;
    --radius: 14px; --radius-sm: 8px;
    --shadow: 0 1px 2px #0000000d, 0 4px 14px #0000000a;
    --shadow-lift: 0 2px 4px #00000010, 0 12px 28px -8px #00000030;
}
[hidden] { display: none !important; }

/* ---------- base: text size, links, focus ---------- */
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); -webkit-font-smoothing: antialiased; }
@media screen and (min-width: 992px) { .container { width: 100%; max-width: 1100px; } }
h1, h2, h3 { color: var(--ink); line-height: 1.25; text-wrap: balance; }
h1 { font-size: 2.1rem; margin-bottom: 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin-bottom: .6rem; }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1.1em; text-wrap: pretty; }
a { color: var(--red-ink); }
a:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: .2em; }
* { outline: revert; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; border-radius: 4px; }
.skip { display: block; position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .5rem 1rem; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip:focus { left: .5rem; }
div { overflow: visible; }   /* the classic base gives every div overflow: auto, which shows stray scroll bars */
article, .pagecontent, .gallery { overflow: visible; }
article { display: flow-root; }

a.button, button.button { display: inline-block; padding: .65em 1.2em; border: 0; border-radius: 99px; background: var(--red); color: #fff; font: inherit; font-weight: 600;
    box-shadow: 0 2px 6px #e4223040; cursor: pointer; transition: background .2s, box-shadow .2s, translate .2s; }
a.button:hover, button.button:hover { background: var(--red-ink); color: #fff; text-decoration: none; box-shadow: 0 6px 16px #e4223055; translate: 0 -1px; }

/* ---------- header: the icon tiles with their names ---------- */
header { margin-bottom: 1.5rem !important; }
@media screen and (min-width: 768px) { header { height: auto; min-height: 140px; margin-bottom: 2.25rem !important; } }
header .header__nav { overflow: visible; }
/* quiet tiles: icon and name on the page, no frame or shadow; hover and the active section only tint the background */
header .header__navitemlink { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: transparent; border: 0; box-shadow: none;
    border-radius: var(--radius); color: var(--muted); transition: background .2s, color .2s; }
header .header__navitemlink:hover { background: var(--soft); box-shadow: none; text-decoration: none; color: var(--ink); }
header .header__navitemlink img { opacity: .9; transition: opacity .2s; }
header .header__navitemlink:hover img { opacity: 1; }
@media screen and (min-width: 768px) { header .header__navitemlink { max-width: none; width: 80px; padding: .5rem .3rem .4rem; } header .header__navitemlink img { width: 44px; height: 44px; } }
/* every name has room for two lines (one-line names centred in it): all tiles are the same height, the icons line up;
   at least 4 letters on each side of a hyphen (Tisch-tennis, not Tischten-nis) */
header .header__navlabel { display: flex; align-items: center; justify-content: center; min-height: 2.3em; font-size: .74rem; font-weight: 500; line-height: 1.15; text-align: center;
    hyphens: auto; hyphenate-limit-chars: 8 4 4; overflow-wrap: anywhere; }
header .header__nav { align-items: stretch; }
header .header__navitem { display: flex; }
header .header__navitemlink { justify-content: flex-start; }
header .header__navitem.is-active .header__navitemlink { background: var(--red-soft); }
header .header__navitem.is-active .header__navitemlink img { opacity: 1; }
header .header__navitem.is-active .header__navlabel { color: var(--red-ink); font-weight: 600; }
header .header__pageindicator { height: 3px; border-radius: 3px; top: calc(100% + .35rem); box-shadow: none; }
@media screen and (min-width: 768px) { header .header__nav { height: auto; } }
@media screen and (max-width: 767px) {
    /* phones: seven tiles in a row, the name in small type below the icon */
    header .header__nav { margin: 0 -1vw; }
    header .header__navitemlink { margin: 0 1vw; padding: 1.2vw .6vw 1vw; border-radius: 2.5vw; max-width: 13vw; }
    header .header__navlabel { font-size: 2.35vw; font-weight: 500; letter-spacing: -.01em; }
    header .header__navitem.is-active .header__navlabel { font-weight: 600; }
    /* the menu below the tiles: solid and only as tall as its list (header.js sets the height of the whole page) */
    header .header__subnavwrapper { top: 100%; }   /* directly below the row of tiles (the tile is a flex box, so it has no automatic place) */
    header .header__subnavwrapper.open { height: auto !important; max-height: 300vh; box-shadow: 0 16px 30px -12px #0004; border-radius: 0 0 var(--radius) var(--radius); }
    header .header__subnav { background: #f7f7f5; border-radius: 0 0 var(--radius) var(--radius); }
    header .header__subnav a { opacity: 1; color: var(--text); font-weight: 500; }
    header .header__subnav a.active { color: var(--red-ink); font-weight: 700; }
}
header .header__logo img { max-height: 120px; }
@media screen and (min-width: 768px) and (max-width: 1099px) {
    /* tablets: logo and bell above, the seven tiles in their own row over the full width (side by side they do not fit) */
    header { flex-wrap: wrap; }
    header .header__logo { flex: 1 0 100%; height: 110px; }
    header .header__nav { flex: 1 0 100%; justify-content: space-between; gap: .5rem; margin: 0; }
    header .header__navitem { flex: 1 1 0; min-width: 0; }
    header .header__navitemlink { width: 100%; margin: 0; }
}

/* the bell: still the tab that hangs from the top, now a button with the number of news */
.newsbell { overflow: visible; }
.newsbell__icon { display: block; border: 0; font: inherit; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); }
.newsbell__icon:hover { text-decoration: none; }
.newsbell__icon:hover { box-shadow: var(--shadow-lift); }
.newsbell__count { position: absolute; right: -.45rem; bottom: -.45rem; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 99px; background: var(--red); color: #fff;
    font-size: .75rem; line-height: 1.4rem; text-align: center; box-shadow: 0 0 0 2px #fff; }

/* ---------- dialogs: picture viewer ---------- */
dialog { border: 0; padding: 0; color: var(--text); }
dialog::backdrop { background: #1d1f23a6; backdrop-filter: blur(2px); }
.close { flex: none; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.close:hover { background: var(--grey); }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #0d0e10f2; color: #fff; display: none; place-items: center; overflow: hidden; }
.lightbox[open] { display: grid; }
.lightbox figure { margin: 0; display: grid; gap: .75rem; justify-items: center; padding: 3.5rem 4rem 2rem; max-height: 100dvh; overflow: hidden; }
.lightbox img { max-width: 92vw; max-height: 80dvh; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #e1e3e6; font-size: .95rem; text-align: center; }
.lightbox .close { position: absolute; top: 1rem; right: 1rem; background: #ffffff1f; color: #fff; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; translate: 0 -50%; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: #ffffff1f; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox__prev:hover, .lightbox__next:hover, .lightbox .close:hover { background: #ffffff38; }
.lightbox__prev { left: 1rem; } .lightbox__next { right: 1rem; }
@media (max-width: 560px) { .lightbox figure { padding: 3.5rem .5rem 1.5rem; } .lightbox__prev, .lightbox__next { top: auto; bottom: 1rem; translate: none; } }

/* ---------- side menu: a calm list, the current page with the red bar ---------- */
.sidenav { flex-basis: 210px; flex-shrink: 0; align-self: flex-start; margin-right: 2rem; border-right: 0; position: sticky; top: 1rem; }
.sidenav a, .sidenav a:first-child { position: relative; border: 0; border-radius: var(--radius-sm); padding: .4rem .75rem; color: var(--muted); opacity: 1; font-size: .93rem; line-height: 1.35; }
.sidenav a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.sidenav a.active { background: var(--soft); color: var(--ink); font-weight: 700; }
.sidenav a.active::before { content: ""; position: absolute; left: 0; top: .4rem; bottom: .4rem; width: 3px; border-radius: 3px; background: var(--red); }

/* ---------- content ---------- */
article { margin-bottom: 2rem; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media screen and (min-width: 768px) { article { padding: 1.5rem 1.75rem; border-radius: var(--radius); } }
.news__date, .event__date { color: var(--muted); font-size: .92rem; }
blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--red); color: var(--muted); }

/* pictures: "Klein" floats beside text only when text follows it; on its own or above a table (team photo with its
   names) it is shown large, at most its own size */
div.image img { border-radius: var(--radius-sm); }
article div.image:not([class*="image--"]):not(:has(+ p, + ul, + ol, + h3, + blockquote)),
div.image:not([class*="image--"]):not(:has(+ p, + ul, + ol, + h3, + blockquote)) { float: none; max-width: 100%; margin: 0 0 1rem; }
@media screen and (min-width: 576px) {
    article div.image:not([class*="image--"]):has(+ p, + ul, + ol, + h3, + blockquote) { max-width: 40%; margin: .25rem 1.25rem 1rem 0; }
}
div.image:not([class*="image--"]):has(+ table) img { margin: 0 auto; }

/* tables: lighter lines, labels in grey; fact sheets stack label above value on phones */
table { border-collapse: collapse; border-spacing: 0; margin: 1.25rem auto; }
table td { border: 1px solid var(--line); padding: .55rem .75rem; vertical-align: top; }
table .title { background: var(--soft); color: var(--muted); font-weight: 600; }
table tr.title td { color: var(--ink); }
@media screen and (max-width: 575px) {
    table:has(td.title) td { display: block; border-width: 0 1px; }
    table:has(td.title) tr:first-child td:first-child { border-top-width: 1px; }
    table:has(td.title) tr:last-child td:last-child { border-bottom-width: 1px; }
    table:has(td.title) td.title { text-align: left; padding-bottom: .1rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: none; }
    table:has(td.title) td.title + td { padding-top: 0; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
    table:has(td.title) { width: 100%; }
    table:not(:has(td.title)) { display: block; max-width: 100%; overflow-x: auto; }
}

/* galleries: small gaps, rounded corners */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(5.5rem, 22vw, 9rem), 1fr)); gap: .35rem; margin: 0 0 1.5rem; }
.gallery::after { display: none; }
.gallery img { float: none; width: 100%; margin: 0; border-radius: 6px; transition: opacity .25s, scale .3s; }
.gallery a:hover img { opacity: .85; scale: 1.02; }

.callout--highlight { border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.board__role { border-radius: var(--radius-sm); }
.fully-booked::before { border-radius: 8px; }

/* groups: the age group as a label under the heading, the contact button below the facts; latest event reports */
.group__audience { display: inline-block; margin: -.5rem 0 1rem; padding: .2rem .75rem; border-radius: 99px; background: var(--red-soft); color: var(--red-ink); font-weight: 600; font-size: .88rem; }
.group__contact { text-align: center; margin: -.5rem 0 2rem; }
.recent-events { padding-left: 1.2rem; }
.recent-events__date { color: var(--muted); font-size: .9rem; }

/* ---------- start page: next dates and news below the welcome text ---------- */
.home-extra { margin: 0 0 2.5rem; }
.home-extra .dates { margin-bottom: 0; }
.is-home .pagecontent > h1 + .home-extra { margin-top: .5rem; }
.home-extra h2 { font-weight: 300; margin: 0 0 1rem; }
.dates { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: .5rem; }
.dates a { display: flex; gap: .9rem; align-items: center; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.dates a:hover { text-decoration: none; box-shadow: var(--shadow-lift); color: var(--ink); }
.dates .date { display: grid; place-items: center; width: 3.3rem; flex: none; padding: .25rem 0; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red-ink); font-size: .72rem;
    font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.dates .date b { font-size: 1.3rem; }
.dates small { display: block; color: var(--muted); font-size: .85rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); box-shadow: var(--shadow);
    transition: box-shadow .25s, translate .25s; }
.card:hover { text-decoration: none; color: var(--text); box-shadow: var(--shadow-lift); translate: 0 -2px; }
.card__image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.card__image img { width: 100%; height: 100%; object-fit: cover; }
.card__image--document, .card__image--empty { display: grid; place-items: center; }
.card__image--document img { width: auto; height: 82%; object-fit: contain; background: #fff; border-radius: 3px; box-shadow: 0 8px 20px -8px #0006; rotate: -3deg; }
.card__image--empty { background: var(--red-soft); }
.card__image--empty img { width: 34%; height: auto; mix-blend-mode: multiply; }
.card__body { display: grid; gap: .25rem; padding: .9rem 1rem 1.1rem; overflow-wrap: anywhere; }
.card__body small { color: var(--red-ink); font-size: .8rem; font-weight: 600; }
.card__body strong { color: var(--ink); line-height: 1.3; }
.card__body span { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.home-extra__more { text-align: center; }

/* ---------- footer: all sections, Facebook, banner, copyright ---------- */
.footer { margin-top: 3rem; padding: 1.5rem 0 1rem; background: var(--soft); border-top: 1px solid var(--line); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; }
.footer__nav a { display: inline-block; color: var(--text); font-weight: 600; padding: .25rem 0; }
.footer__nav a:hover { color: var(--red-ink); }
.footer__socialmedia { display: inline-flex; align-items: center; gap: .5rem; height: auto; color: var(--muted); opacity: 1; }
.footer__socialmedia img { width: 28px; height: 28px; opacity: .7; }
.footer__socialmedia:hover { color: var(--ink); }
.footer__socialmedia:hover img { opacity: 1; }
.footer__copyright { color: var(--muted); font-size: .85rem; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; font-size: .9rem; }
.footer__legal a { display: inline; color: var(--muted); }
.footer__legal a:hover, .footer__legal a[aria-current] { color: var(--red-ink); }
.legal__date { margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.is-legal .pagecontent { max-width: 48rem; margin: 0 auto; }   /* legal pages: no side menu, a readable text column */

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { header, .footer, .sidenav, .newsbell, dialog, .home-extra { display: none !important; } article { box-shadow: none; } }
