/* ===================================
   HSV Meerbusch-Kaarst e.V. — Stylesheet
   Barrierefreies, modernes Design
   =================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #002a5c;
  --color-primary-dark: #001b3d;
  --color-primary-light: #e4ecf5;
  --color-accent: #c49000;
  --color-accent-light: #fdf5e0;
  --color-text: #1a1a1a;
  --color-text-light: #4a4a4a;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-border: #cdd5de;
  --color-white: #ffffff;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Skip-Link (Barrierefreiheit) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* --- Header --- */
.site-header {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-primary-dark);
  background: var(--color-white);
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  margin: 0.4rem 0;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  line-height: 1;
}

.site-logo img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.site-logo span {
  display: none;
  color: var(--color-primary-dark);
  letter-spacing: 0.01em;
}

@media (min-width: 480px) {
  .site-logo span {
    display: inline;
  }
}

/* --- Partner Logos (Footer) --- */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.footer-logos img {
  height: 50px;
  width: auto;
  opacity: 0.85;
  transition: opacity var(--transition);
}

.footer-logos a:hover img,
.footer-logos a:focus-visible img {
  opacity: 1;
}

/* --- Navigation --- */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  color: var(--color-white);
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav-menu {
  list-style: none;
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-primary-dark);
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background var(--transition);
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
}

.nav-menu a[aria-current="page"] {
  font-weight: 600;
  border-left: 3px solid var(--color-accent);
  padding-left: calc(1.5rem - 3px);
}

/* Dropdown */
.has-dropdown > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.has-dropdown > a::after {
  content: '';
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  margin-left: 0.5rem;
  opacity: 0.6;
}

.dropdown {
  list-style: none;
  display: none;
  background: rgba(0, 0, 0, 0.15);
}

.dropdown.is-open {
  display: block;
}

.dropdown a {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

/* Desktop Navigation */
@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    gap: 0;
  }

  .nav-menu a {
    padding: 1rem 0.6rem;
    font-size: 0.9rem;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .nav-menu a[aria-current="page"] {
    border-left: none;
    padding-left: 0.6rem;
    background: rgba(255, 255, 255, 0.12);
    border-bottom: 3px solid var(--color-accent);
  }

  .has-dropdown > a::after {
    padding: 2px;
  }

  .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-primary-dark);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 50;
  }

  .dropdown a {
    padding: 0.6rem 1.25rem;
    border-radius: 0;
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    display: block;
  }
}

/* --- Hero / Page Header --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto;
}

.page-header {
  background: var(--color-primary-light);
  padding: 2rem 1.5rem;
  border-bottom: 3px solid var(--color-primary);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--color-primary-dark);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span[aria-current="page"] {
  font-weight: 600;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: 100%;
}

.main-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}

.main-content h2:first-child {
  margin-top: 0;
}

.main-content h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin: 1.5rem 0 0.75rem;
}

.main-content p {
  margin-bottom: 1rem;
}

.main-content ul,
.main-content ol {
  margin: 0 0 1rem 1.5rem;
}

.main-content li {
  margin-bottom: 0.35rem;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.card a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.card a:hover {
  text-decoration: underline;
}

/* --- Info Box / CTA --- */
.info-box {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.info-box h3 {
  color: var(--color-primary-dark);
  margin-top: 0;
}

.cta-box {
  background: var(--color-accent-light);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.cta-box p {
  margin-bottom: 0.5rem;
}

/* --- Tables --- */
.responsive-table {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  white-space: nowrap;
}

tr:nth-child(even) {
  background: var(--color-bg-alt);
}

tr:hover {
  background: var(--color-primary-light);
}

/* --- Results / Erfolge --- */
.result-block {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.result-block h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.result-block ul {
  margin-left: 1.25rem;
  margin-bottom: 0;
}

/* --- Team Members --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.team-member {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
}

.team-member strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.team-member span {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* --- Fee Table --- */
.fee-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.fee-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.fee-list li:nth-child(odd) {
  background: var(--color-bg-alt);
}

.fee-amount {
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

/* --- Training Schedule --- */
.schedule {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.schedule li {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}

.schedule li:nth-child(odd) {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

.schedule .day {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.schedule .time {
  font-weight: 600;
  color: var(--color-accent);
}

@media (max-width: 480px) {
  .schedule li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.35rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-col address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

/* --- Links --- */
a {
  color: var(--color-primary);
}

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Print --- */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle,
  .skip-link {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  .main-content {
    max-width: 100%;
    padding: 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}

/* --- Hero mit Hintergrundbild --- */
.hero-image {
  position: relative;
  color: var(--color-white);
  padding: 5rem 1.5rem;
  text-align: center;
  background-image: linear-gradient(rgba(0, 27, 61, 0.75), rgba(0, 42, 92, 0.75)), url('images/header/headerimage-1.jpg');
  background-size: cover;
  background-position: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-image h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-image p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 650px;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Content Images --- */
.content-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

.content-image-float {
  float: right;
  max-width: 280px;
  margin: 0 0 1rem 1.5rem;
}

@media (max-width: 600px) {
  .content-image-float {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
}

/* Sparten-Card mit Bild */
.card.with-image {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card.with-image img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--color-primary-light);
  padding: 1rem;
}

.card.with-image img.cover {
  object-fit: cover;
  padding: 0;
  background: none;
}

.card.with-image .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* Sponsoren-Grid */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  align-items: center;
}

.sponsor-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: box-shadow var(--transition);
}

.sponsor-item:hover {
  box-shadow: var(--shadow-lg);
}

.sponsor-item img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sponsor-item span {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 600;
}

/* Standort-Bild */
.standort-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

/* --- Team Member mit Foto --- */
.team-member.with-photo {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.team-member.with-photo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-primary-light);
}

.team-member.with-photo .info {
  display: flex;
  flex-direction: column;
}

/* --- Card Image Link --- */
.card-image-link {
  display: block;
  line-height: 0;
  overflow: hidden;
}

.card-image-link img {
  transition: transform var(--transition), opacity var(--transition);
}

.card-image-link:hover img,
.card-image-link:focus-visible img {
  transform: scale(1.04);
  opacity: 0.95;
}

.card-image-link:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
}
