/* =========================================================
   基本設定
========================================================= */

/* ==== スムーススクロール ==== */
html {
  scroll-behavior: smooth;
}

/* 本文と固定ヘッダーの重なり対策 */
body {
  margin: 0;
  padding-top: 64px;
}

#top,
#devices,
#howto,
#contact {
  scroll-margin-top: 72px;
}


/* =========================================================
   固定ヘッダー
========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ヘッダー内コンテナ */
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

/* ブランド・ナビゲーション */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.site-nav {
  margin-left: auto;
  transform: translateY(15px);
}

.site-nav ul {
  display: flex;
  flex-wrap: nowrap;
  overflow-x:auto;
  white-space: nowrap;
  list-style: none;
  width:max-content;
  gap: 20px;
  margin: 0;
  padding: 8px 0 0;
  -webkit-overflow-scrolling: touch; /* スマホで慣性スクロール */
}

.site-nav ul li a {
  position: relative;          /* 下線（::after）の基準 */
  display: inline-block;
  color: black;
  text-decoration: none;
  transition: color 0.2s ease; /* 色のみ */
}

/* ナビのアクティブ状態（重複保持） */
.site-nav a.is-active {
  color: #005bac;
  background: #e6f0ff;
}

/* hover時の文字色 */
.site-nav ul li a:hover {
  color: #005bac;
}
/* 下線アニメーション */
.site-nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: #005bac;
  transition: width 0.2s ease;
}
.site-nav ul li a:hover::after {
  width: 100%;
}

/* ロゴ画像 */
.brand-aist-logo {
  display: block;
  height: 32px;
  width: auto;
}

.brand-pfasol-logo {
  height: auto;
}

/* 部門名 */
.unit-name {
  font-size: 1.8em;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
  margin-top: 8px;
}


/* =========================================================
   Hero セクション
========================================================= */
.hero-spacer {
  height: 20px;
}

/* ======= 新Hero帯のスタイル（スコープ：#hero 以下） ======= */
#hero {
  position:relative;
  width: 100%;
  min-height: 100px;
  display: flex;
  justify-content: center;
  padding-top: 0px;
  margin-bottom: 1em;
    background: linear-gradient(
    180deg,
    rgba(225,242,248,1) 0%,
    rgb(159, 208, 236) 50%,
    rgb(56, 150, 218) 100%
  );
}

#hero .hero-inner {
  max-width: 1000px;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2; /* オーバーレイより下・テキストより上 */
}

/* ヒーロー中央イメージ */
.hero-image {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.hero-image img {
  max-width: 600px;
  min-width:260px;
  width:50vw;
  display: block;
  opacity: 0.75;
}


.hero-sub-message {
  position: absolute;
  left: 50%;
  top: 75%; /* メイン画像の下に配置 */
  transform: translateX(-50%);
 font-size: clamp(1.6rem, 3vw, 3rem);  /* ← 可変化 */
  max-width: 80%;                      /* ← 幅制限 */

  font-weight: 500;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  margin: 0;

  white-space: nowrap;  /* ← nowrapをやめる（重要） */
  text-align: center;
}
/* PFASOLバッジ */
#hero .hero-badge {
  position: absolute;
  left: 15px;
  top: 10px;
  max-width:180px;
  width: 25vw;
  z-index: 10;
  pointer-events: none;
  height: auto;
  opacity: 1;
}

#hero .hero-inner, #hero .hero-image, #hero .hero-badge {
  z-index: 2;
}


/* viewer グリッド */
#hero .viewer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  aspect-ratio: 3 / 1; 
}

#hero .viewer-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

#hero .viewer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}


.imageItem {
  width:fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
}

.imageItem a {
  text-decoration: none;   /* 下線を消す */
}


.imageItem img {
  max-width: 90%;
  height: auto;
  display: block;
    margin: 0 auto;
}

.imageItem figcaption {
  margin-top: 8px;
  font-size: 1.0em;
  color: #333;
 
}


/* ==========
   ハイライトBOX
============= */

.contentPane p {
  font-size:1.6rem;
  }

.highlightBox {
  background: #fDF2F4;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.highlightBox .listIcon li {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 600;
  line-height: 1.6;
}

/* =====
   HowTo
======== */

.contentPane ol.process {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 利用法保の修飾*/
.contentPane ol.process .step {
  position: relative;
  margin-bottom: 24px;
  padding-bottom: 20px; /* ▼分の余白 */
}

/* バッジ */
.step .step-badge {
  display: inline-block;
  font-size: 2.2rem;
  font-weight: 600;
  background: #CF0027;
  color: #fff;
  padding: 5px 14px 7px 12px;
  border-radius: 12px;
  line-height: 1.2;
  white-space: nowrap;
  margin: 0 0 6px 0;
}

/* 説明文 */
.step p {
  font-size: 1.6rem;
  line-height: 1.7;
  margin: 0;
  padding-top: 6px;
}

/* ▼（左から30px固定） */
.step .down-arrow {
  position: absolute;
  left: 60px;
  bottom: 0;

  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid #CF0027;
}


/* =========================================================
   コンテンツカード（Grid）
========================================================= */

.contentGrid {
  max-width: 1050px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  box-sizing: border-box;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.contentGrid .contentPane {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 160ms ease, transform 160ms ease;

}

.contentGrid .contentPane p{
  text-align: center;
  font-size: 1.6rem;
}

.contentGrid .contentPane li {
  line-height: 1.45;
}

.contentGrid .contentArea {
  padding: 16px 18px 0px;
}

.contentArea.right {
  text-align: right;
}
.contentArea.center {
  text-align: center;
}

/* contentArea の最後の直下子要素の下余白ゼロ */
.contentGrid .contentArea > *:last-child {
  margin-bottom: 0 !important;
}

/* カード先頭アイコン */
.contentGrid .paneIcon {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 10px;
}

/* カードタイトル */
.contentGrid .cardTitle {
  background: none !important;
  font-size: 2rem;
  line-height: 1.2;
  min-height: 2.7em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  color: #222;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* カードラベル */
.contentGrid .cardLabel {
  display: block;
  background: #CF0027;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 8px 32px;
  border-radius: 999px;
  text-align: center;
  margin: 12px auto 16px;
  box-shadow: 0 2px 8px rgba(211,47,47,0.08);
  letter-spacing: 0.05em;
}

/* テキスト・リスト */
.contentGrid .contentPane p {
  margin: 0 0 10px;
  color: #555;
}

.contentGrid .contentPane ul {
  margin: 0;
  padding-left: 18px;
}

.contentGrid .contentPane li {
  margin: 6px 0;
}

/* ホバー効果（ポインタ対応時） */
@media (hover: hover) and (pointer: fine) {
  .contentGrid .contentPane:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    transform: translateY(-1px);
  }
}


/* =========================================================
   テーブル
========================================================= */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.equip-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Noto Sans JP", "Noto Sans", system-ui, sans-serif;
  font-size: 14px;
}

.equip-table thead th {
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  background: #f6f8fa;
}

.equip-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
}

.equip-table,
.equip-table th,
.equip-table td {
  border: none;
}

.equip-table tbody tr:hover {
  background: #ddebff;
  transition: background 0.5s;
}

.row-anchor {
  color: #012060;
  text-decoration: none;
  font-weight: 600;
  display: block;
  width: 100%;
  height: 100%;
}

.row-anchor:hover {
  text-decoration: underline;
}

.wrap {
  word-break: break-word;
}

.clickable-row {
  cursor: pointer;
}


/* =========================================================
   お問い合わせバナー
========================================================= */

.aist-red-banner {
  display: inline-block;
  background: #CF0027;
  color: #fff;
  font-size: 1.8em;
  font-weight: bold;
  padding: 12px 40px 16px 40px; 
  border-radius: 40px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  border: 2px solid #CF0027;
  white-space: nowrap;
}

.aist-red-banner:hover,
.aist-red-banner:focus {
  background: #fff !important;
  color: #CF0027 !important;
  border: 2px solid #CF0027;
  text-decoration: none;
}

.pagetop_fixed_button {
  position: fixed;
  right: 2vw;           /* 右端から2%の余白 */
  bottom: 2vh;          /* 下端から2%の余白 */
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1vw 1.5vw;   /* 幅に応じた余白 */
  border-radius: 1vw;   /* 角丸も画面幅依存 */
   font-size: clamp(12px, 1.2vw, 20px); /* 最小12px、最大20px */
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;

}

.pagetop_fixed_button a {
  color: inherit;         /* 親の文字色を継承 */
  text-decoration: none;
}

.pagetop_fixed_button:hover {
  background-color: rgba(0, 0, 0, 0.8); /* ホバー時に濃く */
  cursor: pointer;
  transform: scale(1.1);
}


/* =========================================================
   レスポンシブ（Media Queries）
========================================================= */

/* 800px未満：ヘッダー再配置 */
@media (max-width: 800px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 8px;
    padding: 8px 16px 6px;
    align-items: center;
  }

  .brand-aist {
    grid-row: 1;
    grid-column: 1;
    display: inline-block;
  }

  .brand-aist-logo {
    height: 28px;
  }

  .unit-name {
    grid-row: 1;
    grid-column: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.4em;
    line-height: 1.1;
    margin-top: 0;
  }

  .site-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: stretch;
    transform: translateY(10px);
  }

  .site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
  }

  .site-nav a {
    white-space: nowrap;
    font-size: 0.95em;
    display: inline-block;
  }

  #top,
  #devices,
  #howto,
  #contact {
    scroll-margin-top: 100px;
  }

  body {
    padding-top: 100px;
  }

  #hero .hero-badge {
    right: 12px;
    bottom: 10px;
  }

}

@media (max-width: 960px) {
  .contentGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 860px) {
  .unit-name {
    font-size: 1.5em;
    transform: translateY(3px);
  }

  .brand-aist-logo {
    display: block;
    height: 28px;
    width: auto;
  }
}

@media (max-width: 640px) {
  
  .contentPane p {
    font-size:1.4rem;
    }

  .contentGrid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contentGrid .contentArea {
    padding: 14px 16px;
  }
}
/* バッジ（列1に置く） */
.step .step-badge {
  font-size: 1.8rem;
  font-weight: 500;
  padding: 5px 14px 7px 12px;
  border-radius: 10px;
}


@media (max-width: 600px) {
  .equip-table thead th,
  .equip-table tbody td {
    padding: 8px 10px;
  }
}


