/* =========================================================
   TTC Wallenfels 1963 e.V. – Stylesheet
   ========================================================= */
:root {
  --green-950: #0b2a18;
  --green-900: #103d23;
  --green-700: #17703a;
  --green-600: #1f8a49;
  --green-100: #e3f2e8;
  --green-50:  #f2f8f4;
  --red-600:   #d0312d;
  --red-700:   #b02623;
  --ink:       #18201b;
  --muted:     #5a665f;
  --line:      #dfe6e1;
  --bg:        #f5f7f5;
  --card:      #ffffff;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(16,61,35,.06), 0 6px 20px rgba(16,61,35,.08);
  --shadow-lg: 0 10px 40px rgba(16,61,35,.18);
  --maxw:      1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--red-600); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--green-900); margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--red-600); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--green-900); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--green-900); }
.brand img { height: 46px; width: auto; }
.brand .brand-wappen { height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.15rem; letter-spacing: -.01em; }
.brand-text span { font-size: .8rem; color: var(--muted); }
.brand:hover { color: var(--green-900); }

.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 46px; height: 46px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; color: var(--green-900);
}
.nav-toggle svg { width: 24px; height: 24px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a {
  display: block; padding: .55rem .9rem; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .98rem;
}
.main-nav a:hover { background: var(--green-50); color: var(--green-700); }
.main-nav a[aria-current="page"] { background: var(--green-700); color: #fff; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .main-nav a { border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: 1.05rem; }
  .brand-text span { display: none; }
}
@media (max-width: 400px) { .brand .brand-wappen { display: none; } }

/* ---------- Hero ---------- */
.hero { color: #fff; background: linear-gradient(135deg, var(--green-950), var(--green-700)); }
.hero .container { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.hero-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3.2rem); margin-bottom: .3em; }
.hero p { font-size: clamp(1.02rem, 1rem + .3vw, 1.2rem); max-width: 46ch; opacity: .92; margin: 0; }
.hero .hero-actions { margin-top: 0; }

/* Bilder-Slider: Bild immer vollständig sichtbar, ohne Überlagerung */
.slider { position: relative; }
.slides {
  position: relative; aspect-ratio: 990 / 300; border-radius: var(--radius); overflow: hidden;
  background: var(--green-950); box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.slide.active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sl-btn {
  position: absolute; top: calc((100% - 3.25rem) / 2); transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--green-900); box-shadow: 0 4px 14px rgba(0,0,0,.35);
  display: grid; place-items: center; transition: transform .15s, background .15s;
}
.sl-btn:hover { background: var(--red-600); color: #fff; }
.sl-btn svg { width: 24px; height: 24px; }
.sl-prev { left: .75rem; }
.sl-next { right: .75rem; }
.sl-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; padding-top: .9rem; }
.sl-caption { font-weight: 600; color: #e3f2e8; font-size: .98rem; }
.sl-dots { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.sl-dots button {
  width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.sl-dots button::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.35); border: 2px solid #fff; transition: background .2s, transform .2s;
}
.sl-dots button[aria-current="true"]::before { background: #fff; transform: scale(1.15); }
@media (max-width: 600px) {
  .sl-btn { width: 38px; height: 38px; }
  .sl-btn svg { width: 20px; height: 20px; }
  .sl-prev { left: .4rem; } .sl-next { right: .4rem; }
  .sl-bar { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .sl-dots { justify-content: flex-start; margin-left: -8px; }
  .slides { border-radius: var(--radius-sm); }
}

/* Festliche Einladung */
.notice-xmas { position: relative; background: linear-gradient(180deg, #fff 0%, #fff 70%, #fdf3f2 100%); }
.notice-xmas .xmas-deco { position: absolute; top: 1.25rem; right: 1.25rem; width: 64px; height: 64px; }
.notice-xmas h2 { color: var(--red-700); padding-right: 70px; }
.notice-xmas .card-meta { color: var(--red-600); }
.notice .lead { font-size: 1.12rem; }
.date-chip svg { width: 20px; height: 20px; flex: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 700; color: #bfe6cc; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--red-600); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.page-hero { background: linear-gradient(120deg, var(--green-900), var(--green-700)); color: #fff; }
.page-hero .container { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { margin: .5rem 0 0; opacity: .85; max-width: 60ch; }
.breadcrumb { font-size: .9rem; margin-bottom: .6rem; opacity: .85; }
.breadcrumb a { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.35rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .15s;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { border-color: var(--green-700); color: var(--green-700); background: #fff; }
.btn-outline:hover { background: var(--green-700); color: #fff; }

/* ---------- Sections & Cards ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; text-decoration: none; }

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line);
}
.card-pad { padding: 1.5rem; }
.card-link { text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: inherit; }
.card-media { aspect-ratio: 4 / 3; background: var(--green-100); overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-media.placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--green-700), var(--green-900)); }
.card-media.placeholder img { width: 38%; height: auto; object-fit: contain; opacity: .9; }
.card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.1rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .96rem; }
.card-meta { font-size: .82rem; font-weight: 700; color: var(--green-600); text-transform: uppercase; letter-spacing: .06em; }
.badge {
  position: absolute; left: .75rem; bottom: .75rem; background: rgba(11,42,24,.85); color: #fff;
  font-size: .8rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px;
}

.notice {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-top: 5px solid var(--red-600); padding: 1.75rem;
}
.notice h2, .notice h3 { margin-top: 0; }
.notice .date-chip {
  display: inline-flex; gap: .5rem; align-items: center; background: var(--green-50); color: var(--green-900);
  border: 1px solid var(--green-100); padding: .4rem .8rem; border-radius: 999px; font-weight: 700; font-size: .95rem; margin-bottom: 1rem;
}
.agenda { counter-reset: a; list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .35rem; }
.agenda li { counter-increment: a; display: flex; gap: .75rem; align-items: baseline; }
.agenda li::before {
  content: counter(a); flex: 0 0 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--green-700); color: #fff; font-size: .8rem; font-weight: 700;
}

.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.info-list li { display: flex; gap: .9rem; align-items: flex-start; }
.info-list .ico {
  flex: 0 0 42px; height: 42px; border-radius: 12px; background: var(--green-50); color: var(--green-700);
  display: grid; place-items: center;
}
.info-list .ico svg { width: 22px; height: 22px; }
.info-list strong { display: block; color: var(--green-900); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.stat b { font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem) !important; }
.stat { background: var(--green-50); border-radius: var(--radius); padding: 1.25rem; text-align: center; border: 1px solid var(--green-100); }
.stat b { display: block; font-size: 2rem; color: var(--green-700); line-height: 1.1; }
.stat span { font-size: .9rem; color: var(--muted); }

.video-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-wrap video { width: 100%; }

/* ---------- Article ---------- */
.article { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: clamp(1.25rem, 4vw, 3rem); }
.prose { max-width: 72ch; }
.prose img { border-radius: var(--radius-sm); }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: .45rem .6rem; vertical-align: top; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.figures { display: grid; gap: 1rem; }
.figures figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.figures figure a { display: block; }
.figures img { width: 100%; }
.figures figcaption { padding: .7rem 1rem; font-size: .9rem; color: var(--muted); }
@media (max-width: 960px) and (min-width: 560px) { .figures { grid-template-columns: repeat(2, 1fr); } }
.article-foot { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------- Gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; } }
.photo-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--green-100); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, opacity .2s; }
.photo-grid a:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(5,15,9,.97); display: none;
  align-items: center; justify-content: center; flex-direction: column; padding: 3.5rem 0 1rem;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1100px, 100vw); display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 8rem); max-width: 100%; object-fit: contain; border-radius: 4px; user-select: none; }
.lightbox figcaption { color: #e7efe9; text-align: center; padding: .75rem 1rem 0; font-size: .95rem; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center; transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-btn svg { width: 26px; height: 26px; }
.lb-close { top: .75rem; right: .75rem; }
.lb-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .75rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 1.3rem; left: 1.25rem; color: #cfe0d5; font-size: .9rem; font-weight: 600; }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; } .lightbox { padding-bottom: 5rem; } }

/* ---------- Spielpläne ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tabs button {
  border: 2px solid var(--green-700); background: #fff; color: var(--green-700); font: inherit; font-weight: 700;
  padding: .55rem 1.2rem; border-radius: 999px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--green-700); color: #fff; }
.schedule { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.schedule caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.schedule th { background: var(--green-900); color: #fff; text-align: left; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; padding: .8rem 1rem; }
.schedule td { padding: .85rem 1rem; border-top: 1px solid var(--line); }
.schedule tr.home td { background: var(--green-50); }
.schedule tr.past td { color: var(--muted); }
.schedule .team-own { font-weight: 700; color: var(--green-900); }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .15rem .5rem; border-radius: 999px; }
.tag-home { background: var(--green-700); color: #fff; }
.tag-away { background: #eef1ef; color: var(--muted); }
.schedule-panel[hidden] { display: none; }
.team-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.team-head h2 { margin: 0; }
.team-head p { margin: .2rem 0 0; color: var(--muted); }
.tag-moved { background: #fbe4e3; color: var(--red-700); }
.schedule tr.past td { color: var(--muted); opacity: .7; }
.schedule tr.next td { background: #fff7e0 !important; }
.schedule-link { margin-top: 1.25rem; }
.schedule-note { margin-top: 2rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) {
}
@media (max-width: 700px) {
  .schedule thead { display: none; }
  .schedule, .schedule tbody, .schedule tr, .schedule td { display: block; width: 100%; }
  .schedule { background: transparent; box-shadow: none; border: 0; }
  .schedule tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; padding: .85rem 1rem; box-shadow: var(--shadow); }
  .schedule tr.home { background: var(--green-50); }
  .schedule td { border: 0; padding: .1rem 0; background: transparent !important; }
  .schedule td.when { font-weight: 700; color: var(--green-700); }
  .schedule td.vs::before { content: "gegen "; color: var(--muted); }
}

/* ---------- Links ---------- */
.link-card { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.4rem; text-decoration: none; color: var(--ink); }
.link-card .ico { flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--green-700); color: #fff; display: grid; place-items: center; }
.link-card .ico svg { width: 24px; height: 24px; }
.link-card small { display: block; color: var(--muted); }
.link-card strong { color: var(--green-900); font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: #c9d8ce; margin-top: auto; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .container { padding-top: 3rem; padding-bottom: 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-brand img { height: 48px; width: auto; background: #fff; border-radius: 10px; padding: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; }

.legal { font-size: .97rem; }
.legal h2 { margin-top: 1.75rem; font-size: 1.35rem; }
.legal h3 { margin-top: 1.4rem; font-size: 1.1rem; }

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--green-700); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .to-top, .hero-actions { display: none; }
  body { background: #fff; }
}
