@import url(common.css);

.lower-contents-title {
  text-align: center;
  position: absolute;
  z-index: 3;
  top: -25vh;
  left: 50%;
  transform: translateX(-50%);
}

.activities-contents {
  background-color: rgb(230, 239, 191);
  position: relative;
  margin-top: 25vh;

  &::before {
    content: "";
    position: absolute;
    top: -20vh;
    left: 0;
    right: 0;
    height: 30vh;
    background-image: url(../img/activities/activities_back.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top;
    z-index: -1;
  }

  &::after {
    content: "";
    position: absolute;
    bottom: -20vh;
    z-index: -1;
    left: 0;
    right: 0;
    height: 30vh;
    background-image: url(../img/activities/activities_back.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom;
  }
}

.activities-contents-list {
  li {
    display: flex;
    align-items: top;
    justify-content: center;
    column-gap: 1%;
    margin-bottom: 2vw;
    flex-wrap: wrap;
    position: relative;

    &:nth-child(even) {
      flex-direction: row-reverse;
    }

    .activities-contents-list-text {
      width: 27%;

      .activities-contents-list-img-sp {
        display: none;
      }
      h3 {
        font-size: 1.4vw;
        font-weight: 700;
        letter-spacing: 0.2vw;
        margin-bottom: 2vh;
      }
      p {
        font-size: 0.8vw;
        line-height: 1.8;
        margin-bottom: 2vh;
      }

      /* 元のボタンデザインを維持 */
      a {
        padding: 1vh 3vw;
        color: rgb(114, 113, 113);
        border: 1px solid rgb(114, 113, 113);
        border-radius: 100px;
        background-color: #fff;
        text-decoration: none;
        display: inline-block;
        transition: all 0.3s ease;
        cursor: pointer;
        font-size: 1vw;
      }

      a:hover {
        background-color: rgb(240, 240, 240);
        transform: translateY(-1px);
      }

      /* アコーディオン状態のスタイル */
      a.accordion-trigger.active {
        background-color: rgb(220, 220, 220);
        color: rgb(80, 80, 80);
      }

      a.accordion-trigger::after {
        content: " ▼";
        margin-left: 5px;
        font-size: 0.8em;
      }

      a.accordion-trigger.active::after {
        content: " ▲";
        margin-left: 5px;
        font-size: 0.8em;
      }
    }

    .activities-contents-list-img {
      width: 22%;
      img {
        width: 100%;
      }
    }
  }
}

/* アコーディオンコンテンツ */
.activities-accordion-content {
  order: 3;
  width: 50%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  background-color: rgba(255, 255, 255, 0.95);
  margin-top: 20px;
  opacity: 0;
  visibility: hidden;
}

.activities-accordion-content.active {
  max-height: 800px;
  opacity: 1;
  visibility: visible;
  transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
}

.accordion-inner {
  padding: 3vw;
  color: rgb(99, 106, 108);
}
.accordion-case {
  ul {
    margin-top: 50px;
  }
  img {
    width: 60%;
    margin: 30px auto 0;
    display: block;
  }
}
.accordion-case-link {
  display: flex;
  gap: 3%;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s;
  .accordion-case-content {
    width: 40%;
    h4 {
      font-size: 0.85vw;
    }
    p {
      font-size: 0.85vw;
      letter-spacing: 0.1vw;
      line-height: 1.5;
    }
    img {
      width: 100%;
      margin-bottom: 10px;
      margin-top: 5px;
    }
  }
  .accordion-case-img {
    width: 47%;
    display: flex;
    img {
      width: 48%;
    }
  }
}

a.accordion-case-link:hover {
  opacity: 0.5;
}

.accordion-program {
  margin-bottom: 50px;
  .accordion-program-text {
    width: 100%;
    background-color: rgb(230, 239, 191);
    position: relative;
    display: flex;
    justify-content: center;
    gap: 5%;
    align-items: center;
    padding: 2vw;
    h4 {
      letter-spacing: 0.5vw;
      font-size: 1.45vw;
      font-weight: 700;
      width: 35%;
    }
    p {
      width: 60%;
      font-size: 1.05vw;
      font-weight: 700;
      margin: 0;
      line-height: 1.8;
    }
    img {
      position: absolute;
      top: -20%;
      left: -2%;
      width: 20%;
    }
  }
  .accordion-program-img {
    width: 100%;
    margin-top: 50px;
  }
}

/* lab */
.accordion-lab-top {
  width: 80%;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 30px;
  .lab1 {
    width: 80%;
  }
  .lab2 {
    width: 60%;
    margin: 5vh 0;
  }
  h4 {
    width: 90%;
    font-weight: 500;
    font-size: 1.7vw;
    margin: 0 auto;
    letter-spacing: 0.4vw;
    text-align: center;
    margin-top: 10px;
    border: 2px solid rgb(99, 106, 108);
  }
  p {
    font-size: 1.3vw;
    letter-spacing: 0.2vw;
    text-align: center;
  }
}
.accordion-lab-circle {
  display: flex;
  justify-content: center;
  gap: 5%;
  flex-wrap: wrap;
  margin-bottom: 50px;

  p {
    aspect-ratio: 1 / 1;
    width: 30%;
    border-radius: 50%;
    background-color: rgb(237, 238, 152);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 2vw;
    font-weight: bold;
  }
}

/* okinawa */
.accordion-okinawa-top {
  margin: 0 auto 70px;
  text-align: center;
  .okinawa-top1 {
    width: 60%;
    text-align: center;
  }

  .okinawa-top2 {
    width: 100%;
    margin: 50px 0;
  }

  p {
    font-size: 1.1vw;
    line-height: 2;
  }
}
.accordion-okinawa-first {
  text-align: center;
  margin: 5vw 0;

  .accordion-okinawa-img7 {
    width: 95%;
    margin: 3vw auto;
    img {
      width: 100%;
    }
  }
  .accordion-okinawa-first-sub-title {
    text-align: center;
    font-size: 1.3vw;
  }
  h3 {
    font-size: 2vw;
    letter-spacing: 0.2vw;
    line-height: 2;
    margin: 3vh 0;
  }
  .accordion-okinawa-first-text {
    text-align: center;
    font-size: 0.9vw;
    line-height: 2;
  }
}

.accordion-okinawa-second {
  img {
    width: 100%;
  }
  p {
    text-align: center;
    font-size: 0.9vw;
    line-height: 2;
    margin-top: 3vw;
  }
}

/* study */
.accordion-study-top {
  margin-bottom: 2vw;
  p {
    margin-bottom: 2vw;
    font-size: 1vw;
    letter-spacing: 0.2vw;
  }
  h3 {
    font-weight: 500;
    font-size: 1.85vw;
    letter-spacing: 0.2vw;
  }
}

.accordion-study-concept {
  margin-bottom: 3vh;
  .accordion-study-concept-top {
    display: flex;
    gap: 1%;
    margin-bottom: 1vh;
    justify-content: flex-start;
    align-items: center;
    img {
      width: 5vw;
    }
    h4 {
      font-size: 1.5vw;
      font-weight: 500;
    }
  }
  p {
    font-size: 0.95vw;
    margin-left: 5%;
    line-height: 1.6;
  }
}

.accordion-study-active {
  margin-bottom: 3vh;
  .accordion-study-active-top {
    display: flex;
    gap: 1%;
    margin-bottom: 1vh;
    justify-content: flex-start;
    align-items: center;
    img {
      width: 5vw;
    }
    h4 {
      font-size: 1.5vw;
      font-weight: 500;
    }
  }
  .accordion-study-active-list {
    li {
      display: flex;
      align-items: flex-start;
      flex-wrap: nowrap;
      justify-content: center;
      gap: 20px;
      .accordion-study-active-list-num {
        width: 2.2vw;
        height: 2.2vw;
        background-color: rgb(114, 113, 113);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 1.2vw;
        line-height: 1;
        flex-shrink: 0;
        .label {
          margin: 0;
          padding: 0;
          line-height: 1;
          display: block;
          text-align: center;
        }
      }

      .accordion-study-active-list-content {
        h4 {
          font-size: 1.4vw;
          margin-bottom: 20px;
        }
        a {
          transition: opacity 0.5s;
          &:hover {
            opacity: 0.7;
          }
        }
        p {
          font-size: 0.95vw;
          line-height: 1.6;
        }
        img {
          width: 100%;
          margin-bottom: 20px;
        }
      }
    }

    .accordion-reverse {
      flex-direction: row !important;
    }
  }
}

.accordion-study-active-box {
  margin-top: 30px;

  .accordion-study-active-box-left {
    padding: 3%;
    flex: 1;
    margin: 0 auto;
    border: 1px solid black;

    .accordion-study-active-box-left-content {
      display: flex;
      gap: 3%;
      align-items: center;
      justify-content: center;

      .accordion-study-active-box-left-content-img {
        flex: 1;
        img {
          width: 100%;
        }
      }

      .accordion-study-active-box-left-content-text {
        flex: 1.2;
      }
      h5 {
        font-size: 1.8vw;
        font-weight: 700;
        span {
          font-size: 1vw;
        }
      }
      p {
        font-size: 1.2vw;
        letter-spacing: -0.05vw;
      }
    }
  }

  .accordion-study-active-box-title {
    font-size: 1.4vw !important;
    font-weight: 700;
    margin-bottom: 20px;
  }

  .accordion-study-active-box-text {
    font-size: 1.2vw;
  }
  .accordion-study-active-box-text-kome {
    font-size: 0.7vw !important;
  }
}

@media (width < 768px) {
  .activities-contents-list {
    padding: 0 5%;
    li {
      column-gap: 1vw;
      margin-bottom: 1vw;

      &:nth-child(even) {
        flex-direction: column;
      }

      .activities-contents-list-text {
        width: 100%;
        .activities-contents-list-img-sp {
          display: block;
          width: 100%;
          margin: 10px 0;
          img {
            width: 100%;
          }
        }
        h3 {
          font-size: 6vw;
          font-weight: 700;
          margin-bottom: 1vh;
        }
        p {
          font-size: 2.7vw;
          margin-bottom: 1vh;
        }

        /* 元のボタンデザインを維持 */
        a {
          text-align: center;
          margin: 0 auto;
          display: block;
          width: 70%;
          font-size: clamp(12px, 2vw, 20px);
        }
      }

      .activities-contents-list-img {
        display: none;
        width: 100%;
        margin: 10px auto 0;
        img {
          width: 100%;
        }
      }
    }
  }

  /* アコーディオンコンテンツ */
  .activities-accordion-content {
    width: 100%;
  }

  .accordion-case-link {
    flex-direction: column;
    margin-bottom: 20px;
    .accordion-case-content {
      width: 100%;
      h4 {
        font-size: 4vw;
      }
      p {
        font-size: clamp(14px, 2vw, 24px);
      }
      img {
        width: 100%;
        margin: 0;
      }
    }
    .accordion-case-img {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      img {
        width: 100%;
      }
    }

    &:hover {
      opacity: 0.5;
    }
  }

  .accordion-case {
    img {
      width: 90%;
    }
  }

  .accordion-program {
    margin-bottom: 50px;
    .accordion-program-text {
      width: 100%;
      background-color: rgb(230, 239, 191);
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: left;
      gap: 5%;
      align-items: center;
      padding: 2vw;
      h4 {
        font-size: 5vw;
        width: 90%;
      }
      p {
        width: 90%;
        font-size: 3.2vw;
      }
      img {
        position: absolute;
        top: -45%;
        left: -2%;
        width: 40%;
      }
    }
    .accordion-program-img {
      width: 100%;
      margin-top: 50px;
    }
  }

  /* lab */
  .accordion-lab-top {
    width: 90%;
    margin: 0 auto;
    margin-bottom: 10px;
    .lab1 {
      width: 90%;
    }
    .lab2 {
      width: 90%;
      margin: 2vh 0;
    }
    h4 {
      width: 90%;
      font-weight: 500;
      font-size: 3.8vw;
    }
    p {
      font-size: 4vw;
      letter-spacing: 0.2vw;
      text-align: center;
    }
  }
  .accordion-lab-circle {
    display: flex;
    justify-content: center;
    gap: 5%;
    flex-wrap: wrap;
    margin-bottom: 50px;

    p {
      aspect-ratio: 1 / 1;
      width: 25%;
      border-radius: 50%;
      background-color: rgb(237, 238, 152);
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: 3vw;
      font-weight: bold;
    }
  }

  /* okinawa */
  .accordion-okinawa-top {
    margin: 0 auto 10px;
    text-align: center;
    .okinawa-top1 {
      width: 60%;
      text-align: center;
    }

    .okinawa-top2 {
      width: 100%;
      margin: 20px 0;
    }

    p {
      font-size: 3vw;
      line-height: 1.4;
      margin-bottom: 10vw;
    }
  }
  .accordion-okinawa-first {
    text-align: center;
    margin: 5vw 0;
    .accordion-okinawa-first-sub-title {
      text-align: center;
      font-size: 2.3vw;
    }
    h3 {
      font-size: 4vw;
      line-height: 1.4;
      margin: 3vh 0;
    }
    .accordion-okinawa-first-text {
      text-align: center;
      font-size: 3vw;
      letter-spacing: 0.2vw;
      line-height: 1.4;
    }
  }

  .accordion-okinawa-second {
    p {
      text-align: center;
      font-size: 3vw;
      letter-spacing: normal;
      line-height: 1.4;
      margin-top: 2vw;
    }
    img {
      width: 100%;
    }
  }

  /* study */
  .accordion-study-top {
    margin-bottom: 2vw;
    p {
      margin-bottom: 2vw;
      font-size: 3vw;
      letter-spacing: 0.2vw;
    }
    h3 {
      font-weight: 500;
      font-size: 4vw;
      letter-spacing: 0.2vw;
    }
  }

  .accordion-study-concept {
    margin-bottom: 1vh;
    .accordion-study-concept-top {
      display: flex;
      gap: 1%;
      margin-bottom: 1vh;
      justify-content: flex-start;
      align-items: center;
      img {
        width: 10vw;
      }
      h4 {
        font-size: 4vw;
        font-weight: 500;
      }
    }
    p {
      font-size: 2.8vw;
      margin-left: 0;
    }
  }

  .accordion-study-active {
    margin-bottom: 3vh;
    .accordion-study-active-top {
      display: flex;
      gap: 1%;
      margin-bottom: 1vh;
      justify-content: flex-start;
      align-items: center;
      img {
        width: 10vw;
      }
      h4 {
        font-size: 4vw;
        font-weight: 500;
      }
    }
    .accordion-study-active-list {
      li {
        display: flex;
        align-items: flex-start;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;
        .accordion-study-active-list-num {
          width: 20px;
          height: 20px;
          background-color: black;
          color: white;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          font-size: 12px;
          box-sizing: border-box;
          .label {
            margin: 0;
            padding: 0;
            line-height: 1;
          }
        }

        .accordion-study-active-list-content {
          img {
            width: 100%;
          }
          h4 {
            font-size: 4vw;
            margin-bottom: 20px;
          }
          p {
            font-size: 2.8vw;
          }
        }
      }
    }
  }

  .accordion-study-active-box {
    flex-direction: column;
    margin-top: 20px;

    .accordion-study-active-box-left {
      margin-bottom: 20px;
      width: 90%;
      .accordion-study-active-box-left-content {
        flex-direction: column;
        h5 {
          font-size: 5vw;
          span {
            font-size: 3vw;
          }
        }
      }
      .accordion-study-active-box-title {
        font-size: 4vw !important;
        margin-bottom: 20px;
      }

      .accordion-study-active-box-text {
        font-size: 1.2vw;
      }
      .accordion-study-active-box-text-kome {
        font-size: 2vw !important;
      }
    }
  }
}
