/* ==========================================
   project-detail.css
   実績・製品紹介 詳細ページ固有スタイル
   ========================================== */

body {
  padding-top: 80px;
}

@media (max-width: 560px) {
  body {
    padding-top: 64px;
  }
}

/* ──────────────────────────────────────
   詳細KV（キービジュアル）
────────────────────────────────────── */
.detail-kv {
  position: relative;
  height: 650px;
  overflow: hidden;
}

.detail-kv__bg {
  position: absolute;
  inset: 0;
}

/* 左側の白グラデーションオーバーレイ（背景画像自体は加工しない）
   Figma「Rectangle 533」：左はほぼ白（〜25%）→ 中央付近から徐々に透明 → 右25%は写真そのまま */
.detail-kv::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.98) 25%,
    rgba(255, 255, 255, 0.9) 38%,
    rgba(255, 255, 255, 0.55) 52%,
    rgba(255, 255, 255, 0) 75%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.detail-kv__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* パンくずリスト */
.detail-kv__breadcrumb {
  position: absolute;
  top: 45px;
  left: 40px;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
}

.detail-kv__breadcrumb-item {
  display: flex;
  align-items: center;
}

.detail-kv__breadcrumb-sep {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 8px;
}

.detail-kv__breadcrumb-link,
.detail-kv__breadcrumb-current {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #7a8192;
  text-decoration: none;
  letter-spacing: 0.36px;
  line-height: 1.5;
  white-space: nowrap;
}

.detail-kv__breadcrumb-current {
  color: #1d2e45;
}

.detail-kv__breadcrumb-link:hover {
  text-decoration: underline;
}

/* カテゴリーバッジ */
.detail-kv__category {
  position: absolute;
  top: 132px;
  left: 83px;
  z-index: 2;
  background-color: #07344d;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.6px;
  line-height: 1.5;
  padding: 2px 12px;
}

/* メインタイトル */
.detail-kv__title {
  position: absolute;
  top: 182px;
  left: 83px;
  z-index: 2;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 48px;
  font-weight: 600;
  color: #1d2e45;
  letter-spacing: 1.44px;
  line-height: 1.5;
  margin: 0;
}

.detail-kv__title-break--sp {
  display: none;
}

.detail-kv__title-break--pc {
  display: inline;
}

/* サブタイトル */
.detail-kv__subtitle {
  position: absolute;
  top: 348px;
  left: 83px;
  z-index: 2;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #1d2e45;
  letter-spacing: 0.66px;
  line-height: 1.6;
  margin: 0;
}

.detail-kv__subtitle-break--sp {
  display: none;
}

.detail-kv__subtitle-break--pc {
  display: inline;
}

/* ──────────────────────────────────────
   白背景本文エリア
────────────────────────────────────── */
.detail-body {
  background-color: #fff;
  padding-bottom: 80px;
  max-width: 1245px;
  margin: -140px auto 0;
  position: relative;
  z-index: 2;
}

.detail-product {
  margin: 0 auto;
  padding-top: 45px;
  width: 1245px;
  background-color: #fff;
}

/* 上段：製品画像 ＋ スペックボックス */
.detail-product__top {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  justify-content: center;
}

/* 製品メイン画像 */
.detail-product__img-area {
  flex: 0 0 auto;
  min-width: 0;
}

.detail-product__img-wrap {
  width: 570px;
  height: 478px;
  overflow: hidden;
  cursor: pointer;
}

.detail-product__img {
  display: block;
  width: 570px;
  height: 478px;
  object-fit: cover;
}

.detail-product__img-caption {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1d2e45;
  letter-spacing: 0.54px;
  line-height: 1.6;
  margin-top: 8px;
  text-align: center;
}

/* ──────────────────────────────────────
   スペックボックス
────────────────────────────────────── */
.detail-spec {
  width: 540px;
  flex-shrink: 0;
  border: 2px solid #edeeee;
  padding: 40px 40px 40px 38px;
}

.detail-spec__row {
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed #edeeee;
}

.detail-spec__row:first-child {
  padding-top: 0;
}

.detail-spec__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-spec__label-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
}

.detail-spec__icon {
  flex-shrink: 0;
}

.detail-spec__label {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1d2e45;
  letter-spacing: 0.66px;
  line-height: 1.6;
}

.detail-spec__value {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0e212f;
  letter-spacing: 0.54px;
  line-height: 1.6;
  margin: 0;
  padding-left: 43px; /* icon幅32px + gap11px */
}

/* ──────────────────────────────────────
   製品セクション（製品概要・特長）
────────────────────────────────────── */
.detail-section {
  margin-top: 60px;
  padding: 0 89px 0 86px;
}

.detail-section__heading-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.detail-section__icon {
  flex-shrink: 0;
}

.detail-section__heading {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1d2e45;
  letter-spacing: 0.66px;
  line-height: 1.6;
  margin: 0;
}

.detail-section__body {
  padding-left: 46px; /* icon + gap */
}

.detail-section__body p {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0e212f;
  letter-spacing: 0.54px;
  line-height: 1.6;
  margin: 0 0 0.5em;
}

.detail-section__body p:last-child {
  margin-bottom: 0;
}

/* ──────────────────────────────────────
   主な特徴・導入メリット（グレー背景）
────────────────────────────────────── */
.detail-features {
  background-color: #f1f3f4;
  padding: 50px 0 80px;
}

.detail-features__inner {
  max-width: 1070px;
  margin: 0 auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 120px;
}

.detail-features__heading {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #456592;
  letter-spacing: 0.84px;
  line-height: 1.8;
  margin: 0 0 36px;
}

.detail-features__divider {
  height: 2px;
  background-color: #456592;
  margin-bottom: 28px;
}

.detail-features__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.detail-feature {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.detail-feature__number {
  font-family: "Roboto", sans-serif;
  font-size: 25px;
  font-style: normal;
  font-weight: 600;
  color: #456592;
  line-height: 160%; /* 40px */
  flex-shrink: 0;
  width: 42px;
}

.detail-feature__content {
  flex: 1;
}

.detail-feature__title {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #1d2e45;
  letter-spacing: 0.66px;
  line-height: 1.8;
  margin: 0 0 4px;
}

.detail-feature__body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0e212f;
  letter-spacing: 0.48px;
  line-height: 1.6;
  margin: 0;
  width: 428px;
}

/* ──────────────────────────────────────
   関連製品
────────────────────────────────────── */
.detail-related {
  background-color: #fff;
  padding: 60px 0 80px;
}

.detail-related__heading {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #456592;
  letter-spacing: 0.84px;
  line-height: 1.8;
  max-width: 1073px;
  margin: 0 auto 30px;
}

.detail-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 331px);
  column-gap: 40px;
  justify-content: center;
}

.detail-related__stage {
  display: none;
}

/* ──────────────────────────────────────
   ライトボックス（画像モーダル）
────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  display: block;
  max-width: calc(90vw / var(--z));
  max-height: calc(90vh / var(--z));
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox__close::before,
.lightbox__close::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 2px;
  background-color: #fff;
}

.lightbox__close::before {
  transform: rotate(45deg);
}

.lightbox__close::after {
  transform: rotate(-45deg);
}

/* ──────────────────────────────────────
   詳細KV（スマホ）
────────────────────────────────────── */
@media (max-width: 560px) {
  .detail-kv {
    height: auto;
  }

  .detail-kv::after {
    display: none;
  }

  .detail-kv__bg {
    position: relative;
    height: 200px;
    overflow: hidden;
  }

  /* スマホのデザインも左→右の白グラデーション（PCと同じ） */
  .detail-kv__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.98) 25%,
      rgba(255, 255, 255, 0.9) 38%,
      rgba(255, 255, 255, 0.55) 52%,
      rgba(255, 255, 255, 0) 75%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .detail-kv__img {
    height: 200px;
  }

  .detail-kv__category {
    top: 35px;
    left: 22px;
    font-size: 15px;
    letter-spacing: 0.45px;
    padding: 4px 10px;
  }

  .detail-kv__title {
    top: 82px;
    left: 21px;
    font-size: 20px;
    letter-spacing: 0.6px;
    line-height: 1.5;
  }

  .detail-kv__title-break--sp {
    display: inline;
  }

  .detail-kv__title-break--pc {
    display: none;
  }

  .detail-kv__title-sub {
    font-size: 17px;
  }

  .detail-kv__breadcrumb {
    position: static;
    padding: 0 22px; /* 他の下層ページと同じく右寄せ */
    margin: 12px 0 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 4px;
  }

  /* 題名は2行目に独立させ、1行目末尾の「／」は隠す（長い題名でも右にはみ出さない） */
  .detail-kv__breadcrumb-item:nth-last-child(2) {
    display: none;
  }

  .detail-kv__breadcrumb-item:last-child {
    flex: 0 0 100%;
    justify-content: flex-end;
  }

  .detail-kv__breadcrumb-current {
    white-space: normal;
    text-align: right;
  }

  .detail-kv__subtitle {
    position: static;
    padding-left: 22px;
    margin-top: 20px;
    font-size: 18px;
    letter-spacing: 0.54px;
    line-height: 1.5;
  }

  .detail-kv__subtitle-break--sp {
    display: inline;
  }

  .detail-kv__subtitle-break--pc {
    display: none;
  }

  .detail-body {
    margin-top: 0;
    padding-bottom: 50px;
  }
}

/* ──────────────────────────────────────
   製品情報・製品概要・特長（スマホ）
────────────────────────────────────── */
@media (max-width: 560px) {
  .detail-product {
    width: auto;
    margin: 0;
    padding: 20px 22px 0;
  }

  .detail-product__top {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding-right: 0;
  }

  .detail-product__img-area {
    flex: none;
    width: 100%;
  }

  .detail-product__img-wrap {
    width: 100%;
    height: 260px;
  }

  .detail-product__img {
    width: 100%;
    height: 260px;
  }

  .detail-product__img-caption {
    color: #1d2e45;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.48px;
  }

  .detail-spec {
    width: 100%;
    padding: 44px 20px 40px;
  }

  .detail-spec__label {
    font-size: 17px;
    letter-spacing: 0.51px;
  }

  .detail-spec__value {
    font-size: 15px;
    letter-spacing: 0.45px;
    padding-left: 34px; /* icon23px + gap11px */
  }

  .detail-spec__icon {
    width: 23px;
    height: 23px;
  }

  .detail-section {
    margin-top: 30px;
    padding: 0;
  }

  .detail-section:first-of-type {
    margin-top: 40px;
  }

  .detail-section__heading-wrap {
    gap: 10px;
    margin-bottom: 5px;
  }

  .detail-section__heading {
    font-size: 17px;
    letter-spacing: 0.51px;
  }

  .detail-section__icon {
    width: 23px;
    height: 23px;
  }

  .detail-section__body {
    padding-left: 33px;
  }

  .detail-section__body p {
    font-size: 15px;
    letter-spacing: 0.45px;
    line-height: 1.5;
    margin-bottom: 0;
  }
}

/* ──────────────────────────────────────
   主な特徴・導入メリット（スマホ）
────────────────────────────────────── */
@media (max-width: 560px) {
  .detail-features {
    padding: 50px 0 60px;
  }

  .detail-features__inner {
    max-width: none;
    padding: 0 22px;
    grid-template-columns: 1fr;
    row-gap: 50px;
    column-gap: 0;
  }

  .detail-features__heading {
    font-size: 24px;
    letter-spacing: 0.72px;
    padding-bottom: 7px;
    margin-bottom: 0;
  }

  .detail-features__divider {
    margin-bottom: 24px;
  }

  .detail-features__list {
    gap: 20px;
  }

  .detail-feature {
    gap: 12px;
  }

  .detail-feature__number {
    font-size: 24px;
    width: 28px;
  }

  .detail-feature__title {
    font-size: 20px;
    letter-spacing: 0.6px;
  }

  .detail-feature__body {
    width: auto;
    font-size: 15px;
    letter-spacing: 0.45px;
  }
}

/* ──────────────────────────────────────
   関連製品スライダー（SP）
────────────────────────────────────── */
@media (max-width: 560px) {
  .detail-related {
    padding: 50px 0 60px;
  }

  .detail-related__heading {
    max-width: none;
    padding: 0 22px;
    font-size: 22px;
    letter-spacing: 0.66px;
    margin: 0 0 24px;
  }

  .detail-related__grid--pc {
    display: none;
  }

  .detail-related__stage {
    display: block;
    position: relative;
    max-width: 331px;
    margin: 0 auto;
  }

  .detail-related__swiper {
    overflow: hidden;
  }

  .detail-related__swiper .swiper-wrapper {
    display: flex;
  }

  .detail-related__swiper .swiper-slide {
    flex: 0 0 100%;
    width: 100%;
  }

  .detail-related__swiper .project-card {
    width: 100%;
    box-sizing: border-box;
  }

  .detail-related__nav-btn {
    position: absolute;
    top: 162px; /* カードの枠2px＋写真160px＝写真と白い枠の境目に丸の中心を合わせる */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 49px;
    height: 49px;
    padding: 0;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #0e212f;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s;
  }

  .detail-related__nav-btn:hover {
    opacity: 0.7;
  }

  .detail-related__nav-btn--prev {
    left: -12px;
  }

  .detail-related__nav-btn--next {
    right: -12px;
  }
}
