/* ===== SPARTE HERO SECTION ===== */
.sparte-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(420px, 60vh, 680px);
  overflow: hidden;
  color: var(--white);
  text-align: center;
}

.sparte-hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.2) 0%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(11, 107, 58, 0.9) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 5rem 0 3rem;
}

.sparte-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sparte-hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.sparte-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

/* ===== INTRO SECTION ===== */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.intro-text h2 {
  margin-bottom: 1rem;
}

.check-list {
  margin-top: 1.5rem;
  padding-left: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  color: var(--green-dark);
  font-weight: 600;
}

.check-list li::before {
  content: "✔";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--green-main);
}

/* ===== STATS ===== */
.intro-stat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-box {
  padding: 2rem 1.5rem;
  border-bottom: 4px solid var(--green-main);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.stat-number {
  display: block;
  color: var(--green-main);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ===== TEAMS GRID ===== */
.teams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.team-card:hover,
.team-card:focus-within {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.team-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 0.75rem;
  background-color: #f4f4f4;
}

.team-image img {
  display: block;
  width: 100%;
  max-height: 260px;
  height: auto;
  border-radius: 0.5rem;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.league-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  background: var(--green-main);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
}

.team-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.5rem;
}

.team-body h3 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 1.5rem;
}

.team-body p {
  margin-bottom: 1.25rem;
  color: #555;
  font-size: 0.95rem;
}

.training-box {
  margin-top: auto;
  padding: 0.8rem;
  border-radius: 0.5rem;
  background: var(--gray-light);
  font-size: 0.9rem;
}

.training-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--green-dark);
  font-weight: 700;
}

/* ===== TEAM ACTIONS ===== */
.team-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.team-actions--stacked {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.team-actions-row .btn-sm {
  flex: 1 1 140px;
}

.btn-full {
  width: 100%;
}

.btn-primary.btn-sm {
  border: 2px solid var(--green-main);
  background-color: var(--green-main);
  color: var(--white);
}

.btn-primary.btn-sm:hover,
.btn-primary.btn-sm:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green-dark);
  background-color: var(--green-dark);
}

.btn-secondary.btn-sm {
  border: 2px solid var(--green-main);
  background-color: transparent;
  color: var(--green-main);
}

.btn-secondary.btn-sm:hover,
.btn-secondary.btn-sm:focus-visible {
  transform: translateY(-2px);
  background-color: var(--green-main);
  color: var(--white);
}

.btn-ghost.btn-sm {
  border: 2px solid transparent;
  background: var(--gray-light);
  color: var(--green-dark);
}

.btn-ghost.btn-sm:hover,
.btn-ghost.btn-sm:focus-visible {
  transform: translateY(-2px);
  background: rgba(11, 107, 58, 0.1);
  color: var(--green-main);
}

.team-social-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  color: var(--green-main);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.team-social-badge:hover,
.team-social-badge:focus-visible {
  transform: translateY(-1px) scale(1.04);
  background: var(--white);
  color: var(--green-dark);
}

.team-social-badge svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== JUGEND KARTE ===== */
.full-width {
  grid-column: 1 / -1;
  padding: 2.5rem 1.5rem;
  background:
    linear-gradient(
      to right,
      var(--green-main),
      var(--green-dark)
    );
  color: var(--white);
  text-align: center;
}

.full-width .team-body {
  padding: 0;
}

.full-width h3 {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: 2rem;
}

.full-width p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}

.jfv-link {
  display: inline-block;
  margin-top: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.jfv-link:hover,
.jfv-link:focus-visible {
  border-bottom-color: var(--white);
  color: var(--white);
}

/* ===== KONTAKTPERSONEN ===== */
.contact-persons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  min-width: min(300px, 100%);
  max-width: 520px;
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.person-avatar {
  flex: 0 0 auto;
}

.person-avatar img {
  width: 80px;
  height: 80px;
  border: 3px solid var(--gray-light);
  border-radius: 50%;
  object-fit: cover;
}

.person-info h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.2rem;
}

.person-info .role {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--green-main);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.contact-link {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.95rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--green-main);
  text-decoration: underline;
}

/* ===== WIDGET-MODAL GRUNDLAYOUT ===== */

/*
 * Die Modal-Grundregeln stehen bewusst in sparte.css.
 * Dadurch sind die Fußball-Dialoge nicht von einer News-Komponente
 * oder anderen seitenspezifischen Styles abhängig.
 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overscroll-behavior: contain;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.modal-overlay[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay.active,
.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: 100%;
  max-height: min(88vh, 900px);
  overflow: hidden;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.modal-overlay.active .modal-content,
.modal-overlay[aria-hidden="false"] .modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-content:focus {
  outline: none;
}

.modal-content:focus-visible {
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    var(--focus-ring);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 41, 51, 0.9);
  color: var(--white);
  font-family: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  transform: scale(1.04);
  background: var(--green-main);
}

/* ===== MODAL WIDGETS ===== */
.widget-modal-content {
  width: 100%;
  padding: 0;
}

.widget-modal-small {
  max-width: 500px;
}

.widget-modal-large {
  max-width: 800px;
}

.widget-modal-head {
  padding: 1.5rem 4.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(11, 107, 58, 0.12);
  background:
    linear-gradient(
      to right,
      rgba(11, 107, 58, 0.08),
      rgba(9, 82, 44, 0.06)
    );
}

.widget-modal-head h2 {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.2rem;
  line-height: 1.3;
}

.widget-modal-body {
  padding: 1rem;
  overflow-y: auto;
  background: var(--white);
}

.widget-modal-body-small {
  min-height: 250px;
  max-height: calc(88vh - 92px);
}

.widget-modal-body-table {
  min-height: 300px;
  max-height: calc(88vh - 92px);
  overflow: auto;
}

.widget-modal-body-squad {
  min-height: 420px;
  max-height: calc(88vh - 92px);
  overflow: auto;
  background: var(--white);
}

.fussballde_widget {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.fussballde_widget iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
  border-radius: 0 0 1rem 1rem;
  background: #fff !important;
  box-shadow: none !important;
}

/* ===== BILDER-LIGHTBOX ===== */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}

.image-lightbox.is-open {
  display: block;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.image-lightbox-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 1100px);
  max-height: 90vh;
  margin: 5vh auto;
  padding: 1rem;
}

.image-lightbox-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 85vh;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.image-lightbox-close {
  position: absolute;
  top: -0.5rem;
  right: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  color: var(--green-dark);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  transform: scale(1.05);
}

/* ===== SINGLE TEAM LAYOUT ===== */
.single-grid {
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.single-grid .team-card {
  width: 100%;
  max-width: 600px;
}

.single-grid .team-image {
  height: 300px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 700px) {
  .teams-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

@media (min-width: 1200px) {
  .teams-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .sparte-hero {
    min-height: 420px;
  }

  .hero-content {
    padding: 4.5rem 0 2.5rem;
  }

  .intro-stat {
    grid-template-columns: 1fr;
  }

  .team-actions,
  .team-actions-row {
    align-items: stretch;
  }

  .team-actions-row .btn-sm {
    flex: 1 1 100%;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .modal-content {
    max-height: 90vh;
    border-radius: 1rem;
  }

  .widget-modal-head {
    padding: 1.25rem 4rem 1.25rem 1.1rem;
  }

  .widget-modal-body {
    padding: 0.75rem;
  }

  .widget-modal-body-small,
  .widget-modal-body-table,
  .widget-modal-body-squad {
    min-height: 320px;
    max-height: calc(90vh - 82px);
  }

  .person-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card,
  .btn-sm,
  .team-social-badge,
  .jfv-link,
  .contact-link,
  .modal-overlay,
  .modal-content,
  .image-lightbox-close {
    transition: none !important;
  }
}