/* =========================================================
   Plant Page
   ========================================================= */

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

/* Hero */

.plant-hero {
  position: relative;
  display: block;
  width: 100%;
  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);
  pointer-events: none;
}

.plant-hero .container {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 48px));
}

.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 {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .75);
  font-size: 15px;
  line-height: 1.9;
}

/* 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;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  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;
}

/* Scale */

.scale-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 40px;
  align-items: stretch;
}

.scale-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.scale-card {
  padding: 27px 30px;
  border: 1px solid #e2e8f0;
  border-radius: 17px;
  background: #f8fafc;
  transition: .25s ease;
}

.scale-card:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 12px 35px rgba(15, 35, 55, .08);
}

.scale-card span {
  display: block;
  margin-bottom: 8px;
  color: #168aad;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.scale-card strong {
  display: block;
  color: #102a43;
  font-size: 36px;
  line-height: 1.2;
}

.scale-card strong small {
  margin-left: 3px;
  font-size: 16px;
}

.scale-card p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 12px;
}

.scale-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

/* Image Links */

.plant-image {
  position: relative;
  display: block;
  min-height: 340px;
  overflow: hidden;
  border-radius: 18px;
  background: #102a43;
}

.plant-image img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  transition: transform .6s ease;
}

.plant-image:hover img {
  transform: scale(1.05);
}

.plant-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(7, 26, 43, .7)
  );
  pointer-events: none;
}

.image-caption {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 18px;
  left: 20px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.image-caption b {
  font-size: 18px;
}

/* Factory Layout */

.layout-image {
  display: block;
  overflow: hidden;
  padding: 25px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 35, 55, .06);
}

.layout-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .6s ease;
}

.layout-image:hover img {
  transform: scale(1.015);
}

.layout-image-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 5px;
  color: #168aad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}

.layout-image-label b {
  font-size: 18px;
}

/* Equipment Intro */

.equipment-intro {
  max-width: 700px;
  margin: -15px 0 35px;
}

.equipment-intro p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

/* Equipment Navigation */

.equipment-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.equipment-nav a {
  position: relative;
  display: block;
  min-height: 125px;
  overflow: hidden;
  border-radius: 16px;
  background: #102a43;
}

.equipment-nav img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  opacity: .72;
  transition: transform .5s ease, opacity .3s ease;
}

.equipment-nav a:hover img {
  transform: scale(1.05);
  opacity: .9;
}

.equipment-nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 26, 43, .82),
    rgba(7, 26, 43, .25)
  );
  pointer-events: none;
}

.equipment-nav span {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 17px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.equipment-nav span b {
  font-size: 18px;
}

/* Equipment Table */

.equipment-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(15, 35, 55, .05);
  -webkit-overflow-scrolling: touch;
}

.equipment-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.equipment-table th {
  padding: 17px 18px;
  color: #fff;
  background: #102a43;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.equipment-table th:nth-child(2) {
  width: 90px;
  text-align: center;
}

.equipment-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: middle;
}

.equipment-table td:nth-child(2) {
  width: 90px;
  color: #168aad;
  text-align: center;
  font-weight: 800;
}

.equipment-table td:first-child {
  color: #102a43;
  font-weight: 700;
}

.equipment-table tbody tr {
  transition: background .2s ease;
}

.equipment-table tbody tr:hover {
  background: #f5fbfc;
}

.equipment-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Qualifications */

.qualification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.qualification-card {
  padding: 35px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  transition: .25s ease;
}

.qualification-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(15, 35, 55, .08);
}

.qualification-number {
  display: inline-block;
  margin-bottom: 18px;
  color: #168aad;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.qualification-card h3 {
  margin: 0 0 12px;
  color: #102a43;
  font-size: 20px;
}

.qualification-card p {
  margin: 0;
  color: #526273;
  font-size: 15px;
  line-height: 1.9;
}

/* Image Modal */

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, .85);
}

.image-modal.is-open {
  display: flex;
}

.image-modal img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

/* Tablet */

@media (max-width: 900px) {
  .plant-section {
    padding: 80px 0;
  }

  .scale-layout {
    grid-template-columns: 1fr;
  }

  .scale-info {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

/* Mobile */

@media (max-width: 600px) {
  .plant-page {
    padding-top: 68px;
  }

  .plant-hero {
    padding: 80px 0 70px;
  }

  .plant-hero .container {
    width: calc(100% - 32px);
  }

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

  .plant-heading {
    gap: 14px;
    margin-bottom: 32px;
  }

  .plant-number {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .scale-info {
    grid-template-columns: 1fr;
  }

  .scale-card {
    padding: 22px;
  }

  .scale-card strong {
    font-size: 30px;
  }

  .scale-images {
    grid-template-columns: 1fr;
  }

  .plant-image,
  .plant-image img {
    min-height: 240px;
  }

  .layout-image {
    padding: 12px;
  }

  .equipment-nav {
    grid-template-columns: 1fr;
  }

  .equipment-nav a,
  .equipment-nav img {
    height: 100px;
    min-height: 100px;
  }

  .equipment-table-wrap {
    border-radius: 12px;
  }

  .equipment-table {
    min-width: 700px;
  }

  .qualification-card {
    padding: 28px;
  }
}

/* 画像拡大モーダル */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

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

  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.88);
}

.image-modal.is-open {
  display: flex;
}

.image-modal img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.image-modal-close {
  position: absolute;
  top: 15px;
  right: 25px;

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

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

#modalCaption {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;

  color: #fff;
  text-align: center;
  font-size: 13px;
}

/* 工場配置図の表示サイズ */
.layout-section > .container > .plant-image {
  display: block;
  width: 60%;
  margin: 0 auto;
}

.layout-section > .container > .plant-image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .layout-section > .container > .plant-image {
    width: 90%;
  }
}