/* ====== Living Standard + CSS Grid 対応 CSS ====== */

:root {
  --color-text: #333;
  --color-bg: #fff;
  --color-accent: #ff6600;
  --color-accent-hover: #ff9900;
  --color-sub: #ef1385;
  --font-base: "メイリオ", Meiryo, sans-serif;
  --line-height-base: 1.6;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: var(--line-height-base);
  background-color: var(--color-bg);
}

/* レイアウトコンテナ */
.territori {
  margin: 1rem auto;
  max-width: 1300px;
  background-color: var(--color-bg);
  display: grid;
  grid-template-columns: 200px 1fr; /* サイドバー + メイン */
  grid-template-rows: auto 1fr auto; /* ヘッダー + コンテンツ + フッター */
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  gap: 1rem;
  padding: 0 1rem;
}

/* ヘッダー */
.box_top {
  grid-area: header;
}

.topimg {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

/* ナビゲーション */
.top_menu {
  width: 100%;
  background-color: var(--color-accent);
}

.top_menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top_menu li a {
  display: block;
  text-decoration: none;
  color: #fff;
  padding: 1rem;
  transition: background-color 0.3s ease;
}

.top_menu li a:hover {
  background-color: var(--color-accent-hover);
}


.top-header {
  display: flex;
  align-items: center;       /* ロゴと検索を縦方向中央揃え */
  justify-content: space-between; /* 左右に配置 */
  padding: 10px 0;
  gap: 20px;                 /* ロゴと検索の間隔 */
}

.logo img {
  display: block;
}

.search-box {
  width: 500px;              /* 指定の幅 */
  max-width: 100%;           /* 狭い画面では折り返す */
  text-align: right;         /* 右寄せ */
}




/* サイドナビ */
.navi {
  width: 100%;
  grid-area: sidebar;
}

nav.navi ul {
  list-style: none !important;   /* ← 強制的に無効化 */
  margin: 0;
  padding: 0;
}

/* 各メニューアイテム */
nav.navi li {
  list-style: none !important;   /* ← LIに付いてる場合も消す */
  margin: 0.5rem 0;
  padding: 0;                    /* 左側の余白が自動付与されていたら消す */
}

/* 背景画像付きリンク */
nav.navi li a {
  display: block;
  width: 200px;
  height: 50px;
  line-height: 50px;             /* 縦方向の中央揃え */
  text-align: left;              /* テキストを左寄せ */
  padding-left: 8px;             /* 左側に余白を確保 */
  text-decoration: none;
  color: #333;                   /* 通常文字色 */
  font-size: 1rem;
  font-weight: bold;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 6px;
  transition: transform 0.2s ease, opacity 0.3s ease, color 0.3s ease;
}

/* ホバー効果 */
nav.navi li a:hover {
  transform: scale(1.05);
  opacity: 0.9;
  color: #fff;   /* ← ホバー時は白色 */
}


body {
  overflow-x: hidden; /* ページ全体で横スクロール禁止 */
}

/* コンテンツ */
.content {
  grid-area: main;
  background-color: var(--color-bg);
  padding: 1.5rem;
  margin-top: 1rem;
}

.content h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.content h2 {
  margin: 1.5rem 0;
  font-size: 1.25rem;
  font-weight: normal;
  color: var(--color-sub);
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* フッター */
.bottom {
  grid-area: footer;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  background-color: var(--color-accent);
}

/* パンくずリスト */
.bread,
.bread2,
.bread3 {
  background-color: #f9ecd9;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
}

.bread2,
.bread3 {
  background-color: #ff9;
}

.bread ol,
.bread2 ol,
.bread3 ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.bread li a,
.bread2 li a,
.bread3 li a {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}

.bread li a:hover,
.bread2 li a:hover,
.bread3 li a:hover {
  color: var(--color-accent);
}

.bread li::after {
  content: ">";
  margin: 0 0.5rem;
  color: #888;
}




/* ==========================
   Google カスタム検索 用デザイン調整
   ========================== */

/* 全体の検索ボックスの枠 */
.gsc-control-cse {
  border: none !important;
  background-color: #f9f9f9; /* 背景色をサイト全体に合わせる */
  border-radius: 50px; /* 丸枠に */
  padding: 8px 12px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

/* 検索フォーム部分 */
.gsc-input-box {
  border: none !important;
  background-color: #ffffff !important;
  border-radius: 50px;
  padding: 6px 12px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

/* 検索ボタン部分 */
.gsc-search-button-v2 {
  background-color: #ff9900 !important; /* サイトテーマカラーに変更可 */
  border: none !important;
  border-radius: 50%;
  width: 38px !important;
  height: 38px !important;
  margin-left: 6px;
  cursor: pointer;
  transition: 0.3s ease;
}

/* ボタンのアイコン */
.gsc-search-button-v2 svg {
  fill: #fff !important;
}

/* ホバー時のボタン */
.gsc-search-button-v2:hover {
  background-color: #ffb84d !important;
}

/* テキスト入力部分 */
input.gsc-input {
  background: transparent !important;
  border: none !important;
  color: #333 !important;
  font-size: 16px !important;
  outline: none !important;
}

/* プレースホルダー文字 */
input.gsc-input::placeholder {
  color: #aaa;
}

/* 結果の部分 */
.gsc-results-wrapper-visible {
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  padding: 12px;
}

/* 検索結果リンク */
.gs-title a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}

.gs-title a:hover {
  color: #ff6600;
  text-decoration: underline;
}

/* 検索結果の説明文 */
.gs-snippet {
  color: #555;
  font-size: 14px;
}






/* 新着イラスト + 広告 グリッド配置 */
.new-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3カラム */
  gap: 1rem;
  align-items: start;
}

.new-grid article,
.new-grid .ad-banner {
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.new-grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

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

.new-grid .ad-banner {
  grid-row: span 2; /* 広告は2段ぶち抜きで固定 */
  background: #f9f9f9;
  text-align: center;
}

/* 広告がない場合は3カラム均等 */
.new-grid.no-ad {
  grid-template-columns: repeat(3, 1fr);
}

.new-grid.no-ad .ad-banner {
  display: none;
}


/* 各イラストカード */
.new-grid article {
  background: var(--color-bg);
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #eee;
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* リンク全体をブロックにして hover可能に */
.new-grid article a {
  display: block;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* ===== hover時の効果（画像＋文字リンク全体） ===== */
.new-grid article a:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.new-grid article a:hover h3 {
  color: var(--color-accent); /* タイトル文字色をアクセントに */
}

.new-grid article a:hover img {
  opacity: 0.85; /* 画像を少し暗めに */
}

/* 画像スタイル */
.new-grid article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

/* 関連記事（例: kanren） */
.kanren ul,
.kanren2 ul,
.kanren3 ul,
.kanren4 ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kanren li a,
.kanren2 li a,
.kanren3 li a,
.kanren4 li a {
  display: block;
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-bg);
  padding: 0.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.kanren li a:hover,
.kanren2 li a:hover,
.kanren3 li a:hover,
.kanren4 li a:hover {
  background-color: #ff9;
  color: var(--color-accent);
}

/* ページネーション */
.pagenation ul,
.pagenation2 ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagenation li a,
.pagenation2 li a {
  border: 1px solid #dd9722;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease;
}

.pagenation li a.prev,
.pagenation li a.next {
  font-weight: bold;
  background-color: #fff8e1;
}

.pagenation li a.active,
.pagenation2 li a.active {
  background-color: #fcf2af;
}

.pagenation li a:hover,
.pagenation2 li a:hover {
  background-color: #ffe9d2;
}

/* ===== レスポンシブ対応 ===== */

@media (max-width: 900px) {
  .new-grid {
    grid-template-columns: repeat(2, 1fr); /* タブレットは2カラム */
  }
}

@media (max-width: 600px) {
  .new-grid {
    grid-template-columns: 1fr; /* スマホは1カラム */
  }
}
