/*
 * CAREOTH お知らせ(PICKS)専用スタイルシート
 *
 * home.php / archive.php / single.php とそれらが使う template-parts/pks-*.php
 * のためだけの新規スタイル。既存の assets/css/style.css は一切変更しない。
 * 新規クラスはすべて "pks-" 接頭辞で統一している。
 * 例外: ファイル末尾に front-page.php のCAREOTH PICKSセクション向けの
 * WP側調整（style.cssへの上書き）を1セクションだけ置いている。
 *
 * 配色は既存サイトの主要色（_variables.scss / style.css）を踏襲：
 *   青       : #1B4FD8前後（既存 --primary #1E60BE 系）
 *   薄青グラデ: #cfe8f7 → #7fc4ee
 *   本文色   : #333
 */

/* ============================================================
   共通ユーティリティ
============================================================ */
.pks-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   全体レイアウト（3カラム）
============================================================ */
.pks-page {
	background: #f7f9fc;
	/* .header は position:fixed（高さ約69px）のため、被らないよう上部を空ける */
	padding-top: 70px;
}

.pks-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) 280px;
	gap: 28px;
	align-items: start;
	padding-top: 48px;
	padding-bottom: 96px;
}

.pks-sidebar {
	min-width: 0;
}

/* ============================================================
   左サイドバー：カテゴリ一覧
============================================================ */
.pks-cat-list {
	list-style: none;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

.pks-cat-list-item {
	border-bottom: 1px solid #e7ebf1;
}

.pks-cat-list-item:last-child {
	border-bottom: none;
}

.pks-cat-list-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	color: #1a1a1a;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease;
}

.pks-cat-list-link:hover {
	color: #1b4fd8;
	background: #f2f7fd;
}

.pks-cat-list-arrow {
	display: inline-flex;
	color: #1b4fd8;
	flex: 0 0 auto;
}

/* ============================================================
   中央：タイトル帯（ヒーロー）
============================================================ */
.pks-hero {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	padding: 40px 32px;
	text-align: center;
	color: #0b2b52;
	background: linear-gradient(120deg, #cfe8f7 0%, #9ed2f0 45%, #7fc4ee 100%);
	margin-bottom: 32px;
}

.pks-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: url("../images/wave-haikei-1.svg") center bottom / cover no-repeat;
	opacity: 0.18;
	pointer-events: none;
}

.pks-hero-title {
	position: relative;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 700;
	letter-spacing: 0.04em;
	margin-bottom: 10px;
	word-break: auto-phrase;
	line-break: strict;
}

.pks-hero-sub {
	position: relative;
	font-size: clamp(12px, 1.4vw, 15px);
	font-weight: 500;
	color: #0b2b52;
}

.pks-hero-current {
	position: relative;
	margin-top: 14px;
	display: inline-block;
	padding: 6px 20px;
	border-radius: 999px;
	background: rgba(11, 43, 82, 0.12);
	font-size: 13px;
	font-weight: 600;
}

/* ============================================================
   中央：ブランドフィルタタブ
============================================================ */
.pks-tabs {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 32px;
}

.pks-tab {
	flex: 1 1 160px;
	text-align: center;
	padding: 14px 18px;
	border-radius: 6px;
	border: 2px solid #1b4fd8;
	background: #fff;
	color: #1b4fd8;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	word-break: auto-phrase;
	line-break: strict;
}

.pks-tab:hover {
	opacity: 0.8;
}

.pks-tab.is-active {
	background: #1b4fd8;
	color: #fff;
}

/* ============================================================
   中央：チップ（ブランド / カテゴリ）
============================================================ */
.pks-chip {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.7;
	color: #fff;
	white-space: nowrap;
	/* デフォルト（灰色）: term meta の careoth_chip_color も、既知スラッグの
	   .pks-chip--{slug} 修飾子も無い、管理画面で新規追加しただけのカテゴリ向けの保険 */
	background: #7a7a7a;
}

.pks-chip--brand {
	background: #2f9bdc;
}

.pks-chip--news {
	background: #5a8a3c;
}

.pks-chip--column {
	background: #1a3a6b;
}

.pks-chip--career {
	background: #b06a2a;
}

.pks-chip--training {
	background: #2a8a8a;
}

.pks-chip--event,
.pks-chip--partnership,
.pks-chip--interview,
.pks-chip--overseas,
.pks-chip--international,
.pks-chip--internal,
.pks-chip--worklife,
.pks-chip--default {
	background: #7a7a7a;
}

/* ============================================================
   中央：記事リスト
============================================================ */
.pks-list {
	background: #fff;
	border-radius: 8px;
	padding: 4px 28px;
}

.pks-empty {
	padding: 40px 0;
	text-align: center;
	color: #666;
	font-size: 14px;
}

.pks-item {
	border-bottom: 1px solid #e7ebf1;
	padding: 28px 0;
}

.pks-item:last-child {
	border-bottom: none;
}

.pks-item-link {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	color: inherit;
	text-decoration: none;
}

.pks-item-thumb {
	flex: 0 0 180px;
	width: 180px;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	background: linear-gradient(135deg, #eaf5fc, #cfe8f7);
}

.pks-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pks-item-body {
	flex: 1;
	min-width: 0;
}

.pks-item-title {
	font-size: 16px;
	font-weight: 600;
	color: #171717;
	line-height: 1.6;
	margin: 12px 0 12px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: auto-phrase;
	line-break: strict;
}

.pks-item-meta {
	font-size: 13px;
	color: #767676;
}

/* ============================================================
   中央：ページネーション
============================================================ */
.pks-pagination {
	margin-top: 44px;
}

.pks-pagination .screen-reader-text,
.pks-pagination .pks-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pks-pagination nav {
	display: block;
}

.pks-pagination .nav-links {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

.pks-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 4px;
	border-radius: 50%;
	color: #333;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.pks-pagination a.page-numbers:hover {
	background: #eef4fc;
}

.pks-pagination .page-numbers.current {
	background: #12295c;
	color: #fff;
	font-weight: 700;
}

.pks-pagination .page-numbers.dots {
	background: none;
	color: #999;
}

.pks-pagination .page-numbers.prev,
.pks-pagination .page-numbers.next {
	color: #1b4fd8;
	font-size: 18px;
	font-weight: 700;
	background: none;
}

/* ============================================================
   右サイドバー：新着記事（NEW）
============================================================ */
.pks-sidebar--new {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(29, 55, 104, 0.08);
}

.pks-new-head {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #12295c;
	color: #fff;
	padding: 14px 20px;
}

.pks-new-badge {
	background: #fff;
	color: #12295c;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 3px;
}

.pks-new-label {
	font-size: 15px;
	font-weight: 700;
	word-break: auto-phrase;
	line-break: strict;
}

.pks-new-list {
	list-style: none;
}

.pks-new-item {
	border-bottom: 1px solid #e7ebf1;
	padding: 18px 20px;
}

.pks-new-item:last-child {
	border-bottom: none;
}

.pks-new-item-link {
	display: flex;
	gap: 14px;
	color: inherit;
	text-decoration: none;
}

.pks-new-item-thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 4px;
	overflow: hidden;
	background: #dfe6ee;
}

.pks-new-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pks-new-item-body {
	flex: 1;
	min-width: 0;
}

.pks-new-item-title {
	font-size: 12.5px;
	color: #333;
	line-height: 1.75;
	margin-top: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pks-new-empty {
	padding: 20px;
	font-size: 13px;
	color: #666;
}

/* ============================================================
   詳細ページ（single.php）
============================================================ */
.pks-single {
	background: #fff;
	border-radius: 8px;
	padding: 32px;
}

.pks-single-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.pks-single-meta-chips {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.pks-single-date {
	font-size: 14px;
	color: #767676;
}

.pks-single-title {
	font-size: clamp(22px, 3.2vw, 32px);
	font-weight: 700;
	color: #1b4fd8;
	line-height: 1.5;
	margin-bottom: 16px;
	word-break: auto-phrase;
	line-break: strict;
}

.pks-single-keyword {
	font-size: 13px;
	color: #767676;
	margin-bottom: 28px;
}

.pks-single-thumb {
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 28px;
}

.pks-single-thumb-img {
	width: 100%;
	height: auto;
	display: block;
}

.pks-single-content {
	font-size: 15px;
	line-height: 1.9;
	color: #333;
}

.pks-single-content p {
	margin-bottom: 1.6em;
}

.pks-single-content img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	margin: 1.5em 0;
	display: block;
}

.pks-single-content h2,
.pks-single-content h3,
.pks-single-content h4 {
	color: #1b4fd8;
	font-weight: 700;
	line-height: 1.6;
	margin: 1.8em 0 0.8em;
	word-break: auto-phrase;
	line-break: strict;
}

/* ============================================================
   詳細ページ：前後記事カード
============================================================ */
.pks-prevnext {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 56px;
}

.pks-prevnext-card {
	display: block;
	border: 1px solid #e7ebf1;
	border-radius: 8px;
	padding: 20px;
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease;
}

.pks-prevnext-card:hover {
	box-shadow: 0 4px 12px rgba(29, 55, 104, 0.1);
}

.pks-prevnext-label {
	display: block;
	text-align: center;
	color: #1b4fd8;
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 14px;
}

.pks-prevnext-thumb {
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 12px;
	background: linear-gradient(135deg, #eaf5fc, #cfe8f7);
}

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

.pks-prevnext-date {
	display: block;
	font-size: 13px;
	color: #767676;
	margin-bottom: 6px;
}

.pks-prevnext-excerpt {
	font-size: 13px;
	color: #333;
	line-height: 1.7;
}

/* ============================================================
   404
============================================================ */
.pks-404-inner {
	text-align: center;
	padding: 120px 0;
}

.pks-404-title {
	font-size: 64px;
	font-weight: 800;
	color: #1b4fd8;
	letter-spacing: 0.04em;
}

.pks-404-text {
	margin: 20px 0 32px;
	color: #333;
	font-size: 15px;
}

/* ============================================================
   レスポンシブ
============================================================ */
@media (max-width: 980px) {
	.pks-layout {
		grid-template-columns: 1fr;
		padding-top: 32px;
		padding-bottom: 64px;
	}

	.pks-sidebar--categories {
		order: 2;
	}

	.pks-main {
		order: 1;
	}

	.pks-sidebar--new {
		order: 3;
	}

	.pks-list {
		padding: 4px 20px;
	}

	.pks-single {
		padding: 24px;
	}
}

@media (max-width: 600px) {
	.pks-hero {
		padding: 28px 20px;
	}

	.pks-tabs {
		gap: 10px;
	}

	.pks-tab {
		flex: 1 1 100%;
		font-size: 13px;
		padding: 12px 14px;
	}

	.pks-item-link {
		flex-direction: column;
	}

	.pks-item-thumb {
		width: 100%;
		flex-basis: auto;
	}

	.pks-item-title {
		margin: 10px 0 8px;
	}

	.pks-prevnext {
		grid-template-columns: 1fr;
	}

	.pks-single {
		padding: 18px;
	}

	.pks-single-meta {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ============================================================
   トップページ CAREOTH PICKS（WP側調整・2026-08-06）
   デモ静的版には無いWP固有の調整。style.css本体は変更しない。
   （news.cssはstyle.cssより後に読み込まれるため上書きできる）
============================================================ */

/* 記事エリアの横幅を拡大（現状1100pxで小さく狭いため、より大きく見せる） */
.picks .picks__inner {
	max-width: 1400px;
}

/* カテゴリチップ: カテゴリが多い記事でチップが圧縮され
   縦書き状態に潰れるため、折り返して1つずつ整形して表示する */
.picks .picks__card-label {
	flex-wrap: wrap;
}

.picks .picks__card-label li {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* ============================================================
   PICKS 3カラムレイアウトの横幅拡大（2026-08-28）
   ------------------------------------------------------------
   中央カラムが444px（本文380px）しかなく、記事詳細で本文が
   1行18文字程度・見出しが4行に折り返す・本文中の画像が小さい、
   一覧でも記事タイトルが2行で省略される状態だったため拡大する。
   トップページのPICKSセクション（8/6に1400pxへ拡大）と幅を揃える。

   .l-container（style.css・max-width:1100px）を、後から読み込む
   news.css の同一詳細度セレクタで上書きする（style.cssは不変更）。
   両サイドバーの幅は据え置き、増えた300pxはすべて中央カラムへ。
   1400px → 中央カラム744px（本文680px）
============================================================ */
.pks-layout {
	max-width: 1400px;
}

/* ============================================================
   タグ／チップのリンク化（2026-09-08）
   ------------------------------------------------------------
   トップページ PICKS カードのタグ・記事詳細のチップを押すと
   該当カテゴリ／ブランドで絞り込んだ一覧へ遷移する。
   トップのタグは a の入れ子を避けるため .picks__card-link の外
   （article直下）へ移したので、見た目が変わらないよう調整する。
============================================================ */

/* カード全体リンクをブロック化（従来 a はインライン。ul を外に出したため明示する） */
.picks .picks__card-link {
	display: block;
}

/* 枠線とサイズはこれまでどおり li 側。クリック領域を枠いっぱいに広げるため
   padding を a へ移し、li からは外す（見た目のサイズは変わらない） */
.picks .picks__card-label .picks__card-label-item {
	padding: 0;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.picks .picks__card-label .picks__card-label-link {
	display: block;
	padding: 0.4em 0.7em;
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.picks .picks__card-label .picks__card-label-item:hover {
	background-color: #1b4fd8;
	border-color: #1b4fd8;
}

.picks .picks__card-label .picks__card-label-item:hover .picks__card-label-link {
	color: #fff;
}

/* 記事詳細のチップ（リンク化したもの） */
a.pks-chip--link {
	text-decoration: none;
	transition: opacity 0.2s ease;
}

a.pks-chip--link:hover {
	opacity: 0.8;
}

/* 左サイドバー: 現在絞り込み中のカテゴリ */
.pks-cat-list-item.is-active > .pks-cat-list-link {
	background: #eef4fd;
	color: #1b4fd8;
	font-weight: 700;
}
