/* ==========================================================
   インタビュー詳細（/case/xxx/）
   処理: lib/case-single.php / テンプレート: single-case.php / 共通部品: case-common.css
   ========================================================== */

/* パンくずをヘッダー直下に出すので上の余白を詰め、全体をヘッダーと同じ幅に */
.single-case .l-content {
	padding-top: 32px;
}

.single-case .l-article {
	max-width: none;
}

/* ---------- 2カラム（本文 + 右サイドバー） ---------- */
.c-caseSingle__cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 64px;
}

.c-caseSingle__main {
	--swl-h2-margin--x: 0;      /* SWELL は PC で h2 だけ左右にはみ出させるため 0 に */
	--swl-block-margin: 1.6em;  /* 段落などの間隔 */
	min-width: 0;
}

/* ---------- 冒頭（写真 → INTERVIEW → タイトル → 企業情報） ---------- */
.c-caseHead {
	margin: 0 0 48px;
}

.c-caseHead__thumb {
	margin: 0;
}

.c-caseHead__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center top; /* 縦長写真は上（顔側）を残して切り抜く */
	border-radius: var(--case-radius);
	background: var(--case-bg);
}

.c-caseHead__caption {
	margin-top: 8px;
	color: var(--case-muted);
	font-size: .75rem;
	line-height: 1.6;
}

.c-caseHead__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 32px 0 10px;
	color: var(--case-red);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .16em;
}

.c-caseHead__eyebrow::before {
	content: "";
	width: 20px;
	height: 2px;
	background: var(--case-red);
}

.l-content .c-caseHead__title {
	margin: 0 0 24px;
	padding: 0;
	border: none;
	background: none;
	color: var(--case-text);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.55;
	letter-spacing: .02em;
	overflow-wrap: anywhere;
}

.l-content .c-caseHead__title::before,
.l-content .c-caseHead__title::after {
	content: none;
}

/* 企業情報カード（企業名・ロゴ + 業種・社員数など） */
.c-caseHead__profile {
	padding: 20px 24px;
	border: 1px solid var(--case-line);
	border-radius: var(--case-radius);
	background: #fff;
}

.c-caseHead__company {
	display: flex;
	align-items: center;
	gap: 16px;
}

.c-caseHead__logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 6px 10px;
	border: 1px solid var(--case-line);
	border-radius: 6px;
	background: #fff;
}

.c-caseHead__logo img {
	display: block;
	width: auto;
	max-width: 120px;
	height: auto;
	max-height: 36px;
}

.c-caseHead__name {
	margin: 0;
	color: var(--case-text);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .02em;
}

.c-caseHead__note {
	margin: 4px 0 0;
	color: var(--case-muted);
	font-size: .75rem;
	line-height: 1.6;
}

.c-caseHead__terms {
	display: grid;
	gap: 10px;
	margin: 16px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--case-line);
	list-style: none;
}

.c-caseHead__profile > .c-caseHead__terms:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.c-caseHead__term {
	display: grid;
	grid-template-columns: 6.5em minmax(0, 1fr);
	align-items: start;
	margin: 0;
	padding: 0;
	list-style: none;
}

.c-caseHead__termKey {
	padding-top: 5px;
	color: var(--case-muted);
	font-size: .75rem;
	font-weight: 700;
}

.c-caseHead__termVals {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

/* 値は一覧の絞り込みタグと同じチップ（各一覧ページへのリンク） */
.c-caseHead__termVals a {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 2px 10px;
	border: 1px solid var(--case-line);
	border-radius: 999px;
	background: #fff;
	color: var(--case-text);
	font-size: .8125rem;
	line-height: 1.5;
	text-decoration: none;
	transition: border-color var(--case-ease), color var(--case-ease);
}

.c-caseHead__termVals a:hover {
	border-color: var(--case-red);
	color: var(--case-red);
}

/* ---------- 課題 → 効果 ---------- */
.c-caseSingle .c-casePoints {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin: 40px 0 48px;
}

.c-caseSingle .c-casePoints__col {
	position: relative;
	padding: 22px 24px;
	border: 1px solid var(--case-line);
	border-radius: var(--case-radius);
	background: var(--case-bg);
}

.c-caseSingle .c-casePoints__col.-effects {
	border-color: #f3cdd1;
	background: #fff;
}

.c-caseSingle .c-casePoints__ttl {
	display: inline-block;
	margin: 0 0 12px;
	padding: 2px 12px;
	border-radius: 4px;
	background: #4b5058;
	color: #fff;
	font-size: .8125rem;
	font-weight: 700;
	line-height: 1.8;
}

.c-caseSingle .c-casePoints__col.-effects .c-casePoints__ttl {
	background: var(--case-red);
}

.c-caseSingle .c-casePoints__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.c-caseSingle .c-casePoints__list li {
	position: relative;
	margin: 0;
	padding: 0 0 0 1.6em;
	color: var(--case-text);
	font-size: .9375rem;
	line-height: 1.75;
	list-style: none;
}

.c-caseSingle .c-casePoints__list li + li {
	margin-top: .5em;
}

.c-caseSingle .c-casePoints__list li::before {
	content: "";
	position: absolute;
	top: .6em;
	left: .25em;
	width: .5em;
	height: .5em;
	border-radius: 50%;
	background: #9ca3af;
}

/* 効果の項目は太字で強調（課題側は通常ウェイト） */
.c-caseSingle .c-casePoints__col.-effects .c-casePoints__list li {
	font-weight: 700;
}

.c-caseSingle .c-casePoints__col.-effects .c-casePoints__list li::before {
	top: .45em;
	width: .7em;
	height: .4em;
	border-radius: 0;
	background: none;
	border-left: 2px solid var(--case-red);
	border-bottom: 2px solid var(--case-red);
	transform: rotate(-45deg);
}

.c-caseSingle .c-casePoints__col.-issues + .c-casePoints__col.-effects::before {
	content: "";
	position: absolute;
	top: -22px;
	left: 50%;
	width: 12px;
	height: 12px;
	border-top: 2px solid var(--case-red);
	border-right: 2px solid var(--case-red);
	transform: translateX(-50%) rotate(135deg);
}

/* ---------- 本文 ---------- */
.c-caseSingle__main .post_content {
	color: var(--case-text);
	line-height: 1.9;
}

.c-caseSingle__main .post_content h2,
.c-caseSingle__main .post_content h3,
.c-caseSingle__main .post_content h4,
.c-caseSingle__main .post_content h5,
.c-caseSingle__main .post_content .is-style-section_ttl,
.single-case .p-toc__ttl {
	text-align: left !important;
}

/* h2: 装飾なしの黒太字（強調は文字サイズと太さだけ） */
.c-caseSingle__main .post_content h2 {
	margin-top: 72px;    /* 前の本文との間 */
	margin-bottom: 22px; /* 次の質問文まで */
	padding: 0;
	color: var(--case-text);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.45;
}

/* SWELL の見出しスタイルの下線（::after）と標準 h2 の ::before を出さない */
.c-caseSingle__main .post_content h2::before,
.c-caseSingle__main .post_content h2::after {
	content: none;
	display: none;
}

/* h3（事例記事の「着目した業務｜…」など）: 赤い左線だけのシンプルな見出し。SWELL 標準の青い下線（::before）は出さない */
.c-caseSingle__main .post_content h3 {
	margin: 52px 0 26px;
	padding: 2px 0 2px 18px; /* 線4px + 文字との間隔14px */
	border: none;
	border-left: 4px solid var(--case-red);
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--case-text);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.45;
	text-align: left;
}

.c-caseSingle__main .post_content h3::before,
.c-caseSingle__main .post_content h3::after {
	content: none;
	display: none;
}

.c-caseSingle__main .post_content .wp-block-image {
	margin-top: 2.25em;
	margin-bottom: 2.25em;
}

.c-caseSingle__main .post_content .wp-block-image img {
	border-radius: var(--case-radius);
}

.c-caseSingle__main .post_content .wp-block-image figcaption {
	margin-top: 8px;
	color: var(--case-muted);
	font-size: .75rem;
	line-height: 1.6;
}

/* インタビューの質問文（見た目上の小見出し）: 文字全体を赤・16px・太字。線や背景は付けない
   （質問は「強調色の太字」の段落で書かれている。全記事で強調色の段落は質問のみであることを確認済み。
     h3 は事例レポート記事の小見出しに使用） */
.c-caseSingle__main .post_content p:has(> strong:first-child .has-swl-main-color),
.c-caseSingle__main .post_content p:has(> .has-swl-main-color:first-child) {
	margin-top: 2.4em;
	margin-bottom: 22px; /* 質問から回答まで */
	padding: 0;
	border: none;
	background: none;
	color: var(--case-red);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.75;
}

.c-caseSingle__main .post_content p:has(> strong:first-child .has-swl-main-color) :is(strong, .has-swl-main-color),
.c-caseSingle__main .post_content p:has(> .has-swl-main-color:first-child) :is(strong, .has-swl-main-color) {
	color: var(--case-red) !important;
	font-size: inherit;
	font-weight: 700;
}

/* 見出し（h2）の直後の質問は、h2 の下余白 32px だけ空ける */
.c-caseSingle__main .post_content h2 + p:has(> strong:first-child .has-swl-main-color),
.c-caseSingle__main .post_content h2 + p:has(> .has-swl-main-color:first-child) {
	margin-top: 0;
}

/* 目次 */
.c-caseSingle__main .p-toc {
	margin-bottom: 3em;
	padding: 20px 24px;
	border: 1px solid var(--case-line);
	border-radius: var(--case-radius);
	background: var(--case-bg);
}

/* ---------- サイドバー（見出し・余白・角丸を共通に） ---------- */
.c-caseSide {
	color: var(--case-text);
	font-size: .9375rem;
}

.c-caseSide__box {
	margin: 0;
}

/* セクション間 */
.c-caseSide__box + .c-caseSide__box,
.c-caseSide__sticky {
	margin-top: 44px;
}

/* ピックアップ・インタビューを探す を追従させる（画面より長い場合は中だけスクロール） */
.c-caseSide__sticky {
	position: sticky;
	top: calc(24px + var(--swl-adminbarH, 0px) + var(--swl-fix_headerH, 0px));
	max-height: calc(100vh - 40px - var(--swl-adminbarH, 0px) - var(--swl-fix_headerH, 0px));
	overflow-y: auto;
	scrollbar-width: thin;
}

/* セクション見出し */
.c-caseSide__label {
	position: relative;
	margin: 0 0 18px;
	padding: 0 0 12px;
	border-bottom: 1px solid var(--case-line);
	color: var(--case-text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.c-caseSide__label::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 32px;
	height: 2px;
	background: var(--case-red);
}

/* 「業種から探す」などのラベル */
.c-caseSide__sub {
	margin: 24px 0 10px;
	color: var(--case-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.c-caseSide__more {
	display: block;
	margin-top: 18px;
	color: var(--case-text);
	font-size: 13px;
	text-align: right;
	text-decoration: none;
	transition: color var(--case-ease);
}

.c-caseSide__more:hover {
	color: var(--case-red);
}

.c-caseSide__more::after {
	content: " →";
}

/* 資料ダウンロード */
.c-caseSideDl {
	display: block;
	padding: 18px;
	border: 1px solid var(--case-line);
	border-radius: var(--case-radius);
	background: #fff;
	color: var(--case-text);
	text-decoration: none;
	transition: border-color var(--case-ease);
}

.c-caseSideDl:hover {
	border-color: var(--case-line-strong);
}

.c-caseSideDl__img {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	background: var(--case-bg);
}

.c-caseSideDl__img img {
	display: block;
	width: 100%;
	height: auto;
}

.c-caseSideDl__title {
	display: block;
	margin-top: 14px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
}

.c-caseSideDl__btn {
	display: flex;
	width: 100%;
	height: 46px;
	margin-top: 16px;
	font-size: 15px;
}

/* ピックアップ記事 */
.c-caseSidePosts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.c-caseSidePosts li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.c-caseSidePosts li + li {
	margin-top: 20px;
}

.c-caseSidePosts__link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	border-radius: 6px;
	color: var(--case-text);
	text-decoration: none;
}

.c-caseSidePosts__img {
	flex: 0 0 104px;
	aspect-ratio: 16 / 9;
	height: auto;
	overflow: hidden;
	border-radius: 6px;
	background: var(--case-bg);
}

.c-caseSidePosts__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.c-caseSidePosts__body {
	flex: 1;
	min-width: 0;
}

.c-caseSidePosts__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	overflow-wrap: anywhere;
	transition: color var(--case-ease);
}

.c-caseSidePosts__link:hover .c-caseSidePosts__title {
	color: var(--case-red);
}

/* 記事タイトル（キャッチコピー）: 会社名より小さく、最大3行 */
.c-caseSidePosts__catch {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin-top: 4px;
	color: var(--case-text);
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.c-caseSidePosts__cat {
	display: block;
	margin-top: 6px;
	color: var(--case-muted);
	font-size: 12px;
	line-height: 1.4;
}

/* インタビューを探す */
.c-caseSideSearch {
	display: flex;
	gap: 8px;
}

.c-caseSideSearch input[type="search"] {
	height: 46px;
	font-size: 14px;
}

.c-caseSideSearch button {
	height: 46px;
	padding: 0 18px;
	font-size: 14px;
}

.c-caseSideTags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 6px;
}

.c-caseSideTags .c-caseTag {
	min-height: 32px;
	padding: 5px 11px;
	font-size: 13px;
	line-height: 1.4;
}

/* ---------- お問い合わせフォーム（全幅） ---------- */
.c-caseSingle__form {
	margin-top: 80px;
}

/* フォームとフッターの間の余白をなくす（フォームがある記事のみ） */
.single-case .l-content:has(.c-caseSingle__form) {
	margin-bottom: 0;
}

.single-case .l-content:has(.c-caseSingle__form) .l-articleBottom,
.c-caseSingle__form .p-blogParts {
	margin-top: 0;
	margin-bottom: 0;
}

/* ---------- タブレット: サイドバーは本文の下へ、追従なし ---------- */
@media (max-width: 959px) {
	.c-caseSingle__cols {
		grid-template-columns: minmax(0, 1fr);
		gap: 56px;
	}

	.c-caseSide__sticky {
		position: static;
		max-height: none;
		overflow: visible;
	}
}

/* ---------- スマホ ---------- */
@media (max-width: 599px) {
	.single-case .l-content {
		padding-top: 20px;
	}

	.c-caseSingle__main .post_content h3 {
		margin: 44px 0 22px;
		padding-left: 14px; /* 線4px + 間隔10px */
	}

	.c-caseHead {
		margin-bottom: 40px;
	}

	.c-caseHead__eyebrow {
		margin-top: 24px;
	}

	.l-content .c-caseHead__title {
		margin-bottom: 20px;
		font-size: 1.375rem;
	}

	.c-caseHead__profile {
		padding: 16px;
	}

	.c-caseHead__term {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
	}

	.c-caseHead__termKey {
		padding-top: 0;
	}

	.c-caseSingle .c-casePoints__col {
		padding: 18px;
	}

	.c-caseSingle__main .post_content h2 {
		margin-top: 60px;
		margin-bottom: 20px;
		font-size: 1.3rem;
	}

	.c-caseSingle__main .post_content p:has(> strong:first-child .has-swl-main-color),
	.c-caseSingle__main .post_content p:has(> .has-swl-main-color:first-child) {
		margin-bottom: 20px;
		font-size: 17px;
	}

	.c-caseSingle__form {
		margin-top: 56px;
	}
}

/* ==========================================================
   パスワード付き記事の入力画面
   ========================================================== */
.c-caseLocked .c-caseLocked__box {
	max-width: 560px;
	margin: 24px auto 80px;
	padding: 48px 40px;
	border: 1px solid var(--case-line);
	border-radius: var(--case-radius);
	background: #fff;
	text-align: center;
}

.c-caseLocked__eyebrow {
	margin: 0 0 12px;
	color: var(--case-red);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
}

.c-caseLocked .c-caseLocked__title {
	margin: 0 0 20px;
	color: var(--case-text);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.5;
}

.c-caseLocked__lead {
	margin: 0 0 28px;
	color: var(--case-muted);
	font-size: .9375rem;
	line-height: 1.8;
}

.c-caseLocked__form form {
	margin: 0;
}

.c-caseLocked__form p {
	margin: 0 0 14px;
	color: var(--case-muted);
	font-size: .8125rem;
	line-height: 1.7;
}

/* サイト共通の label 指定（余白・左パディング）を打ち消す */
.c-caseLocked .c-caseLocked__form label {
	display: block;
	margin: 0;
	padding: 0;
	color: var(--case-text);
	font-size: .875rem;
	font-weight: 700;
	text-align: left;
}

.c-caseLocked__form input[type="password"] {
	display: block;
	width: 100%;
	height: 46px;
	margin-top: 8px;
	padding: 0 14px;
	border: 1px solid var(--case-line-strong);
	border-radius: 6px;
	font-size: 1rem;
}

.c-caseLocked__form input[type="password"]:focus {
	outline: none;
	border-color: var(--case-red);
	box-shadow: 0 0 0 3px rgba(230, 0, 18, .12);
}

.c-caseLocked__form input[type="submit"] {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background: var(--case-red);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.c-caseLocked__form input[type="submit"]:hover {
	background: var(--case-red-dark);
}

@media (max-width: 599px) {
	.c-caseLocked .c-caseLocked__box {
		margin-bottom: 48px;
		padding: 36px 20px;
	}
}
