/*
 * thinx-news.css – News コンポーネント（home + topics）
 *
 * 移管元:
 *   - Post 12 (home)   widget_id=f40e84f の <style> 中身
 *   - Post 32 (topics) widget_id=a6af6f1 の <style> 中身
 *
 * 設計方針:
 *   「まずコピー」を基本としつつ、物理ファイル化に伴う唯一の書き換えとして、
 *   各セレクタに #thxNews / #thxNewsPage のスコープを明示する。
 *
 *   理由:
 *     Elementor 側 inline では「home ページには home の <style>、topics ページには
 *     topics の <style> しかロードされない」ためセレクタ競合が発生しなかったが、
 *     物理ファイル化すると両ページで同一 CSS が読まれるため、同名セレクタ
 *     (.thx-news-item / .thx-news-list / .thx-news-headline 等) が後勝ちで一方を
 *     壊してしまう。スコープ明示は機能上等価かつ最小の書き換え。
 *
 * 並行運用中の優先度:
 *   Elementor の inline <style> は <body> 内、本ファイルは <head> 内に出力されるため、
 *   ドキュメント順では Elementor 側が後勝ち。並行運用中は inline が効き、
 *   Phase 1-E/F で inline を削除した時点で本ファイルが主導権を引き継ぐ。
 *
 * 注意:
 *   CSS 変数 (--n-accent 等) は #thxNews / #thxNewsPage のブロック内で宣言しており、
 *   それぞれのスコープに閉じている。両者の値は同一。
 */

/* ════════════════════════════════════════════════════════════════════
 * SECTION A : home ページ用  – #thxNews scope
 *   元: Post 12 (page/publish "home") widget_id=f40e84f
 * ════════════════════════════════════════════════════════════════════ */

/* News & Topics Section
 *
 * Phase 3 Step 2-A（v1.1.1）でローカル変数を Phase 3 統合トークンへ
 * フォールバック付き var() 参照に移行。--n-* 変数名は維持（既存
 * var(--n-...) 参照箇所への影響なし、後方互換性 100%）。
 */
#thxNews {
	--n-accent:     var(--thx-accent);
	--n-accent-rgb: var(--thx-accent-rgb);
	--n-bg:         var(--thx-bg);
	--n-border:     var(--thx-border);
	--n-muted:      var(--thx-muted);

	background-color: var(--n-bg);
	color: #ECE7DA;
	/* Phase A-05a（v2.6.4）: HOME Section Rhythm 統一、80→100px。
	 * Hero / News / Service / About / Company / Recruit / Contact の 6 セクションを
	 * 100px 0 で統一、スクロール体験のリズム統一。 */
	padding: 100px 0 !important;
	position: relative;
	overflow: hidden;
	font-family: system-ui, -apple-system, sans-serif;
	margin-top: -2px !important;
	margin-bottom: -2px !important;
}

/* 背景グリッド */
#thxNews::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(200,190,170,0.08) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(200,190,170,0.05) 1px, transparent 1px);
	background-size: 92px 92px;
	background-attachment: fixed;
	pointer-events: none;
	z-index: 1;
}

/* タイトルエリア
 *
 * Phase A-03-7（v2.6.3）: Tier 2 Section Headline 基準化、margin-bottom 60→80px。
 *   Service / 他 teaser と完全統一、HOME 内セクションのリズム同期。 */
#thxNews .thx-news-header {
	margin-bottom: 80px;
	display: flex;
	flex-direction: column;
}

#thxNews .thx-news-title-ja {
	font-size: 18px;
	font-weight: 700;
	color: var(--n-accent);
	letter-spacing: 0.02em;
	margin-bottom: 4px;
}

#thxNews .thx-news-label {
	font-size: 13px;
	letter-spacing: 0.4em;
	color: rgba(236, 231, 218, 0.7);
	text-transform: uppercase;
	display: block;
	margin-bottom: 16px;
}

/* Phase 4-D-9（v2.1.8）：正典 .thx-philosophy-main-copy 準拠の serif 化。
 * sans 800 / 1.4 / 0.05em → Georgia + Noto Serif JP / 400 / 1.5 / 0.02em。 */
#thxNews .thx-news-title {
	font-family: Georgia, "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.02em;
	color: #ECE7DA;
}

/* ニュースリスト構造 */
#thxNews .thx-news-list {
	border-top: 1px solid var(--n-border);
}

#thxNews .thx-news-item {
	border-bottom: 1px solid var(--n-border);
	transition: background-color 0.4s ease;
}

/* アコーディオンのトリガー */
#thxNews .thx-news-trigger {
	width: 100%;
	padding: 30px 0 30px 20px; /* 左側に20pxの余白を追加 */
	display: grid;
	grid-template-columns: 100px 120px 1fr 40px;
	align-items: center;
	gap: 20px;
	cursor: pointer;
	background: transparent !important;
	border: none !important;
	text-align: left;
	transition: all 0.4s ease;
	outline: none !important;
	box-shadow: none !important;
	-webkit-tap-highlight-color: transparent;
}

#thxNews .thx-news-trigger:hover {
	background: rgba(55, 171, 157, 0.03) !important;
}

/* タグ */
#thxNews .thx-news-tag {
	font-size: 13px;
	letter-spacing: 0.1em;
	font-weight: 700;
	color: var(--n-accent) !important;
	border: 1px solid var(--n-accent) !important;
	padding: 4px 8px;
	border-radius: 4px;
	text-align: center;
	text-transform: uppercase;
}

/* 日付 */
#thxNews .thx-news-date {
	font-size: 14px;
	color: var(--n-muted) !important;
	font-family: "Inter", sans-serif;
}

/* タイトル */
#thxNews .thx-news-headline {
	font-size: 18px;
	font-weight: 600;
	color: #ECE7DA !important;
	line-height: 1.5;
	transition: color 0.3s ease;
}

#thxNews .thx-news-trigger:hover .thx-news-headline,
#thxNews .thx-news-item.is-active .thx-news-headline {
	color: var(--n-accent) !important;
}

/* 矢印アイコン */
#thxNews .thx-news-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--n-accent) !important;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 詳細エリア */
#thxNews .thx-news-detail {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#thxNews .thx-news-detail-content {
	padding: 0 140px 40px 260px; /* 左側のパディングを240pxから260pxへ微調整 */
	font-size: 16px;
	line-height: 1.8;
	color: rgba(236, 231, 218, 0.8);
}

/* 展開した本文の中のリンク（2.14.6）：指定がないと親テーマ reset.css の a { color: #c36 }（赤系）が出るため、
 * 記事ページの本文リンクと同じ青緑＋細い下線にそろえる。「記事ページを開く」（.thx-news-more）は従来の指定のまま。
 * 下線の !important は thinx-header.css の a { text-decoration: none !important } に勝つため。 */
#thxNews .thx-news-detail-content p:not(.thx-news-more) a,
#thxNews .thx-news-detail-content p:not(.thx-news-more) a:visited {
	color: var(--n-accent) !important;
	text-decoration: underline !important;
	text-decoration-color: rgba(var(--n-accent-rgb), 0.55) !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.2s, text-decoration-color 0.2s;
}

#thxNews .thx-news-detail-content p:not(.thx-news-more) a:hover,
#thxNews .thx-news-detail-content p:not(.thx-news-more) a:active,
#thxNews .thx-news-detail-content p:not(.thx-news-more) a:focus-visible {
	color: var(--thx-accent-bright, #5BC7B8) !important;
	text-decoration-color: currentColor !important;
}

#thxNews .thx-news-detail-content p:not(.thx-news-more) a:focus-visible {
	outline: 2px solid var(--n-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* 2.14.7：お知らせ #245（コーポレートサイト リニューアル）の「関連ページ」3 リンクだけ下線を出さない（2026-11-26 ユーザー指示）。
 * #245 の項目は「記事ページを開く」のリンク先（/news/site-renewal/）で見分ける。色・ホバー・フォーカスの枠は上の指定のまま。 */
#thxNews .thx-news-item:has(.thx-news-more a[href$="/news/site-renewal/"]) .thx-news-detail-content p:not(.thx-news-more) a:is([href="/solutions/"], [href="/methodology/"], [href="/ai-platform/"]),
#thxNews .thx-news-item:has(.thx-news-more a[href$="/news/site-renewal/"]) .thx-news-detail-content p:not(.thx-news-more) a:is([href="/solutions/"], [href="/methodology/"], [href="/ai-platform/"]):visited {
	text-decoration: none !important;
}

/* アクティブ状態の背景色 */
#thxNews .thx-news-item.is-active {
	background: rgba(55, 171, 157, 0.08) !important;
}

#thxNews .thx-news-item.is-active .thx-news-icon {
	transform: rotate(180deg);
}

#thxNews .thx-news-item.is-active .thx-news-detail {
	max-height: 1000px;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
	/* Phase A-05c（v2.6.5）: モバイル padding 80px 0 で HOME 全 7 セクション統一。
	 * デスクトップ 100px → モバイル 80px の階段、Anthropic 系標準パターン。 */
	#thxNews {
		padding: 80px 0 !important;
	}
	/* Phase A-20（v2.9.8）: タイトル横幅不足を解消、meta + title の 2 段構造へ。
	 * 旧 [tag][headline][arrow] 横並びでは headline 領域が 250-270px に限定され、
	 * 22 字以上の日本語タイトルが窮屈に折返しまたは切れて見えていた。
	 * 新レイアウトでは meta（tag + date + arrow）を 1 行目、headline を 2 行目に
	 * 全幅展開（grid-column: 1 / -1）、自然な折返しで省略なく完全表示。
	 * 「meta + title」の論文・メディア標準階層、THINX 知的トーンに整合。
	 * padding 24px 10px で左右余白を最小化し、タイトル表示領域を最大限確保。
	 * Desktop（>900px）は完全維持。 */
	#thxNews .thx-news-trigger {
		grid-template-columns: auto auto 1fr auto;
		grid-template-rows: auto auto;
		padding: 24px 10px;
		column-gap: 12px;
		row-gap: 10px;
		align-items: center;
	}
	#thxNews .thx-news-tag {
		grid-column: 1;
		grid-row: 1;
	}
	#thxNews .thx-news-date {
		grid-column: 2;
		grid-row: 1;
		font-size: 13px;
	}
	#thxNews .thx-news-icon {
		grid-column: 4;
		grid-row: 1;
	}
	/* Phase A-05c（v2.6.5）: モバイル headline 16→17px、視認性向上。
	 * Phase A-20（v2.9.8）: grid 全幅化（1 / -1）で row 2 に配置、折返し表示。 */
	#thxNews .thx-news-headline {
		font-size: 17px;
		grid-column: 1 / -1;
		grid-row: 2;
		line-height: 1.5;
	}
	#thxNews .thx-news-detail-content {
		padding: 20px 20px 40px 20px;
	}
}


/* ════════════════════════════════════════════════════════════════════
 * SECTION B : topics ページ用  – #thxNewsPage scope
 *   元: Post 32 (page/publish "topics") widget_id=a6af6f1
 * ════════════════════════════════════════════════════════════════════ */

/* News Page - デザイン・フォント・動的機能 完全同期版
 *
 * Phase 3 Step 2-A（v1.1.1）でローカル変数を Phase 3 統合トークンへ
 * フォールバック付き var() 参照に移行。--n-* 変数名は維持（既存
 * var(--n-...) 参照箇所への影響なし、後方互換性 100%）。
 */
#thxNewsPage {
	--n-accent:     var(--thx-accent);
	--n-accent-rgb: var(--thx-accent-rgb);
	--n-bg:         var(--thx-bg);
	--n-card-bg:    var(--thx-card-bg);
	--n-border:     var(--thx-border);
	--n-muted:      var(--thx-muted);

	background-color: var(--n-bg);
	color: #ECE7DA;
	padding: 140px 0 100px !important;
	position: relative;
	overflow: hidden;
	font-family: system-ui, -apple-system, "Inter", sans-serif;
	width: 100%;
}

/* 背景グリッド */
#thxNewsPage::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(200,190,170,0.08) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(200,190,170,0.05) 1px, transparent 1px);
	background-size: 92px 92px;
	background-attachment: fixed;
	pointer-events: none;
	z-index: 1;
}

/* --- セクションヘッダー --- */
#thxNewsPage .thx-section-header {
	text-align: center;
	margin-bottom: 80px;
}

#thxNewsPage .thx-section-title-ja {
	font-size: 20px;
	font-weight: 800;
	color: var(--n-accent);
	letter-spacing: 0.15em;
	margin-top: 0;
	margin-bottom: 12px;
	display: block;
}

#thxNewsPage .thx-section-label {
	font-size: 13px;
	letter-spacing: 0.5em;
	color: var(--n-muted);
	text-transform: uppercase;
	margin-bottom: 110px;
	display: block;
	position: relative;
}

#thxNewsPage .thx-section-label::after {
	content: "";
	position: absolute;
	bottom: -30px;
	left: 50%;
	transform: translateX(-50%);
	width: 40px;
	height: 2px;
	background: var(--n-accent);
	opacity: 0.8;
}

/* Phase 4-D-7（v2.1.6）：Topics 見出し h2 を CSS 側で一元管理。
 * 旧 Elementor HTML widget 内 <h2 style="...color: #f9fbff..."> の青白系 inline color を
 * 完全撤去し、warm cream #ECE7DA のサイト見出し標準色へ統一する。
 * HTML 側は <h2>...</h2>（inline style 削除済）の構造で本セレクタが直接適用される。
 *
 * Phase 4-D-8（v2.1.7）：正典 .thx-philosophy-main-copy 準拠の serif 化。
 * sans 800 / 1.4 / 0.05em → Georgia + Noto Serif JP / 400 / 1.5 / 0.02em へ統一。
 * About teaser「数字の裏側にある」等と同質の細字明朝で描画される。 */
#thxNewsPage .thx-section-header > h2 {
	font-family: Georgia, "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.02em;
	color: #ECE7DA;
	text-align: center;
	margin: 0;
}

/* --- タブ検索（PHPから出力されるボタンのスタイル） --- */
#thxNewsPage .thx-news-tabs {
	display: flex;
	justify-content: center;
	gap: 40px;
	margin-bottom: 60px;
	border-bottom: 1px solid var(--n-border);
	padding-bottom: 0;
}

#thxNewsPage .thx-tab-btn {
	background: transparent !important;
	border: none !important;
	color: var(--n-muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	padding: 15px 5px;
	cursor: pointer;
	position: relative;
	transition: all 0.4s ease;
	outline: none;
	box-shadow: none !important;
}

#thxNewsPage .thx-tab-btn::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--n-accent);
	transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

#thxNewsPage .thx-tab-btn:hover { color: #fff; }

#thxNewsPage .thx-tab-btn.is-active {
	color: var(--n-accent) !important;
	background-color: transparent !important;
	text-shadow: 0 0 12px rgba(55, 171, 157, 0.6);
}

#thxNewsPage .thx-tab-btn.is-active::after {
	width: 100%;
	box-shadow: 0 0 10px var(--n-accent);
}

/* --- News List --- */
#thxNewsPage .thx-news-list {
	width: 100%;
	max-width: 1000px;
	margin: 0 auto 80px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

#thxNewsPage .thx-news-item {
	width: 100%;
	border: 1px solid var(--n-border);
	border-radius: 12px;
	background: var(--n-card-bg);
	overflow: hidden;
	transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

#thxNewsPage .thx-news-item.is-hidden {
	display: none;
	opacity: 0;
}

#thxNewsPage .thx-news-item:hover,
#thxNewsPage .thx-news-item.is-active {
	border-color: var(--n-accent);
	background: rgba(55, 171, 157, 0.05);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(55, 171, 157, 0.1);
}

#thxNewsPage .thx-news-header-trigger {
	display: grid;
	grid-template-columns: 120px 140px 1fr 40px;
	align-items: center;
	padding: 30px 40px;
	gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

/* タグデザイン（ホームと完全統一） */
#thxNewsPage .thx-news-tag-badge {
	font-size: 13px;
	letter-spacing: 0.1em;
	font-weight: 700;
	color: var(--n-accent) !important;
	border: 1px solid var(--n-accent) !important;
	background: transparent !important;
	padding: 5px 12px;
	border-radius: 4px;
	text-align: center;
	text-transform: uppercase;
	display: inline-block;
	width: 100px;
}

#thxNewsPage .thx-news-date {
	font-size: 14px;
	color: var(--n-muted) !important;
	font-family: "Inter", sans-serif;
}

/* タイトルフォントをホーム（18px / 600）に完全同期 */
#thxNewsPage .thx-news-headline {
	font-size: 18px;
	font-weight: 600;
	color: #ECE7DA !important;
	line-height: 1.5;
	margin: 0;
	transition: color 0.3s ease;
}

#thxNewsPage .thx-news-trigger:hover .thx-news-headline,
#thxNewsPage .thx-news-item.is-active .thx-news-headline,
#thxNewsPage .thx-news-item:hover .thx-news-headline {
	color: var(--n-accent) !important;
}

#thxNewsPage .thx-news-arrow {
	color: var(--n-accent);
	font-size: 13px;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
}

#thxNewsPage .thx-news-item.is-active .thx-news-arrow {
	transform: rotate(90deg);
}

/* Content Wrap */
#thxNewsPage .thx-news-content-wrap {
	max-height: 0;
	padding: 0 40px;
	background: rgba(0, 0, 0, 0.15);
	transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
	overflow: hidden;
}

#thxNewsPage .thx-news-item.is-active .thx-news-content-wrap {
	max-height: 1000px;
	padding: 10px 40px 40px 40px;
}

#thxNewsPage .thx-news-body {
	padding-left: 25px;
	border-left: 2px solid var(--n-accent);
	margin-left: 280px;
}

#thxNewsPage .thx-news-body p {
	color: rgba(236, 231, 218, 0.85);
	font-size: 16px;
	line-height: 1.85;
	margin: 0;
}

/* レスポンシブ */
@media (max-width: 900px) {
	#thxNewsPage { padding: 130px 0 80px !important; }
	#thxNewsPage .thx-news-header-trigger {
		grid-template-columns: 100px 1fr 30px;
		padding: 24px 20px;
		gap: 12px;
	}
	#thxNewsPage .thx-news-date { grid-row: 2; grid-column: 1 / 2; font-size: 13px; }
	#thxNewsPage .thx-news-headline { font-size: 16px; grid-column: 2 / 3; }
	#thxNewsPage .thx-news-body { margin-left: 0; padding-left: 20px; }
}


/* ════════════════════════════════════════════════════════════════════
 * SECTION C : 記事ページへのリンク（v2.14.0・2026-10-09）
 *   topics … 行全体が記事ページへのリンク（<a class="thx-news-header-trigger">）。開閉はしない
 *   home   … 開いた本文の下に「記事ページを開く」
 * ════════════════════════════════════════════════════════════════════ */
#thxNewsPage a.thx-news-header-trigger {
	color: inherit;
	text-decoration: none !important;
	border-bottom: none !important;
}

#thxNewsPage .thx-news-item:focus-within {
	border-color: var(--n-accent);
}

#thxNewsPage a.thx-news-header-trigger:focus-visible {
	outline: 2px solid var(--n-accent);
	outline-offset: -2px;
	border-radius: 12px;
}

#thxNewsPage .thx-news-item:hover .thx-news-arrow {
	transform: translateX(4px);
}

#thxNews .thx-news-more {
	margin: 24px 0 0;
}

#thxNews .thx-news-more a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--n-accent) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	border-bottom: 1px solid rgba(var(--n-accent-rgb), 0.5) !important;
	padding-bottom: 2px;
}

#thxNews .thx-news-more a::after {
	content: "→";
}

#thxNews .thx-news-more a:hover,
#thxNews .thx-news-more a:focus-visible {
	border-bottom-color: var(--n-accent) !important;
}

#thxNews .thx-news-trigger:focus-visible {
	outline: 2px solid var(--n-accent) !important;
	outline-offset: -2px;
}
