/* ==========================================================================
   multilingual-safe.css
   --------------------------------------------------------------------------
   目的:
   このサイトは最終的に 日本語 / English / नेपाली (ネパール語) の3言語で運用される。
   同じ意味の文章でも言語によって文字数・単語の長さがまったく変わるため、
   「日本語の文字数にぴったり合わせた固定幅」でコンポーネントを作ると、
   英語・ネパール語を流し込んだ瞬間にボタンの文字がはみ出す/ナビゲーションが
   崩れる、といった不具合が高確率で発生する。

   このファイルは、そうした崩れを避けるための「土台のルール」と、
   参考サイト(NRNA Japan)のレイアウトを再現するための「再利用可能な
   コンポーネントクラス」をセットで提供する。

   コーディング規約(このサイトで新しいパーツを作る全員が守ること):
   1. テキストを含む要素に width: 固定px を指定しない。
      → min-width / max-width / padding + flex|grid で伸縮させる。
   2. white-space: nowrap をテキストに使わない(折り返しを妨げない)。
   3. テキストを含む要素に height: 固定px を指定しない。
      → min-height にする(縦方向にも伸びられるようにする)。
   4. ボタン・ナビゲーション等のUI部品を新しく作ったら、
      実際にわざと長い文字列(例: "आप्रवासी नेपाली संघको आधिकारिक वेबसाइटमा स्वागत छ")
      を仮に入れて崩れないか確認してから完成とする。
   5. ネパール語(デーヴァナーガリー文字)を含む要素には lang="ne" 属性を付け、
      本ファイル内の [lang="ne"] のフォント指定が効くようにする。
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. 基礎リセット
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	/* padding/borderをサイズ計算に含める。幅指定と中身のテキスト量を
	   分離して考えられるようにするための必須設定。 */
	box-sizing: border-box;
}

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

/* ヒーローを画面幅いっぱい(下記7.参照)に広げると、環境によっては
   スクロールバー幅の分だけ数px横にはみ出すことがある(100vwはスクロール
   バーの幅を含むため)。ページ全体に横スクロールバーが出てしまうのを防ぐ
   ための安全策。 */
body {
	overflow-x: hidden;
}


/* --------------------------------------------------------------------------
   1. 可変タイポグラフィ
   見出し・ボタン文字などは clamp() で「画面幅に応じて滑らかに変化する」
   サイズにしておく。固定px指定より、多言語での文字量の違いに強い。
   -------------------------------------------------------------------------- */

.terai-h1 {
	/* 通常の倍サイズ(元: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem)) */
	font-size: clamp(3.5rem, 2.4rem + 4.4vw, 5.5rem);
	line-height: 1.25;
}

/* スマホ調整 */
@media (max-width: 600px) {
	/* スマホのベースフォントサイズを 15px に(Kadence の body 17px を上書き)。
	   Kadence はインライン <style> で `body, input, ... { font-size: 17px }` を
	   出力しており詳細度が同じ(0,0,1)なので、`html body` で詳細度を上げて勝たせる。
	   これに追従するのは em / % / inherit / 1em 指定の要素(本文・日付など)。
	   rem 指定(見出し・ボタン等)は html(16px)基準なので影響しない。 */
	html body {
		font-size: 15px;
	}

	.terai-h1 {
		font-size: 2rem;
	}

	/* スマホでは手動改行を無効化して自然に折り返させる */
	.terai-body br {
		display: none;
	}
}

.terai-h2 {
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
	line-height: 1.35;
}

.terai-body {
	font-size: clamp(0.95rem, 0.9rem + 0.8vw, 1.25rem);
	line-height: 1.8; /* 多言語混在時、行間を広めに取ると可読性が落ちにくい */
	margin-bottom: 0;
}

/* ネパール語(デーヴァナーガリー文字)は縦方向にも高さを取るため、
   行間をさらに広めに確保する。functions.php で読み込む
   Noto Sans Devanagari をフォールバックに指定。
   これは元々、日本語ページの中に部分的にネパール語の文章を混在させる場合を
   想定して、個別の要素に手動で lang="ne" を付けたときのためのルールだった。 */
[lang="ne"] {
	font-family: "Noto Sans Devanagari", "Noto Sans", sans-serif;
	line-height: 2;
}

/* Polylang導入後の「ネパール語版ページまるごと」用のルール。
   Polylangはネパール語(ロケール ne_NP)のページに <html lang="ne-NP"> を
   出力するため、上の [lang="ne"](完全一致)には引っかからない。
   :lang(ne) なら ne-NP のような地域サブタグ付きにも一致するので、
   ページ全体をこちらでカバーする。 */
:lang(ne) {
	font-family: "Noto Sans Devanagari", "Noto Sans", sans-serif;
	line-height: 2;
}

/* 英語ページのフォントは Roboto を使う(functions.php で読み込み済み)。
   同様に、Polylangが出力する html[lang="en-US"] に :lang(en) で一致させる。
   個々の要素に lang="en" を書いて回らなくても英語ページ全体に自動的に効く。 */
:lang(en) {
	font-family: "Roboto", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 日本語ページのベースフォントは Zen Kaku Gothic Antique(functions.php で
   読み込み済み)。他の2言語と同じく :lang(ja) で指定しておけば、
   Polylangの日本語ページ(<html lang="ja">)に自動的に効く。
   ヘッダーのロゴ・ナビ(常に英字表記)は下の .site-branding / #site-navigation
   ルールの方が詳細度で勝つため、ここでは上書きされない。 */
:lang(ja) {
	font-family: "Zen Kaku Gothic Antique", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* ヘッダーのロゴ表記("Terai Community Japan")とナビゲーション
   ("About Us" / "Members" / "Events" / "News" など)は、依頼主の意図で
   ページの言語に関わらず常に英字表記のまま(日本語ページの中でも英語)。
   これは :lang(en) では拾えない(ページ自体は lang="ja" のため)ので、
   Kadenceが出力する実際の構造セレクタ(.site-branding / #site-navigation)を
   直接指定して、常にRobotoになるようにしている。 */
.site-branding,
#site-navigation {
	font-family: "Roboto", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* --------------------------------------------------------------------------
   2. ボタン
   固定幅を絶対に使わない。中身のテキスト量に応じて自然に伸びる。
   -------------------------------------------------------------------------- */

.terai-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;

	/* 幅はコンテンツに応じて可変。最低幅だけ確保する。 */
	width: auto;
	min-width: 8em;
	max-width: 100%;

	padding: 0.85em 1.75em;
	white-space: normal;      /* 折り返しを許可(なが〜い言語でも改行して収まる) */
	word-break: keep-all;     /* 単語の途中で不自然に折り返さない */
	overflow-wrap: break-word;

	text-align: center;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.4;
}

/* 参考サイトの「Donate」ボタンのようなグラデーションCTA */
.terai-btn--primary {
	background: linear-gradient(90deg, #2ecc9a, #2f7bf0);
	color: #fff;
}

/* 参考サイトの「Register」ボタンのような単色CTA */
.terai-btn--secondary {
	background: #2f5fd6;
	color: #fff;
}

/* ボタンを横並びにする時の親要素。入り切らない言語が来たら
   自動的に折り返す(横スクロールや崩れを起こさない)。 */
.terai-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   2b. Gutenbergの標準「ボタン」ブロック用の配色バリエーション
   functions.php の register_block_style() で登録した
   is-style-tcj-primary / is-style-tcj-secondary に対応するスタイル。
   標準ボタンブロックはもともと固定幅を持たず、折り返しも自然に行われるため
   (無闇にwidthやnowrapを指定しない限り)、配色だけをここで上書きする。
   -------------------------------------------------------------------------- */

.wp-block-buttons {
	flex-wrap: wrap; /* ボタンを横並びにしても、入らなければ自動で折り返す */
}

.wp-block-button.is-style-tcj-primary .wp-block-button__link {
	background: linear-gradient(90deg, #2ecc9a, #2f7bf0);
	color: #fff;
	border-radius: 999px;
}

.wp-block-button.is-style-tcj-secondary .wp-block-button__link {
	background: #2f5fd6;
	color: #fff;
	border-radius: 999px;
}


/* --------------------------------------------------------------------------
   3. ナビゲーションメニュー(ヘッダー)
   Kadenceのヘッダービルダーで作るメニューに対して、
   Polylangが言語ごとに出し分けたメニュー項目の文字量が変わっても
   崩れないようにする土台。
   -------------------------------------------------------------------------- */

.terai-nav {
	display: flex;
	flex-wrap: wrap;      /* 英語/ネパール語で項目が長くなっても折り返す */
	align-items: center;
	gap: 0.25rem 1.25rem;
}

.terai-nav a {
	display: inline-block;
	white-space: normal;  /* nowrapにしない。長い言語名でも自然に折り返す */
	padding: 0.5em 0.25em;
}


/* --------------------------------------------------------------------------
   4. CTAカード(参考サイトの「Donate to Nepal House」「Become a Member」相当)
   高さを固定しない。テキスト量が言語によって変わっても、
   カードの高さが自動的に追従する。
   -------------------------------------------------------------------------- */

.terai-cta-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem;
	align-items: stretch; /* 隣り合うカードの高さを揃えつつ、中身は可変 */
}

.terai-cta-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;

	min-height: 0;      /* heightではなくmin-heightの発想で。固定しない。 */
	padding: 1.75rem;
	border-radius: 12px;
	background: #f4f6f8;
}

.terai-cta-card__title {
	font-weight: 700;
}

.terai-cta-card__body {
	flex: 1 1 auto;      /* 本文の長さが変わってもカード全体で吸収する */
}


/* --------------------------------------------------------------------------
   5. お知らせ / ニュース一覧(参考サイトの2カラムウィジェット相当)
   カスタム投稿タイプ「お知らせ」「イベント」をここに流し込む前提。
   -------------------------------------------------------------------------- */

.terai-notice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
}

.terai-notice-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.terai-notice-list li a {
	display: block;
	white-space: normal;   /* 長いタイトルでも省略せず折り返す */
	line-height: 1.6;
}


/* --------------------------------------------------------------------------
   6. 代表挨拶などの「写真 + 長文」2カラムセクション
   (参考サイトの "Our President's Message" 相当)
   -------------------------------------------------------------------------- */

.terai-profile-section {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
	gap: 2rem;
	align-items: start;
}

/* 画面が狭い、あるいは長い言語で文章量が増えた場合は1カラムに切り替える */
@media (max-width: 782px) {
	.terai-profile-section {
		grid-template-columns: 1fr;
	}
}

.terai-profile-section__photo img {
	border-radius: 8px;
}


/* --------------------------------------------------------------------------
   7. ヒーロー(スライダー版)
   [tcj_hero_slider] ショートコード(写真のみ・背景担当)の上に、
   見出し・キャッチコピー・CTAボタンを固定オーバーレイとして重ねる。
   スライドごとに文言は持たせない(理由は inc/custom-post-types.php 参照)。
   -------------------------------------------------------------------------- */

.terai-hero {
	position: relative;
	overflow: hidden;

	/* スライドを画面幅いっぱいに表示する。
	   Gutenbergブロックの「幅広」「全幅」(alignwide/alignfull)設定に頼らず、
	   コンポーネント自身がコンテンツ幅のコンテナからはみ出す形にしている。
	   これにより、固定ページ側でブロックの配置設定をうっかり忘れても、
	   必ず画面幅いっぱいになる(設定に依存しない = 崩れようがない)。 */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.terai-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 1rem;

	color: #fff;
	padding: clamp(1.5rem, 4vw, 3rem);

	/* 下から暗くして、どんな写真が来ても文字の可読性を確保する */
	background: linear-gradient(0deg, rgba(15, 20, 30, 0.75) 0%, rgba(15, 20, 30, 0.1) 55%, rgba(15, 20, 30, 0) 100%);
}

/* オーバーレイ内の見出し・本文・ボタンにも、他コンポーネントと同じく
   固定幅/nowrapを使わない原則を適用する(継承済みだが明示しておく)。 */
.terai-hero__overlay .terai-h1{
	max-width: 40em;
}

/* ヒーロー見出しはテーマ既定の上下marginを消してオーバーレイに詰める。
   色は #fff を明示する: 親(.terai-hero__overlay)に color:#fff を指定して
   いるが、Kadence の style.css が見出し(h1〜h6 / .wp-block-heading)に
   パレット色を直接あてているため、継承が効かず暗い色になってしまう。
   実機(WordPress)では h1 側のセレクタ specificity に負けないよう、
   ここで overlay 配下の見出し・本文に明示的に白を指定して打ち消す。 */
.terai-hero .terai-h1,
.terai-hero .terai-body,
.terai-hero__overlay .terai-h1,
.terai-hero__overlay .terai-body {
	color: #ffffff;
}

.terai-hero__overlay .terai-h1 {
	margin: 0;
}

/* スマホ版: 見出しとテキストの間隔を広げ、テキストは行間を詰めて少し小さく。
   (ここに書く理由: .terai-body / .terai-hero__overlay の基本ルールより後ろに
   置かないと、詳細度が同じため基本ルールに上書きされてしまう) */
@media (max-width: 600px) {
	.terai-hero__overlay {
		gap: 1.5rem;
	}

	.terai-hero__overlay .terai-h1 {
		margin-bottom: 1rem;
	}

	/* Kadence の `.single-content p:last-child { margin-bottom: 0 }`(content.min.css)
	   と詳細度が同じ(0,2,1)タイになる。さらに content.min.css は
	   <head> 内で multilingual-safe.css より後ろに出力されるため、
	   読み込み順のタイブレークでも Kadence 側が勝ってしまう(実機で確認済み)。
	   margin-bottom だけ !important で明示的に勝たせる。 */
	.terai-hero__overlay p.terai-body {
		font-size: 0.9rem;
		line-height: 1.5;
		margin-bottom: 1rem !important;
	}
}


/* --------------------------------------------------------------------------
   8. ユーティリティ
   -------------------------------------------------------------------------- */

/* テキストを含む要素に width:固定px を書きたくなったら、
   代わりにこのクラスで「最大幅の目安」だけ与える。 */
.u-text-measure {
	max-width: 40em; /* 文字数ではなく em 基準。フォントサイズに追従する */
}

/* どうしても横幅が厳しい箇所(バッジ等、意味的に1行が前提の短い要素)にのみ
   限定して使う。本文・ボタン・メニューには絶対に使わないこと。 */
.u-nowrap-caution {
	white-space: nowrap;
}


/* --------------------------------------------------------------------------
   9. ヘッダー・レイアウトの微調整
   -------------------------------------------------------------------------- */

/* スマホ版: ロゴ+ハンバーガーメニューの行(.site-header .site-container)の
   左右余白を少し詰める。Kadence は左右余白を --global-content-edge-padding
   というCSS変数で持っているので、値を上書きするだけで済む(padding直書きより
   Kadence標準の仕組みに沿う)。 */
@media (max-width: 600px) {
	.site-header .site-container {
		--global-content-edge-padding: 16px;
	}
}

/* ロゴ表記("Terai Community Japan")の見た目調整 */
.site-branding .site-title {
	font-weight: 500;
	letter-spacing: 0;
	/* Kadence がインラインCSSで同じセレクタに font-size: 26px を後から
	   出力しており、詳細度が同じだと読み込み順で負けるため !important で上書き。 */
	font-size: 24px !important;
}

/* ロゴ表記の左にロゴマーク(assets/images/mark.jpg)を表示する。
   Kadence のカスタマイザーで「ロゴ画像」を設定していないため、CSS の
   ::before で画像を差し込む。サイズは文字サイズ(em)に追従。 */
.site-branding .site-title-wrap {
	display: flex;
	align-items: center;
	gap: 0.9em;
}

.site-branding .site-title-wrap::before {
	content: "";
	flex: 0 0 auto;
	width: 3em;
	height: 3em;
	background-image: url(../images/mark.jpg);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

/* スマホ: ヘッダーまわりをコンパクトに。
   ロゴ表記のサイズ・ヘッダー高さは Kadence がインラインCSS(メディアクエリなし)で
   出力しているため、!important で明示的に上書きする。 */
@media (max-width: 600px) {
	.site-branding .site-title {
		font-size: 17px !important;
		letter-spacing: 0 !important;
	}

	/* ヘッダー行の高さ(既定 80px)を詰める */
	.site-main-header-inner-wrap {
		min-height: 60px !important;
	}

	/* ハンバーガーボタン: Kadence の SVG(塗りの太いバー)を隠し、
	   CSS で「約2倍サイズ・細いライン3本」を描く。 */
	#mobile-toggle .kadence-svg-iconset {
		display: none;
	}

	#mobile-toggle .menu-toggle-icon {
		position: relative;
		display: block;
		width: 40px;
		height: 40px;
		/* 中央のライン */
		background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
	}

	#mobile-toggle .menu-toggle-icon::before,
	#mobile-toggle .menu-toggle-icon::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		height: 1.5px;
		background: currentColor;
	}

	#mobile-toggle .menu-toggle-icon::before {
		top: 25%;
	}

	#mobile-toggle .menu-toggle-icon::after {
		bottom: 25%;
	}

	/* ドロワーを開いたときの右上「閉じる(×)」ボタンも、ハンバーガーと
	   同じく「大きめ・細いライン」に。バーは Kadence が
	   .drawer-toggle .toggle-close-bar(詳細度 0,2,0)で em 基準に描くので、
	   #mobile-drawer を前置して詳細度を上げ、固定 px で細く・長くする。 */
	#mobile-drawer .drawer-header .drawer-toggle.menu-toggle-close {
		font-size: 40px;
		line-height: 1;
	}

	#mobile-drawer .menu-toggle-close .toggle-close-bar {
		width: 26px;
		height: 1.5px;
	}
}

/* サブメニュー付きメニュー項目の「親リンク + 開閉トグル」ラッパーを、
   縦位置そろえで横並びにする。
   Kadence の header.min.css が同じ詳細度(.nav-drop-title-wrap)で
   display:block を後勝ちで当ててくるため、`a` を前置して詳細度を上げる
   (このラッパーは必ず <a> の中にある)。 */
a .nav-drop-title-wrap {
	display: flex;
	align-items: center;
}

/* ヘッダーのドロップダウン(サブメニュー)内のリンクを、アイコン等を
   横並び・縦位置そろえで置けるようにする。 */
.header-navigation .header-menu-container ul ul li.menu-item > a {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* モバイルドロワー(.mobile-navigation)内のリンクも同様に横並び・縦位置そろえ。
   ドロワー UI 専用クラスなのでメディアクエリ外に置く。
   Kadence の header.min.css が同詳細度の .mobile-navigation a { display:block }
   を後勝ちさせるため、ul を挟んで詳細度を上げる。 */
.mobile-navigation ul a {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* ハンバーガーメニュー内で、現在表示中のページの項目に色を付けない
   (他の項目と同じ見た目にする)。Kadence がインラインCSSで
   color: var(--global-palette-highlight) を当てているため !important で打ち消す。 */
.mobile-navigation ul li.current-menu-item > a,
.mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrap,
.mobile-navigation ul li.current_page_item > a {
	color: inherit !important;
}

/* ヘッダーメニュー全体の文字ウェイト・サイズ */
.header-navigation .header-menu-container {
	font-weight: 500;
	font-size: 1rem;
}

/* トップレベルのメニュー項目を flex 並びにし、項目間は gap で確保する
   (> ul に限定。入れ子の ul ul = ドロップダウンは縦積みのまま)。 */
.header-navigation .header-menu-container > ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem;
}

/* トップレベルのリンクの横パディングは 0(項目間は上の gap で確保済み)。
   縦パディングはクリック領域として残す。
   Kadence が同じ詳細度(0,3,3)のインラインCSSで padding: 0.6em calc(0.6em) を
   後勝ちさせるため、!important で明示的に打ち消す。 */
.header-navigation .header-menu-container > ul > li.menu-item > a {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ホバー(とフォーカス・現在ページ)で、テキスト幅ぴったりのアンダーラインを
   左から伸ばし、離れると右へ抜ける(milknetwork.com のナビ挙動を踏襲)。 */
.header-navigation .header-menu-container > ul > li.menu-item > a {
	position: relative;
}

.header-navigation .header-menu-container > ul > li.menu-item > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 4px;
	/* 整数pxにして、transform 中と静止時(アクティブページ)で線の太さが
	   サブピクセル描画差でズレないようにする。 */
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform 0.3s ease;
	/* アクティブページの下線も同じ合成レイヤーで描かせて太さを揃える。 */
	will-change: transform;
}

.header-navigation .header-menu-container > ul > li.menu-item > a:hover::after,
.header-navigation .header-menu-container > ul > li.menu-item > a:focus-visible::after,
.header-navigation .header-menu-container > ul > li.current-menu-item > a::after,
.header-navigation .header-menu-container > ul > li.current_page_item > a::after {
	transform: scaleX(1);
	transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
	.header-navigation .header-menu-container > ul > li.menu-item > a::after {
		transition: none;
	}
}

/* 注意: .content-area / .entry-content-wrap はKadenceが全ページ共通で使う
   汎用クラスなので、ここでの変更はトップページに限らずサイト全体
   (About Us等)に効く。ヘッダー直下の余白をなくす目的であれば、
   本来はトップページ(全幅ヒーロー)だけにスコープしたいところだが、
   指示通りグローバルに適用している。他ページで見出し上の余白が
   詰まりすぎると感じたら教えてください。

   !important について: Kadenceはこの余白を、テーマ本体のCSSではなく
   グローバルスタイル由来のインラインCSS(<style>ブロック)として、
   子テーマのCSSより後に出力している。そのため通常の詳細度・読み込み順
   では上書きできず、実機確認で marginTop:80px / paddingTop:32px が
   そのまま残ることを確認した。ここだけは !important で明示的に勝たせる。 */
.content-area {
	margin-top: 0 !important;
	/* フッター(独自の .terai-footer)を本文直下にぴったり付けるため下余白も消す */
	margin-bottom: 0 !important;
}

.entry-content-wrap {
	padding: 0 !important;
}

/* Kadenceの「コンテンツ背景(ボックス)」に付く下向きドロップシャドウを消す。
   全幅ヒーロー・フッター・ワイドビューがコンテナから突き抜けるこのデザインでは、
   本文ボックスの影(SNS欄の下などに出る)が浮いて見えるため不要。
   .entry.single-entry / .entry.loop-entry はKadenceがインラインCSSで
   box-shadow を出力しており(詳細度 0,2,0)、通常では上書きできないので
   !important で明示的に打ち消す。全ページ共通。 */
.entry.single-entry,
.entry.loop-entry,
.entry.content-bg {
	box-shadow: none !important;
}


/* --------------------------------------------------------------------------
   10. 横長CTAボタン(寄附・入会)
   スライダーの直下に、通常のページの流れの中で(fixedではなく)横並びで
   配置する、幅の広いカード風の2つのボタン。依頼主から共有された参考画像
   (カード型のリンクUI: 角丸・淡い背景・アイコンを丸で囲む・右側に矢印)の
   見た目を踏襲している。

   経緯: 当初は画面下部に常時フローティング表示する版(position: fixed、
   小さめの錠剤型ボタン)で作っていたが、参考画像をもとに「スライダーの下に
   横長のボタンを横並びで」という指示に変わったため、本セクションで
   デザインを差し替えた(fixed版のCSSクラスは使われなくなったため削除済み)。

   配色はネパール国旗の2色(クリムゾンレッドとブルー)からインスパイア。
   -------------------------------------------------------------------------- */

.terai-cta-row {
	display: grid;
	/* 固定px幅を使わず、280px以上を確保しつつ画面幅に応じて自動で
	   1列⇄2列を切り替える(規約1)。 */
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.25rem;
	margin: clamp(1.5rem, 4vw, 2.5rem) 0;
	margin-bottom: 100px;
}

.terai-cta-wide {
	display: flex;
	align-items: center;
	gap: 1.25rem;

	width: 100%;
	min-width: 0;
	max-width: 100%;

	padding: 1.5rem 1.75rem;
	border-radius: 20px;
	background: #f6f7f6;
	/* ドロップシャドウは付けず、薄いグレーのボーダーで縁取る */
	border: 1px solid #e2e5e9;

	text-decoration: none;
	color: #1a202c;

	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.terai-cta-wide:hover,
.terai-cta-wide:focus-visible {
	/* マウスオーバー時は色をわずかに変えるだけ(移動・影なし) */
	background: #eceef0;
	border-color: #d3d7dc;
	color: #1a202c;
}

/* 左側の丸いアイコン(規約3: heightの固定pxは避け、remで一定サイズにしつつ
   ボタン自体の高さはpaddingで可変にする) */
.terai-cta-wide__icon {
	flex: 0 0 auto;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;

	/* マウスオーバー時になめらかに少しズームする */
	transition: transform 0.25s ease;
}

.terai-cta-wide:hover .terai-cta-wide__icon,
.terai-cta-wide:focus-visible .terai-cta-wide__icon {
	transform: scale(1.08);
}

.terai-cta-wide__icon svg {
	width: 1.75rem;
	height: 1.75rem;
	display: block;
}

/* タイトル + 説明文をまとめる中央ブロック(伸縮して残り幅を取る) */
.terai-cta-wide__text {
	flex: 1 1 auto;
	min-width: 0; /* 折り返しを許可するために必須(規約1) */
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.terai-cta-wide__title {
	font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
	font-weight: 800;
	line-height: 1.35;
	white-space: normal;
	word-break: keep-all;
	overflow-wrap: break-word;
}

.terai-cta-wide__desc {
	font-size: clamp(0.8rem, 0.76rem + 0.2vw, 0.95rem);
	font-weight: 400;
	line-height: 1.6;
	color: #4a5568;
	white-space: normal;
	overflow-wrap: break-word;
}

/* 右側の矢印(参考画像の「進む」アイコンに相当) */
.terai-cta-wide__arrow {
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}

.terai-cta-wide__arrow svg {
	width: 1.1rem;
	height: 1.1rem;
	display: block;
}

/* ネパール国旗のクリムゾンレッドをインスパイアした配色(寄附ボタン) */
.terai-cta-wide--donate .terai-cta-wide__icon,
.terai-cta-wide--donate .terai-cta-wide__arrow {
	background: #dc143c;
}

/* ネパール国旗のブルー(縁取り部分)をインスパイアした配色(入会ボタン) */
.terai-cta-wide--member .terai-cta-wide__icon,
.terai-cta-wide--member .terai-cta-wide__arrow {
	background: #003893;
}

@media (max-width: 480px) {
	.terai-cta-wide {
		padding: 1.25rem 1.25rem;
		gap: 1rem;
	}

	.terai-cta-wide__icon {
		width: 3rem;
		height: 3rem;
	}

	.terai-cta-wide__icon svg {
		width: 1.5rem;
		height: 1.5rem;
	}
}

/* スマホ: 寄附/メンバーのボタンを画面幅いっぱいに(隙間・角丸なしで敷き詰める) */
@media (max-width: 600px) {
	/* スライダー(.terai-hero)と寄附ボタンの間の余白をなくす。
	   32px の下余白は Kadence の content.min.css(.single-content <el>)由来なので
	   .single-content を前置して詳細度を上げて打ち消す。 */
	.single-content .terai-hero {
		margin-bottom: 0 !important;
	}

	.terai-cta-row {
		width: 100vw;
		margin-top: 0;
		margin-bottom: 40px;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 0;
		gap: 0;
	}

	.terai-cta-wide {
		border-radius: 0;
		/* 各ボタンの囲みボーダーは不要 */
		border: none;
	}

	/* ボタンとボタンの境目にだけ区切り線を入れる(縦積み) */
	.terai-cta-wide + .terai-cta-wide {
		border-top: 1px solid #e2e5e9;
	}
}


/* --------------------------------------------------------------------------
   法人紹介セクション(.terai-about)
   レイアウトは参考画像(コンソーシアムの「About」ブロック)に合わせている:
   左=ビジュアル / 右=eyebrow+見出し+本文+ピルボタン の2カラム。
   参考画像のグレーの枠は使わず背景は透過。配色も参考画像の緑ではなく
   当サイトのブランド色(ネパール国旗のクリムゾン #dc143c / ブルー #003893)。

   多言語規約: テキストを含む要素に固定px width/height・nowrap を使わない。
   -------------------------------------------------------------------------- */

.terai-about {
	display: grid;
	/* 広いとき: 左ビジュアル / 右テキストの2カラム。狭いときは1カラムに
	   落として縦積み(規約1: テキスト側に固定px幅を持たせない)。 */
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	align-items: center;
	gap: clamp(1.5rem, 4vw, 3.5rem);

	margin: clamp(2rem, 9vw, 8rem) 0;
	margin-bottom: 100px;

	background: transparent;
}

@media (max-width: 768px) {
	.terai-about {
		grid-template-columns: 1fr;
		margin-bottom: 60px;
	}

	.terai-about__visual {
		justify-self: center;
	}
}

/* 左のビジュアル: 団体のロゴマーク画像(assets/images/mark.jpg)。 */
.terai-about__visual {
	width: 100%;
	max-width: 270px;
	margin: 0 auto;
}

/* スマホ版: もう少し小さく。
   (この後ろに置く理由: 上の基本ルールより前だと詳細度が同じため上書きされてしまう) */
@media (max-width: 600px) {
	.terai-about__visual {
		max-width: 200px;
	}
}

.terai-about__visual img {
	width: 100%;
	height: auto;
	display: block;
}

/* 右: テキストブロック */
.terai-about__content {
	min-width: 0; /* グリッド子要素の折り返しを許可(規約1) */
}

/* 見出し要素(eyebrow/title は h2〜h6 で出力される)は、Kadence の
   `.entry-content h2 { margin: ... }`(specificity 0,1,1)に負けて margin が
   打ち消されてしまう。`.terai-about` を前置して specificity 0,2,0 にし、
   テーマ既定より確実に勝たせる。 */
.terai-about .terai-about__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	background-color: #003893;
	color: white;
	padding: .5rem 1rem;
	border-radius: 6px;
	display: inline-block;
}

.terai-about .terai-about__title {
	margin: 0 0 1rem;
	font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.8rem);
	line-height: 1.4;
	font-weight: 600;
	color: #1a202c;
}

.terai-about .terai-about__body {
	margin: 0 0 1.75rem;
	max-width: 47em; /* 行長を抑える(px禁止・em基準) */
	line-height: 1.8;
	color: #4a5568;
}

/* ボタンを横並びに(入り切らなければ折り返す) */
.terai-about__cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* 参考画像のダークなピルボタン。高さは固定せず padding で可変(規約3)。 */
.terai-about__cta {
	display: inline-flex;
	align-items: center;
	gap: 1rem;

	min-width: 0;
	padding: 0.85rem 0.85rem 0.85rem 1.5rem;
	border-radius: 999px;

	background: #dc143c; /* ネパール国旗のクリムゾン */
	color: #ffffff;
	text-decoration: none;
	font-weight: 700;

	transition: background-color 0.15s ease;
}

/* クリック中(:active)・訪問済み(:visited)・フォーカス時も文字は白のまま。
   コンテンツ既定の a:visited / a:active 色に負けないよう全状態で明示する。 */
.terai-about__cta,
.terai-about__cta:link,
.terai-about__cta:visited,
.terai-about__cta:hover,
.terai-about__cta:focus,
.terai-about__cta:focus-visible,
.terai-about__cta:active {
	color: #ffffff;
}

.terai-about__cta:hover,
.terai-about__cta:focus-visible {
	background: #b01031; /* マウスオーバーで少し暗いクリムゾンへ */
}

.terai-about__cta-icon {
	flex: 0 0 auto;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;

	background: #ffffff;
	color: #1a202c;

	transition: transform 0.25s ease;
}

.terai-about__cta:hover .terai-about__cta-icon,
.terai-about__cta:focus-visible .terai-about__cta-icon {
	transform: translateX(3px);
}

.terai-about__cta-icon svg {
	width: 1.1rem;
	height: 1.1rem;
	display: block;
}

/* スマホ: 私たちについて / メンバー紹介 ボタンをコンパクトに。
   ↑ の .terai-about__cta* 基本ルールより後ろに置いて確実に上書きする。 */
@media (max-width: 600px) {
	.terai-about__cta {
		gap: 0.55rem;
		padding: 0.5rem 0.5rem 0.5rem 1.1rem;
		font-size: 0.9rem;
	}

	.terai-about__cta-icon {
		width: 1.25rem;
		height: 1.25rem;
	}

	.terai-about__cta-icon svg {
		width: 0.7rem;
		height: 0.7rem;
	}
}


/* --------------------------------------------------------------------------
   代表挨拶(.terai-greeting)
   見出しは無し。左=挨拶文 / 右=代表者写真 の2カラム。
   他セクションと同じコンテンツ幅・中央寄せの、角丸のグレーカード。

   多言語規約: テキストを含む要素に固定px の width/height を使わない。
   写真は aspect-ratio で縦横比だけ決める(実写真が入ったら
   .terai-greeting__photo の div を <img alt="…"> に置き換え)。
   -------------------------------------------------------------------------- */

.terai-greeting {
	margin: clamp(2rem, 6vw, 4rem) 0;
	margin-bottom: 120px;
	padding: clamp(2rem, 5vw, 3.5rem);
	background: #f7f5f5;
	border-radius: clamp(20px, 3vw, 32px);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.25);
}

.terai-greeting__body {
	display: grid;
	/* 左=挨拶文 / 右=写真。写真カラムは固定pxにせず最大300pxで伸縮(規約1)。
	   スマホ幅まで基本は横並びを維持する。 */
	grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
}

/* DOM順は figure → text だが、グリッド配置で写真を右カラムに置く。
   row を明示しないと、col2 に置いた figure の次に来る text(col1)が
   sparse配置で2行目に回ってしまうため、両方 row 1 に固定する。 */
.terai-greeting__text {
	grid-column: 1;
	grid-row: 1;
}

.terai-greeting__figure {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
}

/* 横並びが窮屈になるスマホ幅でだけ縦積みに切り替える */
@media (max-width: 560px) {
	.terai-greeting__body {
		grid-template-columns: 1fr;
		gap: clamp(1.5rem, 6vw, 2.5rem);
	}

	/* 1カラム時は DOM順(写真 → 挨拶文)のまま縦積み */
	.terai-greeting__text,
	.terai-greeting__figure {
		grid-column: auto;
		grid-row: auto;
	}
}

.terai-greeting__photo {
	aspect-ratio: 3 / 4;
	border-radius: 16px;
	overflow: hidden;
	background: #e5e7eb; /* 画像の読み込み前・失敗時のフォールバック色 */
}

.terai-greeting__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.terai-greeting__caption {
	margin-top: 1rem;
	text-align: center;
	font-weight: 700;
	line-height: 1.6;
	color: #1a202c;
}

.terai-greeting__text > p {
	margin: 0 0 1.4rem;
	max-width: 44em;      /* 行長を抑える(px禁止・em基準) */
	font-size: inherit;   /* サイトのベースフォントサイズ(body: 17px) */
	line-height: 2;
	color: #333a45;
}

.terai-greeting__text > p:last-child {
	margin-bottom: 0;
}

/* スマホ: 背景を画面幅いっぱいに(角丸なしのバンドにする)。
   ↑ の .terai-greeting 基本ルールより後ろに置いて確実に上書きする。 */
@media (max-width: 600px) {
	.terai-greeting {
		width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 30px 20px;
		border-radius: 0;
	}
}


/* --------------------------------------------------------------------------
   お知らせ / イベント(.terai-news)
   Information と Events を縦並び。各ブロックは 見出し行(タイトル左 /
   ダークなピル型「一覧」ボタン右)+ 中身。
   - Information: 角丸グレーの行カードを縦リスト
   - Events: 直近3件を横並びのカード(日付バッジ + サムネ + タイトル +
     主催/会場 + 右下の丸い矢印)。参考: コンソーシアムの Events 欄。

   本番: Information の <ul> と Events の各カードを、投稿タイプ
   「お知らせ」(tcj_notice)・「イベント」(tcj_event)のクエリーループに差し替える。

   多言語規約: カード内テキストに固定px幅・nowrap を使わない。カード高さは
   グリッドで揃え、タイトルは行数で切らず自然に折り返させる。
   -------------------------------------------------------------------------- */

.terai-news {
	margin: 0 0 100px;
	padding: 0;

	display: flex;
	flex-direction: column;
	/* Events ブロックと News ブロックの間隔 */
	gap: clamp(3.5rem, 9vw, 5rem);
}

.terai-news__block {
	min-width: 0;
}

/* イベント / お知らせが1件も無いときの控えめな空表示([tcj_news_events]) */
.terai-news__empty {
	margin: 0;
	color: #8a93a3;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* 見出し行 */
.terai-news__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.terai-news__col-title {
	margin: 0;
	font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.8rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.3;
	color: #1a202c;
}

/* ピル型「一覧」ボタン(右端に白丸の矢印)。
   「私たちについて」ボタン(.terai-about__cta)の約 70% サイズ。
   配色(ブルー #003893 / ホバー #00245f・白文字)は据え置き。 */
.terai-news__head-link {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	min-width: 0;
	padding: 0.6rem 0.6rem 0.6rem 1.05rem;
	border-radius: 999px;

	background: #003893; /* ネパール国旗のブルー */
	color: #ffffff;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.75rem;

	transition: background-color 0.15s ease;
}

.terai-news__head-link:hover,
.terai-news__head-link:focus-visible {
	background: #00245f; /* ホバーで少し暗いブルーへ */
	color: #ffffff; /* コンテンツ既定の a:hover 色に負けないよう明示 */
}

.terai-news__head-link-arrow {
	flex: 0 0 auto;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: #ffffff;
	color: #1a202c;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	transition: transform 0.25s ease;
}

/* ホバー時は矢印(白丸)が少し右へ動く */
.terai-news__head-link:hover .terai-news__head-link-arrow,
.terai-news__head-link:focus-visible .terai-news__head-link-arrow {
	transform: translateX(3px);
}

.terai-news__head-link-arrow svg {
	width: 0.8rem;
	height: 0.8rem;
	display: block;
}

/* スマホ版: 「お知らせ一覧」「イベント一覧」ボタンをもう少し小さく。
   (基本ルールより後ろに置く: 詳細度が同じだと先に書いた方が負けるため) */
@media (max-width: 600px) {
	.terai-news__head-link {
		gap: 0.55rem;
		padding: 0.5rem 0.5rem 0.5rem 0.85rem;
		font-size: 0.7rem;
	}

	.terai-news__head-link-arrow {
		width: 1.4rem;
		height: 1.4rem;
	}

	.terai-news__head-link-arrow svg {
		width: 0.7rem;
		height: 0.7rem;
	}
}

/* ---- Information: 縦のリスト ---- */
/* .terai-news を前置して詳細度 0,2,0 にし、Kadence / コアの
   `.entry-content ul { padding-left: ... }`(0,1,1)に負けないようにする。 */
.terai-news .terai-news__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.terai-news__link {
	display: grid;
	/* 日付 / 見出し / 矢印 を1行に並べる */
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.9rem;

	padding: 0.9rem 1rem;
	border-radius: 10px;
	background: #f4f6f8;

	text-decoration: none;
	color: #1a202c;

	transition: background-color 0.15s ease;
}

.terai-news__link:hover,
.terai-news__link:focus-visible {
	background: #eceef1;
}

.terai-news__date {
	grid-column: 1;
	/* Events の日付(.terai-events__date)と同じスタイル */
	color: #5b6472;
	font-weight: 700;
	font-size: inherit; /* サイトのベースフォントサイズ(body: 17px) */
	font-variant-numeric: tabular-nums;
	white-space: nowrap; /* 日付(数字のみ・短い固定要素)は折り返さない */
}

.terai-news__headline {
	grid-column: 2;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.55;
}

.terai-news__arrow {
	grid-column: 3;

	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #ffffff; /* 白背景 */

	display: flex;
	align-items: center;
	justify-content: center;
	color: #dc143c; /* 赤い矢印(ネパール国旗のクリムゾン) */

	transition: transform 0.2s ease;
}

.terai-news__link:hover .terai-news__arrow,
.terai-news__link:focus-visible .terai-news__arrow {
	transform: translateX(2px);
}

.terai-news__arrow svg {
	width: 0.95rem;
	height: 0.95rem;
	display: block;
}

/* ---- Events: 直近3件を横並びカード ---- */
.terai-events {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

@media (max-width: 900px) {
	.terai-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
	.terai-events { grid-template-columns: 1fr; }
}

.terai-events__card {
	background: #f4f6f8;
	border-radius: 16px;
	overflow: hidden;
}

.terai-events__link {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	height: 100%;
	padding: clamp(1rem, 2.5vw, 1.5rem);

	text-decoration: none;
	color: #1a202c;
}

.terai-events__date {
	align-self: flex-start;
	color: #5b6472;
	font-size: inherit; /* サイトのベースフォントサイズ(body: 17px)を継承 */
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.terai-events__thumb {
	aspect-ratio: 16 / 10;
	border-radius: 10px;
	overflow: hidden;

	display: flex;
	align-items: center;
	justify-content: center;
	background: #e3e6e9;
	color: #8a93a3;
	font-size: 0.75rem;
	font-weight: 700;
}

.terai-events__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.terai-events__title {
	font-size: inherit; /* サイトのベースフォントサイズ(body: 17px)を継承 */
	font-weight: 700;
	line-height: 1.55;
}

/* 開催場所(ACF: tcj_event_location)。見出しのすぐ下に小さく表示する。
   .terai-events__link の gap(0.85rem)を負マージンで詰めて見出しに寄せる。 */
.terai-events__location {
	margin-top: -0.4rem;
	display: flex;
	align-items: flex-start;
	gap: 0.35em;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #5b6472;
}

.terai-events__location-icon {
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
	margin-top: 0.15em; /* テキスト先頭行と光学的に揃える */
}

.terai-events__foot {
	margin-top: auto; /* カード下端へ。カード高さはグリッドで揃う */
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
}

.terai-events__arrow {
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #ffffff;  /* 白背景 */
	color: #dc143c;       /* 赤い矢印(ネパール国旗のクリムゾン) */

	display: flex;
	align-items: center;
	justify-content: center;

	transition: transform 0.2s ease;
}

.terai-events__link:hover .terai-events__arrow,
.terai-events__link:focus-visible .terai-events__arrow {
	transform: translateX(2px);
}

.terai-events__arrow svg {
	width: 0.95rem;
	height: 0.95rem;
	display: block;
}

/* スマホ: イベントカードも横並び + フリック(横スクロール)で見せる。
   ↑ の .terai-events* 基本ルール(グリッド)より後ろに置いて上書きする。 */
@media (max-width: 600px) {
	.terai-events {
		display: flex;
		flex-wrap: nowrap;
		gap: 0.75rem;

		overflow-x: auto;
		overscroll-behavior-x: contain;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.5rem;

		/* 右側だけ画面端まで伸ばす(左は本文と同じ余白のまま)。
		   カードが右端からのぞいて見えることで、横スクロールできると
		   分かりやすくする。右端の余白(padding-right)は右にも少しだけ残す。
		   マージンの値は本文の左右余白(現在16px)に合わせてあるので、
		   その値を変えたらここも合わせて変えること。 */
		margin-right: -16px;
		padding-right: 1rem;
	}

	.terai-events__card {
		flex: 0 0 auto;
		width: 78vw;
		max-width: 300px;
	}
}


/* --------------------------------------------------------------------------
   SNS アイコンボタン(.terai-social)
   フッターの手前に置く「フォローはこちら」の丸いアイコンボタン列
   (Facebook / TikTok)。リンク先URLは未確定のため href="#" 仮。
   -------------------------------------------------------------------------- */

.terai-social {
	margin: clamp(2.5rem, 6vw, 4rem) 0 clamp(1rem, 3vw, 2rem);
	text-align: center;
}

.terai-social__label {
	margin: 0 0 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #1a202c;
}

.terai-social__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.terai-social__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 50%;

	background: #1a202c;
	color: #ffffff;
	text-decoration: none;

	transition: background-color 0.15s ease, transform 0.15s ease;
}

.terai-social__btn:hover,
.terai-social__btn:focus-visible {
	background: #dc143c;
	color: #ffffff; /* アイコン(fill:currentColor)を白のままに(コンテンツ既定の a:hover 色を打ち消す) */
	transform: translateY(-2px);
}

.terai-social__btn svg {
	width: 1.4rem;
	height: 1.4rem;
	display: block;
}


/* --------------------------------------------------------------------------
   カスタム投稿タイプのアーカイブ = /member/ ・ /event/
   独自テンプレート(archive-tcj_member.php / archive-tcj_event.php)で、
   コンテンツ幅を決めて中央寄せ + 見出しの共通スタイル。
   多言語規約: 固定px幅・nowrap を使わず、テキストは自然に折り返させる。
   -------------------------------------------------------------------------- */

/* .content-area を併記して詳細度 0,2,0 に(Kadence global.min.css の
   `.content-area { margin: var(--global-xxl-spacing) 0 }` が左右marginを
   0 に戻してくるため、それに勝たせて中央寄せを効かせる)。 */
.content-area.content-area-tcj-members,
.content-area.content-area-tcj-events,
.content-area.content-area-tcj-event-single,
.content-area.content-area-tcj-notices,
.content-area.content-area-tcj-notice-single {
	max-width: var(--global-content-width, 1290px);
	margin-left: auto;
	margin-right: auto;
	padding: clamp(2rem, 6vw, 4rem) 1.5rem clamp(3rem, 8vw, 6rem);
}

.terai-members__heading,
.terai-events-archive__heading,
.terai-notices-archive__heading,
/* 「私たちについて」「寄附をする」「メンバーになる」「メンバーになる(送信完了)」
   ページの Kadence ページタイトルも同じ青いピルに。本文側の目印クラスと
   #inner-wrap を共有するので :has() で「このページのときだけ」に限定する。 */
#inner-wrap:has(.terai-about-page) .entry-hero .entry-header.page-title .entry-title,
#inner-wrap:has(.terai-donate-page) .entry-hero .entry-header.page-title .entry-title,
#inner-wrap:has(.terai-join-page) .entry-hero .entry-header.page-title .entry-title,
#inner-wrap:has(.terai-join-thanks-page) .entry-hero .entry-header.page-title .entry-title,
#inner-wrap:has(.terai-contact-page) .entry-hero .entry-header.page-title .entry-title,
#inner-wrap:has(.terai-contact-thanks-page) .entry-hero .entry-header.page-title .entry-title {
	margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 1px;
	color: white;
	background-color: #003893;
	padding: 1rem 3rem;
	border-radius: 7px;
	text-align: center;
	/* Kadence の hero 見出しが display:block を強く当てるため !important で上書き */
	display: inline-block !important;
}

/* ページタイトルの青いピルが付く全ページ + イベント/お知らせ一覧共通で、
   スマホ版はピルを一回り小さく。 */
@media (max-width: 600px) {
	#inner-wrap:has(.terai-about-page) .entry-hero .entry-header.page-title .entry-title,
	#inner-wrap:has(.terai-donate-page) .entry-hero .entry-header.page-title .entry-title,
	#inner-wrap:has(.terai-join-page) .entry-hero .entry-header.page-title .entry-title,
	#inner-wrap:has(.terai-join-thanks-page) .entry-hero .entry-header.page-title .entry-title,
	#inner-wrap:has(.terai-contact-page) .entry-hero .entry-header.page-title .entry-title,
	#inner-wrap:has(.terai-contact-thanks-page) .entry-hero .entry-header.page-title .entry-title,
	.terai-events-archive__heading,
	.terai-notices-archive__heading,
	.terai-members__heading {
		font-size: 15px;
		padding: 0.75rem 1rem;
	}

	/* ページタイトルの青いピルが付く全ページ + トップページで、
	   本文の左右余白を揃えて少し広げる。
	   トップページには .terai-about-page のような目印クラスが無いので、
	   WordPressが <body> に自動で付ける .home で判定する。
	   ※ .content-container.site-container ではなく article.entry に効かせる:
	   Kadenceの `.content-style-boxed .content-bg:not(.loop-entry)`(719px以下)
	   が article.entry に margin: 0 -1rem を当てており、.content-container側で
	   padding を増やしても、この -16px の食い込みで実際の見た目は
	   狙った値より16px狭くなってしまう(実機で確認済み)。article.entry
	   (padding:0のまま)に直接 padding を指定すれば、この食い込みの影響を
	   受けずに正確な値になる。 */
	#inner-wrap:has(.terai-about-page) article.entry,
	#inner-wrap:has(.terai-donate-page) article.entry,
	#inner-wrap:has(.terai-join-page) article.entry,
	#inner-wrap:has(.terai-join-thanks-page) article.entry,
	#inner-wrap:has(.terai-contact-page) article.entry,
	#inner-wrap:has(.terai-contact-thanks-page) article.entry,
	body.home article.entry {
		/* article.entry の実際の左端は、.content-container の元のpadding(24px)から
		   Kadenceの -16px 食い込み分を引いた 8px から始まる。ここでの
		   padding を 8px にすることで、視覚上ちょうど 8+8=16px になる
		   (全ページ共通で左右16pxに統一)。 */
		padding-left: 8px;
		padding-right: 8px;
	}

	/* イベント一覧・お知らせ一覧・メンバー紹介・イベント/お知らせ詳細ページも、
	   本文の左右余白を他ページと揃えて16pxに。こちらは article.entry を
	   経由しない独自テンプレートなので、Kadenceの -16px 食い込みは無く、
	   素直に 16px を指定するだけでよい。 */
	.content-area.content-area-tcj-events,
	.content-area.content-area-tcj-notices,
	.content-area.content-area-tcj-members,
	.content-area.content-area-tcj-event-single,
	.content-area.content-area-tcj-notice-single {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ページタイトル帯(200px の空きスペース)を詰める。
   ページタイトル「私たちについて」〜 ミッション文までを、about-image.jpg を
   背景にした帯にする(直下のミッションブロックと同じ背景で連続して見える)。
   #f7f5f5 を薄く重ねているのは、上に乗る濃色テキストの可読性を保つため。
   「寄附をする」「メンバーになる」ページのヘッダーにも同じ写真を使い、トーンを揃える。 */
#inner-wrap:has(.terai-about-page) .entry-hero-container-inner,
#inner-wrap:has(.terai-donate-page) .entry-hero-container-inner,
#inner-wrap:has(.terai-join-page) .entry-hero-container-inner,
#inner-wrap:has(.terai-join-thanks-page) .entry-hero-container-inner,
#inner-wrap:has(.terai-contact-page) .entry-hero-container-inner,
#inner-wrap:has(.terai-contact-thanks-page) .entry-hero-container-inner {
	background-image: linear-gradient(rgba(247, 245, 245, 0.86), rgba(255, 255, 255, 0.26)), url(../images/about-image.jpg);
	background-size: cover;
	background-position: top center;
	background-repeat: no-repeat;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

#inner-wrap:has(.terai-about-page) .entry-hero .entry-header.page-title,
#inner-wrap:has(.terai-donate-page) .entry-hero .entry-header.page-title,
#inner-wrap:has(.terai-join-page) .entry-hero .entry-header.page-title,
#inner-wrap:has(.terai-join-thanks-page) .entry-hero .entry-header.page-title,
#inner-wrap:has(.terai-contact-page) .entry-hero .entry-header.page-title,
#inner-wrap:has(.terai-contact-thanks-page) .entry-hero .entry-header.page-title {
	min-height: 0;
	/* 下の本文と左端をそろえる(ヒーローのコンテナは本文より 0.5rem 内側にある) */
	padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(0.75rem, 2vw, 1.25rem) 0.5rem;
	/* Kadence の hero 見出しは flex + align-items:center。左寄せに変える。 */
	align-items: flex-start;
	text-align: left;
}

.terai-members__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	/* 固定px幅は使わず、最小 180px を確保して自動で列数を決める(規約1) */
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: clamp(1.25rem, 3vw, 2.25rem);
}

/* スマホ版: 180px基準の自動列数だと1列になってしまうため、2列固定にする */
@media (max-width: 600px) {
	.terai-members__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}
}

.terai-members__card {
	min-width: 0;
}

.terai-members__photo {
	aspect-ratio: 3 / 4;
	border-radius: 14px;
	overflow: hidden;
	background: #e3e6e9;
	margin-bottom: 0.75rem;
}

.terai-members__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.terai-members__name {
	margin: 0;
	font-weight: 700;
	line-height: 1.5;
	color: #1a202c;
}

.terai-members__role {
	margin: 0.15rem 0 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #5b6472;
}

.terai-members__empty {
	margin: 0;
	color: #8a93a3;
}

/* ---- /event/ アーカイブ: トップの Events 欄と同じカード(.terai-events)を流用 ----
   グリッド段組み・カードの見た目は .terai-events 一式(セクション「お知らせ / イベント」)
   をそのまま使う。--archive はアーカイブ特有の調整だけを足す。 */

/* アーカイブは件数が多いので、スマホでも横フリックにせず縦積み(1カラム)に戻す
   (.terai-events のスマホ用 display:flex 上書きを打ち消す)。 */
@media (max-width: 600px) {
	.terai-events--archive {
		display: grid;
		grid-template-columns: 1fr;
		overflow: visible;

		/* トップページの横スクロール用に .terai-events(基本クラス)へ足した
		   margin-right / padding-right を、同じクラスを共有するアーカイブ側
		   では打ち消す(実機で右マージンだけ狭くなる不具合を確認)。 */
		margin-right: 0;
		padding-right: 0;
	}

	.terai-events--archive .terai-events__card {
		width: auto;
		max-width: none;
		flex: none;
	}
}

/* ページ送り(the_posts_pagination): 上に余白 + 右寄せ */
.content-area-tcj-events .pagination,
.content-area-tcj-events .nav-links,
.content-area-tcj-notices .pagination,
.content-area-tcj-notices .nav-links {
	margin-top: clamp(2rem, 5vw, 3rem);
}

.content-area-tcj-events .pagination .nav-links,
.content-area-tcj-notices .pagination .nav-links {
	text-align: right;
	justify-content: flex-end;
}

/* ---- イベント シングルページ(single-tcj_event.php)----
   見出しは写真の横(.terai-event-single__info)の先頭に置く。 */
.terai-event-single__title {
	margin: 0 0 clamp(0.9rem, 2.5vw, 1.5rem);
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
	font-weight: 400;
	line-height: 1.35;
	color: #1a202c;
}

/* スマホ版: 見出しをもう少し小さく */
@media (max-width: 600px) {
	.terai-event-single__title {
		font-size: 1.35rem;
	}
}

/* 見出しの下を2カラム: 左=写真 / 右=情報(上下中央そろえ)。狭い画面では縦積み。
   ※ 本文(.terai-event-single__content)はこの2カラムの外・下にフル幅で出力する。 */
.terai-event-single__body {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}

@media (max-width: 768px) {
	.terai-event-single__body {
		grid-template-columns: 1fr;
	}

	/* 縦積みのとき、アイキャッチ画像の下の余白をもう少し広げる */
	.terai-event-single__photo {
		margin-bottom: 1rem;
	}
}

.terai-event-single__media {
	min-width: 0;
}

.terai-event-single__photo {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 16px;
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.35);
}

.terai-event-single__info {
	min-width: 0;
}

.terai-event-single__meta {
	margin: 0;
	display: grid;
	gap: 0;
}

.terai-event-single__meta-row {
	display: grid;
	/* ラベル列は固定pxにせず内容で伸縮(規約1)。ネパール語の長いラベルでも折れる。 */
	grid-template-columns: minmax(5rem, max-content) minmax(0, 1fr);
	gap: 0.25rem 1.25rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid #e2e5e9;
}

.terai-event-single__meta-row:first-child {
	border-top: 1px solid #e2e5e9;
}

.terai-event-single__meta dt {
	margin: 0;
	font-weight: 700;
	color: #5b6472;
}

.terai-event-single__meta dd {
	margin: 0;
	line-height: 1.6;
	color: #1a202c;
}

.terai-event-single__content {
	margin-top: clamp(2.25rem, 6vw, 4rem);
	line-height: 1.9;
	color: #333a45;
}

.terai-event-single__content > :first-child {
	margin-top: 0;
}

.terai-event-single__back {
	margin: clamp(2rem, 5vw, 3rem) 0 0;
}

.terai-event-single__back a {
	color: #003893;
	font-weight: 700;
	text-decoration: none;
}

.terai-event-single__back a:hover,
.terai-event-single__back a:focus-visible {
	text-decoration: underline;
}


/* --------------------------------------------------------------------------
   /news/ アーカイブ(archive-tcj_notice.php)
   イベントアーカイブ(.terai-events__card)と同じ色・角丸・矢印バッジの
   トーンを踏襲しつつ、グリッドではなく縦1列のリストにする
   (.terai-notices__card は横長の行として並ぶ)。
   -------------------------------------------------------------------------- */

.terai-notices {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.terai-notices__card {
	background: #f4f6f8;
	border-radius: 16px;
	overflow: hidden;
}

.terai-notices__link {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 1.5rem);
	padding: clamp(0.85rem, 2vw, 1.25rem) clamp(1rem, 2.5vw, 1.5rem);

	text-decoration: none;
	color: #1a202c;
}

/* サムネイルはアイキャッチが設定されている投稿だけに出す(規約1: 固定px幅は使わない)。 */
.terai-notices__thumb {
	flex: 0 0 auto;
	width: clamp(88px, 14vw, 128px);
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
}

.terai-notices__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.terai-notices__body {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.terai-notices__date {
	color: #5b6472;
	font-weight: 700;
	font-size: inherit; /* サイトのベースフォントサイズ(body: 17px)を継承 */
	font-variant-numeric: tabular-nums;
}

.terai-notices__title {
	font-size: inherit;
	font-weight: 700;
	line-height: 1.55;
}

.terai-notices__arrow {
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #ffffff;
	color: #dc143c; /* 赤い矢印(ネパール国旗のクリムゾン) */

	display: flex;
	align-items: center;
	justify-content: center;

	transition: transform 0.2s ease;
}

.terai-notices__link:hover .terai-notices__arrow,
.terai-notices__link:focus-visible .terai-notices__arrow {
	transform: translateX(2px);
}

.terai-notices__arrow svg {
	width: 0.95rem;
	height: 0.95rem;
	display: block;
}

@media (max-width: 480px) {
	/* 狭い画面ではサムネイルを本文の上へ(横に並べると窮屈なため)。 */
	.terai-notices__link {
		flex-wrap: wrap;
	}

	.terai-notices__thumb {
		width: 100%;
		aspect-ratio: 16 / 9;
	}
}

/* ---- お知らせ シングルページ(single-tcj_notice.php)----
   基本はテキストのみの本文。アイキャッチがある投稿だけ、本文の右側に
   写真を添える2カラムにする(イベント単体ページとは左右が逆)。
   記事(見出し+本文)を「私たちについて」の基本データ(.terai-about-page__info)と
   同じ薄いグレー背景+ボックスシャドウのカードにする。「戻る」リンクは
   枠の外(カードの下)に置く。 */
.terai-notice-single__card {
	background: #f7f5f5;
	border-radius: clamp(16px, 3vw, 24px);
	padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 5vw, 3rem);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.18);
}

.terai-notice-single__head {
	margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
}

.terai-notice-single__date {
	display: block;
	margin-bottom: 0.5rem;
	color: #5b6472;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.terai-notice-single__title {
	margin: 0;
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
	font-weight: 400;
	line-height: 1.35;
	color: #1a202c;
}

/* スマホ版: 見出しをもう少し小さく */
@media (max-width: 600px) {
	.terai-notice-single__title {
		font-size: 1.35rem;
	}
}

.terai-notice-single__body {
	line-height: 1.9;
	color: #333a45;
}

/* スペースの無い長い文字列(URLの直書き等)が、右の画像の下に潜り込んで
   はみ出さないようにする(2カラム時、本文側グリッド列の中で折り返す)。 */
.terai-notice-single__content {
	min-width: 0;
	overflow-wrap: anywhere;
}

.terai-notice-single__body--with-media {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

@media (max-width: 768px) {
	.terai-notice-single__body--with-media {
		grid-template-columns: 1fr;
	}

	.terai-notice-single__body--with-media .terai-notice-single__media {
		order: -1;
	}
}

.terai-notice-single__content > :first-child {
	margin-top: 0;
}

.terai-notice-single__media {
	min-width: 0;
}

.terai-notice-single__photo {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 16px;
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.35);
}

.terai-notice-single__back {
	margin: clamp(2rem, 5vw, 3rem) 0 0;
}

.terai-notice-single__back a {
	color: #003893;
	font-weight: 700;
	text-decoration: none;
}

.terai-notice-single__back a:hover,
.terai-notice-single__back a:focus-visible {
	text-decoration: underline;
}


/* --------------------------------------------------------------------------
   「私たちについて」ページ(固定ページ / content/about-blocks.html)
   0. ミッション(全幅の青バンド)
   1. 基本データ(グレーの角丸カード内に定義リスト)
   2. Terai Community について(本文)
   トップページのパーツ(.terai-about / .terai-greeting / アーカイブ見出し)の
   トーンに合わせて統一。本文は1つの wp:html ブロックなので、すべて
   .terai-about-page を前置して Kadence の .entry-content h2 / p 等に勝たせる。
   -------------------------------------------------------------------------- */

/* セクション見出し。ページタイトル(塗りの青ピル)より一段下の階層なので、
   同系だが「線だけの青ピル(アウトライン)」で差をつける。 */
.terai-about-page .terai-about-page__heading {
	display: inline-block;
	margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
	padding: 0.65rem 1.75rem;
	background: none;
	border: 1.5px solid #003893;
	border-radius: 7px;
	color: #003893;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
}

.terai-about-page .terai-about-page__heading--spaced {
	margin-top: clamp(3rem, 8vw, 5.5rem);
}

.terai-about-page {
	margin-bottom: clamp(2rem, 6vw, 4rem);
}

/* 0. ミッション — ページタイトル帯(写真背景)からつながる #f7f5f5 の全幅バンド。
   写真は「ページヘッダー」(.entry-hero-container-inner)側だけに使う
   (ここも写真にすると、別要素ゆえ2枚の写真の継ぎ目が見えてしまうため)。
   左右は calc(50vw - 50%) で本文と同じ左端にそろえる。 */
.terai-about-page .terai-about-page__mission {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-top: 0;
	margin-bottom: 0;
	padding: clamp(1.75rem, 5vw, 2.75rem) calc(50vw - 50%);
	background: transparent;
	color: inherit;
}

.terai-about-page .terai-about-page__mission-body {
	margin: 0;
	max-width: 34em; /* 行長を抑える(px禁止・em基準) */
	font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem);
	font-weight: 700;
	line-height: 1.7;
	color: #1a202c;
	/* 和文の字詰め: 約物(「」、。)の余白を詰めて見出しらしく整える */
	font-feature-settings: "palt" 1;
	letter-spacing: 0.04em;
}

/* スマホ: 手動改行を無効化して自然に折り返させる(規約: 長い文言でも崩れないように) */
@media (max-width: 600px) {
	.terai-about-page .terai-about-page__mission-body br {
		display: none;
	}
}

/* 1. 基本データ — .terai-greeting と同じ「グレーの角丸カード」に定義リストを収める */
.terai-about-page .terai-about-page__info {
	margin: 0;
	display: grid;
	background: #f7f5f5;
	border-radius: clamp(16px, 3vw, 24px);
	padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 5vw, 3rem);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.18);
}

.terai-about-page .terai-about-page__info-row {
	display: grid;
	/* ラベル列は固定pxを避け rem の min/max で。ネパール語の長いラベルは折り返す。 */
	grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr);
	gap: 0.35rem 2rem;
	padding: clamp(1rem, 3vw, 1.5rem) 0;
	border-bottom: 1px solid #e4e6e2;
}

.terai-about-page .terai-about-page__info-row:first-child {
	padding-top: 0;
}

.terai-about-page .terai-about-page__info-row:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.terai-about-page .terai-about-page__info dt {
	margin: 0;
	font-weight: 700;
	color: #5b6472;
}

.terai-about-page .terai-about-page__info dd {
	margin: 0;
	line-height: 1.7;
	color: #1a202c;
}

.terai-about-page .terai-about-page__info dd a {
	color: #003893;
	text-decoration: none;
}

.terai-about-page .terai-about-page__info dd a:hover,
.terai-about-page .terai-about-page__info dd a:focus-visible {
	text-decoration: underline;
}

.terai-about-page .terai-about-page__info-sub {
	display: block;
	margin-top: 0.25rem;
	color: #5b6472;
	font-size: 0.85em;
}

@media (max-width: 560px) {
	.terai-about-page .terai-about-page__info-row {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}
}

/* 1.5 団体設立の目的 — 本文(左)+ 写真(右)の2カラム。写真はまだダミー
   (noimage.jpg)。狭い画面では縦積みにする。 */
.terai-about-page .terai-about-page__purpose {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

.terai-about-page .terai-about-page__purpose-media {
	min-width: 0;
}

.terai-about-page .terai-about-page__purpose-media img {
	width: 100%;
	height: auto;
	display: block;
}

@media (max-width: 768px) {
	.terai-about-page .terai-about-page__purpose {
		grid-template-columns: 1fr;
	}

	.terai-about-page .terai-about-page__purpose-media {
		order: -1; /* スマホでは写真を本文より先に */
	}

	.terai-about-page .terai-about-page__purpose-media img {
		width: 70%;
		margin-inline: auto;
	}
}

/* 2. 団体設立の目的・Terai Community について — 本文(.terai-about__body / __title のトーン) */
.terai-about-page .terai-about-page__prose {
	line-height: 1.8;
	color: #4a5568;
}

.terai-about-page .terai-about-page__prose > :first-child {
	margin-top: 0;
}

.terai-about-page .terai-about-page__prose h3 {
	margin: clamp(1.5rem, 4vw, 2.25rem) 0 0.5rem;
	font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
	font-weight: 700;
	line-height: 1.5;
	color: #1a202c;
}

.terai-about-page .terai-about-page__prose p {
	margin: 0 0 1.1rem;
}

.terai-about-page .terai-about-page__prose ul {
	margin: 0 0 1.1rem;
	padding-left: 1.4em;
}

.terai-about-page .terai-about-page__prose li {
	margin: 0.4rem 0;
}


/* --------------------------------------------------------------------------
   404「お探しのページが見つかりません。」ページ
   -------------------------------------------------------------------------- */
/* 文言(h1)を画面の中央付近に表示する。
   404 のときだけ #inner-wrap を縦センターの flex コンテナにする。 */
.error404 #inner-wrap {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 65vh;
}

.error404 .page-header .page-title {
	font-weight: 500;
	font-size: 22px;
	text-align: center;
}

/* 検索窓と、それを促す一文(「こちらには何もありません。検索をお試しください。」)は表示しない */
.error404 .search-form,
.error404 .entry-content-wrap > p {
	display: none;
}


/* --------------------------------------------------------------------------
   フッター手前のワイドビュー写真(.terai-wideview)
   bg_wideview.jpg(横長パノラマ 2928×352)を、ウィンドウ幅いっぱいに
   1枚そのまま配置する(トリミングなし。画像の縦横比のまま高さが決まる)。
   ※ ページ本文ではなく全ページ共通の装飾。本番は inc/footer.php が
   .terai-footer の直前に出力する(preview-top.html では PASTE 範囲の外)。
   -------------------------------------------------------------------------- */

.terai-wideview {
	width: 100vw;
	margin: clamp(2.5rem, 7vw, 5rem) calc(50% - 50vw) 0;
}

.terai-wideview img {
	display: block;
	width: 100%;
	height: auto;
}


/* --------------------------------------------------------------------------
   サイト共通フッター(.terai-footer)
   ※ これはページ本文ではなく「サイト全体のフッター」。preview-top.html では
   PASTE範囲の外に置いて見た目だけ確認している。本番では Kadence の
   フッタービルダー、または子テーマに footer.php を追加して実装すること。
   ウィンドウ横幅いっぱい(ヒーローと同じ 100vw + 負マージン)。
   -------------------------------------------------------------------------- */

.terai-footer {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);

	background: #00245f; /* ネパール国旗のブルー */
	color: #d5def0;
}

.terai-footer__inner {
	max-width: 1290px;
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 4rem) 1.5rem clamp(1.5rem, 4vw, 2.5rem);

	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2rem clamp(2rem, 6vw, 5rem);
}

.terai-footer__brand {
	min-width: 0;
	flex: 1 1 16rem;
}

.terai-footer__name {
	margin: 0 0 0.5rem;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.6;
	color: #ffffff;
}

.terai-footer__addr {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.9;
}

.terai-footer__addr a {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;

	color: #cbd2dc;
	text-decoration: none;
	line-height: 1.6;
}

.terai-footer__addr a:hover,
.terai-footer__addr a:focus-visible {
	color: #ffffff;
}

/* TEL / MAIL のラベル代わりのアイコン */
.terai-footer__addr-icon {
	flex: 0 0 auto;
	width: 1.05em;
	height: 1.05em;
	display: block;
}

/* SDGs アイコン。フッター右側(法人情報の対向)に配置。
   __inner は space-between なので brand=左 / sdg=右。狭い画面では折り返して下段へ。 */
.terai-footer__sdg {
	flex: 0 1 auto;
	min-width: 0;
}

.terai-footer__sdg-label {
	margin: 0 0 0.85rem;
	font-size: 0.85rem;
	color: #a9b6d6;
}

.terai-footer__sdg-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.terai-footer__sdg-list img {
	width: clamp(60px, 11vw, 82px);
	height: auto;
	border-radius: 4px;
	display: block;
}

.terai-footer__copy {
	max-width: 1290px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;

	text-align: center;
	font-size: 0.8rem;
	color: #a9b6d6;
}


/* --------------------------------------------------------------------------
   「寄附をする」ページ(固定ページ / content/donate-blocks.html)
   振込先(銀行名・口座番号・名義)を「私たちについて」の基本データと同じ
   「グレーの角丸カード+ボックスシャドウ」の定義リストで掲載する。
   見出しのピル(アウトライン)も .terai-about-page__heading と同じ見た目。
   -------------------------------------------------------------------------- */

.terai-donate-page {
	/* ヘッダー(写真背景の帯)とリード文の間の空き */
	margin-top: clamp(2rem, 6vw, 4rem);
	margin-bottom: clamp(2rem, 6vw, 4rem);
}

.terai-donate-page .terai-donate-page__lead {
	margin: 0 0 clamp(2rem, 5vw, 3rem);
	line-height: 1.8;
	color: #4a5568;
}

.terai-donate-page .terai-donate-page__heading {
	display: inline-block;
	margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
	padding: 0.65rem 1.75rem;
	background: none;
	border: 1.5px solid #003893;
	border-radius: 7px;
	color: #003893;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
}

/* 「ゆうちょ銀行ATM・窓口から」「他の金融機関から」の振込方法別の小見出し。
   __heading(アウトラインの青ピル)より一段下の階層なので、下線だけのシンプルな見出しにする。 */
.terai-donate-page .terai-donate-page__subheading {
	margin: 0 0 1rem;
	font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
	font-weight: 700;
	line-height: 1.5;
	color: #1a202c;
}

.terai-donate-page .terai-donate-page__subheading--spaced {
	margin-top: clamp(2rem, 5vw, 3rem);
}

.terai-donate-page .terai-donate-page__info {
	margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
	display: grid;
	background: #f7f5f5;
	border-radius: clamp(16px, 3vw, 24px);
	padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 5vw, 3rem);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.18);
}

.terai-donate-page .terai-donate-page__info-row {
	display: grid;
	/* ラベル列は固定pxを避け rem の min/max で。ネパール語の長いラベルは折り返す。 */
	grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr);
	gap: 0.35rem 2rem;
	padding: clamp(1rem, 3vw, 1.5rem) 0;
	border-bottom: 1px solid #e4e6e2;
}

.terai-donate-page .terai-donate-page__info-row:first-child {
	padding-top: 0;
}

.terai-donate-page .terai-donate-page__info-row:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.terai-donate-page .terai-donate-page__info dt {
	margin: 0;
	font-weight: 700;
	color: #5b6472;
}

.terai-donate-page .terai-donate-page__info dd {
	margin: 0;
	line-height: 1.7;
	color: #1a202c;
}

/* 預金種目の補足(※印の注記)。about ページの __info-sub と同じ扱い。 */
.terai-donate-page .terai-donate-page__info-sub {
	display: block;
	margin-top: 0.35rem;
	color: #5b6472;
	font-size: 0.85em;
	line-height: 1.6;
}

@media (max-width: 560px) {
	.terai-donate-page .terai-donate-page__info-row {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}
}

.terai-donate-page .terai-donate-page__note {
	margin: 0;
	padding: 1rem 1.25rem;
	background: #fdf1f1;
	border-left: 3px solid #dc143c;
	border-radius: 4px;
	line-height: 1.8;
	color: #4a5568;
	font-size: 0.95rem;
}


/* --------------------------------------------------------------------------
   「メンバーになる」ページ(固定ページ / content/join-blocks.html)
   Contact Form 7 のフォーム出力を、サイトのトーン(角丸・赤いCTAボタン)に
   合わせてスタイルする。.terai-join-page__form の内側だけに効くよう前置し、
   将来 別ページに別のCF7フォームを置いても影響しないようにする。
   -------------------------------------------------------------------------- */

.terai-join-page {
	margin-top: clamp(2rem, 6vw, 4rem);
	margin-bottom: clamp(2rem, 6vw, 4rem);
}

.terai-join-page .terai-join-page__lead {
	margin: 0 0 clamp(2rem, 5vw, 3rem);
	line-height: 1.8;
	color: #4a5568;
}

.terai-join-page .terai-join-page__heading {
	display: inline-block;
	margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
	padding: 0.65rem 1.75rem;
	background: none;
	border: 1.5px solid #003893;
	border-radius: 7px;
	color: #003893;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
}

/* CF7 フォームの見た目(枠・入力欄・送信ボタン)は「メンバーになる」
   (.terai-join-page__form)と「お問い合わせ」(.terai-contact-page__form)で
   共通の見た目にするため、セレクタをまとめて指定している。 */
.terai-join-page .terai-join-page__form,
.terai-contact-page .terai-contact-page__form {
	max-width: 40rem;
	margin-left: auto;
	margin-right: auto;
	background: #f7f5f5;
	border-radius: clamp(16px, 3vw, 24px);
	padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 5vw, 3rem);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.18);
}

/* CF7 既定の <p> 区切りのまま、ラベル+入力欄を縦に並べる。 */
.terai-join-page .terai-join-page__form p,
.terai-contact-page .terai-contact-page__form p {
	margin: 0 0 1.5rem;
}

.terai-join-page .terai-join-page__form label,
.terai-contact-page .terai-contact-page__form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 700;
	color: #1a202c;
}

/* スマホ版: 項目名と入力欄の間隔をもう少し詰める。
   CF7フォームは「項目名<br>[フィールド]」と書いても、wpautop() により
   実際には <p>項目名</p><p><input...></p> と“別々の段落”に分割される
   (実機で確認済み)。そのため両方に効いている p の margin-bottom(1.5rem)が
   項目名と直後の入力欄の間にもそのまま入ってしまう。入力欄を含まない
   (=項目名だけの)段落だけを :not(:has()) で狙って margin を縮める。 */
@media (max-width: 600px) {
	.terai-join-page .terai-join-page__form p:not(:has(.wpcf7-form-control-wrap)),
	.terai-contact-page .terai-contact-page__form p:not(:has(.wpcf7-form-control-wrap)) {
		margin-bottom: 0.4rem;
	}

	/* 送信ボタンをセンタリング(ボタン自体は inline-flex なので、
	   包む段落に text-align: center を効かせるだけでよい) */
	.terai-join-page .terai-join-page__form p:has(input[type="submit"]),
	.terai-contact-page .terai-contact-page__form p:has(input[type="submit"]) {
		text-align: center;
	}

	/* CF7がボタンの直後に付ける読み込み用スピナー(.wpcf7-spinner、
	   幅24px+左マージン24px)は普段 visibility:hidden で見えないが、
	   インライン幅は占有したままなので、text-align:centerで中央寄せしても
	   その分だけボタンが左に寄って見える。負のマージンで見た目の幅を
	   打ち消し、ボタン単体が中央に来るようにする。 */
	.terai-join-page .terai-join-page__form .wpcf7-spinner,
	.terai-contact-page .terai-contact-page__form .wpcf7-spinner {
		margin-left: -48px;
	}
}

.terai-join-page .terai-join-page__form input[type="text"],
.terai-join-page .terai-join-page__form input[type="tel"],
.terai-join-page .terai-join-page__form input[type="email"],
.terai-join-page .terai-join-page__form input[type="date"],
.terai-contact-page .terai-contact-page__form input[type="text"],
.terai-contact-page .terai-contact-page__form input[type="email"],
.terai-contact-page .terai-contact-page__form textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.6rem 1rem;
	border: 1px solid #cbd2dc;
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
	background: #ffffff;
	color: #1a202c;
}

.terai-contact-page .terai-contact-page__form textarea {
	min-height: 10rem;
	resize: vertical;
}

.terai-join-page .terai-join-page__form input:focus-visible,
.terai-contact-page .terai-contact-page__form input:focus-visible,
.terai-contact-page .terai-contact-page__form textarea:focus-visible {
	outline: 2px solid #003893;
	outline-offset: 1px;
}

/* 画像認証(Really Simple CAPTCHA)。回答欄は短い文字列だけなので、
   他の入力欄と違い横幅いっぱいにはしない。 */
.terai-join-page .terai-join-page__form img.wpcf7-captchac,
.terai-contact-page .terai-contact-page__form img.wpcf7-captchac {
	display: block;
	margin-bottom: 0.5rem;
	border-radius: 6px;
}

.terai-join-page .terai-join-page__form input.wpcf7-captchar,
.terai-contact-page .terai-contact-page__form input.wpcf7-captchar {
	width: 8rem;
}

/* 在留資格(ラジオボタン)。固定px幅・nowrapは使わず自然に折り返す(規約1・2)。 */
.terai-join-page .terai-join-page__form .wpcf7-radio {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.terai-join-page .terai-join-page__form .wpcf7-list-item {
	margin: 0;
}

.terai-join-page .terai-join-page__form .wpcf7-list-item-label {
	margin-left: 0.4em;
}

.terai-join-page .terai-join-page__form input[type="submit"],
.terai-contact-page .terai-contact-page__form input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 2.5rem;
	border: none;
	border-radius: 999px;
	background: #dc143c;
	color: #ffffff;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.terai-join-page .terai-join-page__form input[type="submit"]:hover,
.terai-join-page .terai-join-page__form input[type="submit"]:focus-visible,
.terai-contact-page .terai-contact-page__form input[type="submit"]:hover,
.terai-contact-page .terai-contact-page__form input[type="submit"]:focus-visible {
	background: #b01031;
}

.terai-join-page .terai-join-page__form input[type="submit"]:disabled,
.terai-contact-page .terai-contact-page__form input[type="submit"]:disabled {
	opacity: 0.6;
	cursor: default;
}

/* スマホ版: 送信ボタンをもう少し小さく */
@media (max-width: 600px) {
	.terai-join-page .terai-join-page__form input[type="submit"],
	.terai-contact-page .terai-contact-page__form input[type="submit"] {
		padding: 0.65rem 1.75rem;
		font-size: 0.9rem;
	}
}

.terai-join-page .terai-join-page__form .wpcf7-not-valid-tip,
.terai-contact-page .terai-contact-page__form .wpcf7-not-valid-tip {
	margin-top: 0.35rem;
	color: #dc143c;
	font-size: 0.85rem;
}

.terai-join-page .terai-join-page__form .wpcf7-response-output,
.terai-contact-page .terai-contact-page__form .wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	border: 1px solid #e4e6e2;
	font-size: 0.95rem;
}


/* --------------------------------------------------------------------------
   送信完了ページ(固定ページ / content/join-thanks-blocks.html・
   content/contact-thanks-blocks.html)
   CF7 送信後、inc/contact-form.php の JS がここへリダイレクトする。
   「メンバーになる」「お問い合わせ」共通の見た目にするため、セレクタを
   まとめて指定している。
   -------------------------------------------------------------------------- */

.terai-join-thanks-page,
.terai-contact-thanks-page {
	margin-top: clamp(2rem, 6vw, 4rem);
	margin-bottom: clamp(2rem, 6vw, 4rem);
	margin-left: auto;
	margin-right: auto;
	max-width: 40rem;
	text-align: center;
}

.terai-join-thanks-page .terai-join-thanks-page__body,
.terai-contact-thanks-page .terai-contact-thanks-page__body {
	line-height: 1.9;
	color: #333a45;
}

.terai-join-thanks-page .terai-join-thanks-page__body > :first-child,
.terai-contact-thanks-page .terai-contact-thanks-page__body > :first-child {
	margin-top: 0;
}

.terai-join-thanks-page .terai-join-thanks-page__back,
.terai-contact-thanks-page .terai-contact-thanks-page__back {
	margin: clamp(2rem, 5vw, 3rem) 0 0;
}

.terai-join-thanks-page .terai-join-thanks-page__back a,
.terai-contact-thanks-page .terai-contact-thanks-page__back a {
	color: #003893;
	font-weight: 700;
	text-decoration: none;
}

.terai-join-thanks-page .terai-join-thanks-page__back a:hover,
.terai-join-thanks-page .terai-join-thanks-page__back a:focus-visible,
.terai-contact-thanks-page .terai-contact-thanks-page__back a:hover,
.terai-contact-thanks-page .terai-contact-thanks-page__back a:focus-visible {
	text-decoration: underline;
}

/* スマホ版: 本文中の手動改行を無効化して自然に折り返させ、テキストは左寄せに。 */
@media (max-width: 600px) {
	.terai-join-thanks-page .terai-join-thanks-page__body br,
	.terai-contact-thanks-page .terai-contact-thanks-page__body br {
		display: none;
	}

	.terai-join-thanks-page,
	.terai-contact-thanks-page {
		text-align: left;
	}
}


/* --------------------------------------------------------------------------
   「お問い合わせ」ページ(固定ページ / content/contact-blocks.html)
   フォーム自体の見た目(枠・入力欄・送信ボタン)は「メンバーになる」ページと
   共通化済み(.terai-join-page__form のセレクタを参照)。ここではページ固有の
   リード文・見出しだけを定義する。
   -------------------------------------------------------------------------- */

.terai-contact-page {
	margin-top: clamp(2rem, 6vw, 4rem);
	margin-bottom: clamp(2rem, 6vw, 4rem);
}

.terai-contact-page .terai-contact-page__lead {
	margin: 0 0 clamp(2rem, 5vw, 3rem);
	line-height: 1.8;
	color: #4a5568;
}

.terai-contact-page .terai-contact-page__heading {
	display: inline-block;
	margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
	padding: 0.65rem 1.75rem;
	background: none;
	border: 1.5px solid #003893;
	border-radius: 7px;
	color: #003893;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
}
