/* =========================
   HISTORY ARCHIVE / TABLES
========================= */

.fsv-history-archive {
  max-width: 1280px;
  margin: 80px auto 0;
  padding: 0 24px 80px;
  position: relative;
  z-index: 2;
}

.fsv-history-archive__header {
  margin-bottom: 34px;
}

.fsv-history-archive__header h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-transform: uppercase;
}

.fsv-history-archive__header p {
  margin: 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.fsv-history-archive__group {
  margin-bottom: 24px;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(8, 18, 44, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.fsv-history-archive__toggle {
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 24px 28px;
  background:
    linear-gradient(135deg, #f0d319 0%, #f5dc3f 45%, #d7b800 100%);
  color: #1b253b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fsv-history-archive__toggle:hover {
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.08);
}

.fsv-history-archive__toggle-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fsv-history-archive__toggle-subline {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(27, 37, 59, 0.7);
}

.fsv-history-archive__icon {
  flex: 0 0 auto;
  font-size: 22px;
  transition: transform 0.3s ease;
}

.fsv-history-archive__group.is-open .fsv-history-archive__icon {
  transform: rotate(180deg);
}

.fsv-history-archive__content {
  display: none;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(17, 37, 84, 0.82) 0%, rgba(9, 23, 55, 0.9) 100%);
}

.fsv-history-archive__group.is-open .fsv-history-archive__content {
  display: block;
  animation: fsvArchiveFade 0.35s ease;
}

@keyframes fsvArchiveFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fsv-history-archive__intro {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.fsv-history-archive__table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(10, 20, 40, 0.06);
}

.fsv-history-archive__table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  color: #1d2433;
}

.fsv-history-archive__table thead th {
  padding: 18px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #32415f;
  background:
    linear-gradient(180deg, #eef3ff 0%, #dce7ff 100%);
  border-bottom: 1px solid rgba(30, 55, 100, 0.12);
  position: sticky;
  top: 0;
  z-index: 1;
}

.fsv-history-archive__table tbody td {
  padding: 16px;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(32, 53, 94, 0.08);
  vertical-align: top;
}

.fsv-history-archive__table tbody tr:nth-child(even) td {
  background: rgba(222, 233, 255, 0.28);
}

.fsv-history-archive__table tbody tr:hover td {
  background: rgba(244, 212, 28, 0.12);
}

.fsv-history-archive__note-row td {
  font-style: italic;
  font-weight: 600;
  color: #2d3f66;
  background: rgba(247, 221, 52, 0.16) !important;
}

.fsv-history-archive__badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fsv-history-archive__badge--up {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.fsv-history-archive__badge--down {
  background: rgba(220, 38, 38, 0.14);
  color: #991b1b;
}

.fsv-history-archive__badge--neutral {
  background: rgba(71, 85, 105, 0.14);
  color: #334155;
}

@media (max-width: 991px) {
  .fsv-history-archive {
    padding: 0 18px 64px;
    margin-top: 56px;
  }

  .fsv-history-archive__toggle {
    padding: 20px 20px;
    font-size: 22px;
  }

  .fsv-history-archive__content {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .fsv-history-archive__header h2 {
    font-size: 30px;
  }

  .fsv-history-archive__header p {
    font-size: 15px;
  }

  .fsv-history-archive__toggle {
    font-size: 19px;
  }

  .fsv-history-archive__toggle-subline {
    font-size: 12px;
  }

  .fsv-history-archive__table tbody td,
  .fsv-history-archive__table thead th {
    padding: 13px 12px;
    font-size: 13px;
  }
}

/* Tabellenbereich: Text deutlich dunkler */
.fsv-history-archive__table,
.fsv-history-archive__table tbody,
.fsv-history-archive__table tbody tr,
.fsv-history-archive__table tbody td {
  color: #111111 !important;
}

/* Überschriften in der Tabelle */
.fsv-history-archive__table thead th {
  color: #24324a !important;
}

/* Introtext über der Tabelle */
.fsv-history-archive__intro {
  color: #ffffff !important;
}

/* Normale Tabellenzellen */
.fsv-history-archive__table tbody td {
  color: #111111 !important;
  font-weight: 500;
}

/* Hinweiszeilen wie Pokalendspiel */
.fsv-history-archive__note-row td {
  color: #1f2937 !important;
  font-weight: 600;
}

/* Badges besser lesbar */
.fsv-history-archive__badge--up {
  background: rgba(22, 163, 74, 0.14);
  color: #166534 !important;
}

.fsv-history-archive__badge--down {
  background: rgba(220, 38, 38, 0.14);
  color: #991b1b !important;
}

.fsv-history-archive__badge--neutral {
  background: rgba(71, 85, 105, 0.14);
  color: #334155 !important;
}

/* =========================
   HISTORY STATS
========================= */

.fsv-history-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 34px;
}

.fsv-history-stat {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(15, 33, 78, 0.92) 0%, rgba(10, 24, 59, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.fsv-history-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #39bdf8 0%, #f0d319 100%);
}

.fsv-history-stat__label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.fsv-history-stat__value {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
}

.fsv-history-stat__text {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1100px) {
  .fsv-history-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fsv-history-stats {
    grid-template-columns: 1fr;
  }

  .fsv-history-stat {
    padding: 20px 18px;
  }
}

/* =================================
   FEINSCHLIFF ARCHIVBEREICH
================================= */

/* Accordion-Köpfe */
.fsv-history-archive__toggle {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.fsv-history-archive__toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  filter: brightness(1.02);
}

.fsv-history-archive__toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 45%,
    rgba(255,255,255,0) 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.fsv-history-archive__toggle:hover::after {
  transform: translateX(120%);
}

/* Tabellencontainer */
.fsv-history-archive__table-wrap {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

/* Tabellenzeilen */
.fsv-history-archive__table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}

.fsv-history-archive__table tbody tr:hover {
  background: rgba(57, 189, 248, 0.08);
}

/* Kopfzeile edler */
.fsv-history-archive__table thead th {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

/* Intro-Text etwas sauberer */
.fsv-history-archive__intro {
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.7;
  color: #1f2937;
}

/* Statistik-Karten Hover */
.fsv-history-stat {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fsv-history-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  border-color: rgba(255,255,255,0.16);
}

/* =================================
   ABSCHLUSSBLOCK GESCHICHTE
================================= */

.fsv-history-closing {
  margin: 48px 0 0;
  padding: 44px 0 10px;
}

.fsv-history-closing__inner {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(57, 189, 248, 0.18) 0%, rgba(57, 189, 248, 0) 38%),
    radial-gradient(circle at bottom right, rgba(240, 211, 25, 0.18) 0%, rgba(240, 211, 25, 0) 36%),
    linear-gradient(135deg, #0e234f 0%, #091733 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.fsv-history-closing__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.03) 10px,
      transparent 10px,
      transparent 24px
    );
  pointer-events: none;
}

.fsv-history-closing__headline {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-bottom: 28px;
}

.fsv-history-closing__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(57, 189, 248, 0.14);
  color: #8fdcff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fsv-history-closing__headline h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  font-weight: 900;
  color: #ffffff;
}

.fsv-history-closing__headline p {
  margin: 0;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255,255,255,0.82);
}

.fsv-history-closing__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.fsv-history-closing__card {
  padding: 24px 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fsv-history-closing__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.24);
  border-color: rgba(255,255,255,0.18);
}

.fsv-history-closing__card-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0d319;
}

.fsv-history-closing__card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.fsv-history-closing__card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
}

@media (max-width: 980px) {
  .fsv-history-closing__grid {
    grid-template-columns: 1fr;
  }

  .fsv-history-closing__inner {
    padding: 26px 20px;
  }
}