.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.85);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;

  /* 上下左右に余白を確保 */
  padding: 70px;
  box-sizing: border-box;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  display: block;

  /* ボタンと重ならないようにする */
  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;

  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;

  z-index: 10000; /* 画像より前面 */

  width: 50px;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;

  font-size: 36px;
  line-height: 1;
  cursor: pointer;

  border-radius: 50%;
}

/* 拡大表示 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.85);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;

  object-fit: contain;

  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;

  border: 0;
  background: none;
  color: #fff;

  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}


/* =========================================================
   製品紹介ページ
   ========================================================= */

.plant-page {
  padding-top: 76px;
  background: #f5f7f9;
}


/* =========================================================
   ページタイトル
   ========================================================= */

.plant-hero {
  position: relative;
  overflow: hidden;

  padding: 115px 0 105px;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #071a2b 0%,
      #102a43 58%,
      #168aad 100%
    );
  min-height: 0 !important;
  height: auto !important;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  box-sizing: border-box;
}

.plant-hero::after {
  content: "";

  position: absolute;

  right: -130px;
  bottom: -260px;

  width: 600px;
  height: 600px;

  border-radius: 50%;

  background: rgba(114,210,231,.10);
}

.plant-hero .container {
  position: relative;
  z-index: 2;
}

.plant-hero-label {
  display: block;

  margin-bottom: 18px;

  color: #72d2e7;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: .22em;
}

.plant-hero h1 {
  margin: 0;

  font-size: clamp(42px, 6vw, 68px);

  line-height: 1.15;

  letter-spacing: -.04em;
}

.plant-hero p {
  margin: 24px 0 0;

  max-width: 650px;

  color: rgba(255,255,255,.75);

  font-size: 15px;

  line-height: 1.9;
}

/* =========================================================
   製品一覧
   ========================================================= */

.grid {
  max-width: 1200px;
  margin: 0 auto;

  padding: 70px 20px 100px;

  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 28px;

  box-sizing: border-box;
}

/* =========================================================
   Sections
   ========================================================= */

.plant-section {
  padding: 105px 0;
}

.scale-section,
.equipment-section {
  background: #fff;
}

.layout-section,
.qualification-section {
  background: #f5f7f9;
}


.plant-heading {
  display: flex;

  align-items: flex-start;

  gap: 22px;

  margin-bottom: 45px;
}

.plant-number {
  display: flex;

  align-items: center;
  justify-content: center;

  flex: 0 0 48px;

  width: 48px;
  height: 48px;

  border-radius: 14px;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #102a43,
      #168aad
    );

  font-size: 12px;
  font-weight: 800;
}

.plant-label {
  display: block;

  margin-bottom: 4px;

  color: #168aad;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: .18em;
}

.plant-heading h2 {
  margin: 0;

  color: #102a43;

  font-size: clamp(30px, 4vw, 42px);

  line-height: 1.25;

  letter-spacing: -.03em;
}

/* =========================================================
   製品カード
   ========================================================= */

.card {
  position: relative;

  display: block;

  background: #fff;

  border: 1px solid #e8edf1;

  border-radius: 20px;

  overflow: hidden;

  text-decoration: none;

  color: inherit;

  box-shadow:
    0 8px 30px rgba(20,50,70,.06);

  transition:
    transform .35s ease,
    box-shadow .35s ease;

}


.card:hover {
  transform: translateY(-8px);

  box-shadow:
    0 18px 45px rgba(20,50,70,.14);
}


/* =========================================================
   画像
   ========================================================= */

.image {
  position: relative;

  width: 100%;
  height: 240px;

  overflow: hidden;

  background: #e9eef2;
}


.image img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition:
    transform .6s cubic-bezier(.2,.7,.2,1);
}


.card:hover .image img {
  transform: scale(1.07);
}


/* =========================================================
   番号
   ========================================================= */

.number {
  position: absolute;

  top: 16px;
  right: 16px;

  display: flex;

  justify-content: center;
  align-items: center;

  width: 48px;
  height: 48px;

  border-radius: 50%;

  background: rgba(13,53,87,.9);

  color: #fff;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: .08em;

  backdrop-filter: blur(5px);
}


/* =========================================================
   カード本文
   ========================================================= */

.body {
  position: relative;

  padding: 25px 27px 28px;

  min-height: 175px;

  box-sizing: border-box;
}


.category {
  display: block;

  margin-bottom: 8px;

  color: #1769aa;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: .14em;

  line-height: 1.4;
}


.body h2 {
  margin: 0;

  color: #20262b;

  font-size: 21px;

  font-weight: 800;

  letter-spacing: .04em;

  line-height: 1.5;
}


.body p {
  margin: 9px 0 0;

  color: #777;

  font-size: 13px;

  line-height: 1.7;
}


/* =========================================================
   詳しく見る
   ========================================================= */

.more {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  margin-top: 18px;

  color: #1769aa;

  font-size: 12px;

  font-weight: 800;

  letter-spacing: .06em;

  transition:
    gap .25s ease,
    color .25s ease;
}


.more b {
  font-size: 17px;
  font-weight: 400;

  line-height: 1;
}


.card:hover .more {
  gap: 14px;
  color: #0d4f80;
}


/* =========================================================
   カード上部アクセント
   ========================================================= */

.card::before {
  content: "";

  position: absolute;

  z-index: 5;

  top: 0;
  left: 0;

  width: 100%;
  height: 4px;

  background:
    linear-gradient(
      90deg,
      #1769aa,
      #3ba5d9
    );

  transform:
    scaleX(0);

  transform-origin: left;

  transition:
    transform .35s ease;
}


.card:hover::before {
  transform: scaleX(1);
}


/* =========================================================
   タブレット
   ========================================================= */

@media screen and (max-width: 1000px) {

  .grid {
    grid-template-columns:
      repeat(2, 1fr);

    gap: 22px;

    padding:
      55px 20px 80px;
  }


  .image {
    height: 220px;
  }

}


/* =========================================================
   スマートフォン
   ========================================================= */

@media screen and (max-width: 768px) {

  .plant-hero {
    padding:
      65px 20px 55px;
  }


  .plant-hero h1 {
    font-size: 32px;
  }


  .plant-hero p {
    margin-top: 14px;

    font-size: 13px;

    line-height: 1.8;
  }


  .grid {
    grid-template-columns: 1fr;

    gap: 18px;

    padding:
      40px 15px 65px;
  }


  .card {
    border-radius: 17px;
  }


  .image {
    height: 220px;
  }


  .body {
    min-height: auto;

    padding:
      21px 22px 24px;
  }


  .body h2 {
    font-size: 19px;
  }


  .body p {
    font-size: 13px;
  }


  .number {
    width: 43px;
    height: 43px;

    top: 13px;
    right: 13px;
  }

}


/* =========================================================
   小型スマートフォン
   ========================================================= */

@media screen and (max-width: 430px) {

  .plant-hero {
    padding:
      50px 18px 45px;
  }


  .plant-hero-label {
    font-size: 11px;
  }


  .plant-hero h1 {
    font-size: 28px;
  }


  .grid {
    padding:
      30px 12px 50px;
  }


  .image {
    height: 200px;
  }


  .body {
    padding:
      19px 19px 22px;
  }


  .body h2 {
    font-size: 18px;
  }

}

/* =========================================================
   画像拡大モーダル：画面中央に固定
   ========================================================= */

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  padding: 60px 20px;
  box-sizing: border-box;

  background: rgba(0, 0, 0, 0.9);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.image-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-modal img {
  display: block;

  max-width: 100%;
  max-height: 80vh;

  width: auto;
  height: auto;

  object-fit: contain;
}

.image-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 2;

  width: 48px;
  height: 48px;

  border: none;
  background: transparent;
  color: #fff;

  font-size: 42px;
  cursor: pointer;
}

#modalCaption {
  color: #fff;
  text-align: center;
  margin-top: 15px;
}