/* ========================================
   single-case.css - PC版スタイル
   ======================================== */

/* メインコンテナ */
.single-case {
	min-height: 100vh;
	padding-top: 13.5rem;
	position: relative;
}

/* ヒーローセクション */
.single-case__hero {
	position: relative;
	margin-bottom: 8rem;
}

.single-case__hero-container {
	max-width: 816px;
	margin: 0 auto;
	padding: 0 2rem;
}

.single-case__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 1rem; /* 10px 16px */
	color: #ffffff;
	font-size: 1rem; /* 16px */
	font-weight: 700;
	line-height: 1; /* 28px */
	min-width: 111px;
    box-sizing: border-box;
}

.single-case__title {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 3.5rem;
	color: #000000;
	margin-bottom: 3.5rem;
}

.single-case__hero-image {
	width: 100%;
	aspect-ratio: 816 / 524;
	background-color: #ffffff;
	border-radius: 0;
	overflow: hidden;
}

.single-case__hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* メインコンテンツエリア */
.single-case__content {
	background-color: #ffffff;
	border-radius: 80px;
	position: relative;
	margin: 0 8rem;
	padding: 4.5rem 0 6rem;
}

.single-case__container {
	max-width: 816px;
	margin: 0 auto;
	padding: 0 6.5rem;
}

/* プロジェクトを担当したデザイナー */
.single-case__designer {
	background-color: #13a92f;
	border-radius: 0;
	padding: 1.5rem;
	margin-bottom: 6.5rem;
	display: flex;
	align-items: flex-start;
	gap: 3rem;
	position: relative;
}

.single-case__designer-content {
	flex: 1 1 0;
	min-width: 0;
	padding-left: 1.5rem;
}

.single-case__designer-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.75rem;
	color: #ffffff;
	margin-top: initial;
	margin-bottom: initial;
}

.single-case__designer-divider {
	width: 100%;
	height: 1px;
	background-color: #08FF7F;
	margin: 1.5rem 0;
}

.single-case__designer-description {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.5rem;
	color: #ffffff;
	margin: 0;
}

.single-case__designer-image {
	flex: 0 0 272px;
}

.single-case__designer-image img {
	width: 100%;
	height: -webkit-fill-available;
	object-fit: cover;
	display: block;
}

/* セクション共通 */
.single-case__section {
	display: grid;
	grid-template-columns: 60px 1fr;
	grid-template-rows: auto 1fr;
	column-gap: 2.25rem;
	row-gap: 0.75rem;
	margin-bottom: 6rem;
	position: relative;
}

/* セクション番号から下に線を引く */
.single-case__section::before {
	content: '';
	position: absolute;
	left: 30px; /* 60px ÷ 2 = 丸の中心 */
	top: 60px; /* 丸の高さ分 */
	height: calc(100% + 6rem - 60px); /* セクションの高さ + margin-bottom - 次の丸の高さ */
	width: 1px;
	background-color: #13a92f;
}

/* 05番（支援詳細）には線を表示しない */
.single-case__section:has(.single-case__section-number--filled)::before {
	display: none;
}

.single-case__section-number {
	grid-row: 1;
	grid-column: 1;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 1px solid #13a92f;
	background-color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 2.375rem;
	color: #13a92f;
	flex-shrink: 0;
	z-index: 1;
	position: relative;
	align-self: center;
}

.single-case__section-number--filled {
	background-color: #13a92f;
	color: #ffffff;
}

.single-case__section-title {
	grid-row: 1;
	grid-column: 2;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 2.25rem;
	color: #000000;
	margin: 0;
	align-self: center;
}

.single-case__section-content {
	grid-row: 2;
	grid-column: 2;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.75rem;
	color: #000000;
}

.single-case__section-content p {
	margin: 0;
}

.single-case__section-content--highlight {
	background-color: rgba(8, 255, 127, 0.1);
	padding: 1.5rem 2.5rem;
}

/* ギャラリー/スライダー */
.single-case__gallery-container {
	width: 100%;
	max-width: 816px;
	margin: 0 auto;
}

.single-case__gallery-slider {
	width: 100%;
	aspect-ratio: 816 / 524;
	display: flex;
	overflow: hidden;
	position: relative;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	touch-action: pan-y;
}

.single-case__gallery-track {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 0.3s ease-out;
	will-change: transform;
}

.single-case__gallery-track.is-dragging {
	transition: none;
}

.single-case__gallery-slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	display: block;
}

.single-case__gallery-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-user-drag: none;
}

.single-case__gallery-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.5rem;
}

.single-case__gallery-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #d9d9d9;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.single-case__gallery-dot:hover {
	background-color: #a8a8a8;
	transform: scale(1.2);
}

.single-case__gallery-dot.is-active {
	background-color: #08FF7F;
	transform: scale(1.3);
}

/* 関連事例 */
.single-case__related {
	padding: 5rem 1.5rem;
	overflow: visible;
}

.single-case__related-container {
	max-width: 1232px;
	margin: 0 auto;
}

.single-case__related-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 3rem;
}

.single-case__related-title {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.75rem;
	color: #000000;
	margin: 0;
}

.single-case__related-link {
	min-width: 12rem;
}

.single-case__related-grid {
	display: flex;
	gap: 1rem;
	justify-content: flex-start;
}

/* single-case固有スタイル
   共通スタイルは css/components/case-card.css を参照
   archive-case__cardのスタイルを基準に統一 */

.single-case__related-card {
	flex: 0 0 calc((100% - 2rem) / 3);
}

/* レスポンシブ: タブレット */
@media screen and (max-width: 1024px) {
	.single-case__content {
		margin: 0 4rem;
	}
}

/* レスポンシブ: SP */
@media screen and (max-width: 768px) {
	/* メインコンテナ */
	.single-case {
		padding-top: 8rem;
	}

	/* ヒーローセクション */
	.single-case__hero {
		margin-bottom: 2.625rem;
	}

	.single-case__hero-container {
		max-width: 100%;
		padding: 0 1.3125rem;
	}

	.single-case__label {
		padding: 0.5469rem 0.875rem;
		font-size: 0.6562rem;
		min-width: 92px;
	}

	.single-case__title {
		font-size: 1.5rem;
		line-height: 1.8594rem;
		margin-bottom: 1.75rem;
	}

	.single-case__hero-image {
		border-radius: 0;
	}

	/* メインコンテンツエリア */
	.single-case__content {
		border-radius: 60px;
		margin: 0 0;
		padding: 4.4013rem 0;
	}

	.single-case__container {
		max-width: 100%;
		padding: 0 1.3125rem;
	}

	/* プロジェクトを担当したデザイナー */
	.single-case__designer {
		padding: 2.5rem 1rem 1rem;
		margin-bottom: 4.375rem;
		flex-direction: column;
		align-items: stretch;
		gap: 1.1484rem;
	}

	.single-case__designer-content {
		order: 1;
		padding-left: initial;
	}

	.single-case__designer-title {
		font-size: 0.875rem;
		line-height: 1.3125rem;
		margin-bottom: 1.3125rem;
	}

	.single-case__designer-divider {
		margin-bottom: 1.3125rem;
	}

	.single-case__designer-description {
		font-size: 0.75rem;
		line-height: 1.2031rem;
	}

	.single-case__designer-image {
		width: 100%;
		order: 2;
	}

	/* セクション共通 */
	.single-case__section {
		grid-template-columns: 40px 1fr;
		column-gap: 0.875rem;
		row-gap: 0.5rem;
		margin-bottom: 3rem;
	}

	.single-case__section::before {
		left: 20px; /* 40px ÷ 2 = 丸の中心（SP版） */
		top: 40px; /* 丸の高さ分（SP版） */
		height: calc(100% + 3rem - 40px); /* セクションの高さ + margin-bottom - 次の丸の高さ（SP版） */
	}

	/* 05番（支援詳細）には線を表示しない */
	.single-case__section:has(.single-case__section-number--filled)::before {
		display: none;
	}

	.single-case__section-number {
		width: 40px;
		height: 40px;
		font-size: 1rem;
		line-height: 2.0781rem;
	}

	.single-case__section-title {
		font-size: 1.25rem;
		line-height: 1.9688rem;
	}

	.single-case__section-content {
		font-size: 0.875rem;
		line-height: 1.5;
	}

	.single-case__section-content--highlight {
		padding: 1.3125rem 0.875rem;
	}

	/* ギャラリー/スライダー */
	.single-case__gallery-container {
		width: 100%;
	}

	.single-case__gallery-dots {
		margin-top: 1rem;
	}

	/* 関連事例 */
	.single-case__related {
		padding: 3.0625rem 0 6.5rem 1.5rem;
	}

	.single-case__related-container {
		max-width: 100%;
		display: flex;
		flex-direction: column;
	}

	.single-case__related-header {
		display: contents;
	}

	.single-case__related-title {
		font-size: 1.3125rem;
		line-height: 1.5312rem;
		order: 1;
		margin-bottom: 1.75rem;
		padding-right: 1.5rem;
	}

	.single-case__related-grid {
		display: flex;
		overflow-x: auto;
		gap: 1.625rem;
		order: 2;
		margin-bottom: 1.75rem;
		padding: 0 0 0.875rem 0;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		grid-template-columns: unset;
	}

	.single-case__related-grid::-webkit-scrollbar {
		display: none;
	}

	.single-case__related-card {
		flex: 0 0 275px;
		scroll-snap-align: start;
	}

	.single-case__related-link {
		padding: 0.8203rem 1.75rem;
		font-size: 0.75rem;
		line-height: 1.2031rem;
		height: 50px;
		box-sizing: border-box;
		order: 3;
		margin-right: 1.5rem;
	}

	/* single-case__related-card-label のSPサイズでは
	   共通スタイル（0.85714rem）ではなく0.75remを使用 */
	.single-case__related-card-label {
		font-size: 0.75rem;
	}
}
