body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* nav */
header {
  background-color: #e10600;
  color: #fff;
  padding: 10px 0;
  position: relative;
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  left: 50%;
  transform: translateX(-50%);
}

.logo img {
  height: 50px;
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-size: 20px;
  padding: 8px 12px;
  transition: background-color 0.3s;
}

.nav-links a:hover {
  text-decoration: underline 4px solid #15151e;
}

/* Mobile Navigation Bar */
.menu-icon {
  display: none;
  font-size: 30px;
  cursor: pointer;
  color: #fff;
}

.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #e10600;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidebar a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #fff;
  display: block;
  transition: 0.3s;
}

.sidebar a:hover {
  text-decoration: underline 4px solid #15151e;
}

.sidebar .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

@media (max-width: 918px) {
  .nav-links {
      display: none;
  }

  .menu-icon {
      display: block;
  }

  .logo {
      left: 50%;
      transform: translateX(-50%);
  }
}

/* hero */
.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 500px;
  margin: auto;
  overflow: hidden;
}

@media (max-width: 918px) {
  .hero {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 500px;
    margin: auto;
    overflow: hidden;
  }
}

.hero .overlay-itro {
  background-color: rgba(0, 0, 0, 0.6);;
  position: absolute;
  top: 0;
  left: 0px;
  padding: 0;
  height: 100%;
  width: 100%;
  opacity: 0.9;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
}

.hero-message {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 170px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 8px;
  font-size: 24px;
}
/* hero */

.brochure {
  padding: 10px 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #e10600;
  border-radius: 20px;
  font-size: 20px;
  text-decoration: none;
  color: #fff;
  letter-spacing: .1rem;
  font-weight: 600;
  border: 3px solid transparent;
  width: auto;
  height: 50px;
}

@media (max-width:500px) {
  .brochure {
    font-size: 15px;
    font-weight: 300;
    height: auto;
  }

  .brochure:hover {
    background: transparent;
    color: #15151e;
    border: 3px solid #e10600;
  }
}

.brochure:hover {
  background: transparent;
  color: #15151e;
  border: 3px solid #e10600;
}

/* home page */
main {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width:700px){
  .main-gallery {
    width: 400px;
  }
}

section {
  margin-bottom: 32px;
}

h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.news-articles, .race-schedule, .results-summary, .links {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.news-articles article, .race, .result, .links a {
  background: #f0f0f0;
  padding: 1rem;
  margin: 1rem;
  border-radius: 0.5rem;
  text-align: center;
  flex: 1 1 200px;
}

.news-articles article a, .links a {
  display: block;
  margin-top: 1rem;
  color: #15151e;
  text-decoration: none;
}
/* home page*/

/* contact page */

.additional-info {
  margin-top: 20px;
  align-items: center;
}

.additional-info h2 {
   margin-bottom: 10px;
}

.additional-info p {
  text-align: center;
}

.social-media-1 a:hover {
  color: #e10600;
}

.contact {
  width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(255, 3, 3, 0.9);
  border-radius: 15px;
}

@media ( max-width: 918px) {
  .contact {
    width: 310px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(255, 3, 3, 0.9);
    border-radius: 15px;
  }
}

.contact h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #15151e;
}

.underline-hr {
  width: 80px;
  height: 3px;
  background-color: #e10600;
  border: 1px solid #e10600
}

.contact p {
  font-size: 19px;
  margin-bottom: 20px;
  text-align: center;
}

@media (max-width:918px) {
  .contact p {
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
  }
}

.contact #contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-field {
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.social-media-contact {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.social-media-contact a {
  color: #e10600;
  text-decoration: none;
  font-size: 1.5rem;
  margin: 0 0.5rem;
}

.social-media-contact a:hover {
  color: rgba(255, 3, 3, 0.9);
}

#contact-button {
  padding: 10px 20px;
  font-size: 1em;
  background-color: #e10600;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#contact-button:hover {
  color: #e10600;
  background-color: #15151e;
	-webkit-animation: tracking-in-expand-fwd 2.0s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
	        animation: tracking-in-expand-fwd 2.0s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@-webkit-keyframes tracking-in-expand-fwd {
	0% {
	  letter-spacing: -0.5em;
	  -webkit-transform: translateZ(-700px);
			  transform: translateZ(-700px);
	  opacity: 0;
	}
	40% {
	  opacity: 0.6;
	}
	100% {
	  -webkit-transform: translateZ(0);
			  transform: translateZ(0);
	  opacity: 1;
	}
  }
  @keyframes tracking-in-expand-fwd {
	0% {
	  letter-spacing: -0.5em;
	  -webkit-transform: translateZ(-700px);
			  transform: translateZ(-700px);
	  opacity: 1;
	}
	40% {
	  opacity: 1;
	}
	100% {
	  -webkit-transform: translateZ(0);
			  transform: translateZ(0);
	  opacity: 1;
	}
  }

#contact-feedback {
  margin-top: 10px;
  font-size: 30px;
  color: #15151e;
}
/* contact page */

/**** gallery page ****/
* {box-sizing:border-box}

.slideshow-container {
  max-width: 1000px;
  position: relative;
  margin: auto;
  box-shadow: 0 0 10px rgba(255, 3, 3, 0.9);
}

.mySlides {
  display: none;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: #e10600;
  background-color: #15151e;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.4);
}

.text {
  color: #e10600;
  font-size: 20px;
  font-weight: bolder;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

.numbertext {
  color: #e10600;
  font-size: 18px;
  font-weight: bolder;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 10 2px;
  background-color: #15151e;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #e10600;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

.gallery {
  --size: 100px;
  display: grid;
  justify-content: center;
  align-items: center;
  grid-template-columns: repeat(6, var(--size));
  grid-auto-rows: var(--size);
  margin-bottom: var(--size);
  place-items: start center;
  gap: 5px;
  
  &:has(:hover) img:not(:hover),
  &:has(:focus) img:not(:focus){
    filter: brightness(0.5) contrast(0.5);
  }

  & img {
    object-fit: cover;
    width: calc(var(--size) * 2);
    height: calc(var(--size) * 2);
    clip-path: path("M90,10 C100,0 100,0 110,10 190,90 190,90 190,90 200,100 200,100 190,110 190,110 110,190 110,190 100,200 100,200 90,190 90,190 10,110 10,110 0,100 0,100 10,90Z");
    transition: clip-path 0.25s, filter 0.75s;
    grid-column: auto / span 2;
    border-radius: 5px;

    &:nth-child(5n - 1) { 
      grid-column: 2 / span 2 
    }

    &:hover,
    &:focus {
      clip-path: path("M0,0 C0,0 200,0 200,0 200,0 200,100 200,100 200,100 200,200 200,200 200,200 100,200 100,200 100,200 100,200 0,200 0,200 0,100 0,100 0,100 0,100 0,100Z");
      z-index: 1;
      transition: clip-path 0.25s, filter 0.25s;
    }
    
    &:focus {
      outline: 1px dashed black;
      outline-offset: -5px;
    }
  }
}


/* teams page */

.teams {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(255, 3, 3, 0.9);
}

.teams h1 {
  text-align: center;
  margin-bottom: 20px;
}

.team {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.team-name {
  margin: 0;
  color: #e10600;
  text-align: left;
}

.team-info {
  flex: 1;
  margin-right: 20px;
}

.team-info p, .team-info, .team-achieve {
  margin-bottom: 10px;
}

.team-info, .team-achieve {
  list-style-type: disc;
  margin-left: 20px;
}

.teams-hr {
  border: 2px solid #15151e;
}

.driver-photos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.driver-photos img {
  width: 100px;
  height: auto;
  border: 1px solid #ccc;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.driver-name {
  color: #15151e;
  font-weight: bold;
}
/* teams page */

.mail-hr {
  width: 50%;
  height: 3px;
  background-color: #e10600;
}

.mail-slider {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.slide-mail {
  display: flex;
  animation: slide 10s infinite;
}

.slide {
  min-width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.slide h1 {
  position: absolute;
  bottom: 200px;
  left: 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
}

@keyframes slide {
  0%, 50%, 100% { transform: translateX(0); }
  25% { transform: translateX(-100%); }
}

.mail-area {
  background-color: #15151e;
  color: #fff;
  padding: 20px;
  text-align: center;
}

.mail-area h2 {
  margin-bottom: 10px;
}

.mail-area .form-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mail-area .form-field label {
  font-size: 1.2em;
}

.mail-area .form-field input {
  padding: 10px;
  font-size: 1em;
  border: none;
  border-radius: 5px;
  width: 200px;
}

@media (max-width:500px) {
    .mail-area .form-field input {
        width: 200px;
    }
}

.mail-area .form-field button {
  padding: 10px 20px;
  font-size: 1em;
  background-color: #e10600;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.mail-area .form-field button:hover {
  background-color: #e10600;
}

.mail-area .form-field p {
  margin-top: 10px;
  font-size: 1em;
  color: #ff0;
}

/*****Circuits Page****/
.circuit-page {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(255, 3, 3, 0.9);
}

.circuit-h2 {
  text-align: left;
  text-decoration: underline #e10600;
}

.circuit-h1 {
  text-align: center;
}

.circuit-h3 {
  text-align: left;
}

.circuit-hr {
  background-color: #e10600;
  border: 1px solid #e10600;
  width: 800px;
  height: 5px;
  display: flex;
  flex-wrap: nowrap;
}

.circuit {
  margin-bottom: 40px;
}

.track-map {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 10px 0;
}

/* footer */
.links a {
	font-family: 'Times New Roman', Times, serif;
	font-size: 19px;
	color: #fff;
	background-color: transparent;
  border: 2px solid #e10600;
}
.links :hover {
  background-color: #15151e;
  color: #e10600;
}

footer {
  background-color: #15151e;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  position: relative;
  bottom: 0;
  width: 100%;
}

.social-media {
  margin-bottom: 1rem;
}

.social-media a {
  color: #e10600;
  text-decoration: none;
  font-size: 1.5rem;
  margin: 0 0.5rem;
}

.social-media a:hover {
  color: #ffffff;
}

.external-links {
  margin-bottom: 1rem;
}

.external-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5rem;
  display: inline-block;
}

.external-links a:hover {
  color: #e10600;
}
/* footer*/
