@charset "utf-8";

/* =========================================================
   セルコミュニティ班 サイト共通スタイル
   ========================================================= */

:root {
  --primary: #4156ab;      /* 領域カラー（青） */
  --primary-dark: #2f3f80;
  --accent: #c95078;       /* ニュース（ピンク） */
  --event: #4156ab;        /* イベント */
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --border: #e2e2e8;
  --max-width: 1120px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 20px;
}
.site-logo img { height: 40px; width: auto; display: block; }

.global-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.global-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  border-radius: 6px;
  line-height: 1.3;
}
.global-nav a .en {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: .05em;
}
.global-nav a:hover { background: var(--bg-alt); text-decoration: none; }
.global-nav a.current { color: var(--primary); }
.global-nav a.current .en { color: var(--primary); }

/* ハンバーガー */
.nav-toggle {
  display: none;
  border: 0;
  background: none;
  cursor: pointer;
  width: 44px; height: 44px;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: .25s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  height: min(78vh, 640px);
  overflow: hidden;
  background: #222;
}
.hero video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(30, 40, 80, 0.35);
}
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hero-inner img { max-width: min(720px, 88%); filter: drop-shadow(0 2px 12px rgba(0,0,0,.4)); }

/* ---------- ページ見出し（下層ページ） ---------- */
.page-head {
  background: var(--bg-alt);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  margin: 0;
  font-size: 26px;
  text-align: center;
  color: var(--primary-dark);
}
.page-head .en {
  display: block;
  text-align: center;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--text-light);
  margin-top: 6px;
  text-transform: uppercase;
}

/* ---------- セクション ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }

.section-title {
  text-align: center;
  font-size: 24px;
  margin: 0 0 40px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.section-title::before,
.section-title::after {
  content: "";
  height: 1px;
  width: 48px;
  background: var(--primary);
}

/* 本文コンテンツ */
main { min-height: 40vh; }
.content { max-width: 860px; }
.content h2 { font-size: 22px; color: var(--primary-dark); margin: 2em 0 .8em; }
.content h3 {
  font-size: 19px;
  margin: 1.8em 0 .8em;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.content h4 { font-size: 17px; margin: 1.4em 0 .6em; }
.content p { margin: 1em 0; }
.content ul, .content ol { padding-left: 1.4em; }
.content li { margin: .5em 0; }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }
.content figure { margin: 1.5em 0; text-align: center; }
.content figcaption { font-size: 13px; color: var(--text-light); margin-top: 6px; }

/* 注意書き・案内ボックス */
.notice {
  background: #eef1fa;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 40px;
}
.notice p { margin: 0; }

/* 業績リスト */
.ref-list { padding-left: 1.6em; }
.ref-list li { margin: .7em 0; line-height: 1.7; }
.content h2 + .ref-list { margin-top: 1em; }

/* テーブル */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
th, td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
thead th, table th[scope] { background: var(--bg-alt); }
.table-stripe tbody tr:nth-child(even) { background: var(--bg-alt); }
.table-schedule td:first-child, .table-schedule th:first-child {
  white-space: nowrap; text-align: center; font-weight: 700; width: 1%;
}

/* ---------- ニュース一覧 ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-bottom: 1px solid var(--border); }
.news-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
  color: var(--text);
}
.news-list a:hover { text-decoration: none; background: var(--bg-alt); }
.news-date { font-size: 14px; color: var(--text-light); font-variant-numeric: tabular-nums; }
.cat-label {
  font-size: 12px;
  color: #fff;
  padding: 2px 12px;
  border-radius: 3px;
  white-space: nowrap;
}
.cat-label.news { background: var(--accent); }
.cat-label.event { background: var(--event); }
.news-title { flex: 1 1 300px; font-weight: 500; }

/* お知らせページの記事（1ページ掲載） */
.post-article {
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.post-article:last-child { border-bottom: 0; }
.post-article-title {
  font-size: 21px;
  color: var(--primary-dark);
  margin: 8px 0 16px;
}
.post-article .post-meta { margin-bottom: 8px; }

/* フィルター */
.news-filter { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.news-filter button {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.news-filter button.active { background: var(--primary); color: #fff; }

/* ---------- カード（計画研究 / メンバー） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; font-size: 17px; color: var(--primary-dark); line-height: 1.5; }
.card .role { color: var(--text-light); font-size: 14px; }
.card .card-btn { margin-top: auto; padding-top: 16px; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 9px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn--outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }

.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* バナー */
.banner-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  align-items: center;
}
.banner-row img { height: 56px; width: auto; }

/* 図の右回り込み（メンバー詳細） */
.figure-float { }
@media (min-width: 720px) {
  .figure-float figure { float: right; width: 46%; margin: 0 0 1em 1.5em; }
}

/* 前後記事ナビ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}
.post-nav a {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
}
.post-nav a:hover { border-color: var(--primary); text-decoration: none; }
.post-nav .dir { font-size: 12px; color: var(--text-light); }
.post-nav .t { display: block; margin-top: 4px; font-weight: 500; }
.post-nav .next { text-align: right; }

.post-meta { color: var(--text-light); font-size: 14px; margin-bottom: 24px; }

/* ---------- フッター ---------- */
.site-footer {
  background: #2b2f45;
  color: #cfd2e0;
  padding: 48px 0 24px;
  margin-top: 40px;
}
.site-footer img { height: 44px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .9; }
.site-footer p { margin: 4px 0; font-size: 14px; }
.footer-copy {
  text-align: center;
  font-size: 12px;
  color: #9aa0b8;
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 32px;
  padding-top: 20px;
}

/* PAGE TOP */
.pagetop {
  position: fixed;
  right: 20px; bottom: 20px;
  background: var(--primary);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 6px;
  display: none;
  align-items: center; justify-content: center;
  z-index: 90;
  font-size: 18px;
}
.pagetop:hover { text-decoration: none; background: var(--primary-dark); }
.pagetop.show { display: flex; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .global-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-open .global-nav { max-height: 80vh; }
  .global-nav ul { flex-direction: column; padding: 8px 16px; }
  .global-nav a { flex-direction: row; gap: 10px; justify-content: flex-start; padding: 14px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .post-nav { grid-template-columns: 1fr; }
}
