#mainvisual {
  position: relative;
  display: block;
  width: 100%;

  .mainwrapper {
    position: relative;
    padding-top: 70px;
    padding-bottom: 140px;
    z-index: 1;
    overflow: hidden;

    @media (max-width: 768px) {
      aspect-ratio: 375/586;
      padding-block: 0;
    }

    .mv-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: -1;
    }

    .mv-container {
      width: min(calc(100vw * (1240 / 1440)), 1240px);
      margin-inline: auto;

      @media (max-width: 768px) {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* gap: calc(189.97 / 375 * 100vw); */
        width: 100%;
      }

      .typo {
        width: min(100%, 1000px);

        @media (max-width: 768px) {
          width: 100%;
          margin: calc(100vw * (36 / 375)) 0 0;

          .typo__sp2 {
            margin-top: calc(100vw * (136 / 375));
          }

          & img {
            width: 100%;
          }
        }
      }
    }

    .mv-btn {
      border-radius: 5px;
    }

    #floatingCTA.btnScroll {

      .mv-btn.primary,
      .mv-btn.secondary {
        background-color: #f47808;
        color: #ffffff;
        border: 1px solid #f47808;

        @media (max-width: 768px) {
          height: 100%;
          font-size: 14px;
        }

        &:hover {
          background-color: #ffffff;
          color: #f47808;
          transition: all 0.2s ease-out;
        }
      }
    }
  }
}

#mainvisual .video-wrapper {
  --slides-height: 315px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

@media (width < 769px) {
  #mainvisual .video-wrapper {
    /* height: 720px; */
  }
}

@media (width < 375px) {
  #mainvisual .video-wrapper {
    /* height: 620px; */
  }
}

#mainvisual .video-wrapper video {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center;
  object-position: center;
  z-index: -1;
}

#mainvisual .mainwrapper #floatingCTA {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); 
  grid-template-rows: 56px;
  gap: 10px;
  max-width: 480px;
  width: 100%;
  transition: 0.6s;
  margin-top: 30px;

  @media (max-width: 768px) {
    padding-inline: calc(100vw * (14 / 375));
    width: 100%;
    max-width: none;
    margin: calc(100vw * (10 / 375)) auto 0;
    grid-template-rows: auto;
  }
}

#mainvisual .mainwrapper #floatingCTA .mv-btn {
  border-radius: 8px;
  border: solid 2px #f48e08;
  display: grid;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.3;
  place-items: center;
  width: 100%;
  height: 100%;
  transition: 0.5s;

  @media (width < 769px) {
    font-size: calc(100vw * (14 / 375));
    height: calc(100vw * (48 / 375));
  }

  &.primary {
    background-color: #f48e08;
    color: #fff;

    &:hover {
      background-color: #FF9F47;
      border-color: #fff;
      color: #fff;
    }
  }

  &.secondary {
    background-color: #fff;
    color: #f48e08;

    &:hover {
      background-color: #FF9F47;
      border-color: #fff;
      color: #fff;
    }
  }
}

@media (width < 472px) {
  #mainvisual .mainwrapper #floatingCTA .counseling a {
    padding: 0 10px;
  }
}

@media (width <=375px) {
  #mainvisual .mainwrapper #floatingCTA .counseling a {
    padding: 0;
    text-align: center;
  }
}

#mainvisual .mainwrapper #floatingCTA .counseling:hover {
  background: var(--color-orange-60);
}

#mainvisual .mainwrapper #floatingCTA .contract {
  background: var(--color-white);
}

#mainvisual .mainwrapper #floatingCTA .contract:hover {
  background: var(--color-orange-10);
}

#mainvisual .mainwrapper #floatingCTA.btnScroll {
  display: none;
}

@media (width < 769px) {
  #mainvisual .mainwrapper #floatingCTA.btnScroll {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 999;
    max-width: none;
    width: 100vw;
    height: 6rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
  }
}

#mainvisual .mainwrapper #floatingCTA.btnScroll .button {
  flex: 1;
  height: 100%;
}

@media (width < 472px) {
  #mainvisual .mainwrapper #floatingCTA.btnRemove {
    display: none;
  }
}

.mainvisual-slider-wrapper {
  margin-inline: calc(50% - 50vw);
  width: 100vw;
  background: #1A1F4A;
  position: relative;
  z-index: 1;

  @media (max-width: 768px) {
    margin-top: calc(-100vw * (80 / 375));

    &::before {
      content: '';
      position: absolute;
      top: calc(100vw * (60 / 375));
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      background: linear-gradient(90deg, #F9C0FF 0%, #7FBBFF 100%), #1A1F4A;
      z-index: -1;
    }
  }

  .mainvisual-slider {
    transform: translateY(max(calc(-100vw * (50 / 1440)), -50px));

    @media (width < 769px) {
      transform: none;
    }
  }

  .swiper-slide {
    width: 384px;
    aspect-ratio: 96 / 85;
  }

  .project-swiper:not(.swiper-initialized) {
    .swiper-wrapper {
      width: calc(100% - 160px);
      max-width: 1192px;
      margin-inline: auto;
      display: grid;
      grid-auto-flow: column;
      gap: 20px;
      justify-content: center;
    }

    .swiper-navigation {
      display: none;
    }
  }

  .swiper-navigation {
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 0;
    max-width: 1270px;
    width: calc(100% - 40px);
    margin: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .swiper-navigation__prev,
  .swiper-navigation__next {
    width: 50px;
    height: 50px;
    background: #333 url('/courses/dify/img/mv/arrow.svg') no-repeat center / 40%;
    border-radius: 50%;
    z-index: 1;
  }

  .swiper-navigation__next {
    transform: rotate(180deg);
  }
}

@media (width < 769px) {
  .swiper-wrapper {
    .swiper-slide {
      /* width: auto; */
    }
  }

  .mainvisual-slider-wrapper {
    .project-swiper:not(.swiper-initialized) {
      .swiper-wrapper {
        .swiper-slide {
          width: calc(100vw * (300 / 375));
        }
      }
    }
  }
}

.mainvisual-emblem {
  width: 508px;
  margin-top: 15px;

  @media (max-width: 768px) {
    position: static;
    bottom: -15px;
    margin-inline: calc(50% - 50vw);
    width: 100vw;
    height: auto;
    max-width: none;
    transform: translateY(-15%);
  }
}

.mainvisual-typograph {
  @media (max-width: 768px) {
    position: relative;
    margin-top: calc(100vw * (-180 / 375));
  }

  @media (min-width: 769px) {
    display: contents;
  }
}

.mainvisual-note {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 400;
  width: min(calc(100vw * (742 / 1440)), 742px);
  margin-top: 15px;

  @media (max-width: 768px) {
    text-align: left;
    width: auto;
    padding-inline: calc(100vw * (20 / 375));
    color: #4D77AB;
    margin-top: 0;
    padding-bottom: 1em;
    font-size: calc(100vw * (10 / 375));
  }
}

.min769\:visible {
  display: none;

  @media (min-width: 769px) {
    display: block;
  }
}

.max768\:visible {
  display: none;

  @media (max-width: 768px) {
    display: block;
  }
}

img[src*='sp_no1_emblem'] {
  position: relative;
  margin-block: calc(100vw * (15 / 375));
  padding-inline: calc(100vw * (16 / 375));
  z-index: -1;
}

#mainvisual .-notice {
  /* background: linear-gradient(90deg, #f9c0ff 0%, #7fbbff 100%); */
  color: #1A1F4A;
  align-items: flex-start;
  justify-content: center;
  margin-top: max(calc(100vw * (-50 / 1440)), -50px);
  margin-inline: calc(50% - 50vw);
  width: 100vw;

  @media (width < 769px) {
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
  }

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f9c0ff 0%, #7fbbff 100%);
    z-index: -1;

    @media (width < 769px) {
      display: none;
    }
  }

  .kv-carousel-note {
    color: #1A1F4A;
    font-size: 12px;
    max-width: 1192px;
    width: calc(100% - 160px);
    margin-inline: auto;
    padding-top: 20px;

    @media (width < 769px) {
      position: static;
      text-align: center;
      margin-top: calc(100vw * (15 / 375));
      font-size: calc(100vw * (10 / 375));
      width: 100%;
    }
  }
}

#mainvisual .-notice .-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1rem;
  gap: 1rem;
}

#mainvisual .-notice .-inner .-start {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

#mainvisual .-notice .-inner .-start .-date {
  line-height: 2rem;
}

#mainvisual .-notice .-inner .-date #start_MMDD {
  font-family: din-2014;
  font-size: 4rem;
  vertical-align: bottom;
  line-height: 1em;
}

#mainvisual .-notice .-inner .-date #start_ddd {
  font-size: 1.6rem;
  line-height: 2em;
}

#mainvisual .-notice .-inner .-end {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  background-color: #292838;
  color: #fff;
}

#mainvisual .-notice .-inner .-date #deadline_MMDD {
  font-family: din-2014;
  font-size: 2.2rem;
}

#mainvisual .-notice .-inner .-date #deadline_ddd {
  font-size: 1.2rem;
}

#mainvisual .-notice p {
  line-height: 140%;
  font-size: 1.2rem;
  font-weight: 700;
}

#mainvisual .-end {
  border: solid 1px #fff;
  padding: 0.8rem 1rem;
}

#mainvisual .-end p {
  font-size: 1.4rem;
}

#mainvisual p.-attention {
  font-size: 1.2rem;
  font-weight: 400;
}

@media (width < 769px) {
  #mainvisual .-notice .-inner {
    max-width: none;
    flex-wrap: wrap;
    gap: 1rem;
    padding: calc(100vw * (14 / 375)) calc(100vw * (10 / 375));
  }

  #mainvisual .-notice .-inner .-start {
    gap: 0.2rem;
  }

  #mainvisual .-notice .-inner .-end {
    gap: 0.5rem;
  }

  #mainvisual .-notice p {
    line-height: normal;
    font-size: calc(100vw * (10 / 375));
    font-weight: 700;
  }

  #mainvisual .-end {
    padding: 12px 10px;
  }

  #mainvisual .-end p {
    font-size: calc(100vw * (14 / 375));
    line-height: 1;
  }

  #mainvisual .-notice .-inner .-start .-date {
    line-height: 1.4;
  }

  #mainvisual .-notice .-inner .-date #start_ddd {
    font-size: calc(100vw * (12 / 375));
    line-height: 1.4em;
  }

  #mainvisual .-notice .-inner .-date #start_MMDD {
    font-size: calc(100vw * (32 / 375));
  }

  #mainvisual .-notice .-inner .-date #deadline_MMDD {
    font-size: calc(100vw * (16 / 375));
  }

  #mainvisual .-notice .-inner .-date #deadline_ddd {
    font-size: calc(100vw * (10 / 375));
  }

  #mainvisual p.-attention {
    width: 100%;
    font-size: calc(100vw * (10 / 375));
    font-weight: 400;
    text-align: center;
  }

  #mainvisual .-attention br {
    display: none;
  }
}

#mainvisual .mainwrapper #floatingCTA li:only-child {
  grid-column: 1 / span 2;
}

@keyframes mv-ticker-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes mv-ticker-right {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.mv-ticker {
  @media (max-width: 768px) {
    position: absolute;
    top: calc(100vw * (200 / 375));
    left: 0;
    width: 100%;
    height: calc(100vw * (180 / 375));
    z-index: -1;
    overflow: hidden;
  }
  .mv-ticker__inner {
    overflow: hidden;
    position: absolute;
    right: -280px;
    bottom: -380px;
    z-index: -1;
    transform: rotate(-30deg);
    width: 1950px;
    @media (max-width: 768px) {
      width: calc(100vw * (1100 / 375));
      right: calc(100vw * (-520 / 375));
      bottom: 0;
      margin: auto;
    }
  }

  .mv-ticker__rows {
    display: grid;
    gap: 10px;
  }

  .mv-ticker__row {
    display: flex;
    gap: 10px;
    &:last-child {
      @media (min-width: 769px) {
        display: none;
      }
    }
  }

  .mv-ticker__row--odd {
    animation: mv-ticker-left 72s linear infinite;
  }

  .mv-ticker__row--even {
    animation: mv-ticker-right 72s linear infinite;
  }

  & img {
    min-width: 1950px;
    @media (max-width: 768px) {
      width: calc(100vw * (1100 / 375));
      min-width: calc(100vw * (1100 / 375));
    }
  }
}