/* ============================================================
   詳細ページ共通CSS（detail-common.css）
   ホソカマス（details/hosokamasu.html 261020版）のCSSをそのまま移したもの。
   ここを直すと、これを読み込んでいる全詳細ページに反映される。
   ページ固有の見た目は、各ページの <style> に残す。
   ============================================================ */

/* 色・余白・最大幅などの共通設定 */
:root {
  --brand-blue: #007acc;
  --btn: #1a73e8;
  --btn-hover: #155cc3;
  --text: #333;
  --muted: #666;
  --bg: #f8faff;
  --maxw: 800px;
  --radius: 12px;
  --gap: 40px;
}

/* ページ全体の基本設定 */
body {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

/* ヘッダー部分のデザイン */
header {
  background-color: var(--brand-blue);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

/* ページタイトル */
header h1 {
  margin: 0 0 8px 0;
  font-size: 2.2rem;
  letter-spacing: 0.1em;
}

/* サブタイトル */
header .subtitle {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 100;
}

/* 学名表示 */
header p {
  margin: 0;
  font-style: italic;
  font-size: 1.1rem;
}

/* 本文エリア全体 */
main {
  max-width: var(--maxw);
  margin: 10px auto;
  padding: 0 20px;
}

/* 動画表示エリアの枠 */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-bottom: 20px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 動画本体を枠いっぱいに表示 */
.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 各セクションの余白 */
.section {
  margin-bottom: var(--gap);
}

/* セクション見出し */
h2 {
  color: var(--brand-blue);
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  display: inline-block;
  padding-right: 20px;
}

/* 通常本文 */
.section p {
  margin-bottom: 15px;
  line-height: 2.2;
}

/* 基本情報（上3行） */
.gaiyo-basic p {
  margin: 0;
  line-height: 1.8;
}

/* 概要欄だけ詰めて表示 */
.gaiyo-area p {
  margin-bottom: 8px;
  line-height: 2;
}

/* 体験談・コメント欄（解説ボックスと同じ白枠で、データ欄と区別する） */
.comment-area {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #e6eef6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comment-area p {
  margin: 0;
  line-height: 2.2;
}

/* 解説ボックス */
.gaiyo-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 14px 0;
  border: 1px solid #e6eef6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gaiyo-box p {
  margin: 0;
  line-height: 2;
}

/* スペック見出し */
.spec-title {
  font-size: 0.9rem;
  color: #666;
  margin-top: 12px;
  margin-bottom: 2px;

}

/* スペック一覧・参考資料一覧の行間調整 */
.spec-list li,
.ref-list li {
  margin: 2px 0 !important;
  line-height: 1.8 !important;
}

/* ボタンを横並びにする */
.button-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 16px 0;
}

/* 共通ボタンデザイン */
.contact-button {
  display: inline-block;
  background-color: var(--btn);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: bold;
}

/* ボタンにマウスを乗せたときの変化 */
.contact-button:hover {
  background-color: var(--btn-hover);
  transform: translateY(-2px);
}

/* フッターの見た目 */
footer {
  background: #333;
  color: #ddd;
  text-align: center;
  padding: 50px 20px;
  margin-top: 60px;
}

/* 中央の再生ボタン風アイコン */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* 再生ボタン内の三角形 */
.play-button::after {
  content: "";
  display: block;
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px;
}

/* 本編再生中は中央の再生ボタンを消す */
.video-container.playing .play-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 動画全体をクリック対象にする */
#videoWrapper {
  cursor: pointer;
}

/* パンくず全体 */
#taxonomy-breadcrumb {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  font-size: 0.85em;
  opacity: 0.75;
  letter-spacing: 0.03em;
}

/* パンくずを横並び表示 */
#taxonomy-breadcrumb li {
  display: inline;
}

/* パンくずリンク */
#taxonomy-breadcrumb li a {
  text-decoration: none;
  color: #007acc;
}

/* パンくずリンクにホバーした時 */
#taxonomy-breadcrumb li a:hover {
  text-decoration: underline;
}

/* パンくず内spanにホバーした時の見た目 */
#taxonomy-breadcrumb span:hover {
  text-decoration: underline;
  cursor: default;
}

/* パンくず最後の項目色 */
#taxonomy-breadcrumb li:last-child {
  font-weight: bold;
  color: #333;
}

/* サイトトップへ戻る用のピルボタンエリア */
.blogger-section {
  text-align: center;
  margin: 6px 0 14px;
}

/* ピル型リンクボタン */
.blogger-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f3f3f3;
  border: 1px solid #e0e0e0;
  color: #666;
  text-decoration: none;
  font-size: 0.95em;
  line-height: 1.3;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* ピル型リンクにホバーした時 */
.blogger-pill:hover {
  background: #e9e9e9;
  border-color: #d0d0d0;
}

/* ピル型リンクを押した時 */
.blogger-pill:active {
  background: #e2e2e2;
}

/* キーボード操作時の視認性 */
.blogger-pill:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.45);
  outline-offset: 2px;
}

/* ピル内アイコン用 */
.blogger-pill__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ピル内文字列用 */
.blogger-pill__text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ピル内のサブコピー用
   撮影コラムタイトルの下に出る補足文を少し小さく、やや控えめに表示する */
.blogger-pill__sub {
  display: block;
  font-size: 0.85em;
  color: #888;
  line-height: 1.5;
  margin-top: 2px;
}

/* 参考資料リストの基本形 */
.ref-list {
  margin: 0;
  padding-left: 1.2em;
}

/* 参考動画のサムネイル画像サイズ */
.reference-img {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 10px auto;
  border: none;
  height: auto;
  /* 16:9 の枠にそろえる。YouTube のサムネ画像（4:3）の上下の黒い帯は切り落とす */
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* 参考動画の白いカード枠（背景・影・余白） */
.reference-video {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  margin: 24px 0;
  border: 1px solid #eef3f8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* 参考動画の説明文を中央寄せ */
.video-desc {
  text-align: center;
}

/* 参考動画のタイトルを中央寄せ */
.reference-video strong {
  display: block;
  text-align: center;
}

/* 白枠動画リンクの画像の隙間対策 */
.reference-video img {
  display: block;
  border: none;
}

/* 写真ギャラリー */
.image-gallery {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.image-item {
  width: 30%;
  max-width: 220px;
  text-align: center;
}

.image-item img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
}

/* キャプション */
.image-caption {
  font-size: .85rem;
  color: #666;
  margin-top: 6px;
}

/* ライトボックス */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: .3s;
}

.lightbox-overlay.active {
  visibility: visible;
  opacity: 1;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
}

/* ギャラリー内見出し */
.gallery-title {
  width: 100%;
  text-align: center;
  font-weight: 700;
  color: #444;
  margin: 0 0 8px;
  font-size: 1rem;
}

/* PC hover */
@media (hover:hover) {
  .image-item img:hover {
    opacity: .8;
  }
}

/* スマホ表示時の調整 */
@media screen and (max-width:600px) {
  header h1 {
    font-size: 1.8rem;
  }

  .contact-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .blogger-pill {
    font-size: 0.9em;
    padding: 7px 12px;
  }

  .blogger-pill__text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .image-gallery {
    flex-direction: column;
    align-items: center;
  }

  .image-item {
    width: 100%;
    max-width: none;
  }
}

/* 小見出し（本文中の強調タイトル用） */
.sub-title {
  font-size: 1.2em;
  font-weight: bold;
  display: inline-block;
  position: relative;
  padding-bottom: 1.5px;
  margin-bottom: 18px;
}

.sub-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(100% + 55px);
  height: 2px;
  background: #797575;
}

/* 地方名の一覧（最初は数行だけ見せ、下をぼかす。「続きを見る」で全部開く。広い画面では2列） */
.chihoumei {
  background: #ffffff;
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 12px 16px 10px;
  margin: 0 0 14px;
}

.chihoumei ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  margin: 0;
  padding-left: 1.2em;
  max-height: 9em;              /* 閉じているときに見せる高さ（約5行） */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
  mask-image: linear-gradient(to bottom, #000 45%, transparent);
}

.chihoumei.is-open ul {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.chihoumei__more {
  display: block;
  margin: 8px auto 0;
  padding: 6px 18px;
  border: 1px solid var(--btn);
  border-radius: 999px;
  background: #fff;
  color: var(--btn);
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.chihoumei__more:hover {
  background: var(--btn);
  color: #fff;
}

@media (max-width: 600px) {
  .chihoumei ul {
    grid-template-columns: 1fr;
  }
}

/* セクション見出しの下線（サンプル映像と同じ幅） */
.section-title {
  display: block;
  border-bottom: none;
  padding-right: 0;
}

.section-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: #1e90ff;
  margin-top: 10px;
}

/* 動画の上の定義文 */
.lead {
  font-size: 1.05rem;
  margin: 16px 0;
  line-height: 1.9;
}

/* 出典バッジ（押すと参考資料欄へ移動） */
.ref-badge {
  display: inline-block;
  font-size: 0.75rem;
  border: 1px solid #007acc;
  color: #007acc;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.2s;
}

.ref-badge:hover {
  background: #e8f3fb;
}

/* ページ内移動をなめらかにし、移動先の上に少し余白を取る */
html {
  scroll-behavior: smooth;
}

#refs,
[id^="ref"] {
  scroll-margin-top: 16px;
}

/* 移動してきた参考資料を一瞬だけ色付けして、どこを見ればよいか分かるようにする */
.ref-list li.is-flash {
  animation: ref-flash 6s linear;
}

/* 約4秒は黄色のまま保ち、残り2秒で消える */
@keyframes ref-flash {
  0%, 65% { background: #fff3c4; }
  100% { background: transparent; }
}

/* 出典・引用元表記（画像の下に置く小さな注記） */
.quote-source {
  text-align: center;
  font-size: 0.85em;
  color: #777;
  line-height: 1.6;
}

/* リストへ戻るリンク（パンくずの上に右寄せ） */
.back-to-list-row {
  text-align: right;
  margin-top: 10px;
}

.back-to-list {
  color: #ff4500;
  font-size: 0.85em;
  font-weight: bold;
  text-decoration: none;
}

.back-to-list:hover {
  text-decoration: underline;
}

/* 業務利用の案内帯（概要欄の直後） */
.sozai-guide {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f3f7fb;
  border: 1px solid #c9dbea;
  border-radius: 10px;
  padding: 12px 16px;
}

.sozai-guide__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: #1a73e8;
}

.sozai-guide__text {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
}

.sozai-guide__text strong {
  display: block;
  color: #1f3b52;
  font-size: 0.95rem;
}

.sozai-guide__text span {
  color: #4a6274;
  font-size: 0.85rem;
}

.sozai-guide__button {
  background: #777;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.sozai-guide__button:hover {
  background: #666;
}

/* スマホでは縦に並べる */
@media screen and (max-width: 600px) {
  .sozai-guide {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .sozai-guide__icon {
    align-self: center;
  }
}
