:root {
  --green: #198f3a;
  --green-dark: #0f5f29;
  --green-soft: #eaf7ee;
  --ink: #152017;
  --muted: #5f6f64;
  --line: #dce7df;
  --bg: #ffffff;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(8, 52, 22, .12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - 40px));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: auto;
}

.brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: .01em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: .83rem;
  margin-top: -2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a,
.nav-dropdown-main {
  text-decoration: none;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 999px;
  color: #233328;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown-main:hover,
.nav-dropdown-main.active {
  background: var(--green-soft);
  color: var(--green-dark);
}

/* Dropdown Navigation */

.nav-dropdown {
  position: relative;
}

@media (min-width: 901px) {
  .nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 240px;
    height: 10px;
  }
}

.nav-dropdown-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-main::after {
  content: "▾";
  font-size: .72rem;
  line-height: 1;
  margin-top: 2px;
}

.submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
  z-index: 30;
}

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 650;
  text-decoration: none;
  color: #233328;
  white-space: nowrap;
}

.submenu a:hover,
.submenu a.active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.submenu-group {
  position: relative;
}

.submenu .submenu-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.submenu-parent::after {
  content: "›";
  font-size: 1.15rem;
  line-height: 1;
}

.nested-submenu {
  position: absolute;
  top: -10px;
  left: calc(100% + 10px);
  min-width: 210px;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
  z-index: 31;
}

@media (min-width: 901px) {
  .submenu-group::after {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 10px;
    height: 100%;
  }

  .submenu-group:hover .nested-submenu,
  .submenu-group:focus-within .nested-submenu {
    display: flex;
  }
}

.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu {
  display: flex;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--green-soft);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px;
  background: var(--ink);
}

/* Hero */

.hero,
.page-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(25,143,58,.16), transparent 35%),
    linear-gradient(135deg, #f7fff9, #ffffff 58%, #eef8f1);
}

.hero-grid {
  min-height: 570px;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: center;
  gap: 50px;
  padding: 72px 0;
}

.hero-content h1,
.page-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  line-height: .95;
  margin: 0 0 22px;
  letter-spacing: -0.06em;
}

.lead {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: #314139;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  color: var(--green-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--green);
  color: white;
  box-shadow: 0 12px 30px rgba(25,143,58,.24);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  background: white;
  border-color: var(--line);
  color: var(--green-dark);
}

.button.secondary:hover {
  border-color: var(--green);
}

.hero-card {
  justify-self: end;
  width: min(320px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 34px;
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-card img {
  width: 180px;
  margin: 0 auto 18px;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
}

.hero-card strong {
  color: var(--green-dark);
  font-size: 1.4rem;
}

/* Seitenkopf / Detailseiten */

.page-hero .container {
  padding: 70px 0;
}

.page-hero.compact .container {
  padding: 58px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 44px;
  align-items: center;
}

.detail-icon {
  background: white;
  border-radius: 32px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Sektionen */

.section {
  padding: 35px 0;
}

.section-muted {
  background: #f4faf6;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 440px;
  color: var(--muted);
  margin: 0;
}

/* Sportkarten */

.sport-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sport-grid.compact-grid {
  grid-template-columns: repeat(2, 1fr);
}

.sport-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(11,61,28,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.sport-card:hover {
  transform: translateY(-3px);
  border-color: rgba(25,143,58,.45);
  box-shadow: var(--shadow);
}

.sport-icon-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px;
}

.sport-icon-wrap img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.sport-card strong {
  display: block;
  font-size: 1.12rem;
}

.sport-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

/* Abteilungsverzeichnis auf der Startseite */

.department-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.department-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255,255,255,.55);
}

.department-group-wide {
  grid-column: 1 / -1;
}

.department-main-card {
  height: 100%;
  background: linear-gradient(135deg, #fff 0%, #f4faf5 100%);
  border-color: rgba(25,143,58,.28);
  box-shadow: 0 10px 24px rgba(11,61,28,.08);
}

.department-group-wide .department-main-card {
  height: auto;
}

.sport-card .department-level {
  margin: 0 0 5px;
  color: var(--green);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.department-subgroups {
  margin-top: 14px;
  padding: 16px 4px 4px;
  border-top: 1px solid var(--line);
}

.department-subgroups-label {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.department-subgroup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.department-subgroup-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.department-subgroup-card:hover {
  transform: translateY(-2px);
  border-color: rgba(25,143,58,.45);
  box-shadow: 0 8px 18px rgba(11,61,28,.1);
}

.department-subgroup-icon {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.department-subgroup-icon img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.department-subgroup-card strong,
.department-subgroup-card small {
  display: block;
}

.department-subgroup-card strong {
  line-height: 1.2;
}

.department-subgroup-card small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

/* Inhaltskarten */

.info-columns,
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.info-box,
.content-card,
.callout,
.download-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 8px 22px rgba(11,61,28,.05);
}

.info-box h2,
.content-card h2,
.download-card h2 {
  font-size: 1.28rem;
  margin: 0 0 10px;
  text-decoration: none;
}

.info-box p,
.content-card p,
.download-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

/* Bildergalerie */

.photo-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  grid-auto-rows: clamp(160px, 18vw, 220px);
  gap: 18px;
}

.photo-gallery figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #dfe8e1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(11,61,28,.08);
}

.photo-gallery-featured {
  grid-row: span 2;
}

.photo-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.photo-gallery figure:hover img {
  transform: scale(1.025);
}

.photo-gallery figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 34px 16px 14px;
  color: white;
  font-weight: 700;
  background: linear-gradient(transparent, rgba(7,37,16,.82));
}

@media (max-width: 900px) {
  .photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .photo-gallery-featured {
    grid-column: 1 / -1;
    grid-row: auto;
    width: min(100%, 600px);
    justify-self: center;
  }

  .photo-gallery img {
    height: auto;
  }
}

@media (max-width: 600px) {
  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .photo-gallery-featured {
    grid-column: auto;
  }
}

.text-link {
  color: var(--green-dark);
  font-weight: 760;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.callout {
  background: var(--green-soft);
}

/* Tabellen */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.events-table th,
.events-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.events-table th {
  background: var(--green-soft);
  color: var(--green-dark);
}

.events-table tr:last-child td {
  border-bottom: 0;
}

/* Downloads */

.downloads-list {
  display: grid;
  gap: 16px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.download-card > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.download-card:hover {
  border-color: rgba(25,143,58,.45);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.download-card:hover h2 {
  color: var(--green-dark);
}

.download-card p {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.download-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.download-cover {
  width: 74px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 14px rgba(11,61,28,.08);
  flex: 0 0 auto;
}

.download-text {
  min-width: 0;
}

.download-text h2 {
  margin-bottom: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 6px 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Rechtliches */

.legal-text {
  max-width: 860px;
}

.legal-text h2 {
  margin-top: 34px;
  font-size: 1.5rem;
}

.legal-text p {
  color: var(--muted);
}

/* Sponsorenbereich */

.sponsor-section {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 34px 0;
}

.sponsor-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sponsor-label {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.sponsor-banner {
  width: min(475px, 100%);
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(11,61,28,.06);
}

/* Footer */

.site-footer {
  background: #0c1b11;
  color: #f5fff7;
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-logo {
  width: 46px;
  margin-bottom: 12px;
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.site-footer p {
  color: rgba(255,255,255,.78);
  margin: 0;
}

.site-footer a {
  color: #fff;
}

.copyright-note {
  font-size: .86rem;
  margin-top: 14px !important;
}

code {
  background: var(--green-soft);
  padding: 2px 6px;
  border-radius: 8px;
}

/* Tablet / Mobile Navigation */

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: 88px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 10px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 108px);
    overflow-y: auto;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a,
  .nav-dropdown-main {
    padding: 13px 14px;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-main {
    width: 100%;
    border-radius: 999px;
  }

  .submenu {
    position: static;
    display: flex;
    margin-top: 6px;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border: 0;
    border-radius: 16px;
    background: var(--green-soft);
    padding: 8px;
  }

  .submenu a {
    padding: 9px 12px;
    border-radius: 12px;
    white-space: normal;
  }

  .submenu a:hover,
  .submenu a.active {
    background: white;
    color: var(--green-dark);
  }

  .submenu-parent::after {
    content: "▾";
  }

  .nested-submenu {
    position: static;
    display: flex;
    min-width: 0;
    margin: 2px 8px 6px;
    padding: 6px;
    border: 0;
    border-left: 3px solid var(--green);
    border-radius: 0 12px 12px 0;
    background: white;
    box-shadow: none;
  }

  .nested-submenu a {
    font-size: .94rem;
  }

  .hero-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    justify-self: start;
  }

  .sport-grid,
  .sport-grid.compact-grid,
  .info-columns,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .department-overview {
    grid-template-columns: 1fr;
  }

  .department-group-wide {
    grid-column: auto;
  }

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

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

/* Kleine Smartphones */

@media (max-width: 560px) {
  .section {
    padding: 36px 0;
  }

  .detail-icon {
    width: 160px;
    justify-self: center;
    padding: 14px;
    border-radius: 24px;
  }

  .container,
  .narrow {
    width: min(100% - 28px, 1120px);
  }

  .brand small {
    display: none;
  }

  .brand img {
    width: 46px;
  }

  .header-inner {
    min-height: 76px;
  }

  .main-nav {
    top: 76px;
  }

  .hero-grid {
    min-height: unset;
    padding: 50px 0;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 3rem;
  }

  .sport-card {
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .sport-icon-wrap {
    padding: 6px;
    border-radius: 16px;
  }

  .department-group {
    padding: 10px;
  }

  .department-subgroup-grid {
    grid-template-columns: 1fr;
  }

  .department-subgroup-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .download-card {
    align-items: start;
    flex-direction: column;
  }

  .download-card > article {
    align-items: start;
    flex-direction: column;
  }

  .download-main {
    align-items: flex-start;
  }

  .download-cover {
    width: 62px;
    height: 88px;
  }

  .sponsor-section {
    padding: 28px 0;
  }

  .sponsor-banner {
    border-radius: 8px;
  }
}
