﻿/* ============================================
    全体
============================================ */

.l-page {
  padding-bottom: 150px;
}

.breadcrumb {
  padding-bottom: 70px;
}

/* ============================================
    MV
============================================ */

.mv {
  background: url("../images/property/mv_sp02.jpg") center / cover no-repeat;
}

/* ============================================
   物件情報（PROPERTY）
============================================ */

.section_content--works {
  padding-bottom: 70px;
}

/* --- アイテム --- */

.works_detail {
  display: block;
  text-decoration: none;
  color: var(--text-color);
  border-bottom: 1px solid #cdcdcd;
  padding-bottom: 7px;
}

.works_photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.works_photo::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  transition: background 0.5s ease;
  z-index: 1;
}

.works_photo img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.works_category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #cdcdcd;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-color);
  line-height: 1;
  white-space: nowrap;
  margin-bottom: 5px;
  width: fit-content;
}

.works_spec {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.works_spec_row {
  display: flex;
  flex-wrap: wrap;
}

.works_spec_row dt,
.works_spec_row dd {
  font-size: 14px;
  font-weight: 400;
  line-height: calc(26 / 14);
  color: var(--text-color);
}

/* --- リスト --- */

.lower-layer--works .works_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 15px;
  margin-bottom: 0;
}

/* ============================================
    PC
============================================ */

@media (min-width: 768px) {
  /* --- MV・パンくず --- */

  .mv {
    background: url("../images/property/mv02.jpg") center / cover no-repeat;
  }

  .breadcrumb {
    padding-bottom: 120px;
  }

  /* --- セクション --- */

  .section_content--works {
    padding-inline: 20px;
  }

  .section_content--works .content_box {
    max-width: 890px;
    margin: 0 auto;
  }

  /* --- アイテム --- */

  .works_photo {
    margin-bottom: 15px;
  }

  .works_spec {
    gap: 2px;
  }

  .works_spec_row {
    align-items: baseline;
  }

  .works_spec_row dt,
  .works_spec_row dd {
    display: block;
    flex-shrink: 0;
  }

  /* --- リスト --- */

  .lower-layer--works .works_list {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  /* --- ホバー --- */

  .works_detail:hover .works_photo img {
    transform: scale(1.1);
  }

  .works_detail:hover .works_photo::after {
    background: rgba(0, 0, 0, 0.3);
  }
}

/* ============================================
   施工事例の詳細（WORKS-detail）
============================================ */

/* --- 全体 --- */

.l-page.lower-layer--works-detail {
  padding-top: 60px;
}

.lower-layer--works-detail .breadcrumb {
  padding-bottom: 55px;
}

/* --- ヘッダー --- */

.works-detail_article {
  margin-bottom: 70px;
}

.works-detail_header {
  text-align: center;
  margin-bottom: 15px;
}

.works-detail_title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color);
  line-height: calc(28 / 18);
}

/* --- スライダー --- */

.works-slider {
  margin-bottom: 25px;
}

.works-slider_main {
  position: relative;
  margin-bottom: 15px;
}

.works-slider_viewport {
  overflow: hidden;
}

.works-slider_track {
  position: relative;
  aspect-ratio: 335 / 220;
}

.works-slider_slide {
  position: relative;
  inset: 0;
  /* opacity: 0; */
  transition: opacity 0.5s ease;
  aspect-ratio: 335/220;
  overflow: hidden;
}

.works-slider_slide img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  max-width: 100%;
  object-fit: cover;
  transform: translateY(-50%) translateX(-50%);
}

.works-slider_slide.is-active {
  opacity: 1;
  z-index: 1;
}

.works-slider_slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.works-slider_arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  /* background: var(--accent-color); */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
}

.works-slider_arrow img {
  width: 10px;
  height: auto;
  /* filter: brightness(0) saturate(100%) invert(15%) sepia(95%) saturate(1200%) hue-rotate(336deg) brightness(90%); */
}

.works-slider_prev {
  left: 10px;
}

.works-slider_next {
  right: 10px;
}

.works-slider_next img {
  transform: rotate(180deg);
}

.works-slider_thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  width: 90%;
  margin-left: 5%;
}

.works-slider_thumbs::-webkit-scrollbar {
  display: none;
}

.works-slider_thumb {
  flex: 0 0 clamp(3.125rem, 0.136rem + 12.76vw, 6.25rem);
  height: clamp(3.125rem, 0.136rem + 12.76vw, 6.25rem);
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: none;
  opacity: 0.5;
  transition:
    border-color 0.3s ease,
    opacity 0.3s ease;
}

.works-slider_thumb.is-active {
  opacity: 1;
}

.works-slider_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 本文 --- */

.works-detail_body {
  margin-bottom: 25px;
}

.works-detail_text {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-color);
  line-height: calc(28 / 16);
}

.works-detail_body p {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-color);
  line-height: calc(28 / 16);
}

.works-detail_text+.works-detail_text {
  margin-top: 20px;
}

.works-detail_body p+p {
  margin-top: 20px;
}

/* --- 基本情報 --- */

.works-detail_info {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
}

.works-detail_info-heading {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-color);
  line-height: calc(28 / 18);
  margin-bottom: 15px;
}

.works-detail_info-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.works-detail_info-body .works_category {
  padding: 2px 20px;
  font-size: 16px;
  font-weight: bold;
  line-height: calc(28 / 16);
}

.works-detail_spec {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-top: 1px solid #cdcdcd;
  padding-top: 15px;
}

.works-detail_spec-row {
  display: flex;
  align-items: baseline;
  gap: 30px;
}

.works-detail_spec-row dt,
.works-detail_spec-row dd {
  font-size: 16px;
  color: var(--text-color);
  line-height: calc(28 / 16);
}

.works-detail_spec-row dt {
  font-weight: bold;
  flex-shrink: 0;
  min-width: 110px;
}

.post-nav_next {
  margin-left: auto;
  margin-right: 0;
}

/* ============================================
    PC（WORKS-detail）
============================================ */

@media (min-width: 768px) {
  .works-slider_slide {
    aspect-ratio: 768/432;
  }

  .l-page.lower-layer--works-detail {
    padding-top: 150px;
  }

  .lower-layer--works-detail .breadcrumb {
    padding-bottom: 80px;
  }

  /* --- ヘッダー --- */

  .works-detail_header {
    margin-bottom: 25px;
  }

  .works-detail_title {
    font-size: 20px;
    line-height: calc(30 / 20);
  }

  /* --- スライダー --- */

  .works-detail_article {
    max-width: 808px;
    margin: 0 auto 55px;
    padding-inline: 20px;
  }

  .works-slider {
    margin-bottom: 50px;
  }

  .works-slider_arrow {
    width: 30px;
    height: 30px;
  }

  .works-slider_track {
    aspect-ratio: 768 / 432;
  }

  .works-slider_main {
    margin-bottom: 25px;
  }

  .works-slider_arrow img {
    width: 12px;
  }

  .works-slider_prev {
    left: max(-60px, calc((768px - 100vw) / 2 + 10px));
  }

  .works-slider_next {
    right: max(-60px, calc((768px - 100vw) / 2 + 10px));
  }

  .works-slider_thumbs {
    gap: 15px;
    overflow-x: visible;
    flex-wrap: wrap;
    width: auto;
    margin-right: 0;
    margin-left: 0;
  }

  .works-slider_thumb {
    /* flex: 1 1 0; */
    height: auto;
    aspect-ratio: 1 / 1;
    flex-basis: calc((100% - (15px * 6)) / 7);
  }

  /* --- 本文 --- */

  .works-detail_body {
    margin-bottom: 55px;
  }

  /* --- 基本情報 --- */

  .works-detail_info {
    padding: 30px 40px;
  }

  .works-detail_info-heading {
    font-size: 20px;
  }
}

.works-slider_slide img {
  width: 100%;
  height: auto;
  transition: opacity 0.4s ease;
  /* フェードの速度 */
  opacity: 1;
}

/* フェード中のクラス */
.works-slider_slide img.is-fading {
  opacity: 0;
}

@media (max-width: 768px) {
  .works-slider_arrow {
    bottom: -60px;
    top: inherit;
  }

  .works-slider_prev {
    left: -11px;
  }

  .works-slider_next {
    right: -11px;
  }
}