/* ============================================================
   圭介教授の談話室 専用CSS
   対象：トップページ配下（スラッグ lounge、functions.php の
   enqueue_lounge_css() でこのファイルのみ読み込まれる）
   ベース：mock-up/mockup_danwashitsu_v5.html
   ============================================================ */

.lounge-section {
  --lounge-navy: #1a2d4d;
  --lounge-navy-2: #1f3668;
  --lounge-blue-gray: #8a9bb0;
  --lounge-border: #c8d4e0;
  --font-serif-jp: 'Noto Serif JP', serif;
  --font-display: 'Playfair Display', serif;
}

/* ===== ヒーローバナー ===== */
.lounge-hero {
  background: #1a2d4d url('../images/lounge/header-dark.jpg') center 40% / cover no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 220px;
}
.lounge-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.lounge-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1090px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}
.lounge-hero-title {
  font-size: 4rem;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ===== ローカルタブナビ ===== */
.lounge-nav-bar {
  background: #fff;
  border-bottom: 2px solid var(--lounge-navy);
}
.lounge-nav-bar-inner {
  max-width: 1090px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 0;
}
.lounge-nav-bar a {
  display: block;
  padding: 10px 20px;
  font-size: 1.3rem;
  color: var(--lounge-navy);
  text-decoration: none;
  background: #e8eef5;
  border: 1px solid var(--lounge-border);
  border-bottom: none;
  margin-left: 4px;
  margin-top: 8px;
  border-radius: 4px 4px 0 0;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lounge-nav-bar a:hover { background: #d0dcea; }
.lounge-nav-bar a.current {
  background: linear-gradient(to bottom, var(--lounge-navy-2), var(--lounge-navy));
  color: #fff;
  font-weight: bold;
  border-color: var(--lounge-navy);
}

/* ===== コンテンツラッパー ===== */
.lounge-section .content-wrap {
  max-width: 1090px;
  margin: 0 auto;
  padding: 32px 0 60px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
}
.lounge-section .content-wrap.full {
  grid-template-columns: 1fr;
}
/* グリッドアイテムはデフォルトmin-width:autoで中の広いテーブルに押し広げられるため、
   0にしてテーブル側（.data-table/.note-figureのoverflow-x:auto）だけがスクロールするようにする */
.lounge-section .content-wrap > .main-content {
  min-width: 0;
}

/* ===== ページ見出し ===== */
.lounge-section .page-h1 {
  color: var(--lounge-navy);
  border-bottom: 6px solid transparent;
  border-image: linear-gradient(to right, var(--lounge-navy), var(--lounge-navy-2)) 1;
  padding-bottom: 10px;
  margin-bottom: 6px;
  font-family: var(--font-serif-jp);
}
.lounge-section .page-h1 .en {
  font-size: 1.4rem;
  color: var(--lounge-blue-gray);
  letter-spacing: 0.15em;
  font-weight: normal;
  margin-left: 12px;
  font-family: var(--font-display);
  font-style: italic;
}
.lounge-section .page-lead {
  color: #888;
  margin-bottom: 28px;
}
/* ページ内アンカー（趣味の各トピック見出し等）がILEC固定ヘッダーの下に隠れないよう補正 */
@media (min-width: 992px) {
  .lounge-section .article-body h2[id],
  .lounge-section .shosai-section[id] {
    scroll-margin-top: 158px;
  }
}

/* ===== サイドメニュー（sticky・カレント表示） ===== */
.lounge-sidebar {
  position: sticky;
  top: 20px;
  align-self: flex-start;
}
/* PC幅（992px以上）ではILEC共通ヘッダーがfixed（高さ138px）になるため、その下にstickyさせる */
@media (min-width: 992px) {
  .lounge-sidebar { top: 158px; }
}
.lounge-sidebar .side-box {
  background: #fff;
  border: 1px solid var(--lounge-border);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}
.lounge-sidebar .side-box-head {
  font-size: 1.2rem;
  background: linear-gradient(to right, var(--lounge-navy), var(--lounge-navy-2));
  color: #fff;
  padding: 8px 14px;
  letter-spacing: 0.1em;
  font-family: var(--font-serif-jp);
}
.lounge-sidebar ul { list-style: none; margin: 0; padding: 0; }
.lounge-sidebar ul li {
  font-size: 1.3rem;
  margin: 0;
  padding: 0;
  color: var(--lounge-navy);
  border-bottom: 1px solid #e8eef5;
}
.lounge-sidebar ul li:last-child { border-bottom: none; }
/* リンク行：paddingはaにのみ付与（liとの二重付与を避ける） */
.lounge-sidebar ul li a {
  display: block;
  padding: 9px 14px;
  color: inherit;
  text-decoration: none !important;
}
.lounge-sidebar ul li a:hover,
.lounge-sidebar ul li a:visited,
.lounge-sidebar ul li a:active {
  text-decoration: none !important;
  background: #f0f4f8;
}
/* current行：aを持たずliに直接テキストが入るのでliにpadding。見出し(side-box-head)と同系色にならないよう、濃い塗りではなく淡色背景のみで表現 */
.lounge-sidebar ul li.current {
  padding: 9px 14px;
  color: var(--lounge-navy);
  font-weight: bold;
  background: #e8eef5;
}

/* ===== トップページ：ごあいさつ ===== */
.welcome-text {
  background: #faf8f4;
  border: 1px solid #d8cfc0;
  border-radius: 6px;
  padding: 24px 28px 20px;
  margin-bottom: 24px;
  line-height: 2;
  color: #444;
}
.welcome-text-head {
  font-size: 2.2rem;
  font-weight: bold;
  color: #7a6a55;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid #d8cfc0;
  font-family: var(--font-serif-jp);
  letter-spacing: 0.06em;
}
.welcome-text-body {
  font-size: 1.5rem;
  line-height: 2;
  color: #444;
}
.profile-career-link-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.profile-career-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px 20px;
  background: linear-gradient(to right, var(--lounge-navy), var(--lounge-navy-2));
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  transition: background 0.15s;
  gap: 16px;
}
.profile-career-link::after { content: '→'; }
.profile-career-link:hover { background: #243d66; }

/* ===== トップページ：セクションカード ===== */
.section-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.section-card {
  background: #fff;
  border: 1px solid var(--lounge-border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.section-card:hover {
  box-shadow: 0 6px 20px rgba(26, 45, 77, 0.13);
  transform: translateY(-2px);
}
.section-card-head {
  padding: 16px 20px;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.08em;
  font-family: var(--font-serif-jp);
}
.section-card-head.brown { background: linear-gradient(to right, var(--lounge-navy), var(--lounge-navy-2)); }
.section-card-head.green { background: linear-gradient(to right, #1e3a5f, #264d82); }
.section-card-head.navy  { background: linear-gradient(to right, #243d66, #2a4a80); }
.section-card-body {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.section-card-body p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 10px;
  flex: 1;
}
.section-card-body .go-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 7px 12px 7px 16px;
  background: linear-gradient(to right, var(--lounge-navy), var(--lounge-navy-2));
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  gap: 12px;
  white-space: nowrap;
}
.section-card-body .go-btn::after { content: '→'; }
.section-card-body .go-btn:hover { background: #243d66; }
@media (min-width: 769px) {
  .section-card-body .go-btn { margin-left: auto; }
}

/* ===== 研究業績展覧室：カテゴリーグリッド ===== */
.achievement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.achievement-card {
  background: #fff;
  border: 1px solid var(--lounge-border);
  border-radius: 4px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}
.achievement-card:hover { background: #f0f4f8; box-shadow: 0 3px 10px rgba(26, 45, 77, 0.1); }
.ach-num {
  font-size: 3rem;
  color: var(--lounge-blue-gray);
  font-family: var(--font-display);
  width: 52px;
  flex-shrink: 0;
  line-height: 1.4;
}
.ach-label { flex: 1; }
.ach-label strong {
  display: block;
  font-size: 1.7rem;
  color: var(--lounge-navy);
  margin-bottom: 3px;
  font-family: var(--font-serif-jp);
}
.ach-arrow { color: var(--lounge-blue-gray); font-size: 1.8rem; flex-shrink: 0; }

/* ===== データテーブル（研究業績一覧） ===== */
.data-table {
  background: #fff;
  border: 1px solid var(--lounge-border);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  overflow-x: auto;
}
.data-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 1.4rem;
  line-height: 1.4;
}
.data-table th {
  background: #e8eef5;
  color: var(--lounge-navy);
  padding: 6px 10px;
  text-align: left;
  font-weight: bold;
  border-bottom: 1px solid var(--lounge-border);
  white-space: nowrap;
}
.data-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e8eef5;
  vertical-align: top;
  line-height: 1.4;
}
.data-table .award-badge {
  display: inline;
  margin-left: 0.3em;
  font-size: 1.3rem;
  color: var(--lounge-blue-gray);
  font-weight: normal;
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f5f8fc; }
.data-table .year-cell { color: var(--lounge-blue-gray); font-size: 1.2rem; white-space: nowrap; }
.data-table .type-cell { color: var(--lounge-blue-gray); font-size: 1.2rem; }
.data-table a { color: var(--lounge-navy); text-decoration: underline; text-underline-offset: 3px; }
.data-table a:hover { color: #2a4a80; }

/* mystyle.css の汎用ルール（target=_blank・.pdfリンク先頭への自動アイコン付与）を打ち消す */
.lounge-section a[target="_blank"]:not(:root)::before,
.lounge-section a[href$=".pdf"]:not(:root)::before {
  content: none;
  display: none;
}
.lounge-pdf-icon { margin-left: 0.4em; font-size: 0.9em; color: var(--lounge-navy); }

/* ===== 書斎：セクション／記事リスト ===== */
.shosai-section { margin-bottom: 36px; }
.lounge-section .section-h2 {
  color: var(--lounge-navy);
  border-left: 8px solid var(--lounge-navy);
  padding: 4px 0 4px 12px;
  margin-bottom: 14px;
  font-family: var(--font-serif-jp);
}
.article-list {
  background: #fff;
  border: 1px solid var(--lounge-border);
  border-radius: 4px;
  overflow: hidden;
}
.article-item {
  padding: 14px 20px;
  border-bottom: 1px solid #e8eef5;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: #f0f4f8; }
.art-title { font-size: 1.4rem; color: #333; flex: 1; }
.art-date { font-size: 1.1rem; color: var(--lounge-blue-gray); white-space: nowrap; }
.art-arrow { color: var(--lounge-blue-gray); }

/* ===== 記事詳細／プロフィール ===== */
.article-detail {
  background: #fff;
  border: 1px solid var(--lounge-border);
  border-radius: 4px;
  padding: 36px 40px;
}
.article-meta {
  margin-bottom: 24px;
  padding-bottom: 5px;
  border-bottom: 2px dashed #e8eef5;
}
.article-meta .art-type {
  letter-spacing: 0.15em;
  color: #5a7a9a;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-style: italic;
}
.article-meta h1 {
  color: var(--lounge-navy);
  line-height: 1.5;
  margin-bottom: 10px;
  font-family: var(--font-serif-jp);
}
.article-meta .author-date { color: var(--lounge-blue-gray); text-align: right; }
.article-body h2 {
  color: var(--lounge-navy);
  background: none;
  margin: 24px 0 10px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--lounge-blue-gray);
  font-family: var(--font-serif-jp);
  font-size: 1.8rem;
}
.article-body h3 {
  color: var(--lounge-navy);
  background: none;
  margin: 20px 0 8px;
  padding: 0;
  font-family: var(--font-serif-jp);
  font-size: 1.6rem;
  font-weight: bold;
}
.article-body p { line-height: 2; color: #444; margin-bottom: 16px; }

/* mystyle.css の汎用ルール（h2.wp-block-heading:before に仮アイコン画像）を打ち消す */
.lounge-section h2.wp-block-heading:before,
.lounge-section h3.wp-block-heading:before,
.lounge-section h4.wp-block-heading:before,
.lounge-section h5.wp-block-heading:before {
  content: none;
  display: none;
}

/* 記事本文：図表・参考文献・注（論文形式の記事詳細で使用） */
.article-body h5 {
  font-size: 1.5rem;
  color: var(--lounge-navy);
  margin: 24px 0 10px;
  font-family: var(--font-serif-jp);
}
.article-body .note-figure { margin: 0 0 30px; overflow-x: auto; }
.article-body .note-figure h6 {
  font-size: 1.4rem;
  font-weight: 500;
  text-align: center;
  color: var(--lounge-navy);
  margin-bottom: 10px;
}
.article-body .note-figure-img img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.article-body .note-figure p {
  font-size: 1.2rem;
  color: var(--lounge-blue-gray);
  text-align: center;
  margin: 10px 0 0;
}
.article-body .note-table { width: 100%; border-collapse: collapse; font-size: 1.3rem; margin-bottom: 10px; }
.article-body .note-table th {
  background: #e8eef5;
  color: var(--lounge-navy);
  padding: 3px 6px;
  text-align: center;
  border: 1px solid var(--lounge-border);
}
.article-body .note-table td {
  background: #fff;
  padding: 3px 6px;
  text-align: center;
  border: 1px solid var(--lounge-border);
}
.article-body .paper-list { list-style: disc; margin: 0 0 24px 20px; font-size: 1.3rem; line-height: 1.8; color: #444; }
.article-body .paper-list li { margin-bottom: 8px; }
.article-body .article-notes {
  font-size: 1.2rem;
  color: var(--lounge-blue-gray);
  line-height: 1.8;
  border-top: 1px solid var(--lounge-border);
  padding-top: 14px;
  margin-top: 24px;
}
.article-body .article-notes h6 { font-size: 1.3rem; font-weight: 600; color: var(--lounge-navy); margin-bottom: 8px; }

/* プロフィールページ：学歴・職歴などの定義リスト */
.profile-dl {
  display: grid;
  grid-template-columns: 14em 1fr;
  font-size: 1.5rem;
  line-height: 1.9;
  color: #444;
  row-gap: 2px;
}
.profile-dl dt { color: var(--lounge-blue-gray); padding: 3px 20px 3px 0; white-space: nowrap; }
.profile-dl dd { padding: 3px 0; margin: 0; }

/* プロフィールページ：氏名・肩書、本文段落・箇条書き（.article-body を挟まず .article-detail 直下に本文が入る） */
.profile-name {
  font-size: 2rem;
  color: var(--lounge-navy);
  font-family: var(--font-serif-jp);
  margin-bottom: 6px;
}
.profile-subtitle {
  font-size: 1.5rem;
  color: #5a7a9a;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.article-detail > p {
  font-size: 1.5rem;
  line-height: 2;
  color: #444;
  margin-bottom: 24px;
}
.article-detail ol {
  font-size: 1.5rem;
  line-height: 2;
  color: #444;
  padding-left: 20px;
  margin-bottom: 28px;
}
.article-detail ol li { margin-bottom: 4px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--lounge-navy);
  font-size: 1.4rem;
  text-decoration: none;
}
.back-link::before { content: '←'; }
.back-link:hover { text-decoration: underline; }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .lounge-hero { min-height: 100px; }
  .lounge-hero-inner { padding: 24px 16px; }
  .lounge-hero-title { font-size: 2.4rem; }

  .lounge-nav-bar-inner { padding: 0 10px; overflow-x: auto; justify-content: flex-start; }
  .lounge-nav-bar a { padding: 8px 14px; font-size: 1.2rem; }

  .lounge-section .content-wrap {
    grid-template-columns: 1fr;
    padding: 20px 10px 40px;
    gap: 24px;
  }
  .lounge-sidebar { position: static; order: -1; }

  .section-cards { grid-template-columns: 1fr; }
  .achievement-grid { grid-template-columns: 1fr; }
  .profile-career-link-wrap { justify-content: stretch; }
  .profile-career-link { width: 100%; }

  .profile-dl { grid-template-columns: 1fr; row-gap: 0; }
  .profile-dl dt { padding: 6px 0 0; }
  .profile-dl dd { padding: 0 0 6px; }

  .article-detail { padding: 20px; }

  /* テーブルはSPのみ横スクロール可（PCは100%のまま） */
  .data-table table,
  .article-body .note-table {
    width: max-content;
    min-width: 100%;
  }
}
