/* =========================================================
   pd_detail_unified_menu.css
   PD detail article only styles
   - 共通デザインは ../css/style.css を使用
   - ここでは記事ページ固有のhero、本文図版、H3控えめ表現のみ定義
   ========================================================= */

/* =========================================================
   Article Hero
   画像はHTML側の <img class="hero-bg"> で指定します。
   他の記事でもHTMLのsrc差し替えだけでhero画像を変更できます。
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  min-height: clamp(360px, 42vw, 560px);
  overflow: hidden;
  isolation: isolate;
  background: #0b1428;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 19, 45, 0.25), rgba(7, 19, 45, 0.04) 54%, rgba(7, 19, 45, 0.04)),
    linear-gradient(180deg, rgba(7, 19, 45, 0.02), rgba(7, 19, 45, 0.14));
  z-index: 1;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 44px);
  opacity: 0.12;
  z-index: 2;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.02);
}

.article-hero__inner {
  position: relative;
  z-index: 3;
  width: min(1120px, 92vw);
  min-height: clamp(360px, 42vw, 560px);
  margin-inline: auto;
  padding: clamp(56px, 7vw, 86px) 0 120px;
  display: flex;
  flex-direction: column;
  /* center から flex-start に変更 */
  justify-content: flex-start;

}

.article-hero__title {
  position: relative;
  /* 横幅を広げる */
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 18px;
  color: #ffffff;
  font-family: "Montserrat", "Noto Sans JP", system-ui, sans-serif;
 /* 少しだけ小さくする */
  font-size: clamp(1.9rem, 4.1vw, 3.65rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0.025em;
  text-shadow: 0 12px 30px rgba(0,0,0,0.40);
}

.article-hero__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  width: 5px;
  height: 1.05em;
  background: linear-gradient(180deg, var(--h_line), var(--accent-2));
}

.article-hero__caption {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 24px;
  /* 少し小さく */
  max-width: min(420px, 42vw);
  margin: 0;
  /* 余白も少し小さく */
  padding: 9px 12px;
  color: #ffffff;
  /* 文字サイズを小さく */
  font-size: 0.74rem;
  line-height: 1.65;
  /* 背景を少し薄く */
  background: rgba(7, 19, 45, 0.52);
  /* 枠線も控えめに */
  border: 1px solid rgba(0, 163, 255, 0.18);
  border-left: 4px solid var(--accent-2);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

/* =========================================================
   Article body layout
   共通style.cssの .section-contents をベースに、記事本文だけ少し読みやすく調整
   ========================================================= */

/* =========================================================
   Article main wrapper
   外側mainはレイアウト専用にし、カード装飾は内側.section-contentsだけに付ける
   ========================================================= */
.article-main {
  margin-top: clamp(36px, 6vw, 72px);
  margin-bottom: clamp(54px, 7vw, 86px);
}

.article-main > .section-contents {
  max-width: 980px;
  margin-bottom: 0;
}


/* H2: トップページと同じ存在感 */
main .section-contents > h2.section-title {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  margin-top: 0;
  margin-bottom: 1.5em;
}

/* H3: H2より控えめ。左ラインのみで、下線や大きな装飾を抑える */
main .section-contents > h3.section-title {
  margin-top: 2.3em;
  margin-bottom: 1.1em;
  padding: 0 0 0 0.78em;
  border-bottom: none;
  border-left: 4px solid rgba(54, 78, 150, 0.42);
  color: var(--h_line);
  font-size: clamp(1.08rem, 2.1vw, 1.35rem);
  font-weight: 750;
  letter-spacing: 0.02em;
}

main .section-contents > h3.section-title::before,
main .section-contents > h3.section-title::after {
  display: none;
}

main .section-contents p {
  line-height: 1.95;
}

/* =========================================================
   Figures
   ========================================================= */
.article-figure {
  margin: 3em 0;
}

.article-figure__image {
  max-width: min(780px, 92%);
  height: auto;
  border-radius: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(54, 78, 150, 0.18);
  box-shadow: 0 12px 30px rgba(17,24,39,0.12);
}

.article-figure__caption {
  margin-top: 0.85em;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--fg-d);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* 記事中の大きめ図版を少し小さく表示し、クリック拡大できるようにする */
.article-figure--compact {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.article-figure--compact .article-figure__image {
  width: 100%;
  height: auto;
}

.image-zoom-link {
  position: relative;
  display: block;
  cursor: zoom-in;
  border-radius: 10px;
}

.image-zoom-link::after {
  content: "クリックで拡大";
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.image-zoom-link:hover::after,
.image-zoom-link:focus-visible::after {
  opacity: 1;
}

.image-zoom-link:hover .image-zoom-link__image {
  filter: brightness(0.97);
}

/* =========================================================
   Generic info card
   links to observatories, missions, projects
   サイト全体の白基調・濃紺ライン・近未来感に合わせた情報カード
   ========================================================= */

.info-card {
  max-width: min(820px, 100%);
  margin: 2rem 0;
}

/* カード全体をクリック可能にする */
.info-card__link {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 14px;
  color: inherit;
  text-decoration: none;

  background:
    linear-gradient(90deg, rgba(54, 78, 150, 0.055), rgba(255, 255, 255, 0.92)),
    rgba(255, 255, 255, 0.92);

  border: 1px solid rgba(54, 78, 150, 0.18);
  border-left: 4px solid rgba(54, 78, 150, 0.62);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);

  overflow: hidden;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease;
}

/* 右上に控えめな光のライン */
.info-card__link::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--h_line, #364e96),
    var(--accent-2, #00a3ff),
    transparent 72%
  );
  opacity: 0.55;
  pointer-events: none;
}

/* hover時：既存カード群と同じく少し浮かせる */
.info-card__link:hover {
  color: inherit;
  transform: translateY(-3px);
  border-color: rgba(54, 78, 150, 0.34);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.11);
  background:
    linear-gradient(90deg, rgba(54, 78, 150, 0.085), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
}

/* キーボード操作時 */
.info-card__link:focus-visible {
  outline: 3px solid rgba(0, 96, 176, 0.26);
  outline-offset: 4px;
}

/* 画像 */
.info-card__image {
  width: 150px;
  aspect-ratio: 4 / 3;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;

  border-radius: 8px;
  border: 1px solid rgba(54, 78, 150, 0.14);
  background-color: var(--bg-2, #eef3fb);

  transition:
    transform 0.28s ease,
    filter 0.28s ease;
}

/* hover時に画像を少しだけ拡大 */
.info-card__link:hover .info-card__image {
  transform: scale(1.025);
  filter: saturate(1.05);
}

/* テキスト部分 */
.info-card__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2px 4px;
}

/* タイトル */
.info-card__title {
  position: relative;
  margin: 0 0 0.35rem;
  color: var(--fg, #172033);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

/* タイトル末尾に外部リンク感の小さな矢印 */
.info-card__title::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.45em;
  color: var(--accent, #0060b0);
  font-size: 0.78em;
  font-weight: 700;
  transform: translateY(-0.05em);
  opacity: 0.75;
}

/* hover時のタイトル */
.info-card__link:hover .info-card__title {
  color: var(--h_line, #364e96);
}

/* 説明文 */
.info-card__caption {
  margin: 0;
  color: var(--fg-d, #526071);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* クレジット表記が説明文内にある場合も読みやすく */
.info-card__caption br + * {
  color: var(--fg-d, #526071);
}


/* =========================================================
   info-card group layout (shared component)
   ========================================================= */
.info-card-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 22px);
  margin: 1.8rem 0 2.2rem;
  max-width: 980px; /* article body widthに合わせる */
}

@media (max-width: 720px) {
  .info-card-group {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   info-card image placeholder as badge (shared component)
   ========================================================= */
.info-card__image--badge {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(54, 78, 150, 0.92), rgba(0, 163, 255, 0.72));
  color: #fff;
}

.info-card__badge {
  font-family: "Montserrat", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.95;
}


/* =========================================================
   Spec Table
   ミッション主要諸元テーブル
   サイト全体の白基調・濃紺ライン・近未来感に合わせた表デザイン
   ========================================================= */

/* 横幅が狭い画面でも表が崩れないようにする外側ラッパー */
.spec-table-wrapper {
  margin: 2.4em 0 3.2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 表タイトル */
.spec-table-caption {
  margin: 0 0 0.85em;
  color: var(--h_line, #364e96);
  font-family: "Montserrat", "Noto Sans JP", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

/* table内captionとして使う場合にも対応 */
.spec-table caption.spec-table-caption {
  caption-side: top;
}

/* テーブル本体 */
.spec-table {
  width: min(720px, 100%);
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;

  color: var(--fg, #172033);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.94));

  border: 1px solid rgba(54, 78, 150, 0.18);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);

  overflow: hidden;
  font-size: 0.95rem;
}

/* ヘッダー */
.spec-table thead th {
  padding: 14px 18px;
  color: var(--h_line, #364e96);
  background:
    linear-gradient(90deg, rgba(54, 78, 150, 0.13), rgba(0, 163, 255, 0.07)),
    #f1f4fb;
  border-bottom: 2px solid rgba(54, 78, 150, 0.24);

  font-weight: 800;
  text-align: left;
  letter-spacing: 0.03em;
}

/* セル共通 */
.spec-table th,
.spec-table td {
  padding: 15px 18px;
  vertical-align: top;
  line-height: 1.8;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

/* 最終行の罫線を消す */
.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td {
  border-bottom: none;
}

/* 左列 */
.spec-table tbody th,
.spec-table tbody td:first-child {
  width: 34%;
  color: var(--fg, #172033);
  background: rgba(54, 78, 150, 0.035);
  font-weight: 800;
  white-space: nowrap;
}

/* 右列 */
.spec-table tbody td:last-child {
  color: var(--fg-d, #526071);
}

/* 行hover：控えめに反応 */
.spec-table tbody tr {
  transition: background-color 0.18s ease;
}

.spec-table tbody tr:hover {
  background-color: rgba(54, 78, 150, 0.055);
}

/* 角丸の見え方を整える */
.spec-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.spec-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

/* =========================================================
   Mission Table
   RAMSES探査機の主な搭載機器テーブル
   spec-table と同じデザイン系統で、長文向けに横幅と余白を調整
   ========================================================= */

.mission-table-wrapper {
  margin: 2.6em 0 3.6em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 表タイトル */
.mission-table-caption {
  margin: 0 0 0.9em;
  color: var(--h_line, #364e96);
  font-family: "Montserrat", "Noto Sans JP", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

/* table内captionとして使う場合にも対応 */
.mission-table caption.mission-table-caption {
  caption-side: top;
}

/* テーブル本体 */
.mission-table {
  width: min(980px, 100%);
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;

  color: var(--fg, #172033);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 253, 0.94));

  border: 1px solid rgba(54, 78, 150, 0.18);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);

  overflow: hidden;
  font-size: 0.94rem;
}

/* ヘッダー */
.mission-table thead th {
  padding: 14px 18px;
  color: var(--h_line, #364e96);
  background:
    linear-gradient(90deg, rgba(54, 78, 150, 0.13), rgba(0, 163, 255, 0.07)),
    #f1f4fb;
  border-bottom: 2px solid rgba(54, 78, 150, 0.24);

  font-weight: 800;
  text-align: left;
  letter-spacing: 0.03em;
}

/* セル共通 */
.mission-table th,
.mission-table td {
  padding: 15px 18px;
  vertical-align: top;
  line-height: 1.85;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

/* 最終行の罫線を消す */
.mission-table tbody tr:last-child th,
.mission-table tbody tr:last-child td {
  border-bottom: none;
}

/* 左列：搭載機器名 */
.mission-table tbody th,
.mission-table tbody td:first-child {
  width: 28%;
  color: var(--fg, #172033);
  background: rgba(54, 78, 150, 0.035);
  font-weight: 800;
  white-space: normal;
}

/* 右列：説明文 */
.mission-table tbody td:last-child {
  color: var(--fg-d, #526071);
}

/* 行hover：控えめに反応 */
.mission-table tbody tr {
  transition: background-color 0.18s ease;
}

.mission-table tbody tr:hover {
  background-color: rgba(54, 78, 150, 0.055);
}

/* 角丸の見え方を整える */
.mission-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.mission-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

/* =========================================================
   Mission Logo Image Group
   RAMSES / ESA ロゴマーク横並び表示
   ========================================================= */

/* 2つのロゴカードを横並びにする外側 */
.mission-image-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  max-width: 900px;
  margin: 3em auto;
  align-items: start;
}

/* 各ロゴカード */
.mission-image-item {
  margin: 0;
  min-width: 0;
}

/* 画像を収めるカード */
.mission-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  /* ロゴが大きくなりすぎないように高さを制御 */
  min-height: 260px;
  padding: clamp(18px, 3vw, 28px);

  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 32, 51, 0.10);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);

  overflow: hidden;
}

/* ロゴ画像本体 */
.mission-image-item img {
  display: block;

  /* 横並び時に大きくなりすぎないよう調整 */
  width: auto;
  max-width: 100%;
  max-height: 220px;

  height: auto;
  object-fit: contain;
}

/* クレジット */
.mission-image-credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;

  color: #ffffff;
  background: rgba(7, 19, 45, 0.62);
  padding: 4px 7px;
  border-radius: 4px;

  font-size: 0.68rem;
  line-height: 1;
  pointer-events: none;
}

/* キャプション */
.mission-image-item figcaption {
  margin-top: 0.85em;
  color: var(--fg-d, #526071);
  font-size: 0.88rem;
  line-height: 1.65;
  text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
  .hero {
    min-height: 380px;
  }

  .article-hero__inner {
    min-height: 380px;
    padding: 68px 0 136px;
  }

  .article-hero__caption {
    left: 4vw;
    right: 4vw;
    bottom: 16px;
    max-width: none;
    font-size: 0.78rem;
  }

  .article-hero__title {
    white-space: normal;
  }
}

/* ========================
   Spec Table Responsive
   ======================== */

@media (max-width: 680px) {
  .spec-table-wrapper {
    margin: 2em 0 2.6em;
  }

  .spec-table {
    min-width: 560px;
    font-size: 0.9rem;
  }

  .spec-table-caption {
    text-align: left;
    font-size: 0.95rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 13px 14px;
  }

  .spec-table tbody th,
  .spec-table tbody td:first-child {
    width: 32%;
    white-space: normal;
  }
}

/* =========================
   Mission Table Responsive
   ========================= */

@media (max-width: 768px) {
  .mission-table-wrapper {
    margin: 2em 0 2.8em;
  }

  .mission-table {
    min-width: 760px;
    font-size: 0.9rem;
  }

  .mission-table-caption {
    text-align: left;
    font-size: 0.95rem;
  }

  .mission-table th,
  .mission-table td {
    padding: 13px 14px;
    line-height: 1.75;
  }

  .mission-table tbody th,
  .mission-table tbody td:first-child {
    width: 26%;
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .mission-image-group {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 24px;
  }

  .mission-image-wrapper {
    min-height: 240px;
  }

  .mission-image-item img {
    max-height: 210px;
  }
}

@media (max-width: 600px) {
  .info-card {
    max-width: 100%;
    margin: 1.6rem 0;
  }

  .info-card__link {
    flex-direction: column;
    padding: 12px;
    gap: 0.85rem;
  }

  .info-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .info-card__text {
    padding: 0 2px 2px;
  }

  .info-card__title {
    font-size: 1rem;
  }

  .info-card__caption {
    font-size: 0.86rem;
    line-height: 1.7;
  }
}


/* =========================================================
   Small mobile Hero adjustment
   iPhone 16e class / 390px width
   ========================================================= */

@media (max-width: 600px) {
  .hero {
    min-height: auto;
    overflow: visible;
    background: #0b1428;
  }

  .article-hero__inner {
    min-height: 360px;
    padding: 64px 0 72px;
  }

  .article-hero__title {
    font-size: clamp(1.75rem, 10vw, 2.45rem);
    line-height: 1.18;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
  }

  .article-hero__caption {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 32px);
    max-width: none;
    margin: -48px auto 0;
    font-size: 0.76rem;
    line-height: 1.7;
  }

  
/* =========================================================
   Table mobile layout fix
   iPhone 16e / small screen
   表の横はみ出し・フォントサイズ乱れ対策
   =========================================================*/
 
  .spec-table-wrapper,
  .mission-table-wrapper {
    margin: 2em 0 2.6em;
    overflow-x: visible;
  }

  .spec-table,
  .mission-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    font-size: 0.9rem;
    overflow: hidden;
  }

  .spec-table thead,
  .mission-table thead {
    display: none;
  }

  .spec-table tbody,
  .spec-table tr,
  .spec-table th,
  .spec-table td,
  .mission-table tbody,
  .mission-table tr,
  .mission-table th,
  .mission-table td {
    display: block;
    width: 100%;
  }

  .spec-table tbody tr,
  .mission-table tbody tr {
    border-bottom: 1px solid rgba(23, 32, 51, 0.12);
    background: #ffffff;
  }

  .spec-table tbody tr:last-child,
  .mission-table tbody tr:last-child {
    border-bottom: none;
  }

  .spec-table th,
  .spec-table td,
  .mission-table th,
  .mission-table td {
    box-sizing: border-box;
    padding: 12px 14px;
    line-height: 1.75;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .spec-table tbody th,
  .spec-table tbody td:first-child,
  .mission-table tbody th {
    color: var(--h_line, #364e96);
    background: linear-gradient(
      90deg,
      rgba(54, 78, 150, 0.12),
      rgba(0, 163, 255, 0.06)
    );
    border-bottom: 1px solid rgba(54, 78, 150, 0.16);
    font-weight: 800;
  }

  .spec-table tbody td:last-child,
  .mission-table tbody td {
    color: var(--fg-d, #526071);
    background: #ffffff;
  }

  .spec-table-caption,
  .mission-table-caption {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* =========================================================
   Text wrapping safeguard
   長い語句・英数字・URLの横はみ出し防止
   ========================================================= */

.article-main,
.article-main .section-contents,
.article-main p,
.article-main li,
.article-main figcaption,
.article-hero__title,
.article-hero__caption,
.info-card__title,
.info-card__caption {
  overflow-wrap: anywhere;
  word-break: normal;
}
