/*========================================================
works
=========================================================*/

.works-wrapper .container {
  max-width: 1170px;
}
.works-list {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(345px, 1fr));
}
.works-list__item {
  display: flex;
  align-items: center;
  justify-content: center;
}
.works-list__item-image {
  max-width: 350px;
  max-height: 238px;
  width: 100%;
  height: auto;
  aspect-ratio: 350 / 238;
  margin-bottom: 15px;
}
.works-list__item-name {
  display: block;
  color: var(--text-black-light);
  font-weight: 300;
  font-size: 1.6rem;
  line-height: 2.88rem;
  letter-spacing: 0.1em;
  text-align: center;
}
.works-list__item:hover .works-list__item-name {
  text-decoration: underline;
}
.contact-text {
  padding-bottom: 22px;
}

@media screen and (max-width: 767px) {
  .works-wrapper .container {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .works-list__item-image {
    aspect-ratio: 345 / 234.6;
    margin-bottom: 12px;
  }
  .works-list {
    gap: 36px;
  }
}
/*========================================================
TOP works
=========================================================*/
.works .container {
  max-width: 1360px;
  min-height: 660px;
  position: relative;
  display: flex;
  gap: 72px;
  justify-content: flex-end;
  flex-direction: row-reverse;
  margin-top: 60px;
  padding-top: 60px;
}
.works .container::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  max-width: 780px;
  max-height: 660px;
  width: 100%;
  height: 100%;
  background-color: var(--bg-gray);
  margin-right: 30px;
}
/*テキスト部分*/
.works .section-title-wrapper {
  text-align: center;
  max-width: 430px;
  width: 40%;
  z-index: 99;
  padding-top: 16px;
  margin: auto 0;
}
.works-subtitle {
  display: block;
  padding-bottom: 30px;
}
.works-text {
  color: var(--text-black-light);
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 2.7rem;
  letter-spacing: 0.05em;
  padding-bottom: 25px;
}
.btn-works {
  margin-top: 6px;
}
/*スライドショー部分*/
.works-slide {
  position: relative;
  max-width: 750px;
  min-height: 510px;
  width: 100%;
  height: 100%;
}
.works-slide-list {
  position: relative;
  max-width: 750px;
  min-height: 510px;
  width: 100%;
  height: fit-content;
  overflow: hidden;
}
.works-slide-list__item {
  position: absolute;
  opacity: 0;
  transition: all 1.2s;
}
.works-slide-list__item.active {
  opacity: 1;
}
.works-slide-list__item-image {
  max-width: 750px;
  width: 100%;
  height: auto;
  aspect-ratio: 750 / 510;
}
/*スライドショーの前後遷移ボタン*/
.works-nav {
  position: absolute;
  top: 50%;
  left: 17px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  width: 95%;
}
.works-nav button {
  position: relative;
  border-radius: 3px;
  transform: rotate(45deg);
  cursor: pointer;
  width: 16px;
  height: 16px;
}
.works-nav-prev {
  border-bottom: 6px solid var(--theme-color);
  border-left: 6px solid var(--theme-color);
}
.works-nav-next {
  border-top: 6px solid var(--theme-color);
  border-right: 6px solid var(--theme-color);
}
/*スライドショーのインジケータードット*/
.works-indicator {
  position: absolute;
  right: 3px;
  bottom: -19px;
  display: flex;
  gap: 8px;
}
.works-indicator__dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--slide-dot-gray);
}
.works-indicator__dot.active {
  background-color: var(--theme-color);
}
@media screen and (max-width: 1165px) {
  .works-slide {
    min-height: 460px;
  }
  .works-slide-list {
    min-height: 460px;
  }
}
@media screen and (max-width: 1023px) {
  .works .container {
    flex-direction: column-reverse;
    align-items: center;
    gap: 0;
  }
  .works-bg {
    top: 30%;
    right: 50%;
    transform: translateX(50%);
    max-width: none;
    width: 94%;
    margin-right: 0;
  }
  .works .section-title-wrapper {
    padding-top: 52px;
    width: 100%;
  }
}
@media screen and (max-width: 767px) {
  .works .container {
    min-height: auto;
    padding-top: 0;
    margin-top: 75px;
  }
  .works-bg {
    top: 152px;
    margin-right: 0;
    max-height: 401px;
  }
  .works .section-title-wrapper {
    margin-top: -1px;
    margin-bottom: 0;
    padding-top: 0;
  }
  .works-subtitle {
    padding-bottom: 27px;
  }
  .works-text {
    font-size: 1.4rem;
    line-height: 2.52rem;
    padding-bottom: 26px;
  }
  .works-slide {
    max-width: 335px;
    min-height: 273.5px;
    margin: 0 auto;
  }
  .works-slide-list {
    max-width: 335px;
    min-height: 273.05px;
  }
  .works-slide-list__item-image {
    max-width: 335px;
    aspect-ratio: 335 / 227.8;
    object-fit: contain;
    object-position: 0 -6px;
  }
  .works-nav {
    top: 40%;
    left: 8px;
  }
  .works-indicator {
    bottom: 32px;
  }
}
