/* SSV Heidenau – Abteilung Leichtathletik
   Vereinsfarben aus dem Logo: Blau #009FE3, Gelb #FFED00 */

:root {
  --blue: #009fe3;
  --blue-dark: #0069a0;      /* Text/Buttons auf Weiß (Kontrast ok) */
  --navy: #0b2a43;
  --navy-2: #081d30;
  --yellow: #ffed00;
  --ink: #14283a;
  --muted: #55697b;
  --line: #dbe6ee;
  --bg: #ffffff;
  --bg-soft: #f2f8fc;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(11, 42, 67, .28);
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 1.0625rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: .18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--navy); padding: .7rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; color: var(--navy); margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: .8rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.mark { background: linear-gradient(transparent 62%, var(--yellow) 62% 92%, transparent 92%); padding: 0 .08em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--navy); }
.brand img { width: 48px; height: 48px; }
.brand b { display: block; font-size: 1.05rem; line-height: 1.1; letter-spacing: -.01em; }
.brand small { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { text-decoration: none; color: var(--navy); font-weight: 650; padding: .55rem .85rem; border-radius: 999px; font-size: .98rem; }
.nav a:hover { background: var(--bg-soft); }
.nav a[aria-current="page"] { background: var(--navy); color: #fff; }
.nav .cta { background: var(--yellow); margin-left: .4rem; }
.nav .cta:hover { background: #fff35c; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; width: 46px; height: 46px; cursor: pointer; color: var(--navy); }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav { position: absolute; inset: 72px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: .8rem 1.25rem 1.4rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 1rem; font-size: 1.1rem; }
  .nav .cta { margin: .4rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .95rem 1.5rem; border-radius: 999px; font-weight: 750; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #fff35c; color: var(--navy); box-shadow: 0 8px 22px -8px rgba(255,237,0,.8); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-blue { background: var(--blue-dark); color: #fff; }
.btn-blue:hover { background: var(--navy); color: #fff; }
.btn-line { border-color: var(--navy); color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--navy) url("/img/hero.jpg") center 35% / cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(100deg, rgba(8,29,48,.93) 0%, rgba(8,29,48,.78) 42%, rgba(0,105,160,.35) 100%); }
.hero .wrap { padding-block: clamp(4.5rem, 11vw, 9rem) clamp(5rem, 12vw, 10rem); }
.hero h1 { color: #fff; max-width: 14ch; margin-bottom: .45em; }
.hero h1 .y { color: var(--yellow); }
.hero p.lead { color: rgba(255,255,255,.86); margin-bottom: 2rem; }
.hero .eyebrow { color: var(--yellow); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px; background: #fff; clip-path: polygon(0 100%, 100% 100%, 100% 0); }

.page-hero { background: linear-gradient(120deg, var(--navy-2), var(--navy) 60%, #0b4469); color: #fff; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(0,159,227,.55), transparent 68%); }
.page-hero .wrap { padding-block: clamp(3rem, 7vw, 5.5rem); position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.82); max-width: 60ch; margin: 0; font-size: 1.15rem; }
.page-hero .eyebrow { color: var(--yellow); }

/* ---------- Sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.soft { background: var(--bg-soft); }
.section-head { max-width: 62ch; margin-bottom: 2.6rem; }
.section-head.row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: -3.2rem; position: relative; z-index: 2; padding: 0; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.4rem; border-top: 5px solid var(--blue); }
.stat:nth-child(2) { border-top-color: var(--yellow); }
.stat b { display: block; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--navy); letter-spacing: -.03em; font-weight: 850; }
.stat span { color: var(--muted); font-weight: 600; font-size: .98rem; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; margin-top: -2rem; } }
.stats-wrap { padding: 0; }

.disciplines { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 1.8rem; padding: 0; list-style: none; }
.disciplines li { background: #fff; border: 1px solid var(--line); padding: .45rem 1rem; border-radius: 999px; font-weight: 700; color: var(--navy); }

/* Cards */
.grid { display: grid; gap: 1.5rem; }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card time { font-size: .85rem; font-weight: 700; color: var(--blue-dark); letter-spacing: .03em; }
.card h3 { margin: 0; font-size: 1.22rem; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card .more { margin-top: auto; padding-top: .7rem; font-weight: 750; color: var(--blue-dark); }

.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.info-card h3 { display: flex; align-items: center; gap: .6rem; }
.info-card .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); flex: none; }
.info-card .dot.y { background: var(--yellow); box-shadow: inset 0 0 0 2px rgba(11,42,67,.18); }
.info-card.dark { background: var(--navy); border-color: var(--navy); color: #dbe9f4; }
.info-card.dark h3 { color: #fff; }

/* Trainingszeiten */
.times { list-style: none; margin: 0; padding: 0; }
.times li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.times li:last-child { border: 0; }
.times b { color: var(--navy); }
.times span { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.info-card.dark .times li { border-color: rgba(255,255,255,.18); }
.info-card.dark .times b { color: #fff; }
.info-card.dark .times span { color: #c4d9ea; }
.tag { display: inline-block; font-size: .78rem; font-weight: 800; padding: .25rem .7rem; border-radius: 999px; background: var(--yellow); color: var(--navy); letter-spacing: .04em; text-transform: uppercase; }
.tag.blue { background: #dff2fc; color: var(--blue-dark); }

/* Galerie */
.gallery { columns: 3 260px; column-gap: 1rem; }
.gallery a { display: block; margin: 0 0 1rem; border-radius: 14px; overflow: hidden; break-inside: avoid; position: relative; }
.gallery img { width: 100%; transition: transform .5s, filter .3s; }
.gallery a:hover img { transform: scale(1.04); filter: brightness(1.06); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(5,16,28,.9); }
dialog.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 10px; margin: auto; }
dialog.lightbox button { position: fixed; top: 1rem; right: 1rem; background: var(--yellow); color: var(--navy); border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; font-weight: 800; cursor: pointer; }

/* CTA band */
.cta-band { background: var(--blue-dark) url("/img/mascot.png") no-repeat right 4% bottom -10px / auto 120%; color: #fff; padding-block: clamp(3rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,105,160,1) 55%, rgba(0,105,160,.7)); }
.cta-band .wrap { position: relative; max-width: 900px; margin-left: max(1.25rem, calc((100vw - var(--wrap)) / 2)); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 52ch; }
@media (max-width: 800px) { .cta-band { background-image: none; } }

/* Kontakt / Formular */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
form.contact { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { font-weight: 700; font-size: .93rem; color: var(--navy); }
input, textarea { font: inherit; padding: .85rem 1rem; border: 1.5px solid #c3d4e0; border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
input:focus, textarea:focus { outline: 3px solid rgba(0,159,227,.35); border-color: var(--blue); }
textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: .2rem; flex: none; accent-color: var(--blue-dark); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 1rem 1.2rem; border-radius: 12px; font-weight: 600; display: none; }
.notice.ok { display: block; background: #e5f7ec; color: #0c5a2c; }
.notice.err { display: block; background: #fde8e8; color: #8a1f1f; }
.person { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.person .av { width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }

/* Blog */
.post-head { max-width: 780px; }
.post-meta { color: rgba(255,255,255,.8); font-size: .98rem; margin-top: 1rem; }
.prose { font-size: 1.12rem; }
.prose p { margin-bottom: 1.3em; }
.prose figure { margin: 2rem 0; }
.prose figure img { border-radius: 14px; width: 100%; box-shadow: var(--shadow); }
.prose figure.small { max-width: 420px; }
.prose figcaption { font-size: .92rem; color: var(--muted); margin-top: .6rem; }
.prose .byline { border-top: 1px solid var(--line); margin-top: 2.2rem; padding-top: 1.2rem; color: var(--muted); font-size: .95rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Events */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.events li { display: grid; grid-template-columns: 110px 1fr; gap: 1.4rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.5rem; }
.events .date { background: var(--navy); color: #fff; border-radius: 14px; text-align: center; padding: .7rem .4rem; line-height: 1.15; }
.events .date b { display: block; font-size: 1.7rem; }
.events .date span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); font-weight: 800; }
.empty { text-align: center; padding: 2.5rem 1.5rem; border: 2px dashed #bcd3e2; border-radius: var(--radius); color: var(--muted); background: #fff; }
.empty b { color: var(--navy); display: block; font-size: 1.2rem; margin-bottom: .3rem; }

.legal h2 { font-size: 1.45rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.6em; }
.legal p, .legal li { color: #2b3f50; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-2); color: #b9cde0; padding-block: 3.5rem 1.6rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
.site-footer h4 { color: #fff; margin: 0 0 .9rem; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot-brand { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.foot-brand img { width: 56px; height: 56px; background: #fff; border-radius: 50%; padding: 2px; }
.foot-brand b { color: #fff; font-size: 1.1rem; display: block; line-height: 1.15; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; padding-top: 1.4rem; font-size: .9rem; }

/* Scroll-Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Bestenliste ---------- */
.bl-tools { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
@media (max-width: 760px) { .bl-tools { grid-template-columns: 1fr; } }
select { font: inherit; padding: .85rem 1rem; border: 1.5px solid #c3d4e0; border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
select:focus { outline: 3px solid rgba(0,159,227,.35); border-color: var(--blue); }
.bl-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.bl-dl { display: flex; gap: .7rem; flex-wrap: wrap; }
.bl-dl .btn { padding: .65rem 1.15rem; font-size: .93rem; }
.bl-ak { padding: 0; margin-bottom: 2.4rem; }
.bl-ak h2 { font-size: 1.7rem; display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; scroll-margin-top: 90px; }
.bl-ak h2 small { font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.bl-dis { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .6rem; overflow: hidden; }
.bl-dis[open] { box-shadow: var(--shadow); }
.bl-dis summary { cursor: pointer; padding: .95rem 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; list-style: none; }
.bl-dis summary::-webkit-details-marker { display: none; }
.bl-dis summary::before { content: "▸"; color: var(--blue-dark); margin-right: .6rem; transition: transform .2s; display: inline-block; }
.bl-dis[open] summary::before { transform: rotate(90deg); }
.bl-dis summary b { color: var(--navy); flex: 1; min-width: 8rem; }
.bl-dis .best { color: var(--muted); font-size: .92rem; }
.bl-dis .tw { overflow-x: auto; border-top: 1px solid var(--line); }
.bl-dis table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 520px; }
.bl-dis th { text-align: left; background: var(--bg-soft); color: var(--navy); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; padding: .6rem 1rem; }
.bl-dis td { padding: .55rem 1rem; border-top: 1px solid #eaf1f6; font-variant-numeric: tabular-nums; }
.bl-dis td.lst { font-weight: 800; color: var(--navy); white-space: nowrap; }
.bl-dis tbody tr:first-child td { background: #fffde0; }
.bl-dis tbody tr:hover td { background: var(--bg-soft); }
.bl-hint { color: var(--muted); font-size: .92rem; margin-top: 1.5rem; }
