/*
Theme Name: Fox Child - 使い捨て時代を考える会
Description: Foxテーマ（Hague）の子テーマ。tukaisutejidai.com移行用のコンテンツ部品クラスを含む。
Author:
Template: fox
Version: 1.0.71
*/

/* サイト全体のフォント指定（OS標準ゴシックを優先。Mac/Win/Androidいずれも綺麗に表示） */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
  --font-nav: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
}

/* ==========================================================================
   tukaisutejidai.com リニューアル用 コンテンツ部品クラス
   命名規則: tkj- プレフィックスでFox本体のクラスと衝突回避
   前提: 親テーマが --accent-color を定義済み（ボタン・リンク色と統一するため利用）
   ========================================================================== */

/* 1. アクセントテキスト（テーマのアクセントカラーに追従・強調用） */
.tkj-text-accent {
  color: var(--accent-color, #db4a37);
  font-weight: bold;
}

/* 2. 警告・注意テキスト（常に赤。テーマカラーが変わっても警告色は固定） */
.tkj-text-alert {
  color: #cc0000;
  font-weight: bold;
}

/* 2b. エコ・農業らしさを表すテキスト（緑系）※要確認：既存コンテンツで頻出した緑系配色を仮に集約したもの */
.tkj-text-eco {
  color: #2c7a2c;
  font-weight: bold;
}
.tkj-bg-eco {
  background-color: #d9f2e3;
}

/* 3. 汎用囲みボックス（Word貼り付けの黒枠囲みの置き換え） */
.tkj-box {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1em 1.2em;
  margin: 1.5em 0;
  background: #fafafa;
}

/* 4. 強調囲みボックス（背景色つき警告・お知らせ枠） */
.tkj-box-alert {
  border: 1px solid #f3c2c2;
  border-left: 4px solid #cc0000;
  border-radius: 4px;
  padding: 1em 1.2em;
  margin: 1.5em 0;
  background: #fff5f5;
}

/* 5. カラムレイアウト（flex-basis直書きの置き換え。モバイルでは1カラムに崩す） */
.tkj-columns-2,
.tkj-columns-3,
.tkj-columns-4 {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  margin: 1.5em 0;
}
.tkj-columns-2 > * { flex: 1 1 calc(50% - 0.75em); }
.tkj-columns-3 > * { flex: 1 1 calc(33.333% - 1em); }
.tkj-columns-4 > * { flex: 1 1 calc(25% - 1.125em); }
@media (max-width: 782px) {
  .tkj-columns-2 > *,
  .tkj-columns-3 > *,
  .tkj-columns-4 > * {
    flex: 1 1 100%;
  }
}

/* 6. 表の横スクロール対応（Word貼り付け表がモバイルで崩れないように） */
.tkj-table-scroll {
  overflow-x: auto;
  margin: 1.5em 0;
  -webkit-overflow-scrolling: touch;
}
.tkj-table-scroll table {
  width: 100%;
  border-collapse: collapse;
}
.tkj-table-scroll th,
.tkj-table-scroll td {
  border: 1px solid #ddd;
  padding: 0.5em 0.8em;
}

/* 団体紹介フッター（4団体横並び・横幅いっぱい） */
.tkj-org-footer {
  width: 100%;
  background: #f4f4f0;
  border-top: 1px solid #ddd;
  padding: 40px 20px;
}
.tkj-org-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 1024px) {
  .tkj-org-footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .tkj-org-footer__inner {
    grid-template-columns: 1fr;
  }
}
.tkj-org-footer__item {
  font-size: 13px;
  line-height: 1.7;
}
.tkj-org-footer__title {
  font-size: 15px;
  font-weight: bold;
  margin: 0 0 10px;
  border-left: 4px solid var(--accent-color, #db4a37);
  padding-left: 10px;
}
.tkj-org-footer__item p {
  margin: 0 0 10px;
}
.tkj-org-footer__item iframe {
  width: 100%;
  height: 220px;
  border: 0;
  margin-top: 8px;
}
.tkj-org-footer__item .tkj-org-links a {
  margin-right: 10px;
}


/*
 * 注記: h1-h6 / ul / ol / strong / blockquote は素のタグのまま移行する。
 * デザインはFoxテーマ本体の entry-content 配下のタイポグラフィ設定に委ねる。
 * （テーマ側で見出し・リスト・引用のデザインを変更すれば全ページに自動反映される）
 */

/* ==========================================================================
   トップページ「使い捨て時代を考える会について」〜「コミュニティカフェ」の4パート
   （新設の会員種別のご案内/メンバー紹介/コミュニティカフェ各セクションは
   Home builder側のSection background機能で同じ背景色を設定している）

   Home builderの section_spacing（全セクション共通の余白, 40px）が margin-top と
   margin-bottom を同じ値で同時制御するため、個別セクションのmarginフィールドでは
   「4パートの間だけ隙間ゼロ」を表現できない。そのため隣接する4パート間のmarginを
   ここで個別に打ち消し、背景色がシームレスに続くようにしている。
   ========================================================================== */
.h2-section_64a7e2ab54b8433 {
  background-color: #f4f5f6;
  margin-bottom: 0 !important;
  padding-top: 40px;
}
.tkj-section-membership,
.tkj-section-members {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.tkj-section-cafeshop {
  margin-top: 0 !important;
  padding-bottom: 40px;
}

/* 会員種別のご案内: 4つのカードの上下余白が窮屈だったため追加 */
.tkj-col-membership-1,
.tkj-col-membership-2,
.tkj-col-membership-3,
.tkj-col-membership-4 {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
}

/* 本文最初の画像を横幅いっぱいに表示（クリックでライトボックス表示） */
.tkj-first-image-figure {
  display: block;
  margin: 0 0 1.5em;
}
.tkj-first-image-link {
  display: block;
}
.tkj-first-image-link img.tkj-first-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* 本文内のリンクURLが長い場合、コンテンツ幅からはみ出さず折り返す */
.entry-content a {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* TablePress テーブルID=1（法人情報）: 1列目30% / 2列目70% */
.tablepress-id-1 {
  table-layout: fixed;
  width: 100%;
}
.tablepress-id-1 th,
.tablepress-id-1 td {
  word-break: break-word;
  vertical-align: middle !important;
}
.tablepress-id-1 td:nth-child(1) {
  width: 30%;
  font-weight: bold;
  background: #fafafa;
  text-align: center;
}
.tablepress-id-1 td:nth-child(2) {
  width: 70%;
  text-align: left;
}

/* anzennousan移行コンテンツのTablePressテーブル: 1列目30% / 2列目70% */
.anzen-table {
  table-layout: fixed;
  width: 100%;
}
.anzen-table th,
.anzen-table td {
  word-break: break-word;
  vertical-align: middle !important;
}
.anzen-table td:nth-child(1) {
  width: 30%;
  font-weight: bold;
  background: #fafafa;
  text-align: center;
}
.anzen-table td:nth-child(2) {
  width: 70%;
  text-align: left;
}

/* 安全農産供給センター移行セクション: ヘッダーを視覚的に区別 */
.tkj-anzennousan-section #header56 {
  background: #ffffff;
}

/* メインメニュー: アクティブ/オンマウス時の下線をキーカラーのグリーンに統一 */
.tkj-anzennousan-section .mainnav ul.menu > li > a::after {
  background: #4caf50;
}
.tkj-anzennousan-section #topbar56 {
  background: #eef7ea;
}

/* wp-block-columns: ブロックコメントを含まないページでもコアのCSSに依存せず
   常にカラムレイアウトが効くよう、子テーマ側で自前定義する（サイト全体） */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  margin-bottom: 1.75em;
}
.wp-block-column {
  flex: 1;
  min-width: 0;
}
@media (max-width: 782px) {
  .wp-block-columns {
    flex-direction: column;
  }
}

/* wpautopが<img>単体行を空の<p></p>に分割してしまうことがあり、
   その空段落の既定marginが本文中に不自然な余白を作るため非表示にする（サイト全体） */
.entry-content p:empty {
  display: none;
}

/* 共通フッター: 手書き文字ロゴ(旧)＋tsukajida-logo.png(新)を縦に並べて表示 */
.tkj-footer-logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.tkj-footer-logo-group .tkj-footer-secondary-logo {
  width: 260px;
  height: auto;
}
.tkj-footer-logo-group .main-footer-logo {
  width: 210px;
  height: auto;
}

/* anzennousan移行セクション: ロゴを実寸(203x115px)の約0.7倍で表示し、retinaで高精細に見せる */
.tkj-anzennousan-section .fox-logo-container img.main-img-logo {
  width: 142.1px;
  height: 80.5px;
}
@media (max-width: 840px) {
  .tkj-anzennousan-section .fox-logo-container img.main-img-logo,
  .tkj-anzennousan-section .header_mobile56 .logo56 img.main-img-logo {
    width: auto;
    height: 40px;
  }
}

/* anzennousan移行セクション: スマホヘッダー右側（search+「ツカジダ」ボタン）が
   1/6幅では狭くボタン文字が縦に折り返してしまうため、列幅とボタンサイズを調整 */
@media (max-width: 840px) {
  .tkj-anzennousan-section .header_mobile56__part--left {
    width: 16%;
  }
  .tkj-anzennousan-section .header_mobile56__part--center {
    width: 42%;
  }
  .tkj-anzennousan-section .header_mobile56__part--right {
    width: 42%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .tkj-anzennousan-section .header_mobile56 .header56__button1 {
    flex-shrink: 0;
  }
  .tkj-anzennousan-section .header_mobile56 .header56__button1 .btn56 {
    white-space: nowrap;
    font-size: 11px;
    padding: 0 7px;
    height: 26px;
    line-height: 26px;
  }
}

/* anzennousan トップページ: お知らせ一覧（画像なし、タイトル+日付のみ） */
.anzen-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.anzen-news-item {
  display: flex;
  align-items: baseline;
  gap: 1.2em;
  padding: 0.9em 0;
  border-bottom: 1px solid #e5e5e5;
}
.anzen-news-date {
  flex-shrink: 0;
  color: #888;
  font-size: 0.9em;
}
.anzen-news-title {
  color: inherit;
  text-decoration: none;
}
.anzen-news-title:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .anzen-news-item {
    flex-direction: column;
    gap: 0.3em;
  }
}

/* anzennousan移行コンテンツ: 動画を横幅いっぱいに表示 */
.anzen-video {
  width: 100%;
}
.anzen-video video {
  width: 100%;
  height: auto;
  display: block;
}
/* YouTube等のiframe埋め込みをレスポンシブ16:9で表示 */
.anzen-video:has(iframe) {
  position: relative;
  padding-top: 56.25%;
  height: 0;
}
.anzen-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact Form 7フォーム共通スタイル（サイト全体） */
.wpcf7-form p br {
  display: none;
}
.wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.3em;
}
.wpcf7-form .wpcf7-list-item {
  display: block;
  margin: 0.3em 0;
}
.tkj-form-required {
  color: var(--link-color, #db4a36);
  font-weight: bold;
  font-size: 13px;
}

/* anzennousan移行コンテンツ: 見出しの上部余白（本文最初の見出しは余白なし） */
.entry-content h2.anzen-heading {
  margin-top: 2.5em;
}
.entry-content h2.anzen-heading:first-of-type {
  margin-top: 0;
}
.entry-content h3.anzen-subheading {
  margin-top: 1.2em;
}

/* anzennousan配下ページ限定: h2に現行サイト(anzennousan.com)のブランドカラー
   （明るいグリーン、ナビゲーションメニュー等で使用）で上下線を追加 */
.tkj-anzennousan-section .entry-content h2 {
  color: #009933;
  padding: 0.5em 0;
  border-top: solid 3px #009933;
  border-bottom: solid 3px #009933;
  font-size: 24px;
}
@media (max-width: 782px) {
  .tkj-anzennousan-section .entry-content h2 {
    font-size: 19px;
  }
}

/* ステップのタイムライン風デザイン（丸番号バッジ＋縦のライン）
   ※em単位の相対計算だと丸のサイズと線の位置がズレやすいため、
   　全て px の固定値で統一し、計算のズレが起きないようにしている */
.anzen-step {
  position: relative;
  padding: 0 0 40px 56px;
  margin: 0;
}
.anzen-step::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  z-index: 1;
  box-sizing: border-box;
}
.anzen-step::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 36px;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
}
.anzen-step--last::after {
  display: none;
}
.anzen-step .anzen-step-title {
  margin-top: 0.3em;
}

/* 色はページによって別デザインとして指定する
   メインサイト（お買い物サイトボタンと同じ色） */
.anzen-step::before,
.anzen-step::after {
  background: #db4a37;
}
/* anzennousan配下ページ（元の緑） */
.tkj-anzennousan-section .anzen-step::before,
.tkj-anzennousan-section .anzen-step::after {
  background: #009933;
}

/* トップページ「あんてなバックナンバー」: スマホ表示では6列→2列に */
@media (max-width: 600px) {
  [class*="tkj-col-antenna-"] {
    width: 50% !important;
  }
}

/* 個別ページ・投稿共通: h2の上部に余白（本文最初の要素がh2の場合は余白なし） */
.entry-content h2 {
  margin-top: 30px;
}
.entry-content > h2:first-child {
  margin-top: 0;
}

/* トップページ「会員種別のご案内」: スマホ表示でカラムが縦積みになった際の
   余白（Foxテーマ本体の2em）が大きすぎるため0に */
@media only screen and (max-width: 600px) {
  .tkj-row-membership .col + .col {
    margin-top: 0;
  }
}

/* anzennousan配下ページ限定: 画像をセンタリング */
.tkj-anzennousan-section .entry-content .anzen-image {
  text-align: center;
}

/* 法人情報テーブル（TablePress table id=6）専用スタイル */
.tablepress-id-6 {
  table-layout: fixed;
  width: 100%;
  border: 1px solid #ddd;
}
.tablepress-id-6 th,
.tablepress-id-6 td {
  word-break: break-word;
  vertical-align: middle !important;
}
.tablepress-id-6 td:nth-child(1) {
  width: 30%;
  background: #f4f4f0;
  font-weight: bold;
  text-align: center;
}
.tablepress-id-6 td:nth-child(2) {
  width: 70%;
  text-align: left;
}

/* 「会員専用広報誌あんてな」バックナンバーページ: サムネイルをグリッド表示 */
.page-id-2807 .entry-content .wp-block-image img {
  width: 100%;
  height: auto;
}

/* メインメニューのプルダウン: 項目が折り返して行間が空いて見えていたため、
   折り返さず1行で表示するように変更（line-height/paddingはテーマ標準に戻す） */
.mainnav ul.sub-menu {
  width: auto;
  min-width: 180px;
  white-space: nowrap;
}
.mainnav ul.sub-menu a {
  white-space: nowrap;
}

/* 「記事一覧」ページ: 投稿タイトルの文字サイズをトップページの一覧と同じに */
.page-id-281 .title56 {
  font-size: 21px;
}
@media (max-width: 782px) {
  .page-id-281 .title56 {
    font-size: 18px;
  }
}
@media (max-width: 600px) {
  .page-id-281 .title56 {
    font-size: 16px;
  }
}

/* 目次（Easy Table of Contents）: 通常時は下線なし、オンマウスで下線
   （他のCSSより確実に優先させるため詳細度を上げてimportantを付与） */
#ez-toc-container a.ez-toc-link,
.ez-toc-container a.ez-toc-link,
a.ez-toc-link {
  text-decoration: none !important;
}
#ez-toc-container a.ez-toc-link:hover,
.ez-toc-container a.ez-toc-link:hover,
a.ez-toc-link:hover {
  text-decoration: underline !important;
}


/* ============================================================
 * 「全てのお知らせ」メガメニュー常時展開表示(PC表示のみ)
 * (通常はホバーで開くドロップダウンだが、配下の活動カテゴリを
 *  ひと目で見せたいという要望のため、ヘッダー直下に常時表示の
 *  帯として固定する。対象メニュー項目は固定ID(2609)で決め打ち。
 *  DOM移動と高さ固定解除はfunctions.phpのtkj_pin_mega_menu_openで行う)
 * ============================================================ */
#pinned-mega-panel {
  display: none;
}
@media only screen and (min-width: 841px) {
  #pinned-mega-panel {
    display: flex !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 1080px !important;
    margin: 0 auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    box-sizing: border-box !important;
    background: #FFE4D5 !important;
    padding: 8px 20px 7px !important;
    border-bottom: 1px solid #eee !important;
    list-style: none !important;
    flex-wrap: wrap !important;
    gap: 4px 24px !important;
  }
  #pinned-mega-panel > li {
    border-right: 1px solid #ccc !important;
    padding-right: 20px !important;
    margin-right: -4px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
  }
  #pinned-mega-panel > li:last-child {
    border-right: none !important;
  }
  #pinned-mega-panel > li > a {
    font-size: 15px !important;
  }
  .menu-item-2609 > a {
    background: #FFE4D5 !important;
  }
}

/* ============================================================
 * メインメニュー「LINE友達追加」にLINEアイコンとキーカラーを適用(固定ID 3018)
 * ============================================================ */
.menu-item-3018 > a {
  color: #06C755 !important;
  font-weight: bold;
}

#menu-item-3018 > a::before {
  content: "\f3c0" !important;
  font-family: "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
  position: static !important;
  display: inline-block !important;
  top: auto !important;
  margin-top: 0 !important;
  margin-right: 6px !important;
  height: auto !important;
  width: auto !important;
  line-height: 1 !important;
  font-size: 1.1em !important;
  color: #06C755 !important;
  vertical-align: middle !important;
}

/* ============================================================
 * スティッキー表示時はメガメニューの余白・文字サイズを最小限に圧縮
 * (ヘッダーごと固定されるため、常時表示分の高さをできるだけ抑える)
 * ============================================================ */
@media only screen and (min-width: 841px) {
  .masthead--sticky .masthead__wrapper.is-sticky #pinned-mega-panel {
    padding: 2px 20px !important;
    gap: 2px 14px !important;
    box-shadow: none !important;
  }
  .masthead--sticky .masthead__wrapper.is-sticky #pinned-mega-panel > li {
    padding-right: 10px !important;
    line-height: 1 !important;
  }
  .masthead--sticky .masthead__wrapper.is-sticky #pinned-mega-panel > li > a {
    font-size: 11px !important;
  }
}

/* ============================================================
 * 引用ブロック(pullquote)のデフォルトスタイルが大きすぎるため調整
 * (コアブロックの初期値 font-size:1.5em / padding:4em 0 を上書き)
 * ============================================================ */
.wp-block-pullquote {
  padding: 20px 0;
}
.wp-block-pullquote,
.wp-block-pullquote blockquote,
.wp-block-pullquote p {
  font-size: 19px;
}

/* ============================================================
 * Xserverウェブフォント(TypeSquare)「丸フォーク M」
 * サイトロゴ文字・ページタイトル(h1)・h2のみに適用(表示対象を絞ることで
 * グリフ読み込みを最小限にし表示速度を優先)
 * ============================================================ */
.text-logo,
h1,
h2 {
  font-family: "丸フォーク M", sans-serif !important;
}

/* スマホ表示時、ページタイトル(h1)が大きすぎるため縮小
   本文中のh2・h3・h4も縮小したh1との釣り合いを見て合わせて調整 */
@media only screen and (max-width: 600px) {
  h1 {
    font-size: 1.5em !important;
  }
  .entry-content h2 {
    font-size: 22px !important;
  }
  .entry-content h3 {
    font-size: 19px !important;
  }
  .entry-content h4 {
    font-size: 17px !important;
  }
}

/* トップページ最下部、4組織紹介(地図)セクションの背景色をフッターと統一 */
.tkj-org-footer {
  background-color: #F8F5F1;
}

/* PC表示、ロゴ下のキャッチコピーがロゴ文字に近すぎるため余白を追加 */
.site-tagline {
  margin-top: 8px !important;
}

/* トップページ最下部フッター、LINE友達追加QRコードを中央配置 */
.tkj-line-qr {
  text-align: center;
}

/* スマホ表示: ロゴ下にタグラインを追加(functions.phpのtkj_show_mobile_taglineで出力)
   PC表示時はロゴ文字が大きいため8pxの余白だが、モバイルはロゴが小さく
   中央寄せのためバランスを見て余白と行間を詰める */
.site-tagline--mobile {
  margin-top: 4px !important;
  font-size: 10px !important;
  letter-spacing: normal !important;
  line-height: 1.3;
  text-align: center;
}
