@charset "UTF-8";
/*==================================================

お役立ち情報（ブログ）WordPress対応
※ header.php で responsive.css・cf7-form.css より「後」に読み込むこと

====================================================*/


/* ---------- ページ送り ----------
   the_posts_pagination() が自動で出力する見出し
   「お役立ち情報のページ送り」は読み上げ用なので、画面上は隠す
   （隠さないとページ番号の上に表示される） */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ---------- 一覧（お役立ち情報・カテゴリー別・検索結果） ---------- */

/* カードを常に2列で並べる（スマホ以外）
   common.css / layout.css の auto-fit は、カードが1枚しかないページ（最終ページなど）で
   そのカードを横いっぱいに引き伸ばすため、列数を2に固定する。
   768px以上に限定しているのは、responsive.css のスマホ用1列の指定を上書きしないため */
@media screen and (min-width: 768px) {
  .page-blog__wrap .postlist-contents__wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* アイキャッチを枠（16:9）いっぱいに切り抜く */
.page-blog__wrap .postlist-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* カテゴリーラベルのリンク色
   （記事ページ・トップページの the_category() はaタグを出力するため、ラベルの白文字を保つ） */
.post-categories a {
  color: inherit;
}


/* ---------- サイドバー ---------- */

/* 選択中のカテゴリー
   静的版のHTMLには current-cat クラスがあるのに対応するCSSがなかったため追加。
   静的版どおり（強調なし）にしたい場合は、この指定を削除する */
.cat-all a.current-cat,
.cat-list .current-cat > a {
  color: var(--main-color);
  font-weight: bold;
}

/* 検索フォーム（静的版の div.search-box を form に置き換えたため） */
.search-box {
  display: flex;
  padding: 0;
}
.search-box__input {
  flex: 1;
  min-width: 0;
  padding: 0.5em 44px 0.5em 0.5em;  /* 右側は虫めがねアイコンの分を空ける */
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 16px;                  /* iPhoneの入力時ズーム防止 */
  color: var(--text-color);
  -webkit-appearance: none;
  appearance: none;
  /* 入力欄はページ全体の文字の指定を引き継がないため、静的版の div と同じになるよう明示 */
  font-family: inherit;             /* Noto Sans JP */
  line-height: inherit;             /* 1.75（これで高さが静的版と同じ約45pxになる） */
  letter-spacing: inherit;          /* 0.5px */
}
.search-box__input::placeholder {
  color: #999;
}
/* 虫めがねアイコン（.search-box::after）の上に透明なボタンを重ねる */
.search-box__btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}

/* 新着記事のサムネイルを16:9で切り抜く */
.news-list__wrap img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}


/* ---------- トップページ「お役立ち情報」 ---------- */

/* アイキャッチを16:9で切り抜く
   （静的版は仮画像がすべて16:9だったため、縦横比の指定がなかった） */
.top-column__aligned .postlist-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}


/* ---------- 記事ページ ---------- */

/* 前後の記事がない側の枠を隠す
   visibility: hidden にしているのは、枠を消しつつ場所は残すため
   （新しい記事へのリンクが左に寄らず、右側に表示されたままになる） */
.pagena-prew:empty,
.pagena-next:empty {
  visibility: hidden;
}


/* ---------- 記事本文 ---------- */

/* 画像：common.css の img { width: 100% } で小さい画像も引き伸ばされるため、元のサイズで表示
   （大きい画像は common.css の max-width: 100% で本文の幅に収まる） */
article img {
  width: auto;
}
article figure {
  margin-top: 2.5em;                /* 段落（article p）と同じ間隔 */
}
article figcaption {
  margin-top: 0.5em;
  font-size: 14px;
  text-align: center;
}

/* 太字・斜体（base.css のリセットで解除されているため戻す） */
article strong,
article b {
  font-weight: bold;
}
article em,
article i {
  font-style: italic;
}

/* 箇条書き（base.css のリセットで記号が消えているため戻す） */
article ul,
article ol {
  margin-top: 2.5em;
  padding-left: 1.5em;
  line-height: 2;
}
article ul {
  list-style: disc;
}
article ol {
  list-style: decimal;
}

/* 本文中のリンク
   common.css の a:link より優先させるため、:link / :visited まで書いている */
article a:link,
article a:visited {
  color: var(--main-color);
  text-decoration: underline;
}

/* 見出し（仮）：記事タイトル（h1）より小さく、太字に
   layout.css / responsive.css の article h2（42px・34px・26px）を上書きする。
   最終的な見た目はデザイン担当の方に確認すること */
article h2 {
  margin-top: 2.5em;
  padding-bottom: 0.4em;
  border-bottom: solid 2px var(--main-color);
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
}


article h3 {
  margin-top: 2em;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
  border-left: solid 4px #E74C27;
  padding-left: 0.5em;
}

/* リストマーカーの色変更 */
.wp-block-list li::marker {
    color: #E74C27;
}

/* ---------- ページ送りの位置（一覧・カテゴリー別・検索結果） ----------
   HTML では「記事一覧 → ページ送り → サイドバー」の順に置いている。
   ・767px以下（1列表示）：HTML の順番どおり、ページ送りがサイドバーの上に出る
   ・768px以上（2列表示）：ページ送りを2行目に回し、記事一覧とサイドバーの下に
     両方の列をまたいで中央に表示する（変更前と同じ位置） */
@media screen and (min-width: 768px) {
  .page-blog__wrap .postlist-aligned > .postlist-contents__wrap {
    grid-column: 1;
    grid-row: 1;
  }
  .page-blog__wrap .postlist-aligned > .sidebar {
    grid-column: 2;
    grid-row: 1;
  }
  .page-blog__wrap .postlist-aligned > .pagination {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}