/* SGM Vöhringen – neues Layout */
:root {
  --navy: #0a1d3c;
  --navy-2: #12305e;
  --blue: #0688d1;
  --blue-dark: #0570ad;
  --sky: #e8f4fc;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --text: #16233b;
  --muted: #5b6b82;
  --line: #e1e7ef;
  --green: #2e9b46;
  --red: #d7262e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 29, 60, .06), 0 8px 24px rgba(10, 29, 60, .06);
  --shadow-lg: 0 12px 40px rgba(10, 29, 60, .16);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 1000; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  width: min(1400px, 100% - 32px); margin-inline: auto; height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); flex-shrink: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.brand small { font-size: 12px; color: var(--muted); font-weight: 500; }

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav__l1 { display: flex; align-items: center; gap: 2px; }
.nav li { position: relative; }
.nav a {
  display: block; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14.5px;
  padding: 8px 11px; border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s;
}
.nav__l1 > li > a:hover, .nav__l1 > li:focus-within > a { background: var(--sky); color: var(--blue-dark); }
.nav__l1 > li.is-active > a { background: var(--navy); color: #fff; }
.nav__l1 > li.has-sub > a { padding-right: 26px; }
.nav__l1 > li.has-sub > a::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .6;
}
.nav__toggle { display: none; }
.nav__sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; padding: 8px !important;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.nav__sub::before { content: ""; position: absolute; inset: -10px 0 auto 0; height: 10px; }
.nav li:hover > .nav__sub, .nav li:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { border-radius: 8px; font-weight: 500; padding: 8px 12px; }
.nav__sub a:hover { background: var(--sky); color: var(--blue-dark); }
.nav__sub li.is-active > a { color: var(--blue-dark); font-weight: 700; }
.nav__sub .has-sub > a::after { content: "›"; float: right; margin-left: 12px; opacity: .5; }
.nav__sub .nav__sub { top: -9px; left: calc(100% + 6px); }

.burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--sky); cursor: pointer; padding: 12px; }
.burger span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: .2s; }
.burger span + span { margin-top: 6px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1279px) {
  /* backdrop-filter würde das fixierte Menü auf die Kopfzeile beschränken */
  .site-header { backdrop-filter: none; background: #fff; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff; overflow-y: auto;
    padding: 12px 16px 40px; display: none; border-top: 1px solid var(--line);
  }
  .nav.is-open { display: block; }
  .nav__l1 { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav__sub li { border-bottom: 0; }
  .nav a { font-size: 17px; padding: 14px 52px 14px 8px; border-radius: 8px; white-space: normal; }
  .nav__l1 > li.has-sub > a::after, .nav__sub .has-sub > a::after { display: none; }
  .nav__l1 > li.is-active > a { background: none; color: var(--blue-dark); }
  .nav__toggle {
    display: block; position: absolute; right: 0; top: 6px; width: 44px; height: 40px; border: 0;
    background: var(--sky); border-radius: 10px; cursor: pointer;
  }
  .nav__toggle::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -6px 0 0 -4px;
    border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg); transition: .2s;
  }
  .nav__toggle[aria-expanded="true"]::before { transform: rotate(-135deg); margin-top: -2px; }
  .nav__sub, .nav__sub .nav__sub {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
    min-width: 0; padding: 0 0 8px 14px !important; display: none; border-left: 2px solid var(--sky); border-radius: 0; margin-left: 8px;
  }
  .nav li.is-open > .nav__sub { display: block; }
  .nav__sub a { font-size: 16px; padding: 10px 52px 10px 10px; }
}
@media (max-width: 420px) { .brand small { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.hero__bg, .pagehead__bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.hero__bg::after, .pagehead__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 29, 60, .94) 0%, rgba(10, 29, 60, .78) 45%, rgba(6, 136, 209, .35) 100%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 96px 0 104px; }
.hero__eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
  letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
}
.hero__title { margin: 0; font-size: clamp(36px, 6vw, 68px); line-height: 1.04; font-weight: 900; letter-spacing: -.025em; max-width: 17ch; text-wrap: balance; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__logo { width: clamp(160px, 22vw, 280px); background: #fff; border-radius: 24px; padding: 14px; box-shadow: var(--shadow-lg); transform: rotate(2deg); }
@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; padding: 56px 0 64px; }
  .hero__logo { order: -1; width: 140px; transform: none; }
}

.pagehead { position: relative; color: #fff; background: var(--navy); overflow: hidden; }
.pagehead__inner { position: relative; padding: 56px 0 60px; }
.pagehead h1 { margin: 6px 0 0; font-size: clamp(30px, 4.5vw, 48px); line-height: 1.1; font-weight: 850; letter-spacing: -.02em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: rgba(255, 255, 255, .7); }
.crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs a:last-child { color: #fff; font-weight: 600; }

/* ---------- Inhalt ---------- */
.content { padding: 48px 0 72px; display: grid; gap: 28px; }
.is-home .content { margin-top: -48px; position: relative; }
.block {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 44px); display: grid; gap: 24px; min-width: 0;
}
.block--plain { background: none; box-shadow: none; padding: 0; }
.block--welcome h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.02em; color: var(--navy); }
.block--welcome .prose p { font-size: 19px; }

.prose { min-width: 0; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 .9em; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; margin: 1.2em 0 .5em; color: var(--navy); letter-spacing: -.015em; }
.prose h3 { font-size: 20px; line-height: 1.3; margin: 1.4em 0 .4em; color: var(--navy); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose ul li::marker { color: var(--blue); }
.prose strong { color: var(--navy); }
.prose .accent, .accent { color: var(--blue); }
.prose img { border-radius: var(--radius-sm); }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.center { text-align: center; }

.pic { margin: 0; }
.pic img { width: 100%; border-radius: 12px; background: var(--bg); }
.pic a { display: block; border-radius: 12px; overflow: hidden; }
.pic a img { transition: transform .35s ease; }
.pic a:hover img { transform: scale(1.02); }
.pic figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.block > .pic { justify-self: center; width: 100%; max-width: 900px; }
.block > .pic img { max-height: 900px; object-fit: contain; }

.cols { display: grid; grid-template-columns: var(--cols); gap: 32px; align-items: start; }
.col { display: grid; gap: 18px; min-width: 0; }
.col .pic img { max-width: 240px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

.media { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 36px; align-items: start; }
.media--right { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.media--right .media__img { order: 2; }
.media__img { position: sticky; top: calc(var(--header-h) + 20px); }
.media__img .pic img { max-height: 560px; object-fit: cover; }
@media (max-width: 860px) { .media { grid-template-columns: 1fr; } .media--right .media__img { order: 0; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery a { display: block; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--bg); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.05); }

.page-partner-sponsoren .block > .pic { max-width: 420px; }
.logo-grid {display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.logo-grid .pic { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; place-items: center; min-height: 150px; transition: box-shadow .2s, transform .2s; }
.logo-grid .pic:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.logo-grid .pic a { border-radius: 0; width: 100%; }
.logo-grid .pic img { width: 100%; height: 120px; object-fit: contain; background: none; border-radius: 0; }

/* Infoliste (z.B. Trainingsort / Trainingszeiten / Trainer) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 0 0 1em; }
.facts > div { background: var(--bg); border-radius: 12px; padding: 16px 18px; border-left: 4px solid var(--blue); }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; color: var(--navy); }
.facts dd + dd { margin-top: 2px; }

/* Downloads */
.download {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; text-decoration: none; color: var(--text);
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .2s;
}
.download:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--text); }
.download__icon { width: 48px; height: 56px; border-radius: 8px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; letter-spacing: .05em; }
.download__body { display: grid; gap: 2px; min-width: 0; }
.download__body strong { color: var(--navy); }
.download__file { color: var(--blue-dark); font-size: 15px; overflow-wrap: anywhere; }
.download__meta { color: var(--muted); font-size: 13px; }
.download__arrow { width: 38px; height: 38px; border-radius: 50%; background: var(--sky); color: var(--blue-dark); display: grid; place-items: center; font-weight: 700; }
.block:has(> .download) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.block:has(> .download) > .prose { grid-column: 1 / -1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: .18s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn-row { margin: 0; text-align: center; }

/* Karten (Unterseiten) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; display: grid; gap: 4px; padding: 22px 22px 22px; border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow); text-decoration: none; color: var(--navy); overflow: hidden; transition: .2s;
}
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--blue); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--navy); }
.card__kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.card__title { font-size: 19px; font-weight: 800; line-height: 1.25; padding-right: 30px; }
.card__arrow { position: absolute; right: 20px; bottom: 20px; color: var(--blue); font-weight: 700; transition: transform .2s; }
.card:hover .card__arrow { transform: translateX(4px); }

/* Formulare */
.form { display: grid; gap: 18px; background: var(--bg); border-radius: 14px; padding: clamp(18px, 3vw, 32px); }
.form__title { margin: 0; font-size: 22px; color: var(--navy); }
.form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px 18px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.field--wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select {
  font: inherit; font-size: 16px; font-weight: 400; padding: 12px 14px; border: 1px solid #cdd6e2; border-radius: 10px; background: #fff; color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(6, 136, 209, .25); border-color: var(--blue); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.check.is-invalid { border-color: var(--red); }
.req { color: var(--red); }
.form__note { margin: 0; font-size: 14px; color: var(--muted); }
.form .btn { justify-self: start; }
.form__msg { padding: 14px 16px; border-radius: 10px; font-size: 15px; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form button[disabled] { opacity: .6; cursor: progress; }
.form__msg.is-ok { background: #e7f6ec; color: #1d6b31; }
.form__msg.is-err { background: #fdecec; color: #a3191f; }

/* fussball.de Widget */
.widget { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.widget__head { background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .04em; padding: 10px 16px; }
.widget .fussballde_widget { padding: 8px; min-height: 120px; }

.counter { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.counter strong { color: var(--navy); font-variant-numeric: tabular-nums; }

/* Sitemap */
.sitemap ul { list-style: none; margin: 0; padding-left: 18px; border-left: 2px solid var(--sky); }
.sitemap > ul { padding-left: 0; border: 0; columns: 2 280px; }
.sitemap li { margin: 6px 0; break-inside: avoid; }
.sitemap > ul > li > a { font-weight: 700; color: var(--navy); }
.sitemap a { text-decoration: none; }
.sitemap a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .8); font-size: 15px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.site-footer h2 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 14px; }
.site-footer p { margin: 0; line-height: 1.7; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.brand--light { color: #fff; margin-bottom: 18px; }
.brand--light img { background: #fff; border-radius: 12px; padding: 4px; }
.brand--light small { color: rgba(255, 255, 255, .65); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.site-footer__bottom a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer__bottom a:hover { text-decoration: underline; }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 14, 30, .92); display: grid; place-items: center; padding: 56px 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1200px, 100%); max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .lightbox, .hero__actions { display: none !important; }
  .block { box-shadow: none; border: 1px solid #ddd; }
  .hero, .pagehead { background: none; color: #000; }
  .hero__bg, .pagehead__bg { display: none; }
}
