/* History page */

.history-hero {
  padding: 150px 0 80px;
  background:
    radial-gradient(circle at 12% 20%, rgba(112, 192, 67, 0.22), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(0, 194, 168, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

.history-hero-content {
  max-width: 880px;
}

.history-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  margin-bottom: 24px;
}

.history-hero p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 30px;
}


.history-intro {
  padding: 70px 0;
}

.history-intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.history-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.history-card h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 18px;
}

.history-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.history-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.history-facts div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.history-facts strong {
  display: block;
  color: var(--primary);
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 8px;
}

.history-facts span {
  color: var(--muted);
  font-size: 0.9rem;
}

.history-image {
  min-height: 460px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.2), rgba(112, 192, 67, 0.16)),
    url("../images/history-first-race.jpg") center/cover;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.history-results {
  padding: 80px 0 100px;
}


.history-table {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.history-table-head,
.history-row {
  display: grid;
  grid-template-columns: 0.6fr 1.25fr 0.8fr 1.8fr 1.8fr 1.5fr 1.5fr 1.3fr;
  gap: 14px;
  align-items: center;
}

.history-table-head {
  background: var(--dark);
  color: white;
  font-weight: 900;
  padding: 18px 22px;
  font-size: 0.9rem;
}

.history-row {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
}

.history-row:nth-child(even) {
  background: #f8fafc;
}

.history-row.highlight {
  background: rgba(112, 192, 67, 0.1);
}


.edition {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.history-empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.history-note {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1200px) {
  .history-table {
    overflow-x: auto;
  }

  .history-table-head,
  .history-row {
    min-width: 1100px;
  }
}

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

  .history-image {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .history-table {
    display: grid;
    gap: 14px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .history-table-head {
    display: none;
  }

  .history-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  }

  .history-row span::before {
    content: var(--mobile-label);
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
  }

  .history-row .edition::before {
    content: var(--edition-label);
    color: rgba(255, 255, 255, 0.85);
  }
}

@media (max-width: 680px) {
  .history-hero {
    padding-top: 124px;
  }

  .history-facts {
    grid-template-columns: 1fr;
  }

  .history-card {
    padding: 24px;
  }

}
