/* ======================================================
   CSS カスタムプロパティ（デザイントークン）
====================================================== */
:root {
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #f0f2f4;
  --border: #e2e6ea;
  --text-dark: #1a2332;
  --text-mid: #4a5568;
  --text-light: #718096;
  --accent-green: #2c8a6e;
  --accent-green-light: #e8f5f0;
  --accent-green-mid: #c3e8dc;
  --accent-teal: #1a7f8a;
  --highlight: #e8f4f1;
  --gold: #b8903a;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius: 8px;
  --radius-lg: 16px;
  --font-serif: 'Noto Serif JP', 'Yu Mincho', YuMincho, serif;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

/* ======================================================
   リセット & ベース
====================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.8;
  min-width: 320px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-teal); text-decoration: underline; }
p { margin-top: 0.75em; margin-bottom: 0.75em; }

/* ======================================================
   スキップリンク
====================================================== */
#hpb-skip {
  position: absolute; top: -100px; left: 0;
  background: var(--accent-green); color: #fff;
  padding: 8px 16px; z-index: 9999;
  transition: top 0.2s;
}
#hpb-skip:focus { top: 0; }
#hpb-skip a { color: #fff; }

/* ======================================================
   コンテナ
====================================================== */
#hpb-container {
  background-color: var(--white);
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

/* ======================================================
   ヘッダー
====================================================== */
#hpb-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

#hpb-headerMain {
  background-color: var(--accent-green);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#hpb-headerMain h1 {
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 300;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  margin: 0;
}

#hpb-headerMain a img { display: inline-block; }

#hpb-headerLogo {
  padding: 14px 20px 12px;
}

#hpb-headerLogo a {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#hpb-headerLogo a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.7rem;
  background: var(--accent-green);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ======================================================
   インナーレイアウト（3カラム）
====================================================== */
#hpb-inner {
  display: grid;
  grid-template-columns: 210px 1fr 220px;
  grid-template-areas: "nav main aside";
  gap: 0;
  align-items: start;
}

/* ======================================================
   ナビゲーション（左）
====================================================== */
#hpb-nav {
  grid-area: nav;
  background-color: var(--off-white);
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 120px);
  padding-top: 8px;
  padding-bottom: 40px;
  position: sticky;
  top: 74px;
  align-self: start;
}

#hpb-nav h3.hpb-c-index {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 20px 18px 8px;
  margin: 0;
}

#hpb-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#hpb-nav ul li { margin: 0; border-bottom: 1px solid var(--border); }
#hpb-nav ul li:last-child { border-bottom: none; }

#hpb-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-mid);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.18s ease;
  line-height: 1.4;
}

#hpb-nav ul li a:hover {
  background-color: var(--accent-green-light);
  border-left-color: var(--accent-green);
  color: var(--accent-green);
  text-decoration: none;
}

#hpb-nav ul li a span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hpb-nav ul li a span:first-child i {
  width: 16px;
  color: var(--accent-green);
  opacity: 0.7;
  font-size: 0.85em;
}

#nav-toppage > a {
  border-left-color: var(--accent-green) !important;
  background-color: var(--accent-green-light);
  color: var(--accent-green) !important;
  font-weight: 500;
}

/* ======================================================
   メインコンテンツ
====================================================== */
#hpb-wrapper {
  grid-area: main;
  min-width: 0;
}

/* ======================================================
   スライダーエリア（3カラム外・全幅表示）
====================================================== */
#hpb-title {
  background-color: var(--white);
  width: 100%;
}

#page { margin: 0; padding: 0; }
#contents { margin: 0; padding: 0; }
.jumbotron { margin: 0; padding: 0; }
.container { max-width: 100%; margin: 0; padding: 0; }

.swiper-container {
  text-align: center;
  padding-bottom: 32px !important;
  background: var(--light-gray);
}

.swiper-container .swiper-slide img {
  max-width: 98%;
  height: auto;
  margin: 0 auto;
}

.swiper-container h7 {
  display: block;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-mid);
  padding: 14px 16px 8px;
  text-align: left;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.swiper-container h7 a {
  color: var(--accent-teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.swiper-button-prev,
.swiper-button-next {
  width: 28px;
  height: 28px;
  margin: -14px 4px 0;
  opacity: 0.7;
}

.mb60 { margin-bottom: 24px; }

/* ======================================================
   メインコンテンツ本文
====================================================== */
#hpb-main {
  padding: 28px 28px 40px;
}

/* ======================================================
   ようこそセクション
====================================================== */
#toppage {}

#toppage > center h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.06em;
  padding: 0 0 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#toppage > center h2 i {
  color: var(--accent-green);
  font-size: 1.1em;
}

#toppage > p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.85;
  background: var(--highlight);
  border-left: 3px solid var(--accent-green);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 28px;
}

/* ======================================================
   h3 セクション見出し
====================================================== */
#hpb-wrapper h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-green);
  letter-spacing: 0.05em;
  padding: 10px 16px;
  margin: 24px 0 8px;
  background: var(--accent-green-light);
  border-left: 4px solid var(--accent-green);
  border-radius: 0 var(--radius) var(--radius) 0;
  clear: both;
  display: flex;
  align-items: center;
  gap: 8px;
}

#hpb-wrapper h3 .en { font-family: var(--font-sans); }
#hpb-wrapper h3 i { color: var(--accent-green); opacity: 0.8; }

/* ======================================================
   ニュース dl/dt/dd
====================================================== */
dl {
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.05em;
  padding: 10px 14px 2px;
  margin-top: 10px;
}

dt:first-child { margin-top: 0; }

dd {
  font-size: 0.85rem;
  color: var(--text-mid);
  padding: 2px 14px 10px 14px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

dd:last-child { border-bottom: none; }

dd a, dt a { color: var(--accent-teal); }
dd a:hover { color: var(--accent-green); }
dd b { font-weight: 500; color: var(--text-dark); }

/* ======================================================
   過去年度リンク（span）
====================================================== */
#toppage > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 8px 0 24px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

#toppage > span a {
  color: var(--text-light);
  font-size: 0.78rem;
}

#toppage > span a:hover { color: var(--accent-green); }

/* ======================================================
   h4 トピックス見出し
====================================================== */
h4, h4.hpb-trigger {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px 12px;
  margin: 20px 0 6px;
  background: var(--off-white);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  cursor: pointer;
}

h4 i, h4.hpb-trigger i {
  color: var(--accent-green) !important;
  margin-top: 2px;
  flex-shrink: 0;
}

h4 b, h4.hpb-trigger b { font-weight: 500; }

/* ======================================================
   本文 p
====================================================== */
#hpb-main p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.85;
  padding: 0;
  text-align: left;
}

/* ======================================================
   PDF リンク（align="right" 要素）
====================================================== */
div[align="right"] {
  text-align: right;
  margin: 8px 0 12px;
}

div[align="right"] a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--accent-teal);
  padding: 5px 12px;
  border: 1px solid var(--accent-teal);
  border-radius: 20px;
  transition: all 0.18s;
}

div[align="right"] a:hover {
  background: var(--accent-teal);
  color: var(--white);
  text-decoration: none;
}

div[align="right"] a i.fa-file-pdf-o { color: inherit; }

/* ======================================================
   hr 区切り線
====================================================== */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
  clear: both;
}

hr.hr-8 {
  border-top: 1px solid var(--border);
  height: 1px;
}

.hr-text {
  line-height: 1em;
  position: relative;
  color: var(--text-light);
  text-align: center;
  height: 1.5em;
  margin: 20px 0;
}

.hr-text:before {
  content: '';
  background: linear-gradient(to right, transparent, var(--border), transparent);
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 1px;
}

.hr-text:after {
  content: attr(data-content);
  position: relative;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-light);
  padding: 0 0.8em;
  line-height: 1.5em;
  background-color: var(--white);
}

/* ======================================================
   リスト (ul/ol)
====================================================== */
#hpb-main ul, #hpb-main ol {
  font-size: 0.85rem;
  color: var(--text-mid);
  padding-left: 1.5em;
  margin: 8px 0 16px;
}

#hpb-main ul li, #hpb-main ol li {
  margin-bottom: 4px;
  line-height: 1.7;
}

/* ======================================================
   トピックス info エリア
====================================================== */
#toppage-info {}

/* ======================================================
   Google 検索ボックス
====================================================== */
gcse\:searchbox-only {
  margin: 16px 0;
}

/* ======================================================
   アサイド（右）
====================================================== */
#hpb-aside {
  grid-area: aside;
  background-color: var(--off-white);
  border-left: 1px solid var(--border);
  padding: 20px 14px 40px;
  position: sticky;
  top: 74px;
  align-self: start;
}

/* バナーエリア */
#banner { margin-bottom: 20px; }

#banner ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#banner li { }

#banner li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 192px;
  height: 128px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  text-indent: -9999px;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: var(--white);
  border: 1px solid var(--border);
}

#banner li a:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

#banner li a.has-text {
  text-indent: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white);
  background-color: var(--accent-green);
  padding: 12px;
  line-height: 1.4;
  text-align: center;
}

#banner a#banner-schedule {
  background-image: url(../img/pic_g105.jpg);
  background-size: contain;
}

#banner a#banner-admission {
  background-image: url(../img/banner_9Ja_02.png);
  background-size: contain;
}

#banner a#banner-blog {
  background-image: url(../img/banner_9Ja_03.png);
  background-size: contain;
}

#banner a#banner-f {
  background-image: url(../img/banner_9Ja_04.jpg);
  background-size: contain;
}

/* バナーテキストラベル（画像なし用） */
#banner a#banner-f span.ja,
#banner a#banner-admission span.ja {
  display: none;
}

/* 団体情報 */
#associationinfo {
  margin-top: 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

#associationinfo h3 {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-green);
  margin: 0 0 10px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  background: none !important;
  clear: both;
}

#associationinfo p {
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.7;
  padding: 0;
  margin-bottom: 6px;
}

/* ======================================================
   フッター
====================================================== */
#hpb-footer {
  background-color: var(--accent-green);
  margin-top: 0;
}

#hpb-footerMain {
  padding: 0;
}

#hpb-footerMain p {
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
  font-weight: 300;
  text-align: center;
  padding: 14px 20px;
  margin: 0;
  background: none;
  letter-spacing: 0.04em;
}

/* ======================================================
   ページトップボタン
====================================================== */
.pagetop {
  position: fixed;
  bottom: 24px;
  right: 20px;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.3s;
  pointer-events: none;
}

.pagetop.visible {
  opacity: 0.85;
  pointer-events: auto;
}

.pagetop a img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}

.pagetop a:hover img {
  transform: translateY(-3px);
}

/* ======================================================
   span テキストアイコン
====================================================== */
span.text-icon {
  display: inline-block;
  background: #d9534f;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
  font-size: 0.6em;
  font-weight: 600;
  color: #fff;
  border-radius: 3px;
}

span.text-icon1 {
  display: inline-block;
  background: #fff;
  padding: 0px 4px;
  margin-left: 5px;
  vertical-align: middle;
  font-size: 0.6em;
  font-weight: 600;
  font-style: italic;
  color: #d9534f;
  border: 1px solid #d9534f;
  border-radius: 4px;
}

/* ======================================================
   アコーディオン（hpb-trigger）
====================================================== */
.hpb-trigger { cursor: pointer; user-select: none; }

.hpb-acc-hide { display: none; }

/* ======================================================
   レスポンシブ（タブレット）
====================================================== */
@media screen and (max-width: 960px) {
  #hpb-inner {
    grid-template-columns: 180px 1fr 0;
    grid-template-areas: "nav main main";
  }

  #hpb-aside {
    display: none;
  }
}

/* ======================================================
   ハンバーガーボタン（スマホのみ表示）
====================================================== */
#sp-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  border-radius: var(--radius);
  transition: background 0.15s;
}

#sp-menu-btn:hover { background: var(--accent-green-light); }

#sp-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent-green);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* 開いた状態：× 形に */
#sp-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#sp-menu-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#sp-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ======================================================
   スマホ用ドロワーナビ
====================================================== */
#sp-nav-drawer {
  display: none; /* JS で制御 */
  background: var(--white);
  border-bottom: 2px solid var(--accent-green);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

#sp-nav-drawer ul {
  list-style: none;
  padding: 6px 0;
  margin: 0;
}

#sp-nav-drawer ul li { margin: 0; border-bottom: 1px solid var(--border); }
#sp-nav-drawer ul li:last-child { border-bottom: none; }

#sp-nav-drawer ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-mid);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

#sp-nav-drawer ul li a:hover,
#sp-nav-drawer ul li a:active {
  background: var(--accent-green-light);
  color: var(--accent-green);
  text-decoration: none;
}

#sp-nav-drawer ul li a i {
  width: 18px;
  color: var(--accent-green);
  opacity: 0.75;
  font-size: 0.9em;
  text-align: center;
}

/* ======================================================
   レスポンシブ（スマートフォン）
====================================================== */
@media screen and (max-width: 640px) {
  body { font-size: 15px; }

  /* ハンバーガーボタンをスマホで表示 */
  #sp-menu-btn { display: flex; }

  /* headerLogo を横並びに */
  #hpb-headerLogo {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
  }

  #hpb-headerLogo a {
    font-size: 1.15rem;
  }

  #hpb-headerLogo a::before {
    height: 1.15rem;
  }

  #hpb-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "aside";
  }

  #hpb-nav {
    display: none;
  }

  #hpb-aside {
    display: block;
    position: static;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 16px;
  }

  #hpb-main {
    padding: 16px;
  }

  #toppage > p {
    padding: 12px 14px;
  }

  .swiper-container .swiper-slide img {
    max-width: 150%;
    height: 100%;
  }

  dl { border-radius: 0; }

  div[align="right"] a {
    font-size: 0.75rem;
    padding: 4px 10px;
    white-space: normal;
    text-align: left;
  }

  .pagetop { bottom: 16px; right: 12px; }
}

/* ======================================================
   ページバナー（サブページ用）
====================================================== */
#hpb-title[style*="pic_g0192118"] {
  height: 160px;
}

@media screen and (max-width: 640px) {
  #hpb-title[style*="pic_g0192118"] {
    height: 100px;
  }
  #hpb-title[style*="pic_g0192118"] h2 {
    font-size: 1.1rem !important;
    padding: 8px 14px !important;
  }
}



/* ======================================================
   スマホ時：バナーを全幅表示
====================================================== */
@media screen and (max-width: 640px) {
  #banner ul {
    flex-direction: column;
    gap: 12px;
  }
  #banner li a {
    width: 100%;
    height: 180px;
  }
}
