/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
}

/* Set base font size and color */
body {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  color: #333;
  box-sizing: border-box;
}

h2 {
  position: relative;
  display: inline-block;
}

/* Set header styles */
header {
  width: 100%;
  background-color: #7cefd2f0;
  color: #fff;
  position: fixed;
  z-index: 1;
  max-width: 100%;
  text-align: center;
}

.header-container {
  width: 100%;
  margin: 20px auto 20px auto;
}


.logo {
  font-size: 5rem;
  margin-top: 20px;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.logo.fade-in {
  opacity: 1;
  transition-duration: 0.7s;
}

.logo .fade-out {
  opacity: 0;
}

.nav-menu {
  width: 100%;
  align-items: center;
}

.nav-menu ul {
  width: 100%;
  text-align: center;
}

.nav-menu ul li {
  margin: 0 30px 0 30px;
  list-style: none;
  display: inline-block;
  font-size: 1.5rem;
  position: relative;
}

.nav-menu ul li a:hover {
  color: #000;
}

.nav-menu ul li::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 4px;
  background-color: #70ffee;
  transition: width 0.3s ease-out;
}

.nav-menu ul li:hover::before {
  width: 100%;
}

.nav-menu ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}


.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  cursor: pointer;
  height: 30px;
}

.line {
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 3px;
}

.close-btn {
  display: none;
  font-size: 3rem;
}



/* Set hero section styles */
#hero {
  display: inline-block;
  height: 100vh;
}

.slide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-position: center;
  z-index: -1;
  transition: opacity 0.5s ease;
  object-fit: cover;
}


.hero-content {
  position: relative;
  top: 10%;
  left: 2.5%;
}

.hero-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 40px;
}


/* Set news section styles */
#news {
  background-color: #70ffee;
  min-height: 200px;
  padding-top: 50px;
}

.news-container {
  text-align: center;
  padding: 20px;
}


.news-container h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  ;
}



.news-section {
  margin: 40px 0;
  text-align: center;
}

.news-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  text-align: center;
  flex-wrap: nowrap;
  /* nowrapで、折り返しをしないように指定 */
  overflow-x: scroll;
  /* スクロールバーを表示 */
  scroll-snap-type: x proximity;
  /* スナップスクロールを指定 */
  padding-bottom: 10px;
}

.news-item {
  width: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-out;
  flex: 0 0 auto;
  /* アイテムの幅が可変であることを指定 */
  margin: 5px 10px;
  /* アイテム間の間隔を指定 */
}

.news-item:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

.news-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
}


.news-details {
  margin: 5px 5px 10px 5px;
}




/* Set story section styles */
#story {
  padding: 100px 50px 50px 50px;
  min-height: 200px;
  background-color: #f5f5f5;
}

.story-container {
  text-align: center;
}

.story-container h2 {
  margin-bottom: 20px;
  font-size: 2rem;
}

.story-content {
  font-family: 'Lato', sans-serif;
  display: flex;
}

.story-image {
  width: 50%;
}

.story-image img {
  display: inline-block;
  width: 100%;
}

.story-text {
  width: 50%;
  padding: 30px;
}

.story-text p {
  line-height: 2rem;
}

.story-text a {
  text-decoration: none;
  margin-top: 30px;
}

.viewmore {
  display: block;
  margin: 50px auto;
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.viewmore:hover {
  color: #000;
  top: 3px;
}

/*ストーリーページのcss*/
.maincontents {
  padding: 100px 5% 100px 5%;
  text-align: center;
}

.maincontents h2 {
  margin: 10px;
}

.maincontents h3 {
  margin: 20px 0 20px 0;
}

.maincontents p {
  margin: 3px;
}

.maincontents section {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: center;
  height: auto;
}

.maincontents section .story {
  display: block;
  height: auto;
  margin: 5px;
}

.maincontents section:nth-of-type(even) {
  flex-direction: row-reverse;
}

.maincontents section p {
  /* width: 30%; */
  display: inline-block;
  margin: 5px;
}

.maincontents section img {
  width: 50%;

}



/* Set schedule section styles */
#schedule {
  background-color: #70ffee;
  color: #000000;
  min-height: 200px;
  padding: 100px 50px 50px 50px;
}

.schedule-container {
  text-align: center;
  padding: 20px;
}

.schedule-container h2 {
  margin-bottom: 20px;
  font-size: 2rem;
}

.race {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.race .date {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.race .location {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.race .time {
  font-size: 1.3rem;
  font-weight: bold;
}

/* Set sponsors section styles */

#sponsors {
  padding: 100px 50px 50px 50px;
  min-height: 200px;
  background-color: #f5f5f5;
}

.sponsors-container {
  padding: 20px;
  text-align: center;
}

.sponsors-container h2 {
  margin-top: 0;
  font-size: 2rem;
}

.sponsors-container h3 {
  font-size: 1.7rem;
  margin: 10px 0 10px 0;
}

.mainsponsors {
  min-height: 300px;
  width: 100%;
  max-width: 100%
}

.mainsponsors ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.mainsponsors ul li {
  font-weight: bold;
}

.sponsors-container li {
  margin: 0 20px;
}

.mainsponsors img {
  height: 200px;
  max-width: 250px;
  object-fit: contain;
}

.personalsponsors ul li {
  display: block;
}

.personalsponsors ul li ul {
  display: flex;
  flex-wrap: wrap;
  width: 80%;
  justify-content: center;
  margin: auto;
}

.personalsponsors ul li ul li {
  white-space: nowrap;
}

/* Set footer styles */
footer {
  background-color: #7cefd2f0;
  color: #fff;
  padding: 20px;
  text-align: center;
}



.social-media {
  margin-top: 10px;
  text-align: center;
}

.social-media li {
  margin: 0 10px;
  display: inline-block;
}

.social-media li a {
  color: #fff;
  font-size: 24px;
  text-decoration: none;
  transition: color 0.3s;
  display: block;
  width: 30px;
  height: 30px;
}

.social-media li a:hover {
  color: #70ffee;
}

* {
  margin: 0;
  padding: 0;
}


/* メディアクエリによるレスポンシブ対応 */
@media screen and (max-width: 780px) {
  header {
    background-color: #7cefd2;
  }

  .header-container {
    width: auto;
  }

  .main-menu {
    height: 100vh;
    display: none;
    text-align: center;
  }

  .nav-menu ul li {
    display: block;
    margin-bottom: 10%;
    margin-top: 10%;
    max-width: 100%;
    top: 10%;
  }

  .nav-menu ul li::before {
    width: 100%;
  }

  .header-container {
    margin: 0
  }

  .hamburger {
    display: flex;
    position: fixed;
    right: 5%;
    top: 6.5%;
  }

  .close-btn {
    position: fixed;
    color: #333;
    right: 5%;
    top: 5%;
  }

  .logo {
    font-size: 3rem;
  }

  /* スライドショーの画像をスマホのときに変更する */
  /* .slide1 {
    content: url("src/img/main1.JPG");
  }
  .slide2 {
    content: url("src/img/main2.JPG");
  }
  .slide3 {
    content: url("src/img/main3.JPG");
  }
  .slide4 {
    content: url("src/img/main4.JPG");
  } */

  #story {
    padding: 50px 20px 50px 20px;
  }

  .story-content {
    display: inline-block;
  }

  .story-image {
    width: 100%;
  }

  .story-text {
    width: 100%;
    padding: 0;
  }

  /*ストーリーページのcss*/
  .maincontents {
    padding-top: 50px;
  }

  .maincontents section {
    display: block;
    width: 100%;
    justify-content: center;
    height: auto;
  }

  .maincontents section:nth-of-type(even) {
    flex-direction: row;
  }

  .maincontents section p {
    width: 100%;
  }

  .maincontents section img {
    width: 100%;

  }

  #schedule {
    padding: 50px 20px 50px 20px;
  }

  .schedule-container {
    padding: 0;
  }

  #sponsors {
    padding: 50px 20px 50px 20px;
  }

  .sponsors-container {
    padding: 0;
  }

}




/* アニメーションの定義 */
@keyframes fadeIn {
  0% {
    transform: translateZ(-50%);
    /* 透明度を0に設定 */
    opacity: 0;
  }

  100% {
    transform: translateX(0);

    /* 透明度を1に変更 */
    opacity: 1;
  }
}