@charset "utf-8";

/* ==========================================================================
   やまぐち共創大学コンソーシアム LMSマニュアル（教員版）
   UI/UX リニューアル版スタイルシート  — Bootstrap 5 と併用
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Zen+Kaku+Gothic+New:wght@500;700;900&display=swap');

/* ---- デザイントークン ---- */
:root {
  --ink:        #24333d;   /* 基本文字色 */
  --ink-soft:   #5c6d79;   /* 補助文字色 */
  --paper:      #f3f5fa;   /* ページ背景 */
  --card:       #ffffff;   /* カード背景 */
  --brand:      #2b4d8c;   /* メインカラー（深いネイビー／教員版識別色） */
  --brand-deep: #16294e;   /* 濃色（ヘッダー・フッター） */
  --brand-soft: #e7edf8;   /* 淡色（ホバー・アクティブ） */
  --accent:     #e8961e;   /* アクセント（アンバー） */
  --danger:     #b3362a;   /* 注意書き */
  --danger-bg:  #fdf0ee;
  --line:       #dfe6e9;   /* 罫線 */
  --radius:     .75rem;
  --shadow-sm:  0 1px 3px rgba(23, 41, 78, .08);
  --shadow-md:  0 6px 24px rgba(23, 41, 78, .10);
}

/* ---- ベース ---- */
html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", Meiryo, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.9;               /* 日本語向けのゆとりある行間 */
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "palt";
}

h1, h2, h3, h4, .navbar-brand {
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  font-weight: 700;
}

a { color: var(--brand); }
a:hover { color: var(--brand-deep); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   ヘッダー（ナビバー）
   ========================================================================== */
.site-navbar {
  background: linear-gradient(120deg, var(--brand-deep) 0%, var(--brand) 100%);
  box-shadow: var(--shadow-sm);
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.site-navbar .navbar-brand {
  color: #fff;
  line-height: 1.35;
  white-space: normal;
  font-size: 1.02rem;
  letter-spacing: .02em;
}
.site-navbar .navbar-brand:hover { color: #d9e2f2; }

.site-navbar .brand-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: .05rem .6rem;
  margin-right: .5rem;
  vertical-align: .12em;
  letter-spacing: .08em;
}

.site-navbar .brand-sub {
  display: block;
  font-family: "Noto Sans JP", sans-serif;
  font-size: .72rem;
  font-weight: 400;
  color: #c3d1e8;
  letter-spacing: .05em;
}

.site-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.site-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255,255,255,.35); }
.site-navbar .navbar-toggler .bi { font-size: 1.4rem; color: #fff; }

/* ==========================================================================
   サイドナビゲーション
   ========================================================================== */
.side-nav {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem .9rem;
  font-size: .88rem;
}

@media (min-width: 992px) {
  .side-nav-sticky {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.side-nav .nav-group + .nav-group { margin-top: .9rem; }

.side-nav .nav-group-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  font-size: .82rem;
  color: var(--brand-deep);
  padding: .25rem .5rem;
  border-bottom: 2px solid var(--brand-soft);
  margin-bottom: .3rem;
  letter-spacing: .03em;
}
.side-nav .nav-group-title .bi { color: var(--brand); font-size: .95rem; }

.side-nav a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  padding: .38rem .5rem .38rem .9rem;
  border-left: 3px solid transparent;
  border-radius: 0 .4rem .4rem 0;
  line-height: 1.5;
  transition: background .15s, color .15s, border-color .15s;
}
.side-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.side-nav a.active {
  background: var(--brand-soft);
  border-left-color: var(--brand);
  color: var(--brand-deep);
  font-weight: 700;
}

/* オフキャンバス（スマホ用メニュー） */
.offcanvas-menu .offcanvas-header {
  background: var(--brand-deep);
  color: #fff;
}
.offcanvas-menu .offcanvas-title { font-size: 1rem; font-weight: 700; }
.offcanvas-menu .btn-close { filter: invert(1); }
.offcanvas-menu .side-nav { border: none; box-shadow: none; padding: .5rem .4rem; }

/* ==========================================================================
   パンくずリスト
   ========================================================================== */
.breadcrumb { font-size: .82rem; margin-bottom: 1rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb .bi { margin-right: .25rem; }

/* ==========================================================================
   ページヘッダー（カテゴリ + タイトル）
   ========================================================================== */
.page-head { margin-bottom: 1.25rem; }

.page-head h2 {           /* カテゴリ名（アイブロウ表示） */
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: .25rem .95rem;
  margin: 0 0 .7rem;
  letter-spacing: .06em;
}

.page-head h3 {           /* ページタイトル（大見出し表示） */
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2rem);
  font-weight: 900;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
  padding-bottom: .8rem;
  border-bottom: 3px solid var(--brand);
  position: relative;
}
.page-head h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 96px;
  height: 3px;
  background: var(--accent);
}

/* ==========================================================================
   本文コンテンツ
   ========================================================================== */
.content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.1rem, 2.5vw, 2.2rem);
}

.page-content { font-size: .98rem; }
.page-content p { margin-bottom: 1.05rem; }
.page-content b, .page-content strong { color: var(--brand-deep); }

.page-content ul, .page-content ol {
  margin: .3rem 0 1rem 1.4rem;
  padding-left: .4rem;
}
.page-content li { margin-bottom: .3rem; }
.page-content li::marker { color: var(--brand); font-weight: 700; }

/* スクリーンショット：枠 + 影 + クリック拡大 */
.page-content img {
  display: block;
  margin: .5rem auto 1.4rem;
  max-width: 100%;
  height: auto !important;      /* 属性による縦横比の歪みを補正 */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: 6px;
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease;
}
.page-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(23, 41, 78, .16);
}

/* 赤字の注意書き（inline style="color:red" のspan）をコールアウト化
   ※HTML本文には手を加えず、CSSのみで見た目を変更 */
.page-content span[style*="red"] {
  display: block;
  color: var(--danger) !important;
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  border-radius: .4rem;
  padding: .7rem 1rem .7rem 2.6rem;
  margin: .6rem 0;
  position: relative;
  line-height: 1.75;
}
.page-content span[style*="red"]::before {
  content: "\F33A";               /* bootstrap-icons: exclamation-triangle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  left: .9rem;
  top: .72rem;
  font-size: 1.05rem;
  color: var(--danger);
}
.page-content span[style*="red"] b { color: var(--danger); }

/* メールアドレス等の表示（既存 .look クラス） */
.look {
  display: inline-block;
  padding: .1rem .7rem;
  background: var(--brand-soft);
  color: var(--brand-deep);
  border: 1px solid var(--line);
  border-radius: .35rem;
  word-break: break-all;
}

/* テーブル */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: .5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.page-content th, .page-content td {
  border: 1px solid var(--line);
  padding: .8rem 1rem;
  vertical-align: middle;
}
.page-content thead th {
  background: var(--brand);
  color: #fff;
  text-align: center;
  font-weight: 700;
  letter-spacing: .05em;
}
.page-content tbody tr:nth-child(even) { background: #f6f8fc; }

/* 「トップページに戻る」ボタン */
a.button1 {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: .7rem 1.8rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: background .15s, transform .15s, box-shadow .15s;
  margin: 1.2rem 0 .4rem;
}
a.button1::before {
  content: "\F12F";               /* bootstrap-icons: arrow-left-circle-fill */
  font-family: "bootstrap-icons";
  font-size: 1.1rem;
}
a.button1:hover {
  background: var(--brand-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
a.button1:active { transform: translateY(1px); box-shadow: none; }

.page-content hr, .content-card > hr { display: none; }  /* 旧テンプレートの区切り線は不要 */

/* ==========================================================================
   前後ページナビゲーション
   ========================================================================== */
.pager-nav { margin-top: 1.25rem; }

.pager-nav a {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  padding: .8rem 1.1rem;
  height: 100%;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pager-nav a:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pager-nav .pager-label {
  font-size: .72rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.pager-nav .pager-title {
  font-weight: 700;
  color: var(--brand-deep);
  font-size: .9rem;
  line-height: 1.5;
}
.pager-nav .pager-next { text-align: right; }
.pager-nav .pager-next .pager-label { justify-content: flex-end; }

/* ==========================================================================
   トップページ
   ========================================================================== */
.hero {
  background:
    radial-gradient(1100px 420px at 88% -60px, rgba(232, 150, 30, .22), transparent 60%),
    linear-gradient(120deg, var(--brand-deep) 0%, var(--brand) 78%);
  color: #fff;
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3.2rem);
}

.hero h1 {
  font-size: clamp(1.45rem, 1.05rem + 2.2vw, 2.35rem);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: .6rem;
  letter-spacing: .01em;
}
.hero h1 a { color: inherit; text-decoration: none; }

.hero address {
  font-style: normal;
  color: #ccd9ee;
  font-size: .95rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hero address::before {
  content: "\F3E3";               /* bootstrap-icons: mortarboard-fill */
  font-family: "bootstrap-icons";
  color: var(--accent);
}

.hero .hero-lead {
  color: #dbe4f3;
  font-size: .92rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* トップ画像を「ブラウザ風フレーム」で表示 */
.browser-frame {
  background: #fff;
  border-radius: .9rem;
  box-shadow: 0 18px 50px rgba(6, 16, 40, .35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .35);
}
.browser-frame .frame-bar {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: #e9eef0;
  padding: .5rem .8rem;
}
.browser-frame .frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9d4d8;
}
.browser-frame .frame-bar span:nth-child(1) { background: #f26d5f; }
.browser-frame .frame-bar span:nth-child(2) { background: #f2b83c; }
.browser-frame .frame-bar span:nth-child(3) { background: #55c664; }
.browser-frame img { display: block; width: 100%; height: auto; }

/* カテゴリカード */
.toc-section { padding: clamp(1.8rem, 4vw, 3rem) 0 1rem; }

.toc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: 100%;
  padding: 1.3rem 1.3rem 1rem;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.toc-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(43, 77, 140, .35);
}

.toc-card h2 {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .8rem;
  padding-bottom: .7rem;
  border-bottom: 2px solid var(--brand-soft);
}

.toc-card .cat-icon {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: .65rem;
  font-size: 1.15rem;
}

/* 既存の dl.new > dd > a 構造をそのまま活かしてリスト表示 */
.toc-card dl.new { margin: 0; }
.toc-card dl.new dd { margin: 0; }
.toc-card dl.new dd a {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.55;
  padding: .42rem .3rem;
  border-radius: .4rem;
  transition: background .15s, color .15s;
}
.toc-card dl.new dd + dd a { border-top: 1px dashed var(--line); }
.toc-card dl.new dd a::before {
  content: "\F285";               /* bootstrap-icons: chevron-right */
  font-family: "bootstrap-icons";
  font-size: .7rem;
  color: var(--accent);
  flex: 0 0 auto;
}
.toc-card dl.new dd a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

/* ==========================================================================
   フッター
   ========================================================================== */
footer.site-footer {
  background: var(--brand-deep);
  color: #b6c5de;
  text-align: center;
  padding: 1.6rem 1rem 1.4rem;
  margin-top: 3rem;
  font-size: .8rem;
  line-height: 1.9;
}
footer.site-footer a { color: #e3ebf7; text-decoration: none; }
footer.site-footer a:hover { color: #fff; text-decoration: underline; }
footer.site-footer .pr { display: block; font-size: .72rem; opacity: .75; }

/* ==========================================================================
   画像拡大（ライトボックス）モーダル
   ========================================================================== */
#imgLightbox .modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
}
#imgLightbox img {
  max-width: 100%;
  max-height: 86vh;
  margin: 0 auto;
  display: block;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
#imgLightbox .btn-close {
  position: absolute;
  top: -2.4rem;
  right: 0;
  filter: invert(1);
  opacity: .9;
}

/* ==========================================================================
   ページトップへ戻るボタン
   ========================================================================== */
#toTop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1040;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, background .15s;
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { background: var(--brand-deep); }

/* ---- フォーカス可視化（キーボード操作対応） ---- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}


/* ==========================================================================
   教員版 固有スタイル
   ========================================================================== */

/* 赤字の注意書き（strong.color-check）も span[style*=red] と同じコールアウト表示に
   ※HTML本文には手を加えず、CSSのみで見た目を変更 */
.page-content .color-check {
  display: block;
  color: var(--danger) !important;
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  border-radius: .4rem;
  padding: .7rem 1rem .7rem 2.6rem;
  margin: .6rem 0;
  position: relative;
  line-height: 1.75;
  font-weight: 700;
}
.page-content .color-check::before {
  content: "\F33A";               /* bootstrap-icons: exclamation-triangle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  left: .9rem;
  top: .72rem;
  font-size: 1.05rem;
  color: var(--danger);
}
.page-content .color-check a { color: var(--danger) !important; }

/* 活動一覧などのアイコン表（.table-wrapper / .item-name / .item-icon） */
.page-content .table-wrapper {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: .5rem;
  overflow-x: auto;               /* 幅の広い表はスクロールで対応 */
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.page-content .table-wrapper table { margin-bottom: 0; box-shadow: none; }

.page-content .item-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--brand-deep);
  margin-bottom: .5rem;
  text-align: center;
}

.page-content .item-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
}

/* アイコン画像はスクリーンショット用の枠・影・拡大の対象外にする */
.page-content .item-icon img,
.page-content img.item-icon {
  display: block;
  width: 100%;
  height: auto !important;
  margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  cursor: default;
  transition: none;
}
.page-content .item-icon img:hover,
.page-content img.item-icon:hover {
  transform: none;
  box-shadow: none;
}

/* 比較表の左上の空セル（.corner） */
.page-content th.corner { background: var(--brand-deep); }

/* 表の1列目（アイコン列）は中央寄せ・幅固定 */
.page-content .table-wrapper td:first-child {
  text-align: center;
  vertical-align: middle;
}
