  @charset "UTF-8";

.details-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 100px 0 0;
  @media only screen and (min-width: 560px) and (max-width: 959px) {
    margin: 92px 0 0;
    flex-direction: column;
    gap: 5px;
  }

  @media only screen and (max-width: 559px) {
    margin: 78px 0 0;
    flex-direction: column;
    gap: 5px;
  }
}

.details {
  position: relative;
  width: calc(100% / 3);
  height: 600px;
  transition: width .5s;

  @media only screen and (max-width: 959px) {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
  }
}

.details-summary {
  position: relative;
  color: #fff;
  font-size: 18px;
  height: 100%;
  width: 100%;
  list-style: none;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;

  @media only screen and (max-width: 959px) {
    display: flex;
    flex-direction: column;
  }

  &::-webkit-details-marker {
    display: none;
  }

  .details-summary__heading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px;
    width: 100%;
    height: auto;
    background-color: transparent;
    z-index: 10;

    @media only screen and (max-width: 959px) {
      padding: 12px 28px;
    }

    @media only screen and (max-width: 559px) {
      top: calc(50% - 31px);
      padding: 12px 16px;
    }
  }

  .details-summary__readmore {
    display: inline-block;
    margin: 0 auto;
    padding: 7px 30px 8px;
    border: none;
    border-radius: 0 0 6px 6px;
    background-color: rgba(255, 255, 255, .86);
    max-width: 100%;
    min-width: auto;
    width: fit-content;
    height: 45px;

    @media only screen and (max-width: 959px) {
      display: none;
    }

    span {
      position: relative;
      display: inline-block;
      color: #008486;
      font-weight: normal;
      line-height: 1.4;
      font-size: 1.4rem;
      vertical-align: middle;
    }
  }

  .HeadingLevel3 {
    padding: 20px 30px;
    background-color: rgba(255, 255, 255, .86);
    font-size: 1.6rem;

    @media only screen and (min-width: 960px) {
      height: 165px;
    }

    @media only screen and (max-width: 559px) {
      padding: 18px 20px 15px;
    }
  }

  .HeadingLevel3__textLead {
    padding-bottom: 4px;
    font-size: 1.8rem;
    line-height: 1.4;
    color: #333;
    border-bottom: 1px solid #008486;

    @media only screen and (min-width: 960px) {
      font-size: clamp(1.5rem, 1.56vw, 1.8rem);
    }
  }

  .HeadingLevel3__body {
    margin: 0;
    padding: 16px 0 0;
    color: #008486;

    @media only screen and (min-width: 960px) {
      font-size: clamp(1.6rem, 1.8vw, 2.8rem);
    }
  }

  /* picture {
    @media only screen and (min-width: 960px) {
      height: 600px;
    }
    @media only screen and (min-width: 560px) and (max-width: 959px) {
      order: 2;
      height: auto;
      aspect-ratio: 768 / 432;
    }
    @media only screen and (max-width: 559px) {
      height: auto;
      min-height: 211px;
      aspect-ratio: 375 / 211;
    }
  } */

  img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;

    @media (hover: hover) {
      &:hover {
        opacity: .8;
      }
    }
  }

  @media only screen and (min-width: 960px) {
    &.-opened {
      .details-summary__heading {
        /* display: none; */
      }
    }
  }
}

.details-content {
  box-sizing: border-box;

  @media only screen and (min-width: 960px) {
    padding: 56px 56px;
    position: absolute;
    top: 0;
    left: 0;
    color: #000;
    background-color: rgba(255, 255, 255, .86);
    z-index: 1;
    width: 100%;
    height: 100%;
  }

  .details-content__inner {
    margin: 0 auto;
    padding: 0 20px;
    width: min(100%, calc(960px + 40px));
    height: 100%;
    overflow-y: auto;

    @media only screen and (max-width: 959px) {
      padding: 32px 28px 60px;
      height: auto;
      animation: fadeOut 1.5s ease;
      animation-fill-mode: forwards;
    }

    @media only screen and (max-width: 559px) {
      padding: 32px 15px 50px;
    }

    @media only screen and (min-width: 1101px) {
      margin: 0 auto;
      padding: 0 20px;
      width: min(100%, calc(960px + 40px));
      height: 100%;
      overflow-y: auto;
    }

    @media only screen and (min-width: 960px) and (max-width: 1100px) {
      margin: 0 auto;
      padding: 0 20px;
      width: min(100%, calc(960px + 40px));
      height: 100%;
      overflow-y: auto;
    }
  }

  .details-content__box {
    margin: 0 auto 0;
    width: min(100%, 960px);

    @media only screen and (min-width: 1101px) {
      margin: 0 auto 0;
      width: min(100%, 960px);
    }

    @media only screen and (min-width: 959px) and (max-width: 1100px) {
      margin: 0 auto 0;
      width: min(100%, 960px);
    }
  }

  .HeadingLevel3 {
    position: relative;
    padding: 0 0 12px;
    border-bottom: 2px solid rgba(37, 154, 156, .4);

    @media only screen and (max-width: 959px) {
      display: none;
    }

    &::after {
      content: "";
      display: inline-block;
      width: 80px;
      height: 2px;
      position: absolute;
      left: 0;
      bottom: -2px;
      background-color: #008486;
    }
  }

  .HeadingLevel3__textLead {
    padding-bottom: 4px;
    font-size: 1.8rem;
    line-height: 1.4;
    color: #333;

    @media only screen and (min-width: 960px) {
      font-size: clamp(1.5rem, .525rem + .6vw, 1.8rem);
    }

    @media only screen and (max-width: 959px) {
      padding-bottom: 4px;
    }

    /* @media only screen and (max-width: 559px) {
      padding-bottom: 6px;
    } */
  }

  .HeadingLevel3__body {
    margin: 0;
    padding: 0;
    color: #008486;
  }

  .HeadingLevel4 {
    position: relative;
    margin-top: 14px;
    padding-left: 12px;

    @media only screen and (max-width: 959px) {
      margin-top: 22px;
    }
    &::after {
      display: none;
    }
  }

  .HeadingLevel4__body {
    position: relative;
    color: #008486;
    &::before {
      content: "";
      display: inline-block;
      width: 4px;
      height: 80%;
      position: absolute;
      top: 50%;
      left: -12px;
      transform: translate(0, -50%);
      background-color: #008486;
    }
  }
}

.details-content__button {
  display: none;

  @media only screen and (max-width: 959px) {
    span {
      color: #008486;

      &::before,
      &::after {
        background-color: #008486;
      }

      &::before {
        transform: rotate(180deg);
      }
    }
  }

  &:hover {
    cursor: pointer;
  }
}

.details-summary__button,
.details-content__button {
  box-sizing: border-box;
  margin: 0;

  @media only screen and (min-width: 960px) {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    max-width: 30px;
    min-width: 30px;
    width: 30px;
    height: 30px;
    border: 2px solid #008486;
    background-color: #fff;
    z-index: 3;

    &::before,
    &::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 1px;
      height: 17px;
      background: #008486;
    }

    &::before {
      transform: translate(-50%, -50%) rotate(45deg);
    }

    &::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }
  }

  @media only screen and (max-width: 959px) {
    order: 2;
    color: #fff;
    border: none;
    border-top: 1px solid #008486;
    border-bottom: 1px solid #008486;
    border-radius: 0;
    max-width: 960px;
    width: 100%;
    height: 70px;
    padding: 20px;
    text-align: center;
    margin: 0;
    background-color: #008486;
  }

  @media only screen and (max-width: 559px) {
    height: 62px;
    padding: 14px 20px;
  }

  &.-pc-close {
    display: none;
  }

  &.-sp-readmore {
    @media only screen and (min-width: 960px) {
      display: none;
    }
  }
}

.details-summary__button__text {
  @media only screen and (min-width: 960px) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
  }

  @media only screen and (max-width: 959px) {
    position: relative;
    display: inline-block;
    padding-left: 36px;
    color: #fff;
    font-weight: normal;
    line-height: 1.5;
    font-size: 1.6rem;
    vertical-align: middle;
  }

  &::before,
  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 20px;
    height: 2px;
    margin-top: -1px;
    background-color: #fff;
    transition: all .3s ease-in-out;

    @media only screen and (max-width: 559px) {
      width: 14px;
      margin-top: -3px;
    }
  }

  &::before {
    transform: rotate(90deg);
  }
}

.details-wrap:has(.details[open]) {
  .details {
    @media only screen and (min-width: 960px) {
      width: 80px;

      .details-summary {
        &::before {
          content: "";
          background-color: rgba(0, 0, 0, .6);
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          display: block;
          z-index: 2;
        }

        .details-summary__heading {
          display: none;
        }
      }
    }
  }

  .details[open] {
    width: 100%;

    .details-summary::before {
      display: none;
    }

    .details-content .HeadingLevel3__main > br {
      display: none;
    }

    .details-summary__heading {
      @media only screen and (max-width: 559px) {
        top: 50%;
      }
    }

    @media only screen and (max-width: 959px) {
      position: relative;
      display: flex;

      .details-content {
        order: 3;
      }

      .details-content__inner {
        animation: fadeIn .5s ease;
        animation-fill-mode: forwards;
      }

      .details-summary__readmore {
        display: none;
      }

      .details-summary__button__text {
        color: #008486;

        &::before,
        &::after {
          background-color: #008486;
        }

        &::before {
          transform: rotate(180deg);
        }
      }
    }

    .details-summary__button {
      &.-pc-close {
        display: block;

        @media only screen and (max-width: 959px) {
          display: none;
        }
      }

      &.-sp-readmore {
        display: none;
      }
    }

    .details-content__button {
      @media only screen and (max-width: 959px) {
        display: block;
        background-color: #fff;
      }

      @media only screen and (max-width: 559px) {
        padding: 20px 20px 14px;
      }
    }
  }
}

.details:nth-of-type(1) .details-summary {
  @media only screen and (min-width: 960px) {
    img {
      object-position: 73% 50%;
    }

    &.-opened {
      /* animation: fade-in 1s;
      animation-fill-mode: forwards; */
      img {
        transition: object-position .1s ease .2s;
        object-position: 100% 50%;
      }
    }
  }
}

.details:nth-of-type(2) .details-summary {
  @media only screen and (min-width: 960px) {
    img {
      object-position: 50% 50%;
    }

    &.-opened {
      /* animation: fade-in 1.5s;
      animation-fill-mode: forwards; */
    }
  }
}

.details:nth-of-type(3) .details-summary {
  img {
    @media screen and (width >= 1500px) {
      object-position: 88% 50%;
    }

    @media screen and (1400px <= width < 1500px) {
      object-position: 87% 50%;
    }

    @media screen and (1200px <= width < 1400px) {
      object-position: 85% 50%;
    }

    @media screen and (960px <= width < 1200px) {
      object-position: 81% 50%;
    }
  }

  @media only screen and (min-width: 960px) {
    &.-opened {
      /* animation: fade-in 1.5s;
      animation-fill-mode: forwards; */
    }
  }
}

@media only screen and (max-width: 959px) {
  .innovation-Section .innovation-Section__inner .-viewPC {
    display: none;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: none;
  }

  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}
