/* ======================================
   変数 (カラーテーマ)
====================================== */
:root {
  --color-bg: #fff;
  --color-text: #333;
  --color-link-hover: #d9f0ff;
  --color-accent: #e2c82f;
  --color-header-footer: #fff;
  --color-breadcrumb: gray;
  --color-breadcrumb-sep: lightgray;
  --color-header-footer-link: #424141;
  --color-bland:#1f6f5e;
  --color-bland-light: #f7fcfa;
  --color-bland-pale: #eef8f4;
  --color-bland-soft: #e5f3ef;
  --color-bland-soft2: #bddfd6;
  --color-bland-mid: #73b1a2;
}

/* ======================================
   基本設定
====================================== */
html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  flex: 1 0 auto;
  color: var(--color-text);
}

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

/* ======================================
   リンクスタイル (main 内)
====================================== */
main a {
  font-weight: 500;
  color: var(--color-link);
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

main a:hover {
  background-color: var(--color-link-hover);
  transform: translateY(-2px);
}

/* ======================================
   レイアウト: ページラッパー & メイン
====================================== */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  padding: 1em;
  margin-top: 8px;
}

@media (min-width: 768px) {
  main {
    max-width: 720px;
    margin: 60px auto 0;
  }
}

@media (min-width: 1200px) {
  main {
    max-width: 1000px;
  }
}

/* ======================================
   共通：高さ管理
====================================== */
:root {
  --header-h: 64px;
  --topmsg-h: 44px; /* ← top_message高さ */
}

/* モバイル */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
    --topmsg-h: 52px; /* スマホは2行想定で少し高く */
  }
}

/* ======================================
   固定ヘッダー
====================================== */
.site_header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);

  background: var(--color-header-footer);
  color: var(--color-bg);

  padding: 0;
  z-index: 1000;
  box-sizing: border-box;
  opacity: 0.9;
}

/* ======================================
   ヘッダー直下メッセージ
====================================== */
.top_message {
  margin-top: var(--header-h); /* ← header分下げる */
  min-height: var(--topmsg-h);

  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;

  background: var(--color-bland-light);
  color: var(--color-bland);

  border-top: 3px solid var(--color-bland);
  border-bottom: 1px solid #e0e0e0;

  box-sizing: border-box;
}

/* ======================================
   本文（header + message 分ずらす）
====================================== */

.site_header.hide {
  transform: translateY(-100%);
}

.navbar {
  height: var(--header-h); /* ← headerと同じ高さ */
  padding: 0 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ロゴ */
.logo { 
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.logo img {
  display: block;
  height: 36px; 
  width: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.nav-links a,
.site_footer a {
  color: var(--color-header-footer-link);
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.site_footer a:hover {
  color: var(--color-accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-header-footer-link);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.top_message {
  margin-top: var(--header-h);
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
  background: #f6fbf9;
  color: var(--color-bland);
  border-top: 3px solid var(--color-bland);
  border-bottom: 1px solid #e0e0e0;
  box-sizing: border-box;
  word-break: break-word;
}

/* モバイルナビ */
@media (max-width: 600px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 10px;
    background: var(--color-bg);
    padding: 15px;
    margin: 0 10px 0 0;
    position: absolute;
    top: 60px;
    right: 0;
    width: 150px;
    border-radius: 0.5rem;
    box-sizing: border-box;
  }

  .nav-links a {
    display: block;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links.active {
    display: flex;
  }
}

/* ======================================
   フッター
====================================== */

.site_footer {
  background: var(--color-header-footer);
  color: var(--color-header-footer-link);
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  flex-shrink: 0;
}

.site_footer .footer-links {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

/* フッターロゴ */
.footer-logo {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.footer-logo img {
  height: 32px;
  width: auto;
  display: block;
  opacity: 0.9;
}

/* ======================================
   パンくずリスト
====================================== */
.breadcrumbs {
  font-size: 0.7rem;
  color: var(--color-breadcrumb);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs a {
  color: var(--color-breadcrumb);
  font-weight: bold;
}

.breadcrumbs a:hover {
  background-color: #f0f0f0;
}

.gt {
  color: var(--color-breadcrumb-sep);
  font-weight: bold;
  padding: 2px;
  transition: color 0.2s ease;
}

/* ======================================
   読み込み中表示
====================================== */
#loading {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 6px solid #f3f3f3; /* 外側の色 */
  border-top: 6px solid #3498db; /* 回転部分の色 */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======================================
   タイトルスタイル
====================================== */
.contents-title {
  color:var(--color-header-footer-link);
  border-left:4px solid var(--color-header-footer-link); 
  padding-left:10px;
}

/**
もっとみる
*/
.more-link-wrapper{
  text-align:center;
  margin:20px 0 40px;
}

.more-link{
  display:inline-block;
  padding:10px 22px;
  font-size:14px;
  font-weight:500;
  color:#444;
  background:#fff;
  border:1px solid #ddd;
  border-radius:20px;
  text-decoration:none;
  transition:all .25s ease;
}

.more-link:hover{
  background:#f5f5f5;
  border-color:#bbb;
}
