/*
Theme Name: Fujibuchi Lab
Theme URI: https://arp.kyushu-u.ac.jp/
Author: 藤淵研究室
Author URI: https://researchmap.jp/fujibuch/
Description: 九州大学大学院医学研究院 保健学部門 医用量子線科学分野 藤淵研究室のためのWordPressテーマ。放射線防護・XR教育をテーマにした青系デザイン。メンバーはカスタム投稿タイプ「メンバー」で、お知らせは「投稿」で管理します。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fujibuchi-lab
*/

/* =========================================================
   藤淵研究室 WordPress テーマ スタイル
   ========================================================= */

:root {
  --blue-900: #0c2d54;
  --blue-700: #1a4d8f;
  --blue-500: #2f6fc0;
  --blue-300: #6ea3dd;
  --blue-050: #eaf2fb;
  --accent:   #00a0b0;
  --gray-800: #2b2f36;
  --gray-600: #555b63;
  --gray-300: #d6dbe1;
  --gray-100: #f4f6f9;
  --white:    #ffffff;
  --maxw: 1080px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(12, 45, 84, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* 英数字: Arial / 日本語: HGPゴシックE（未所持環境向けにフォールバック） */
  font-family: Arial, "HGPゴシックE", "HGPGothicE", "Hiragino Kaku Gothic ProN",
               "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  color: var(--gray-800);
  line-height: 1.8;
  background: var(--white);
  font-size: 16px;
}

a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 言語切替バー ---------- */
.util-bar { background: var(--blue-900); color: #fff; }
.util-inner { max-width: var(--maxw); margin: 0 auto; padding: 6px 20px; text-align: right; font-size: 0.8rem; }
.lang-switch a { color: #cbd9ec; text-decoration: none; }
.lang-switch a:hover { color: #fff; text-decoration: underline; }
.lang-switch a.active,
.lang-switch .current-menu-item > a { color: #fff; font-weight: 700; }
.lang-switch .sep { opacity: 0.4; margin: 0 8px; }
.util-inner ul { list-style: none; margin: 0; padding: 0; display: inline-flex; gap: 14px; }
.util-inner li { display: inline; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--white);
  border-top: 4px solid var(--blue-700);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-title a { color: var(--blue-900); text-decoration: none; }
.site-title .lab-name { font-size: 1.35rem; font-weight: 700; display: block; }
.site-title .lab-affil { font-size: 0.78rem; color: var(--gray-600); display: block; }
.custom-logo { max-height: 56px; width: auto; }

/* ---------- ナビ ---------- */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }
.global-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.global-nav li { position: relative; }
.global-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--gray-800);
  font-size: 0.92rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.global-nav a:hover,
.global-nav a.active,
.global-nav .current-menu-item > a,
.global-nav .current_page_item > a {
  background: var(--blue-050);
  color: var(--blue-700);
}
/* サブメニュー（ドロップダウン） */
.global-nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 6px;
}
.global-nav li:hover > ul { display: flex; }

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  color: var(--white);
  padding: 72px 20px;
  text-align: center;
}
.hero h1 { font-size: 2rem; margin: 0 0 12px; line-height: 1.4; }
.hero p { font-size: 1.05rem; max-width: 760px; margin: 0 auto; opacity: 0.95; }
.hero .btn { margin-top: 28px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; color: var(--white); }
.btn.secondary { background: var(--white); color: var(--blue-700); }

/* ---------- トップスライダー ---------- */
.slider { position: relative; overflow: hidden; }
.slides { display: flex; transition: transform .6s ease; will-change: transform; }
.slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 90px 24px;
  text-align: center;
  color: var(--white);
}
.slide-1 { background: linear-gradient(135deg, var(--blue-900), var(--blue-500)); }
.slide-2 { background: linear-gradient(135deg, #0b3a4a, var(--accent)); }
.slide-3 { background: linear-gradient(135deg, #241a5e, #5b6fd6); }
/* 研究紹介pptより抽出した画像を背景に（文字可読性のため暗いオーバーレイを重ねる） */
.slide.bg-vis { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-visualization.jpg) center/cover; }
.slide.bg-scatter { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-scatter.jpg) center/cover; }
.slide.bg-3dmodels { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-3dmodels.jpg) center/cover; }
.slide.bg-ctroom { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-ctroom.jpg) center/cover; }
.slide.bg-shielding { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-shielding.jpg) center/cover; }
.slide.bg-carm1 { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-carm-scatter.jpg) center/cover; }
.slide.bg-carm2 { background: linear-gradient(rgba(8,28,56,.12), rgba(8,28,56,.30)), url(assets/img/hero-carm-ar.jpg) center/cover; }
.slide h2 { font-size: 2rem; color: var(--white); margin: 0 0 14px; line-height: 1.4; text-shadow: 0 2px 14px rgba(0,0,0,.8), 0 0 6px rgba(0,0,0,.55); }
.slide p { max-width: 760px; margin: 0 auto; font-size: 1.05rem; opacity: 1; text-shadow: 0 1px 10px rgba(0,0,0,.75), 0 0 4px rgba(0,0,0,.5); }
.slide .btn { margin-top: 26px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.18); color: var(--white); border: none;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.slider-arrow:hover { background: rgba(255,255,255,0.35); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots {
  position: absolute; bottom: 18px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
}
.slider-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,0.5); cursor: pointer; transition: background .2s;
}
.slider-dots button.active { background: var(--white); }
@media (max-width: 820px) {
  .slide { padding: 64px 18px; }
  .slide h2 { font-size: 1.45rem; }
  .slider-arrow { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ---------- セクション ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--gray-100); }
.section h2 { font-size: 1.6rem; color: var(--blue-900); text-align: center; margin: 0 0 8px; }
.section h2 + .lead { text-align: center; color: var(--gray-600); margin: 0 0 40px; }
.section h3 {
  font-size: 1.2rem;
  color: var(--blue-700);
  border-left: 5px solid var(--blue-500);
  padding-left: 12px;
  margin: 32px 0 14px;
}

/* ページ見出し */
.page-head {
  background: var(--blue-050);
  border-bottom: 1px solid var(--gray-300);
  padding: 40px 20px;
  text-align: center;
}
.page-head h1 { color: var(--blue-900); margin: 0 0 6px; font-size: 1.8rem; }
.page-head p { color: var(--gray-600); margin: 0; font-size: 0.95rem; }

/* パンくず */
.breadcrumb { font-size: 0.82rem; color: var(--gray-600); padding: 12px 0; }
.breadcrumb a { color: var(--blue-700); }

/* ---------- カードグリッド ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.card h3 { border: none; padding: 0; margin: 0 0 10px; color: var(--blue-700); font-size: 1.1rem; }
.card .icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.card p { margin: 0; color: var(--gray-600); font-size: 0.94rem; }

/* ---------- キーワードタグ ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.tag {
  background: var(--blue-050);
  color: var(--blue-700);
  border: 1px solid var(--blue-300);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* ---------- 業績/お知らせリスト ---------- */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li { padding: 16px 0; border-bottom: 1px solid var(--gray-300); font-size: 0.95rem; }
.pub-list .year {
  display: inline-block;
  background: var(--blue-700);
  color: var(--white);
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 4px;
  margin-right: 10px;
}

/* ---------- 業績（年別・タイトル強調） ---------- */
.pub-year {
  font-size: 1.15rem;
  color: var(--blue-700);
  border-left: 5px solid var(--blue-500);
  padding-left: 12px;
  margin: 30px 0 14px;
}
.pub-items { list-style: none; padding: 0; margin: 0; }
.pub-items li { padding: 14px 2px; border-bottom: 1px solid var(--gray-300); }
.pub-items .ttl { display: block; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.pub-items .meta { font-size: 0.9rem; color: var(--gray-600); }
.pub-items .meta em { font-style: italic; }
.pub-items .me { color: var(--blue-700); }

/* 業績アコーディオン（年ごと折りたたみ） */
details.pub-acc { border-bottom: 1px solid var(--gray-300); }
details.pub-acc > summary {
  cursor: pointer;
  list-style: none;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-700);
  padding: 12px 0 12px 28px;
  position: relative;
}
details.pub-acc > summary::-webkit-details-marker { display: none; }
details.pub-acc > summary::before {
  content: "\25B6";
  position: absolute;
  left: 6px;
  color: var(--blue-500);
  font-size: 0.8rem;
  transition: transform .2s;
}
details.pub-acc[open] > summary::before { transform: rotate(90deg); }
details.pub-acc > summary:hover { color: var(--blue-900); }
details.pub-acc .pub-items { margin: 0 0 14px; }
details.pub-acc .pub-items li:last-child { border-bottom: none; }

/* ---------- メンバー ---------- */
.member {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.member .photo {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--blue-050);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--blue-300);
  overflow: hidden;
}
.member .photo img { width: 96px; height: 96px; object-fit: cover; }
.member .info h3 { border: none; padding: 0; margin: 0 0 4px; }
.member .info .role { color: var(--accent); font-size: 0.88rem; font-weight: 600; }
.member .info p { font-size: 0.9rem; color: var(--gray-600); margin: 6px 0 0; }

/* ---------- テーブル ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-300);
  vertical-align: top;
}
.info-table th { background: var(--blue-050); color: var(--blue-900); white-space: nowrap; width: 200px; }

/* 注記 */
.note {
  background: #fff8e1;
  border-left: 4px solid #f4b400;
  padding: 12px 16px;
  font-size: 0.86rem;
  color: #6b5500;
  border-radius: 4px;
  margin: 16px 0;
}

/* WordPress 本文（the_content）の体裁 */
.entry-content { margin-top: 8px; }
.entry-content h2 { text-align: left; color: var(--blue-900); margin: 28px 0 10px; }
.entry-content h3 {
  color: var(--blue-700);
  border-left: 5px solid var(--blue-500);
  padding-left: 12px;
  margin: 28px 0 12px;
}
.entry-content img { border-radius: var(--radius); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.85rem; color: var(--gray-600); }

/* ブロックエディタの画像・埋め込み（YouTube等）・カラムの体裁 */
.entry-content img { height: auto; }
.entry-content figure { margin: 18px 0; }
.entry-content figure img { border-radius: var(--radius); }
.entry-content .wp-block-image img { box-shadow: var(--shadow); }
.entry-content .wp-block-embed,
.entry-content .wp-block-video { margin: 20px 0; }
.entry-content iframe { max-width: 100%; }
.entry-content .wp-block-columns { gap: 24px; }
.entry-content .alignwide { max-width: 1180px; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-content figcaption { font-size: 0.85rem; color: var(--gray-600); text-align: center; }

/* ---------- 図版（研究紹介） ---------- */
.figure { margin: 20px 0; text-align: center; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 520px; }
.figure figcaption { font-size: 0.82rem; color: var(--gray-600); margin-top: 8px; }
.media-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: center; margin: 24px 0; }
.media-row .figure { margin: 0; }
.media-row img { max-width: 520px; }

/* ---------- 動画（YouTube 16:9 レスポンシブ） ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin: 24px 0; }
.video-grid .figure { margin: 0; }
.video-embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ---------- フッター ---------- */
.site-footer { background: var(--blue-900); color: #c9d6e8; padding: 40px 20px 24px; font-size: 0.88rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer a { color: var(--blue-300); }
.site-footer h4 { color: var(--white); margin: 0 0 10px; font-size: 1rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; }
.copyright { text-align: center; margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.8rem; }

/* ---------- ページネーション ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination .page-numbers {
  padding: 8px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius); color: var(--blue-700);
}
.pagination .page-numbers.current { background: var(--blue-700); color: var(--white); border-color: var(--blue-700); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .nav-toggle-label {
    display: block;
    cursor: pointer;
    font-size: 1.6rem;
    color: var(--blue-700);
    user-select: none;
  }
  .global-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .global-nav ul { flex-direction: column; gap: 0; }
  .global-nav a { padding: 14px 20px; border-bottom: 1px solid var(--gray-100); border-radius: 0; }
  .global-nav ul ul { position: static; box-shadow: none; padding: 0 0 0 16px; }
  .global-nav li:hover > ul { display: block; }
  .nav-toggle:checked ~ .global-nav { max-height: 1000px; }
  .hero h1 { font-size: 1.5rem; }
  .member { flex-direction: column; align-items: center; text-align: center; }
  .info-table th { width: auto; white-space: normal; }
}
