:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #4b5563;
  --accent: #0f4a8c;
  --accent-strong: #0f4a8c;
  --border: #d1d5db;
  --club-blue: #0f4a8c;
  --club-green: #1f8d3d;
  --club-dark: #0b2e52;
  --club-sand: #fff8ed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(11, 46, 82, 0.88), rgba(11, 46, 82, 0.62)),
    url("images/hero-badminton.png") center / cover;
  color: white;
  padding: 5rem 1rem;
}

@supports (background-image: image-set(url("images/hero-badminton.webp") type("image/webp"))) {
  .hero {
    background-image:
      linear-gradient(90deg, rgba(11, 46, 82, 0.88), rgba(11, 46, 82, 0.62)),
      image-set(
        url("images/hero-badminton.webp") type("image/webp"),
        url("images/hero-badminton.png") type("image/png")
      );
    background-position: center;
    background-size: cover;
  }
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 3rem;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(11, 46, 82, 0.42);
  backdrop-filter: blur(12px);
}

.site-nav__menu a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.site-nav__toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(11, 46, 82, 0.42);
  color: white;
  cursor: pointer;
}

.site-nav__toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0.25rem auto;
  border-radius: 999px;
  background: currentColor;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero__logo {
  width: 90px;
  height: auto;
  border-radius: 1rem;
  background: rgba(255,255,255,0.12);
  padding: 0.5rem;
  border: 1px solid rgba(255,255,255,0.18);
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.85);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 4vw, 4rem);
}

.hero p {
  max-width: 720px;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
}

.hero__actions {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  background: white;
  color: var(--accent-strong);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.2);
}

.hero__actions .button:not(.button--secondary):hover {
  background: rgba(255, 255, 255, 0.86);
  color: var(--club-dark);
  box-shadow: 0 12px 30px rgba(11, 46, 82, 0.18);
}

.button:focus-visible,
.team-card__link:focus-visible {
  outline: 3px solid rgba(15, 74, 140, 0.35);
  outline-offset: 3px;
}

.button--secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.button--secondary:hover {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.12);
}

.button--secondary:focus-visible {
  outline-color: rgba(255, 255, 255, 0.75);
}

.section {
  padding: 3rem 1rem;
}

.section--light {
  background: #ffffff;
}

.section--gallery {
  background: #f8fbff;
}

.section--teams {
  background:
    linear-gradient(135deg, rgba(15, 74, 140, 0.10), rgba(31, 141, 61, 0.10)),
    #f8fbff;
}

.section--teams h2 {
  color: var(--club-dark);
}

.section--teams > .container > p {
  max-width: 680px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.section-heading p {
  max-width: 680px;
  margin-bottom: 0;
}

h2 {
  margin-top: 0;
  font-size: 2rem;
  color: var(--accent-strong);
}

p {
  color: var(--muted);
}

.cards,
.news-grid,
.team-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card,
.team-card,
.news-item,
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.05);
}

.card h3,
.team-card h3,
.news-item h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.news-details {
  margin-top: 1rem;
}

.news-details summary {
  cursor: pointer;
  color: var(--club-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.news-details summary:focus-visible {
  outline: 3px solid rgba(15, 74, 140, 0.35);
  outline-offset: 3px;
}

.news-details p:last-child {
  margin-bottom: 0;
}

.gallery-controls {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.gallery-button {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(15, 74, 140, 0.18);
  border-radius: 999px;
  background: var(--surface);
  color: var(--club-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(11, 46, 82, 0.08);
}

.gallery-button:hover,
.gallery-button:focus-visible {
  background: var(--club-dark);
  color: white;
}

.gallery-slider {
  position: relative;
  min-height: clamp(260px, 45vw, 480px);
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--club-dark);
  box-shadow: 0 18px 42px rgba(11, 46, 82, 0.14);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-slide figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(11, 46, 82, 0.78);
  color: white;
  font-weight: 700;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.gallery-dots button {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 74, 140, 0.28);
  cursor: pointer;
}

.gallery-dots button.is-active {
  width: 1.75rem;
  background: var(--club-green);
}

.team-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 74, 140, 0.18);
  border-left-width: 0;
  padding: 0;
  box-shadow: 0 16px 34px rgba(11, 46, 82, 0.08);
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.45rem;
  background: linear-gradient(90deg, var(--club-blue), var(--club-green));
  pointer-events: none;
}

.team-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(15, 74, 140, 0.10), rgba(31, 141, 61, 0.10)),
    #edf3f8;
}

.team-card__photo:not([src]),
.team-card__photo[src=""] {
  display: none;
}

.team-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.team-card h3 {
  position: relative;
  z-index: 1;
}

.team-card p {
  position: relative;
  z-index: 1;
}

.team-card__link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--club-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.team-card__link:hover,
.team-card__link:focus {
  color: var(--club-dark);
  text-decoration: underline;
}

.team-fixture {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 74, 140, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
}

.team-fixture p {
  margin: 0;
}

.team-fixture__label {
  color: var(--club-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-fixture__date {
  margin-top: 0.25rem;
  color: var(--text);
  font-weight: 800;
}

.team-fixture__text {
  margin-top: 0.25rem;
  color: var(--text);
  font-weight: 600;
}

.team-fixture__location {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.team-fixture[data-fixture-status="loading"] .team-fixture__text,
.team-fixture[data-fixture-status="empty"] .team-fixture__text,
.team-fixture[data-fixture-status="error"] .team-fixture__text {
  color: var(--muted);
  font-weight: 500;
}

.team-card--bezirksklasse {
  background: linear-gradient(145deg, rgba(15, 74, 140, 0.13), rgba(255, 255, 255, 0.92));
}

.team-card--bezirksklasse::before {
  background: var(--club-blue);
}

.team-card--kreisliga {
  background: linear-gradient(145deg, rgba(31, 141, 61, 0.15), rgba(255, 255, 255, 0.92));
}

.team-card--kreisliga::before {
  background: var(--club-green);
}

.team-card--kreisklasse {
  background: linear-gradient(145deg, rgba(11, 46, 82, 0.12), rgba(255, 255, 255, 0.92));
}

.team-card--kreisklasse::before {
  background: var(--club-dark);
}

.team-card--jugend {
  background: linear-gradient(145deg, rgba(15, 74, 140, 0.12), rgba(31, 141, 61, 0.13), rgba(255, 255, 255, 0.92));
}

.team-card--jugend::before {
  background: linear-gradient(90deg, var(--club-blue), var(--club-green));
}

.cards,
.news-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.anfahrt-grid,
.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(250px, 1fr) minmax(320px, 1.2fr);
  align-items: start;
  margin-top: 1.5rem;
}

.map-frame {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.05);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  pointer-events: none;
}

.map-frame.is-active iframe {
  pointer-events: auto;
}

.map-frame__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  background: rgba(11, 46, 82, 0.18);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.map-frame__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(11, 46, 82, 0.34));
}

.map-frame__overlay span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 6px rgba(11, 46, 82, 0.75);
}

.map-frame__overlay:hover,
.map-frame__overlay:focus-visible {
  background: rgba(11, 46, 82, 0.28);
}

.map-frame__overlay:focus-visible {
  outline: 3px solid rgba(15, 74, 140, 0.45);
  outline-offset: -6px;
}

.map-frame.is-active .map-frame__overlay {
  opacity: 0;
  pointer-events: none;
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.05);
}

.contact-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-status {
  padding: 1rem 1rem 0;
  color: var(--text);
  font-weight: 600;
}

.form-status.success {
  color: #0f766e;
}

.form-status.error {
  color: #b91c1c;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.05);
}

.form-group {
  display: grid;
  gap: 0.5rem;
}

.form-group--hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #f9fafb;
  color: var(--text);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.button--primary {
  background: var(--accent);
  color: white;
}

.subpage-header {
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--club-blue), var(--club-dark));
  color: white;
}

.subpage-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.subpage-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.subpage-header__top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.subpage-header__logo {
  width: 56px;
  height: auto;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.subpage-header__back {
  display: inline-block;
  color: white;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.35rem;
  color: var(--club-dark);
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content a {
  color: var(--club-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-note {
  padding: 0.85rem 1rem;
  border-left: 0.35rem solid var(--club-green);
  background: rgba(31, 141, 61, 0.10);
  color: var(--text);
}

.footer {
  padding: 2rem 1rem;
  background: var(--club-dark);
  color: white;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.footer p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer__brand {
  margin-top: 0;
  color: white;
  font-weight: 800;
}

.footer__nav {
  display: flex;
  gap: 0.75rem 1.25rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer a {
  color: white;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    linear-gradient(90deg, rgba(11, 46, 82, 0.90), rgba(11, 46, 82, 0.68)),
    url("images/hero-badminton.png") center / cover;
  color: white;
}

@supports (background-image: image-set(url("images/hero-badminton.webp") type("image/webp"))) {
  .not-found {
    background-image:
      linear-gradient(90deg, rgba(11, 46, 82, 0.90), rgba(11, 46, 82, 0.68)),
      image-set(
        url("images/hero-badminton.webp") type("image/webp"),
        url("images/hero-badminton.png") type("image/png")
      );
  }
}

.not-found__panel {
  width: min(100%, 720px);
}

.not-found__logo {
  width: 90px;
  height: auto;
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.not-found h1 {
  max-width: 680px;
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 4vw, 4rem);
  line-height: 1.1;
}

.not-found p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.not-found__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 1rem;
  }

  .site-nav {
    align-items: flex-start;
    margin-bottom: 2.5rem;
  }

  .site-nav__toggle {
    display: block;
    flex: 0 0 auto;
  }

  .site-nav__menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    left: 0;
    z-index: 5;
    display: none;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background: rgba(11, 46, 82, 0.94);
  }

  .site-nav.is-open .site-nav__menu {
    display: grid;
    gap: 0.25rem;
  }

  .site-nav__menu a {
    justify-content: flex-start;
    width: 100%;
    border-radius: 0.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-heading {
    display: grid;
  }

  .gallery-controls {
    justify-content: flex-start;
  }

  .gallery-slide figcaption {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    font-size: 0.95rem;
  }

  .team-list {
    grid-template-columns: 1fr;
  }

  .anfahrt-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-frame,
  .map-frame iframe {
    min-height: 260px;
  }

  .footer__nav {
    justify-content: flex-start;
  }
}
