/* 旧サイト(Twenty Twelve)の見た目を保ちつつ、Hugo移行で必要な微調整のみ */

/* ヘッダーの文字色：旧サイトの WordPress カスタマイザー設定（header text color = #0a3dc9）を再現。
   style.css のデフォルト(#515151)を上書きし、タイトル・タグラインを旧サイトと同じ青に揃える。 */
.site-header h1 a,
.site-header h2 {
  color: #0a3dc9;
}

/* 和文の折り返し・読みやすさ */
body { word-wrap: break-word; overflow-wrap: anywhere; }

/* 本文中の画像・表がカラムをはみ出さないように */
.entry-content img,
.widget img { max-width: 100%; height: auto; }

/* WP由来の表組みを罫線付きで表示 */
.entry-content table { border-collapse: collapse; margin: 0 0 24px; width: 100%; }
.entry-content th,
.entry-content td { border: 1px solid #ddd; padding: 6px 10px; vertical-align: top; }
.entry-content th { background: #f7f7f7; }

/* アーカイブ/カテゴリ見出し */
.archive-header { margin: 0 0 24px; padding-bottom: 12px; border-bottom: 1px solid #ededed; }
.archive-title { font-size: 20px; font-weight: normal; }

/* サイドバー検索フォーム（Twenty Twelve 風） */
.search-form .search-field { width: 60%; padding: 4px 6px; }
.search-form .search-submit { padding: 4px 10px; }

/* 「続きを読む」 */
.more-link { font-weight: bold; }

/* CTA / お問い合わせ ボックス（cta ショートコード） */
.join-cta { margin: 1.5em 0; }
.cta-box {
  border: 1px solid #cdd3e6;
  border-left: 4px solid #0a3dc9;
  background: #f5f8ff;
  padding: 18px 22px;
  border-radius: 4px;
}
.cta-box > :first-child { margin-top: 0; }
.cta-box > :last-child { margin-bottom: 0; }
.cta-box h2 { font-size: 1.15em; color: #0a3dc9; margin: 0 0 .5em; border: 0; padding: 0; }
.cta-box p { margin: .5em 0; line-height: 1.7; }
.cta-button {
  display: inline-block;
  background: #0a3dc9;
  color: #fff;
  padding: 8px 18px;
  border: 0;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  text-decoration: none;
}
.cta-button:hover { background: #082da0; color: #fff; text-decoration: none; }
.cta-email { font-size: 1.05em; }

/* メールのコピー・チップ。中身は <canvas>（テキストではないので選択コピー不可）。
   .cta-button.email-copy（ボタン版）には適用しない。 */
.email-copy:not(.cta-button) {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .1em .55em;
  border: 1px solid #cdd3e6;
  border-radius: 6px;
  background: #eef2ff;
  color: #0a3dc9;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1.4;
  user-select: none;            /* 念のためテキスト選択も無効化 */
  -webkit-user-select: none;
}
/* クリップボード・アイコン（currentColor のマスク） */
.email-copy:not(.cta-button)::before {
  content: "";
  width: .85em;
  height: .85em;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2a2 2 0 0 0-2 2H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-1a2 2 0 0 0-2-2H9zm0 2h6v2H9V4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2a2 2 0 0 0-2 2H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-1a2 2 0 0 0-2-2H9zm0 2h6v2H9V4z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .8;
}
.email-copy:not(.cta-button):hover { background: #e0e8ff; border-color: #0a3dc9; }
.email-copy:not(.cta-button):active { transform: translateY(1px); }
.email-copy canvas { display: block; }
.email-copied-msg { color: #1a7f37; font-weight: bold; }

/* Pagefind 検索UI（旧サイト Twenty Twelve の配色に寄せる） */
.pagefind-search {
  --pagefind-ui-primary: #0a3dc9;
  --pagefind-ui-text: #444;
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: #dddddd;
  --pagefind-ui-tag: #eef;
  --pagefind-ui-border-radius: 4px;
  --pagefind-ui-font: inherit;
  margin-top: 16px;
}

/* ── SIG 構造化イベント（cfp/program）情報カード & タイムテーブル ───────── */
.sig { margin: 0; }

/* 開催概要カード（ラベル＝左カラム青／値＝右） */
.sig-card {
  margin: 0 0 28px;
  border: 1px solid #cdd3e6;
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcff;
}
.sig-card-row { display: grid; grid-template-columns: 8.5em 1fr; border-top: 1px solid #e6eaf5; }
.sig-card-row:first-child { border-top: 0; }
.sig-card-row > dt { margin: 0; padding: 11px 14px; font-weight: bold; color: #0a3dc9; background: #eef2ff; }
.sig-card-row > dd { margin: 0; padding: 11px 16px; line-height: 1.7; }
.sig-muted { color: #5a6072; font-size: .92em; }
.sig-deadlines > div { margin: 2px 0; }
.sig-deadlines del { color: #9aa; }

/* セクション見出し */
.sig-sec { margin: 0 0 22px; }
.sig-h {
  font-size: 1.06em; color: #0a3dc9; font-weight: bold;
  margin: 0 0 10px; padding: 3px 0 6px 12px;
  border-left: 4px solid #0a3dc9; border-bottom: 1px solid #e6eaf5;
}
.sig-list { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.sig-list > li { margin: 0 0 8px; }

/* プログラム・タイムテーブル */
.sig-sched { border-left: 2px solid #dde3f2; margin-left: 4px; padding-left: 2px; }
.sig-slot { display: grid; grid-template-columns: 7.5em 1fr; gap: 0 14px; padding: 7px 0; }
.sig-slot + .sig-slot { border-top: 1px dotted #e6eaf5; }
.sig-slot-time { color: #0a3dc9; font-weight: bold; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.sig-slot-head { margin: 0 0 5px; font-weight: bold; }
.sig-slot-head.is-plain { color: #445; }
.sig-slot-sub { margin: 4px 0; color: #5a6072; font-size: .92em; }
.sig-talk { display: flex; gap: .3em; margin: 4px 0; }
.sig-talk-no { color: #0a3dc9; font-weight: bold; flex: none; }
.sig-talk-title { display: block; }
.sig-talk-auth { display: block; color: #5a6072; font-size: .9em; margin-top: 1px; }

.sig-note { margin-top: 8px; }

/* スマホ：ラベル/時刻を上に積む */
@media (max-width: 480px) {
  .sig-card-row { grid-template-columns: 1fr; }
  .sig-card-row > dt { padding-bottom: 2px; }
  .sig-card-row > dd { padding-top: 4px; }
  .sig-slot { grid-template-columns: 1fr; gap: 2px; }
  .sig-slot-time { padding-left: 0; }
}

/* 参加費の内訳（合宿など複数項目） */
.sig-feelist { margin: 4px 0 0; padding-left: 1.3em; }
.sig-feelist > li { margin: 2px 0; }

/* プログラムの日付見出し（複数日開催） */
.sig-day {
  margin: 4px 0 2px; padding: 7px 12px;
  background: #0a3dc9; color: #fff;
  font-weight: bold; text-align: center; letter-spacing: .04em;
  border-radius: 5px;
}
.sig-day:not(:first-child) { margin-top: 16px; }

/* ── ナビゲーション（テーマ感は維持しつつブランド色・現在地・押せる感） ───── */
/* ホバー/現在地をブランド青に統一（テーマ既定の水色・黒を上書き） */
.main-navigation li a:hover,
.main-navigation li a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
  color: #0a3dc9;
}
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a { font-weight: bold; }

/* デスクトップ（横並びナビ）：現在地/ホバーに下線バー。高さブレ防止に透明ボーダー常設 */
@media screen and (min-width: 600px) {
  .main-navigation li a {
    border-bottom: 3px solid transparent;
    transition: color .12s, border-color .12s;
  }
  .main-navigation li a:hover,
  .main-navigation li a:focus { border-bottom-color: #9fb3f0; }
  .main-navigation .current-menu-item > a,
  .main-navigation .current-menu-ancestor > a { border-bottom-color: #0a3dc9; }
}

/* モバイル：ハンバーガー風トグルボタン & 開いたときの縦メニュー */
@media screen and (max-width: 599px) {
  .menu-toggle {
    display: inline-block;
    margin: 0 auto;
    padding: 8px 16px 8px 38px;
    position: relative;
    border: 1px solid #cdd3e6;
    border-radius: 6px;
    background: #eef2ff;
    color: #0a3dc9;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
  }
  .menu-toggle::before {
    content: "";
    position: absolute;
    left: 14px; top: 50%; margin-top: -6px;
    width: 16px; height: 12px;
    background:
      linear-gradient(#0a3dc9,#0a3dc9) 0 0/100% 2px no-repeat,
      linear-gradient(#0a3dc9,#0a3dc9) 0 5px/100% 2px no-repeat,
      linear-gradient(#0a3dc9,#0a3dc9) 0 10px/100% 2px no-repeat;
  }
  .menu-toggle.toggled-on { background: #0a3dc9; color: #fff; }
  .menu-toggle.toggled-on::before {
    background:
      linear-gradient(#fff,#fff) 0 0/100% 2px no-repeat,
      linear-gradient(#fff,#fff) 0 5px/100% 2px no-repeat,
      linear-gradient(#fff,#fff) 0 10px/100% 2px no-repeat;
  }
  .main-navigation ul.nav-menu.toggled-on {
    display: block;
    margin: 12px 0 0;
    border: 1px solid #e6eaf5;
    border-radius: 6px;
  }
  .main-navigation ul.nav-menu.toggled-on li {
    display: block;
    margin: 0;
    border-top: 1px solid #eef2ff;
  }
  .main-navigation ul.nav-menu.toggled-on li:first-child { border-top: 0; }
  .main-navigation ul.nav-menu.toggled-on li a { display: block; padding: 11px 16px; }
}
