/* RESET & BASE */
body {
  margin: 0;
  padding: 0;
  background-color: #0a0a0a;
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  padding-top: 80px; /* Adjust this value if your navbar height changes */
}

a {
  text-decoration: none;
  color: inherit;
}

/* ANIMATIONS */

/* F1 PULSE Text Glow Animation */
@keyframes pulseGlow {
  0% {
    text-shadow: 0 0 10px #f4f533, 0 0 25px #f4f533, 0 0 40px rgba(244, 245, 51, 0.5);
  }
  50% {
    text-shadow: 0 0 15px #f4f533, 0 0 35px #f4f533, 0 0 60px rgba(244, 245, 51, 0.7);
  }
  100% {
    text-shadow: 0 0 10px #f4f533, 0 0 25px #f4f533, 0 0 40px rgba(244, 245, 51, 0.5);
  }
}

/* Subtitle Color Transition and Fade In */
@keyframes subtitleEffect {
    0% { opacity: 0; color: #ff4d4d; transform: translateY(10px); }
    50% { opacity: 1; color: #ff4d4d; } /* Fades in and stays red */
    75% { color: yellow; text-shadow: 0 0 8px yellow; } /* Briefly flashes yellow */
    100% { opacity: 1; color: #ff4d4d; transform: translateY(0); text-shadow: 0 0 6px #ff4d4d; } /* Settles back to red */
}


/* --- Homepage Specific Styles --- */

/* HERO SECTION */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: none;
  position: relative;
  z-index: 1;
}

.site-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: #f4f533;
  animation: pulseGlow 3s infinite alternate ease-in-out; /* Apply glow animation */
  margin: 0;
}

.site-subtitle {
  font-size: 1.3rem;
  margin-top: 1rem;
  font-family: 'Orbitron', sans-serif;
  opacity: 0; /* Start hidden for fade-in */
  animation: subtitleEffect 2.5s forwards 0.5s; /* Apply subtitle effect after a delay */
}

.hero-buttons {
  margin-top: 2rem;
  display: flex; /* Use flexbox for button layout */
  justify-content: center;
  gap: 1rem; /* Space between buttons */
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.btn {
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
  transition: 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(to right, red, orange);
  color: white;
  border: none;
}

.btn-outline {
  background: #1c1c1c;
  border: 1px solid #444;
  color: white;
}

/* Button Hover Effects (from previous version, not directly modified for this request but kept) */
.btn-primary:hover {
  background: linear-gradient(90deg, orange, red);
  box-shadow: 0 0 10px orange;
}

.btn-outline:hover {
  border-color: red;
  color: red;
  box-shadow: 0 0 8px red;
}


/* WHAT IS F1 SECTION */
.what-is-f1 {
  background: url("../images/f1-track.jpg") center center / cover no-repeat;
  padding: 4rem 2rem;
  position: relative;
}

.overlay.split {
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid lime;
  box-shadow: 0 0 15px #39ff14;
  flex-wrap: wrap;
}

.f1-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.f1-image img {
  max-width: 450px;
  width: 100%;
  height: auto;
  filter: brightness(1.2);
}

.info {
  flex: 2;
  text-align: center;
}

.section-title {
  color: red;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-family: 'Orbitron', sans-serif;
  animation: f1StartGlow 2.5s infinite alternate ease-in-out;
}

.info p {
  font-size: 1.15rem;
  line-height: 1.8;
  font-family: 'Orbitron', sans-serif;
  color: #e0e0e0;
  text-shadow: 0 0 6px rgba(255, 0, 0, 0.4);
}

/* SPONSORS */
.sponsors {
  background-color: #111;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0;
}

.sponsors img {
  height: 80px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  filter: blur(1px) brightness(1.2);
}

/* GALLERY */
.gallery {
  text-align: center;
  padding: 2rem;
}

.gallery h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: red;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  border-radius: 8px;
}

/* F1 WORLD MAP SECTION (from previous version, not directly modified now) */
.f1-map {
  position: relative;
  background: url('../images/homebkg.jpg') center center/contain no-repeat;
  height: 450px;
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-overlay {
  background: rgba(0, 0, 0, 0.65);
  padding: 2rem 3rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #39ff14;
  box-shadow: 0 0 20px #39ff14;
}

.map-overlay h2 {
  font-size: 2rem;
  color: #39ff14;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 0.5rem;
}

.map-overlay p {
  color: #e0e0e0;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
}

.map-section {
  background: url('../images/homebkg.jpg') center center / cover no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
}

.map-wrapper {
  background: url('../images/homebkg.jpg') center center / cover no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
}

.title span {
  background: linear-gradient(90deg, red, orange);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}


/* TEAMS PAGE STYLING (kept from previous version) */
.teams-container {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1000px;
  margin: auto;
}

.team-card {
  display: flex;
  gap: 2rem;
  align-items: center;
  background-color: #111;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #444;
}

.team-photo {
  width: 180px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.team-text {
  flex: 1;
}

.team-text h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  color: #f4f533;
  margin-bottom: 0.5rem;
}

.team-text p {
  color: #ddd;
  margin: 0.3rem 0;
  font-family: 'Orbitron', sans-serif;
}

.overlay-card {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
}

.team-left {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #111;
}

.team-left img {
  width: 100%;
  max-width: 280px;
  border-radius: 8px;
}

.team-right {
  flex: 2 1 500px;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-overlay {
  background: rgba(0, 0, 0, 0.55);
  padding: 2rem;
  color: #fff;
  max-width: 90%;
  text-align: left;
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
}

.team-overlay h2 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: #f4f533;
}

.team-overlay p {
  margin: 0.4rem 0;
  font-size: 1rem;
}
.split-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background-color: #111;
  border-radius: 12px;
  margin-bottom: 2rem;
  padding: 1.5rem;
  gap: 2rem;
}

.split-layout .team-text {
  flex: 1 1 50%;
  color: #f0f0f0;
  font-family: 'Orbitron', sans-serif;
}

.split-layout h2 {
  color: #f4f533;
  margin-bottom: 1rem;
}

.split-layout p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.team-car {
  flex: 1 1 40%;
  text-align: right;
}

.team-car img {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  object-fit: contain;
}
.team-logo {
  width: 120px;
  margin-bottom: 1rem;
}

/* DRIVERS PAGE STYLING (kept from previous version) */
.drivers-collage {
  padding: 4rem 2rem;
  background-color: #0a0a0a;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
}

.driver-block {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  gap: 2rem;
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.driver-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.driver-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f4f533;
  flex-shrink: 0;
}

.driver-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.driver-info h2 {
  margin: 0;
  font-size: 1.6rem;
  color: #f4f533;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 4px #f4f53380;
}

.driver-info .team-name {
  font-size: 1rem;
  color: #ff4d4d;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
}

.driver-info .nationality {
  font-size: 1rem;
  color: #ddd;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.driver-info .nationality .flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid #ccc;
}

.driver-info .number {
  font-size: 1.2rem;
  font-weight: bold;
  color: #00ffcc;
  font-family: monospace;
  background: #111;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #00ffcc50;
  width: fit-content;
  margin-top: 0.4rem;
  letter-spacing: 1px;
}
.driver-info .socials {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
}

.driver-info .socials a {
  color: #ccc;
  font-size: 1.2rem;
  transition: color 0.3s ease, transform 0.2s;
}

.driver-info .socials a:hover {
  color: #f4f533;
  transform: scale(1.2);
}
/* === DRIVERS PAGE (Main Driver List) === */

.drivers-page {
  padding: 4rem 2rem;
  background-color: #0a0a0a;
  font-family: 'Orbitron', sans-serif;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  color: #f4f533;
  margin-bottom: 3rem;
  text-shadow: 0 0 8px #f4f533;
}

.driver-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 1200px;
  margin: auto;
}

/* Individual driver row */
.driver-row {
  display: flex;
  flex-wrap: wrap;
  background-color: #121212;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #333;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
  align-items: center;
  transition: transform 0.3s ease;
}

.driver-row:hover {
  transform: translateY(-4px);
  border-color: #f4f533;
}

/* Left part (photo) */
.driver-left {
  flex: 0 0 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.driver-left img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f4f533;
  transition: transform 0.3s ease;
}

.driver-left img:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px #f4f533;
}

/* Right part (info + extras) */
.driver-right {
  flex: 1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-left: 2rem;
  align-items: center;
}

/* Driver text info */
.driver-info h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: #ffffff;
}

.driver-info p {
  margin: 0.2rem 0;
  font-size: 1rem;
  color: #ccc;
}

/* Flag + Social icons */
.driver-extras {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.driver-extras .flag {
  width: 36px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #888;
}

/* Icons row */
.social-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(1.2);
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.2);
  filter: brightness(1.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-title {
    font-size: 3rem; /* Smaller title on tablets */
  }

  .site-subtitle {
    font-size: 1.1rem; /* Smaller subtitle on tablets */
  }

  .hero-buttons {
    flex-direction: column; /* Stack buttons vertically */
    align-items: center;
  }

  .btn {
    width: 80%; /* Make buttons wider when stacked */
    max-width: 300px;
  }

  .overlay.split {
    flex-direction: column; /* Stack image and info in "What is F1" section */
    text-align: center;
  }

  .f1-image {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 2.5rem; /* Even smaller title on mobile */
    letter-spacing: 3px;
  }

  .site-subtitle {
    font-size: 0.9rem; /* Even smaller subtitle on mobile */
  }

  .gallery-grid {
    grid-template-columns: 1fr; /* Single column for gallery on mobile */
  }

  .sponsors img {
    height: 60px; /* Smaller sponsor logos on mobile */
  }

  .team-card.split-layout {
    flex-direction: column; /* Stack content in team cards */
    text-align: center;
  }

  .team-car {
    text-align: center;
  }

  .team-logo {
    width: 100px; /* Smaller team logo on mobile */
  }

  .driver-block {
    flex-direction: column; /* Stack driver photo and info */
    text-align: center;
    gap: 1rem;
  }

  .driver-photo {
    margin-bottom: 0.5rem;
  }

  .driver-info .nationality {
    justify-content: center;
  }

  .driver-info .number {
    margin: 0.4rem auto 0; /* Center number when stacked */
  }
}

/* --- FOOTER STYLES --- */
.footer {
  background-color: #121212; /* Dark background as per image */
  color: #cccccc;
  padding: 20px 40px;
  font-family: 'Orbitron', sans-serif;
  position: relative;
  margin-top: 50px; /* Provides some space above the footer */
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px; /* Red line height */
  background-color: #E10600; /* F1 Red color */
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 20px;
  padding-top: 15px; /* Space between red line and content */
}

.footer-logo img {
  height: 40px; /* Adjust as needed for the F1 logo */
  filter: brightness(1.2); /* Slightly brightens the logo if it's too dark */
}

.footer-socials {
  display: flex;
  gap: 20px;
  font-size: 1.5rem;
}

.footer-socials a {
  color: #cccccc;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: #fff; /* Lighter on hover */
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.display-mode {
  position: relative;
}

.display-mode select {
  background-color: #2a2a2a; /* Darker background for select box */
  color: #fff;
  border: 1px solid #444;
  padding: 10px 30px 10px 15px; /* Padding for text and arrow space */
  border-radius: 20px; /* Rounded corners */
  appearance: none; /* Remove default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: 'Orbitron', sans-serif;
  outline: none;
  transition: border-color 0.3s ease;
}

.display-mode select:hover {
  border-color: #E10600; /* Red border on hover */
}

/* Custom arrow for select box */
.display-mode::after {
  content: '\2304'; /* Unicode for caret down (U+2304) */
  font-family: 'Font Awesome 5 Free'; /* If using FontAwesome, otherwise a simple unicode char */
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  pointer-events: none; /* Make sure the arrow doesn't block clicks */
}


.footer-copyright {
  font-size: 0.85rem;
  text-align: right;
  margin-top: 20px;
  width: 100%; /* Ensure it takes full width below other content */
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
  .footer-content {
      flex-direction: column;
      text-align: center;
  }

  .footer-right {
      flex-direction: column;
      gap: 15px;
  }

  .footer-socials {
      justify-content: center;
      width: 100%;
      margin-bottom: 10px;
  }

  .footer-copyright {
      text-align: center;
  }
}