/* ============================================
 * 導入事例（Case Study）
 * ============================================ */

/* ===========================================
 * 一覧ページ
 * =========================================== */

.case-study-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 959px) {
	.case-study-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 599px) {
	.case-study-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

/* --- カード --- */
.case-study-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

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

.case-study-card__thumb img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.case-study-card__no-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #f1f8fc, #e1e1e1);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
	font-size: 14px;
}

.case-study-card__body {
	padding: 16px 20px 20px;
}

.case-study-card__clinic-info {
	margin-bottom: 6px;
}

.case-study-card__clinic,
.case-study-card__doctor {
	font-size: 13px;
	color: #05223f;
	font-weight: 700;
	margin: 0;
	line-height: 1.4;
}

.case-study-card__title {
	font-size: 20px;
	font-weight: 900;
	line-height: 1.5;
	color: #1C8ED2;
	margin: 0 0 12px;
}

.case-study-card__meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.case-study-meta-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.case-study-meta-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 900;
	color: #fff;
	background: #1C8ED2;
	padding: 2px 12px;
	border-radius: 4px;
	min-width: 52px;
	text-align: center;
	line-height: 1.6;
	flex-shrink: 0;
}

.case-study-meta-value {
	font-size: 13px;
	font-weight: 500;
	color: #1C8ED2;
}

.case-study-card__footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.case-study-card__more {
	font-size: 14px;
	color: #05223f;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.case-study-card__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #05223f;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	transition: background 0.3s ease;
}

.case-study-card:hover .case-study-card__arrow {
	background: #1C8ED2;
}

.p-archiveContent .nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
}

/* ===========================================
 * 詳細ページ
 * =========================================== */

/* SWELLデフォルトの投稿日・タイトル・ヘッダーを非表示 */
body.single-case_study .p-articleMetas,
body.single-case_study .c-postTitle,
body.single-case_study .l-articleBottom,
body.single-case_study .p-articleFoot,
body.single-case_study .p-articleThumb,
body.single-case_study .l-topTitleArea,
body.single-case_study #top_title_area {
	display: none !important;
}

/* サイドバー非表示・メインコンテンツ全幅 */
body.single-case_study .l-sidebar,
body.single-case_study #sidebar {
	display: none !important;
}

body.single-case_study .l-mainContent {
	max-width: 100% !important;
	flex: 1 !important;
}

body.single-case_study .l-content {
	max-width: 900px;
	margin: 0 auto;
}

/* パンくず最後の項目を表示（SWELLデフォルトで非表示にされるため上書き） */
body.single.single-case_study .p-breadcrumb__item:last-child > span.p-breadcrumb__text {
	display: inline-flex !important;
	opacity: 0.8;
}

/* --- ヒーロー --- */
.cs-hero {
	display: flex;
	align-items: stretch;
	gap: 48px;
	margin-bottom: 48px;
	background: linear-gradient(135deg, #fafcff 0%, #f0f7fc 100%);
	border-radius: 20px;
	padding: 48px;
	box-shadow: 0 4px 24px rgba(28, 142, 210, 0.08);
}

.cs-hero__text {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.cs-hero__clinic {
	font-size: 18px;
	font-weight: 900;
	color: #05223f;
	margin: 0;
	line-height: 1.4;
	letter-spacing: 0.05em;
}

.cs-hero__doctor {
	font-size: 18px;
	font-weight: 900;
	color: #05223f;
	margin: 0 0 16px;
	line-height: 1.4;
	letter-spacing: 0.05em;
}

.cs-hero__title {
	font-size: 30px;
	font-weight: 900;
	line-height: 1.45;
	color: #1C8ED2;
	margin: 0;
	padding-top: 16px;
	border-top: 3px solid #1C8ED2;
}

.cs-hero__image {
	flex: 0 0 50%;
	max-width: 50%;
}

.cs-hero__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

@media (max-width: 599px) {
	.cs-hero {
		flex-direction: column-reverse;
		gap: 24px;
		padding: 24px;
		border-radius: 16px;
	}

	.cs-hero__image {
		flex: none;
		max-width: 100%;
		width: 100%;
	}

	.cs-hero__title {
		font-size: 22px;
	}
}

/* --- メタバッジ --- */
.cs-badges {
	display: flex;
	justify-content: center;
	gap: 0;
	margin-bottom: 48px;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 16px rgba(28, 142, 210, 0.1);
}

.cs-badge {
	text-align: center;
	flex: 1;
	padding: 24px 16px;
	position: relative;
}

.cs-badge + .cs-badge::before {
	content: "";
	position: absolute;
	left: 0;
	top: 20%;
	height: 60%;
	width: 1px;
	background: #e0eef6;
}

.cs-badge__label {
	display: inline-block;
	background: linear-gradient(135deg, #1C8ED2 0%, #1a7ab8 100%);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	padding: 4px 18px;
	border-radius: 20px;
	letter-spacing: 0.08em;
	margin-bottom: 10px;
}

.cs-badge__value {
	display: block;
	font-size: 18px;
	font-weight: 900;
	color: #05223f;
}

@media (max-width: 599px) {
	.cs-badges {
		flex-direction: column;
		border-radius: 12px;
	}

	.cs-badge {
		padding: 16px;
	}

	.cs-badge + .cs-badge::before {
		top: 0;
		left: 15%;
		width: 70%;
		height: 1px;
	}
}

/* --- プロフィールカード --- */
.cs-profile {
	margin-bottom: 48px;
}

.cs-profile__inner {
	display: flex;
	gap: 32px;
	background: linear-gradient(135deg, #1C8ED2 0%, #1672a8 100%);
	color: #fff;
	border-radius: 20px;
	padding: 36px 40px;
	align-items: flex-start;
	box-shadow: 0 8px 32px rgba(28, 142, 210, 0.2);
}

.cs-profile__photo {
	flex: 0 0 240px;
}

.cs-profile__photo img {
	width: 240px;
	height: 240px;
	object-fit: cover;
	border-radius: 16px;
	border: 3px solid rgba(255, 255, 255, 0.3);
}

.cs-profile__info {
	flex: 1;
}

.cs-profile__name {
	font-size: 20px;
	font-weight: 900;
	margin: 0 0 20px;
	line-height: 1.5;
}

.cs-profile__columns {
	display: flex;
	gap: 32px;
}

.cs-profile__col {
	flex: 1;
}

.cs-profile__heading {
	font-size: 17px;
	font-weight: 900;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

.cs-profile__text {
	font-size: 13px;
	line-height: 1.8;
	margin: 0;
	opacity: 0.92;
}

@media (max-width: 599px) {
	.cs-profile__inner {
		flex-direction: column;
		align-items: center;
		padding: 28px;
		text-align: center;
		border-radius: 16px;
	}

	.cs-profile__photo {
		flex: 0 0 150px;
	}

	.cs-profile__photo img {
		width: 150px;
		height: 150px;
	}

	.cs-profile__columns {
		flex-direction: column;
		gap: 16px;
		text-align: left;
	}
}

/* --- 本文のh2 --- */
.single-case_study .post_content h2 {
	background: linear-gradient(135deg, #1C8ED2 0%, #1672a8 100%);
	color: #fff;
	font-size: 20px;
	font-weight: 900;
	padding: 14px 28px;
	border-radius: 12px;
	border: none;
	margin-top: 56px;
	margin-bottom: 28px;
	box-shadow: 0 4px 16px rgba(28, 142, 210, 0.15);
}

.single-case_study .post_content h2::before,
.single-case_study .post_content h2::after {
	display: none;
}

/* --- 本文の画像 --- */
.single-case_study .post_content img {
	border-radius: 12px;
}

/* --- 各セクション：画像+テキストを2列表示 --- */
body.single-case_study .post_content figure.wp-block-image.size-large {
	float: left !important;
	width: 40% !important;
	max-width: 40% !important;
	margin: 0 28px 20px 0 !important;
}

body.single-case_study .post_content figure.wp-block-image.size-large img {
	width: 100% !important;
	height: auto !important;
}

/* セクション区切りのクリア */
body.single-case_study .post_content h2.wp-block-heading {
	clear: both;
}

@media (max-width: 599px) {
	body.single-case_study .post_content figure.wp-block-image.size-large {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 0 16px 0 !important;
	}
}

/* --- 一覧に戻る --- */
.cs-back {
	text-align: center;
	margin-top: 56px;
	margin-bottom: 56px;
}

.cs-back__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	color: #1C8ED2;
	text-decoration: none;
	padding: 14px 36px;
	border: 2px solid #1C8ED2;
	border-radius: 40px;
	transition: all 0.3s ease;
}

.cs-back__link:hover {
	background: #1C8ED2;
	color: #fff;
}
