@import "./common.css";
@import "./header.css";
@import "./footer.css";
@import "./carousel.css";

body {
  background: linear-gradient(white 912px, var(--main-color) 912px);
}

.btn_wrapper {
  display: flex;
  justify-content: center;
  margin: 60px auto 0;
  font-weight: var(--font-weight-normal);
}

.works,
.news {
  margin-bottom: 48px;
}
.works {
  .items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  .item {
    width: 23%;
    height: auto;
    overflow: hidden;

    img {
      width: 100%;
      transition: transform 0.2s ease;
    }

    &:hover img {
      transform: scale(1.1);
    }
  }
}

.news {
  margin-bottom: 96px;
  font-weight: var(--font-weight-bold);
  .item {
    padding: 1rem 0.8rem 1rem 0;
    border-bottom: 2px dotted var(--sub-color);
    &:last-child {
      border-bottom: none;
    }
    a {
      display: flex;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: center;
      &:hover .category {
        background-color: var(--sub-bg-color);
        color: var(--main-color);
      }
    }
  }
  .info {
    display: flex;
    justify-content: space-between;
    width: auto;
    margin-right: 2rem;
  }
  .update {
    font-family: "Noto Sans JP", serif;
    font-weight: var(--font-weight-date);
    margin-right: 1rem;
  }
  .category {
    font-family: "Noto Sans JP", serif;
    display: inline-block;
    min-width: 5rem;
    padding: 5px 0;
    border: 1px solid var(--sub-color);
    text-align: center;
    font-size: var(--font-size-cat);
    font-weight: var(--font-weight-middle);
  }
  .text_body {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .title {
    margin-right: 1rem;
  }

  .btn_circle {
    width: 16px;
    min-width: 16px;
    height: 16px;
    background-color: var(--main-color);
    color: var(--sub-color);
    border: 1px solid var(--sub-color);
    line-height: 16px;

    &::before {
      content: ">";
    }
  }
}
.about {
  width: 100%;
  padding: 104px 0 96px;
  margin-bottom: 0;
  background-color: var(--sub-bg-color);

  .wrapper {
    width: 100%;
    padding: 0 40px;
    margin: 0 auto;
  }

  .inner {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
  }
  .komechan {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 34%;
    height: auto;
    font-size: var(--font-size-xs);
    text-align: center;
  }
  .description {
    width: 88%;
    margin-bottom: 48px;
    font-size: 1.1rem;
    font-weight: 500;
  }
  .contact {
    width: 88%;
    padding: 6% 5%;
    border: 1px solid var(--sub-color);
    border-radius: 10px;

    .dlist {
      margin-bottom: 1rem;
      .dl {
        display: flex;
        align-items: center;
        font-size: var(--font-size-small);
        font-weight: var(--font-weight-middle);
        margin-bottom: 0.8rem;

        .dt {
          flex-basis: 15%;
          padding-right: 1rem;
          line-height: 1rem;
        }

        .dd {
          flex-basis: 85%;
          line-height: 1rem;
          &.address {
            font-size: var(--font-size-cat);
          }
        }
      }
    }
  }
  .mail {
    margin-bottom: 1rem;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-bold);
  }
  .notion {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.2px;
    a {
      padding-bottom: 2px;
      border-bottom: 1px solid var(--sub-color);
    }
  }
}

@media (max-width: 780px) {
  body {
    background: linear-gradient(white 1222px, var(--main-color) 1222px);
  }
  .btn {
    &.btn_normal {
      width: 280px;
      height: 64px;
      font-size: 1.2rem;
      line-height: 48px;
      text-align: center;
    }
  }
  .carousel {
    width: 100%;
    height: 1157px;
  }
  .c-carousel__main-item img {
    width: 100%;
    height: auto;
  }
  .c-carousel__btns-control {
    display: none;
  }
  .c-carousel__pager {
    bottom: -2rem;
    .c-carousel__pager-control {
      justify-content: center;
      .btn_pager {
        width: 18px;
        height: 18px;
      }
    }
  }
  .works {
    margin-bottom: 130px;
    .items {
      justify-content: space-between;
    }
    .item {
      width: 48%;
    }
  }
  .news {
    .item {
      padding: 1.4rem 0;
      a {
        flex-direction: column;
      }
      &:last-child {
        border-bottom: none;
      }
    }
    .info {
      justify-content: flex-start;
      width: 100%;
      margin-right: 0;
      margin-bottom: 0.8rem;
    }
    .category {
      font-size: var(--font-size-small);
    }
  }
  .about {
    .wrapper {
      width: 100%;
    }
    .h2 {
      margin-bottom: 6rem;
    }
    .inner {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 100%;
    }
    .komechan {
      p {
        margin: 2rem 0;
      }
    }
    .description {
      width: 100%;
      font-size: var(--font-size-large);
    }
    .contact {
      width: 100%;
      padding: 6%;
      margin: 0 auto;
      dl {
        display: flex;
        flex-wrap: wrap; /* 必要に応じて折り返し */
        gap: 0.7rem; /* 間隔 */
        width: 100%;
        font-size: var(--font-size-large);
      }
      dt {
        max-width: 100px;
        margin-bottom: 0;
        font-weight: var(--font-weight-middle);
      }
      dd {
        max-width: 420px;
        margin: 0; /* デフォルトの余白を削除 */
        line-height: var(--font-size-xl);
      }
      .notion {
        font-size: var(--font-size-normal);
      }
    }
  }
}
@media screen and (max-width: 480px) {
  body {
    background: linear-gradient(white 680px, var(--main-color) 680px);
  }
  .btn_wrapper {
    .btn_normal {
      width: 50%;
      height: 42px;
      font-size: 1.2rem;
      line-height: 42px;
      text-align: center;
    }
  }
  .section {
    .wrapper {
      padding: 0 20px;
    }
  }
  .section.carousel {
    height: 580px;
  }
  .works {
    margin-bottom: 80px;
    .item {
      width: 47%;
    }
  }
  .news {
    .item {
      padding: 1.4rem 0;
      a {
        flex-direction: column;
      }
      &:last-child {
        border-bottom: none;
      }
    }
    .info {
      justify-content: flex-start;
      align-items: center;
      width: 100%;
      margin-right: 0;
      margin-bottom: 0.8rem;
    }
    .category {
      padding: 2px 0;
      font-size: var(--font-size-small);
    }
  }
  .about {
    & .komechan {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;

      img {
        width: 34%;
        height: auto;
      }
      p {
        font-size: var(--font-size-normal);
      }
    }
    .contact {
      .description {
        font-size: var(--font-size-large);
      }
      .dlist {
        .dl {
          font-size: var(--font-size-large);
          &.address {
            .dd {
              line-height: var(--font-size-xl);
              font-size: var(--font-size-large);
            }
          }
        }
      }
    }
  }
}
