/* =========================
成功事例（CPT: case）詳細・アーカイブページ
========================= */

.br-sp {
	display: none;
}

.case-single-wrap {
	max-width: 900px;
}

/* ---- header / eyecatch ---- */
.case-header {
	margin-bottom: 2em;
}

.case-title {
	font-size: 28px;
	line-height: 1.5;
	font-weight: bold;
	margin: 0 0 1em;
}

.case-title__area {
	color: #9d003e;
}

.case-eyecatch {
	margin: 0;
	text-align: center;
}

.case-eyecatch img {
	width: 50%;
	height: auto;
	border-radius: 4px;
}

/* ---- common section ---- */
.case-section {
	margin: 0 0 3em;
}

.case-section__title {
	font-size: 22px;
	font-weight: bold;
	color: #fff;
	background: #9d003e;
	padding: 0.6em 1em;
	margin: 0 0 1.2em;
	border-radius: 4px;
}

/* ---- 事例概要（物件情報テーブル）---- */
.case-property__table {
	width: 100%;
	border-collapse: collapse;
}

.case-property__table th,
.case-property__table td {
	padding: 0.9em 1.2em;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
	line-height: 1.6;
}

.case-property__table th {
	width: 180px;
	background: #f7f7f7;
	font-weight: bold;
	color: #9d003e;
}

/* ---- 問題点 ---- */
.case-challenge__body {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em;
	align-items: flex-start;
}

.case-challenge__image {
	flex: 0 0 280px;
	margin: 0;
}

.case-challenge__image img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.case-challenge__text {
	flex: 1 1 320px;
	line-height: 1.9;
}

.case-challenge__text p {
	margin: 0;
}

/* ---- 対策 ---- */
.case-measures__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.case-measures__item {
	display: flex;
	gap: 1.2em;
	align-items: flex-start;
	padding: 1.5em 0;
	border-bottom: 1px dashed #ddd;
}

.case-measures__item:last-child {
	border-bottom: none;
}

.case-measures__number {
	flex: 0 0 auto;
	font-family: Georgia, serif;
	font-size: 32px;
	font-weight: bold;
	color: #FCBD3F;
	line-height: 1;
	min-width: 60px;
}

.case-measures__body {
	flex: 1 1 auto;
}

.case-measures__title {
	font-size: 18px;
	font-weight: bold;
	margin: 0 0 0.6em;
	color: #333;
}

.case-measures__image {
	margin: 0 0 0.8em;
	max-width: 280px;
}

.case-measures__image img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.case-measures__desc {
	line-height: 1.9;
}

/* ---- 結果 ---- */
.case-result__cards {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin: 0 0 1.5em;
}

.case-result__card {
	flex: 1 1 160px;
	background: #fdf1f5;
	text-align: center;
	padding: 24px 20px;
}

.case-result__label {
	margin: 0;
	font-size: 14px;
	color: #666;
	margin: 0 0 12px;
	font-weight: 600;
}

.case-result__value {
	font-size: 32px;
	font-weight: bold;
	color: #9d003e;
	line-height: 1.2;
	margin: 0;
}

.case-result__text {
	line-height: 1.9;
}

/* ---- 成功のポイント ---- */
.case-success-point {
	background: #f7f7f7;
	padding: 24px 20px;
}

.case-success-point .case-section__title {
	background: none;
	color: #9d003e;
	padding: 0 0 0 10px;
	border-left: 4px solid #9d003e;
	margin: 0 0 0.8em;
	border-radius: 0;
}

.case-success-point__text {
	line-height: 1.9;
}

/* ---- 関連する成功事例 ----
flex(flex-basis 260px + max-width 32%)だと、コンテナ幅次第で3つ目が折り返されることがあったため、
最大3件固定という前提を活かして3列のCSS Gridにする。 */
.case-related__list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5em;
}

.case-related__item {
	display: block;
	text-decoration: none;
	color: inherit;
}

.case-related__image {
	margin: 0 0 0.6em;
	overflow: hidden;
	background: #fff;
}

.case-related__image img {
	width: 100%;
	height: 180px;
	object-fit: contain;
}

.case-related__image.noimg img {
	object-fit: contain;
	background: #fff;
}

.case-related__area {
	display: block;
	color: #9d003e;
	font-size: 13px;
	font-weight: bold;
	margin-bottom: 0.3em;
}

.case-related__title {
	margin: 0;
	line-height: 1.6;
	font-weight: bold;
}

/* ---- こんなお悩みも解決できます ---- */
.case-worries__list {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.8em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.case-worries__item a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5em;
	text-align: center;
	background: #f7f7f7;
	padding: 1em 0.5em;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	font-size: 13px;
	line-height: 1.3;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	transition: background 0.2s;
}

.case-worries__item {
	display: flex;
}

.case-worries__item a span {
	display: flex;
	align-items: center;
	min-height: 2.6em;
}

.case-worries__item a:hover {
	background: #fdf1f5;
}

.case-worries__icon {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

/* ---- CTA（ページ最後）---- */
.case-cta__box {
	background: url(../../common/images/case/cta-bg.webp) center / cover no-repeat;
	color: #fff;
	text-align: center;
	padding: 2.5em 1.5em;
}

.case-cta__title {
	font-size: 24px;
	font-weight: bold;
	color: #fff;
	margin: 0 0 0.6em;
}

.case-accent-orange {
	color: #f9ff04;
	font-size: 28px;
}

.case-cta__stats {
	margin: 0 0 1.5em;
	font-size: 16px;
	font-weight: 600;
	opacity: 0.9;
}

.case-cta__buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1em;
	margin: 0 0 1.5em;
}

.case-cta__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 320px;
	max-width: 100%;
	padding: 8px 16px;
	border-radius: 6px;
	text-decoration: none !important;
	transition: opacity 0.2s;
	box-sizing: border-box;
}

.case-cta__btn:hover {
	opacity: 0.85;
}

.case-cta__btn-badge {
	/* background: #fff; */
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	/* padding: 3px 12px; */
	line-height: 1;
}

.case-cta__btn-main {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.case-cta__btn-main img {
	width: 28px;
	height: 28px;
	margin: 0 !important;
	flex: 0 0 auto;
}

.case-cta__btn--mail .case-cta__btn-main img {
	width: 28px;
	height: 19px;
}

.case-cta__btn-number {
	font-size: 26px;
	font-weight: bold;
	color: #fff;
	line-height: 1;
}

.case-cta__btn-label {
	font-size: 17px;
	font-weight: bold;
	color: #9d003e;
	line-height: 1;
}

.case-cta__btn-sub {
	font-size: 12px;
	font-weight: 600;
}

.case-cta__btn--mail {
	gap: 8px;
}

.case-cta__btn--tel {
	background: #f9a143;
}

.case-cta__btn--tel .case-cta__btn-sub {
	color: #fff;
	line-height: 1;
}

.case-cta__btn--mail .case-cta__btn-sub {
	color: #666;
	line-height: 1;
}

.case-cta__btn--mail {
	background: #fff;
}

.case-cta__badges {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.8em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.case-cta__badges li {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.3);
	padding: 0.4em 1em;
	border-radius: 20px;
	font-size: 13px;
}

.case-cta__badges li img {
	width: 14px;
	height: auto;
	margin: 0 !important;
	flex: 0 0 auto;
}

/* ---- 一覧に戻るリンク ---- */
.case-back-link {
	text-align: center;
	margin: 2em 0 0;
}

.case-back-link a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #9d003e;
	font-weight: bold;
	text-decoration: none;
	border: 2px solid #9d003e;
	border-radius: 6px;
	padding: 12px 32px;
	transition: background 0.2s, color 0.2s;
}

.case-back-link a:hover {
	background: #9d003e;
	color: #fff;
}

.case-back-link__arrow {
	flex: 0 0 auto;
	transform: scaleX(-1);
}

/* =========================
アーカイブページ
既存の .post-list-card（ブログ一覧と共通のカードデザイン）をそのまま流用し、
成功事例用に必要な差分（エリアバッジの色）だけ上書きする。
========================= */
#main .case-archive__list.post-list-card .eyecatch .cat-name {
	background: #9d003e;
	color: #fff;
	opacity: 1;
}

/* 元画像が正方形（300x300等）のバナー画像で、.eyecatchの高さ(215px)に収まらず
overflow:hiddenで下側が見切れてしまうため、全体が収まるように調整する。
#main .article .eyecatch img（IDセレクタ）に詳細度で負けないよう、こちらも#mainを付与する。 */
#main .case-archive__list.post-list-card .eyecatch img {
	margin: 0;
	width: 100%;
	height: 180px;
	object-fit: contain;
	background: #fff;
}

/* style.css の `.entry-content h2 { color: #fff; }` はダーク背景の別要素向けのルールで、
h2タグを使うこのカードのタイトルにも掛かってしまい白文字になるため上書きする。
また480px以下では `.entry-content h2 { margin-left:-2%; margin-right:-2%; }` という
（別のバナー見出し用と思われる）ルールも掛かり、overflow:hiddenと組み合わさって
左右の文字が見切れる原因になっていたため、marginも0に戻す。 */
#main .case-archive__list.post-list-card .entry-title {
	color: #333;
	background: none;
	padding: 0;
	margin-left: 0;
	margin-right: 0;
}

/* 元の.post-list-cardは日付・著者(byline)込みの高さを前提にした固定390pxで、
floatレイアウトのため高さがバラつくと次の行の開始位置がずれてしまう。
このカードはbylineが無く中身の長さもまちまちなので、固定高さではなくflexにして
「同じ行の中だけ高さを揃える」形にし、ズレと余白の両方を解消する。 */
#main .case-archive__list.post-list-card {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

#main .case-archive__list.post-list-card .case-archive__item {
	float: none;
	height: auto;
}

#main .case-archive__list.post-list-card .case-archive__item a:after {
	content: none;
}

.case-archive__empty {
	text-align: center;
	padding: 3em 0;
}

/* =========================
レスポンシブ（SP）
========================= */
@media screen and (max-width: 767px) {
	.br-sp {
		display: block;
	}

	.case-section {
    margin: 0 0 2em;
  }

	.case-cta__box {
		padding: 2em 1em;
	}

	.case-cta__stats {
		font-size: 14px;
	}

	.case-cta__btn-sub {
		font-size: 10px;
	}

	.case-cta__btn--mail {
		padding: 16px;
	}

	.case-title {
		font-size: 22px;
	}

	.case-section__title {
		font-size: 18px;
	}

	.case-property__table th,
	.case-property__table td {
		display: block;
		width: auto;
	}

	.case-property__table th {
		border-bottom: none;
	}

	.case-challenge__body {
		flex-direction: column;
	}

	.case-challenge__image,
	.case-challenge__text {
		flex-basis: auto;
		width: 100%;
	}

	.case-measures__image {
		max-width: 100%;
	}

	.case-measures__item {
		gap: 0.8em;
	}

	.case-measures__number {
		font-size: 24px;
		min-width: 40px;
	}

	.case-result__card {
		flex-basis: calc(50% - 0.5em);
	}

	.case-related__list {
		grid-template-columns: repeat(2, 1fr);
	}

	.case-related__item:nth-child(3) {
		display: none;
	}

	.case-worries__list {
		grid-template-columns: repeat(3, 1fr);
	}

	.case-cta__btn {
		min-width: 100%;
		max-width: 100%;
	}
}

/* 元画像の解像度が小さいため、767px幅では100%まで広げると画質が荒くなる。
実際にpx換算で表示サイズが小さくなる480px以下のみ100%にする。 */
@media screen and (max-width: 480px) {
	.case-eyecatch img {
		width: 100%;
	}
}

@media screen and (min-width: 768px) and (max-width: 900px) {
	.case-worries__list {
		grid-template-columns: repeat(4, 1fr);
	}
}