@import url("https://fonts.googleapis.com/css2?family=Racing+Sans+One&display=swap");

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Racing Sans One", sans-serif;
  background: #121212;
  color: white;
  min-height: 100vh;
}

/* header */
header {
  background-color: var(--header-bg);
  padding: 20px 20px;
  text-align: center;
  box-sizing: border-box;
}

.inner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo img {
  display: flex;
  justify-content: space-around;
  width: 120px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 50px;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav li {
  display: flex;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: #ffff;
  font-weight: 500;
  font-size: 20px;
  text-transform: uppercase;
}

nav a:hover {
  font-size: 24px;
}

.hero-section {
  position: relative;
}

.hero-section img {
  width: 100%;
  display: block;
}

.hero-text {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 4rem;
  font-weight: bold;
}

/* teams */
#Teams {
  padding: 2rem 1rem;
  background: #121212;
  color: white;
  font-family: Arial, sans-serif;
}

.teams-header {
  display: flex;
  gap: 50px;
}

.teams-header img[alt="f1 logo"] {
  width: 80px;
  margin-bottom: 0.5rem;
}

.teams-header h3 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

#Teams hr {
  width: 100%;
  margin-bottom: 20px;
  border: 2px solid #ffff;
  border-radius: 2px;
}

/* GRID */
.teams-grid {
  padding-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  overflow: hidden;
  min-height: 180px; /* consistent height */
}

.team img {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
  z-index: 1;
}

.team-name {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
  z-index: 2;
}

/* TEAM BACKGROUNDS */
.mclaren {
  background: linear-gradient(
    90deg,
    #863400 0%,
    #c55a00 30%,
    #be5600 50%,
    #c05700 75%,
    #f47600 100%
  );
}

.ferrari {
  background: linear-gradient(
    90deg,
    #710006 0%,
    #bf0b21 30%,
    #ab081a 50%,
    #6f0005 75%,
    #ed1131 100%
  );
}

.mercedes {
  background: linear-gradient(
    90deg,
    #007560 0%,
    #00ad91 30%,
    #00a78c 50%,
    #00a58a 75%,
    #00d7b6 100%
  );
}

.redbull {
  background: linear-gradient(
    90deg,
    #003282 0%,
    #2d64b8 30%,
    #295fb3 50%,
    #4680d6 75%,
    #4781d7 100%
  );
}

.williams {
  background: linear-gradient(
    90deg,
    #000681 0%,
    #0b34ab 30%,
    #0c36ad 50%,
    #00047f 75%,
    #1868db 100%
  );
}

.astonmartin {
  background: linear-gradient(135deg, #038576, #00100e);
}

.kicksauber {
  background: linear-gradient(135deg, #52e252, #111111);
}

.racingbulls {
  background: linear-gradient(135deg, #1e90ff, #ff007f);
}

.haas {
  background: linear-gradient(135deg, #b6babd, #d50000);
}

.alpine {
  background: linear-gradient(135deg, #0090ff, #ff4c00);
}

/* driver */
#Ranking {
  padding: 2rem 1rem;
  background: #121212;
  color: white;
  font-family: Arial, sans-serif;
}

.ranking-header {
  display: flex;
  gap: 50px;
}

.ranking-header img[alt="f1 logo"] {
  width: 80px;
  margin-bottom: 0.5rem;
}

.ranking-header h3 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

#Ranking hr {
  width: 100%;
  margin-bottom: 20px;
  border: 2px solid #ffff;
  border-radius: 2px;
}

.drivers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px;
}

.driver-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  padding: 20px;
  color: white;
}

.driver-info {
  z-index: 2;
}

.driver-info h3 {
  font-size: 1.2rem;
  font-weight: 400;
}

.driver-info h3 span {
  font-weight: 700;
  display: block;
}

.driver-info p {
  margin: 5px 0;
  font-size: 0.9rem;
}

.driver-info h2 {
  font-size: 2rem;
  margin: 10px 0;
}

.flag {
  width: 25px;
  margin-top: 10px;
}

.driver-img {
  position: absolute;
  right: 10px;
  bottom: 0;
}

.driver-img img {
  height: 230px;
  object-fit: contain;
}

/* footer */
footer {
  background: #ff0000; /* F1 red */
  color: white;
  text-align: center;
  padding: 40px 20px;
}

footer p {
  margin-bottom: 20px;
  font-size: 16px;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.store-buttons img {
  height: 45px;
  cursor: pointer;
}

.separator {
  border-top: 2px solid black;
  width: 150px;
  margin: 20px auto;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  font-size: 28px;
  color: black;
  align-items: center;
}

.social-icons img {
  width: 35px;
}
