* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --primary-color: #e9e9e9;
    --secondary-color: #333333;
    --red-color: #E30713;
    --item-background: #202125b3;
    --item-borderradius: 12px;
} 

.pilotos-wrapper{
  background-image: url('../img/bg2.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 3.5rem 0rem;
}

.pilotos-container{
    max-width: 1200px;
    margin: 0 auto;
}

.pilotos-container h2 {
    font-family: 'Formula1Bold', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pilotos-container p {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

#pilotos{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
}

.piloto-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--item-borderradius);
    box-shadow: var(--item-shadow);
    width: 49%;
    height: 200px;
    overflow: hidden;
}

.piloto-header{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.piloto-header h2 {
  font-family: 'Formula1Bold', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0;
}

.piloto-header p{
  font-family: 'Formula1Bold', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--primary-color);
    margin-bottom: 0;
}

.piloto-number-container{
  width: 35px;
  height: 30px;
}

.piloto-number{
  width: 100%;
  height: 100%;
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

.piloto-body{
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
}

.piloto-imagen-campeonato{
  width: 40%;
}

.piloto-imagen-campeonato img {
  width: 100%;
  height: auto;
   filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.piloto-info-campeonato{
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.piloto-info-campeonato p{
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.flag-icon{
  width: 30px;
  height: 20px;
  object-fit: cover;
  border-radius: 2px;
  aspect-ratio: 1 / 1;
}

/* ANIMATION */

.piloto-card {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.piloto-card.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 768px) {
  .pilotos-wrapper{
    padding: 2rem 0;
  }
  .pilotos-container{
    width: 90%;
  }
  .piloto-card{
    width: 100%;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .pilotos-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  .pilotos-container p{
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  .piloto-body {
    gap: 1rem;
  }
  .piloto-card {
    height: 303px;
  }
  .piloto-info-campeonato{
    height: 200px;
  }
}