/* =========================================================
   Game Prep — Historical Series
   Save as styles/football-game-prep-history.css
   ========================================================= */

.history-hero {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(260px, 0.65fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
  padding: 30px;
  color: #ffffff;
  background:
    radial-gradient(
      circle at top left,
      rgba(250, 70, 22, 0.3),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      var(--wruf-blue),
      #173d66
    );
  border-left:
    7px solid
    var(--wruf-orange);
  border-radius: 22px;
}

.history-hero > div > span,
.history-hero-record span,
.history-summary-card span,
.history-last-meeting span,
.history-site-card span,
.history-notable-card span {
  display: block;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.history-hero > div > span,
.history-hero-record span {
  color: var(--wruf-light-orange);
}

.history-hero h2 {
  margin: 7px 0 8px;
  color: #ffffff;
  font-size:
    clamp(
      2rem,
      4vw,
      3.4rem
    );
  line-height: 1;
}

.history-hero p {
  max-width: 760px;
  margin: 0;
  color:
    rgba(
      255,
      255,
      255,
      0.8
    );
}

.history-hero-record {
  padding: 20px;
  text-align: center;
  background:
    rgba(
      255,
      255,
      255,
      0.1
    );
  border-radius: 16px;
}

.history-hero-record strong {
  display: block;
  margin: 6px 0;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
}

.history-hero-record small {
  color:
    rgba(
      255,
      255,
      255,
      0.7
    );
}

.history-method-note,
.history-source-note {
  margin: 0 0 2rem;
  padding: 15px 17px;
  color: var(--wruf-muted);
  background: #fff7ed;
  border:
    1px solid
    rgba(
      250,
      70,
      22,
      0.22
    );
  border-left:
    5px solid
    var(--wruf-orange);
  border-radius: 12px;
  line-height: 1.5;
}

.history-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap: 12px;
  margin-bottom: 14px;
}

.history-summary-card,
.history-site-card,
.history-notable-card {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border:
    1px solid
    rgba(
      15,
      35,
      64,
      0.1
    );
  border-top:
    4px solid
    var(--wruf-orange);
  border-radius: 14px;
  box-shadow:
    0 10px 24px
    rgba(
      15,
      23,
      42,
      0.05
    );
}

.history-summary-card span,
.history-site-card span,
.history-notable-card span {
  color: var(--wruf-orange);
}

.history-summary-card strong,
.history-summary-card small,
.history-site-card strong,
.history-site-card small,
.history-notable-card strong,
.history-notable-card p,
.history-notable-card small {
  display: block;
}

.history-summary-card strong,
.history-site-card strong,
.history-notable-card strong {
  margin: 6px 0;
  color: var(--wruf-blue);
  font-size: 1.25rem;
  line-height: 1.15;
}

.history-summary-card small,
.history-site-card small,
.history-notable-card small,
.history-notable-card p {
  color: var(--wruf-muted);
  line-height: 1.35;
}

.history-last-meeting {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(220px, 0.65fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 2.6rem;
  background: #ffffff;
  border:
    1px solid
    rgba(
      15,
      35,
      64,
      0.1
    );
  border-radius: 15px;
  box-shadow:
    0 12px 28px
    rgba(
      15,
      23,
      42,
      0.06
    );
}

.history-last-meeting > div {
  padding: 18px;
}

.history-last-meeting > div:first-child {
  background: #f8fafc;
}

.history-last-meeting > div:last-child {
  color: #ffffff;
  background: var(--wruf-blue);
}

.history-last-meeting > div:first-child span {
  color: var(--wruf-orange);
}

.history-last-meeting > div:last-child span {
  color: var(--wruf-light-orange);
}

.history-last-meeting h3 {
  margin: 6px 0;
  color: var(--wruf-blue);
}

.history-last-meeting p {
  margin: 0;
  color: var(--wruf-muted);
}

.history-last-meeting strong,
.history-last-meeting small {
  display: block;
}

.history-last-meeting strong {
  margin: 6px 0;
  color: #ffffff;
  font-size: 1.7rem;
}

.history-last-meeting small {
  color:
    rgba(
      255,
      255,
      255,
      0.72
    );
}

.history-site-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap: 12px;
  margin-bottom: 2.7rem;
}

.history-table-wrap {
  overflow-x: auto;
  margin-bottom: 2.7rem;
  background: #ffffff;
  border:
    1px solid
    rgba(
      15,
      35,
      64,
      0.1
    );
  border-radius: 15px;
  box-shadow:
    0 12px 28px
    rgba(
      15,
      23,
      42,
      0.06
    );
}

.history-recent-table {
  width: 100%;
  min-width: 720px;
  margin: 0;
  border-collapse: collapse;
}

.history-recent-table thead {
  color: #ffffff;
  background: var(--wruf-blue);
}

.history-recent-table th,
.history-recent-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom:
    1px solid
    rgba(
      15,
      35,
      64,
      0.08
    );
}

.history-recent-table thead th {
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.history-recent-table tbody th {
  min-width: 120px;
  color: var(--wruf-blue);
  background: #fff7f2;
}

.history-recent-table tbody th strong,
.history-recent-table tbody th span {
  display: block;
}

.history-recent-table tbody th span {
  margin-top: 3px;
  color: var(--wruf-muted);
  font-size: 0.67rem;
}

.history-recent-table td {
  color: var(--wruf-blue);
  font-size: 0.83rem;
  font-weight: 750;
}

.history-recent-table tr:last-child th,
.history-recent-table tr:last-child td {
  border-bottom: none;
}

.history-result {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #64748b;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.history-result--win {
  background: var(--wruf-orange);
}

.history-result--loss {
  background: var(--wruf-blue);
}

.history-notable-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap: 12px;
  margin-bottom: 2rem;
}

.history-notable-card p {
  margin: 0 0 4px;
}

.history-source-note {
  background: #f8fafc;
  border-color:
    rgba(
      15,
      35,
      64,
      0.12
    );
  border-left-color: var(--wruf-blue);
}

.history-source-note strong {
  color: var(--wruf-blue);
}

.history-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2rem;
}

.history-footer a {
  padding: 0.65rem 0.9rem;
  color: var(--wruf-blue);
  background: #ffffff;
  border:
    1px solid
    rgba(
      15,
      35,
      64,
      0.1
    );
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.history-footer a:hover {
  color: #ffffff;
  background: var(--wruf-orange);
}

@media (max-width: 950px) {
  .history-summary-grid,
  .history-site-grid,
  .history-notable-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

@media (max-width: 720px) {
  .history-hero,
  .history-last-meeting {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .history-summary-grid,
  .history-site-grid,
  .history-notable-grid {
    grid-template-columns: 1fr;
  }
}
