@charset "utf-8";

/* 画像をコンテナにフィットさせる */
.hero {

  .splide__slide picture,
  .splide__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* ドット位置（画像の内側・下） */
  .splide__pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  /* PCのみ矢印を見やすく */
  @media (min-width:1024px) {
    &.js-hero-splide {
      max-width: 1200px;
      margin-inline: auto;
      /* 中央ぞろえ */
      width: 100%;

      .splide__track {
        aspect-ratio: 1450 / 550;
      }
    }

    &>.splide__arrows {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      pointer-events: none;
    }

    .splide__arrow {
      pointer-events: auto;
      width: 40px;
      height: 40px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .9);
      box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    }
  }

  /* SP：比率をSP画像（640/480）に切替 */
  @media (max-width: 1023.98px) {
    &.js-hero-splide {
      .splide__track {
        aspect-ratio: 640 / 480;
      }
    }
  }

  /* 古めのブラウザ向けフォールバック（aspect-ratio未対応時） */
  @supports not (aspect-ratio: 1 / 1) {

    /* 比率 = 高さ/幅 × 100% */
    @media (min-width: 1024px) {
      &.js-hero-splide {
        .splide__track {
          height: 0;
          padding-top: calc(550 / 1450 * 100%);
          position: relative;
        }

        .splide__list {
          position: absolute;
          inset: 0;
        }
      }
    }

    @media (max-width: 1023.98px) {
      .js-hero-splide {
        .splide__track {
          height: 0;
          padding-top: calc(480 / 640 * 100%);
          position: relative;
        }

        .splide__list {
          position: absolute;
          inset: 0;
        }
      }
    }
  }
}

.monthly-link {
  display: flex;
  gap: 1%;
  justify-content: space-around;

  @media (width <=641px) {
    flex-wrap: wrap;
  }

  .monthly-link__item {
    box-shadow: 0px 2px 2px 2px rgb(0 0 0 / 3%);
    line-height: 2;
    letter-spacing: 0.05em;
    margin-bottom: 10px;

    @media (width <=641px) {
      /* モバイル */
      flex-basis: 31%;
    }

    @media (width > 640px) {
      /* タブレット・PC */
      flex-basis: 18%;
    }
  }
}

.top-search {
  @media (width >=820px) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .top-search__item {
    max-width: 600px;
    margin: auto;
    margin-bottom: 60px;

    @media (width >=820px) {
      flex-basis: 45%;
      margin: 0 0 60px;

      &:nth-child(1) {
        order: 1;
      }

      &:nth-child(2) {
        order: 2;
      }

      &:nth-child(3) {
        order: 3;
      }

      &:nth-child(4) {
        order: 5;
        flex-basis: 100%;
        max-width: 1200px;
      }

      &:nth-child(5) {
        order: 4;
      }
    }
  }
}

.car-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 480px;
  margin: 10px;
  gap: 2%;

  @media (width >=515px) {
    margin: 10px auto;
  }

  .car-list__item {
    flex-basis: 23%;
    margin-bottom: 10px;

    a {
      display: flex;
      flex-flow: column;
      align-items: center;
      justify-content: center;
      box-shadow: 0 .3rem .8rem 0 rgba(0, 0, 0, .05);
      background: #fff;
      border-radius: 5px;
      font-size: 0.9em;
      min-height: 70px;
      border: 1px solid #d7d6d6;
      text-decoration: none;
      color: #333;

      img {
        width: 50px;
        height: auto;
      }
    }

    &.car-list__item--futsu {
      flex-basis: 100%;

      a {
        padding-bottom: 10px;
        font-size: 1.1em;

        img {
          width: 100px;
          height: auto;
        }
      }
    }

    &.car-list__item--f-nirin,
    &.car-list__item--o-nirin {
      flex-basis: 48%;

      a {
        padding-bottom: 5px;
        font-size: 1em;

        img {
          width: 75px;
          height: auto;
        }
      }
    }
  }
}

.svg-map {
  margin: 10px;

  svg {
    height: 390px !important;
    width: 100%;
    background: #fff;
    border-radius: 5px;
  }

  @-moz-document url-prefix() {
    text {
      font-size: 5.5em !important;
    }
  }
}

.departure-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;

  .departure-list__item {
    flex-basis: 46%;
    margin-bottom: 3%;

    @media (width >=820px) {
      flex-basis: 31%;
    }
  }
}

.purpose-list {
  display: flex;
  gap: 1%;

  @media (width <=821px) {
    /* モバイル */
    overflow: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
    margin-bottom: 1em;
  }

  @media (width > 820px) {
    /* タブレット・PC */
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: auto;
    margin-bottom: 20px;
  }

  .purpose-list__item {
    position: relative;

    @media (width <=821px) {
      /* モバイル */
      display: flex;
      flex-direction: column;
      min-width: 320px;
      max-width: 320px;
      margin: 0.5em;
      box-shadow: 0px 2px 2px 2px rgb(0 0 0 / 3%);
      line-height: 2;
      letter-spacing: 0.05em;
    }

    @media (width > 820px) {
      /* タブレット・PC */
      box-shadow: 0px 2px 2px 2px rgb(0 0 0 / 3%);
      flex-basis: 31%;
      line-height: 2;
      letter-spacing: 0.05em;
      margin-bottom: 10px;
    }
  }

  .purpose-list__txt {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgb(255 255 255 / 60%);
    width: 100%;
    color: #333;

    .purpose-list__stamp {
      display: inline-block;
      background: #eb6877;
      margin: 10px 5px 0;
      padding: 2px 5px;
      font-size: 13px;
      font-weight: 500;
      color: #fff;

      &.purpose-list__stamp--another {
        background: #eb8768;
      }
    }

    .purpose-list__comment {
      margin: 5px 5px 10px;
      font-weight: 600;
      line-height: 1.5;
      font-size: 0.9em;
    }
  }
}

.controller {
  background: #fff;
  min-width: 310px;
  max-width: 375px;
  box-shadow: 0px 2px 2px 2px rgb(0 0 0 / 3%);
  margin: 15px auto 15px;
  padding: 15px 15px 5px;
  border-radius: 5px;

  .controller__box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #999;
    border-radius: 5px;
    padding: 15px;

    .controller__icon {
      flex-basis: 13%;

      img {
        width: 30px;
        height: auto;
      }
    }

    .controller__area {
      display: flex;
      align-items: center;
      gap: 10%;
      flex-basis: 55%;

      select.area__box {
        flex-basis: 70%;
        appearance: none;
        border: none;
        outline: 0;
        background: #fff;
        background-image: none;
        box-shadow: none;
        text-indent: 0.01px;
        text-overflow: ellipsis;
        font-size: 1.6rem;
      }
    }

    .controller__gender {
      display: flex;
      align-items: center;
      gap: 10%;
      flex-basis: 40%;
      border-left: 1px solid #999;
      padding-left: 10px;

      .gender__box {
        flex-basis: 65%;
        appearance: none;
        border: none;
        outline: 0;
        background: #fff;
        background-image: none;
        box-shadow: none;
        text-indent: 0.01px;
        text-overflow: ellipsis;
        font-size: 1.6rem;
      }
    }

    .controller__enr_date {
      display: flex;
      align-items: center;
      flex-basis: 100%;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid #999;

      input {
        appearance: none;
        border: none;
        outline: 0;
        background: #fff;
        background-image: none;
        box-shadow: none;
        text-indent: 0.01px;
        text-overflow: ellipsis;
        font-size: 1.6rem;
      }
    }
  }

  .controller__btn {
    margin-top: 20px;

    .btn__wrap {
      position: relative;
      display: block;
      width: fit-content;
      margin: auto;

      &::before {
        position: absolute;
        display: inline-block;
        content: "";
        background-image: url(/img/common/search.png);
        background-size: contain;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        left: 50px;
        top: 50%;
      }

      .btn {
        font-size: 2rem;
        background: #4e75ba;
        color: #fff;
        border: none;
        border-radius: 5px;
        min-width: 190px;
        padding: 10px 10px 10px 20px;
        margin: 15px auto;
      }
    }
  }
}

.school-list-accordion {
  margin: 10px;

  @media (width > 820px) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0 82px;
    max-width: 820px;
    margin: auto;
  }

  .school-list-accordion__item {
    @media (width > 820px) {
      flex-basis: 45%;
    }

    .accordion__input {
      display: none;
    }

    .accordion__label {
      position: relative;
      display: block;
      background: #4e75ba;
      border: solid 1px rgb(0 1 45 / 30%);
      margin-top: 10px;
      padding: 8px 30px 8px 15px;
      border-radius: 4px;
      line-height: 1.4;
      font-weight: 400;
      color: #fff;
      text-align: center;

      &:after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        right: 18px;
        margin: auto;
        vertical-align: middle;
        width: 5px;
        height: 5px;
        border-top: 1px solid rgb(255 255 255);
        border-right: 1px solid rgb(255 255 255);
        -moz-transform: rotate(135deg);
        -webkit-transform: rotate(135deg);
        transform: rotate(135deg);
        transition: .5s;

        &:hover {
          width: 8px;
          height: 8px;
          border-width: 2px;
          -moz-transition: width .3s ease-out;
          -webkit-transition: width .3s ease-out;
          transition: width .3s ease-out;
          -moz-transition: height .3s ease-out;
          -webkit-transition: height .3s ease-out;
          transition: height .3s ease-out;
        }
      }
    }

    .accordion__content {
      height: 0;
      opacity: 0;
      padding: 0 10px;
      transition: .5s;
      visibility: hidden;
      line-height: 2;
      background: #f6f6f6;

      dt {
        font-size: 1.8rem;
        font-weight: 500;
        margin-top: 20px;

        a {
          font-size: 1.7rem;
          color: #333;
        }
      }
    }

    .accordion__input:checked+.accordion__label {
      opacity: 0.75;

      &:after {
        transform: rotate(315deg);
        transition: .5s;
      }
    }

    .accordion__input:checked+.accordion__label+.accordion__content {
      height: auto;
      opacity: 1;
      padding: 10px;
      visibility: visible;
    }
  }
}

.features {
  @media (width > 820px) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 860px;
    margin: auto;
  }

  .features__item {
    @media (width > 820px) {
      flex-basis: 45%;
    }

    box-shadow: 0px 2px 2px 2px rgb(0 0 0 / 3%);
    padding: 10px 10px 20px;
    margin: 10px 10px 25px;
    border-radius: 10px;

    .features__tit {
      margin-bottom: 10px;
      text-align: center;
      font-size: 1.8rem;
      font-weight: 500;
    }

    .features__img {}

    .features__txt {
      margin-top: 10px;
    }
  }
}