/**
 * 学校理念ページの導入、ストーリー、メッセージ領域の固有表示を管理する。
 *
 * 意味のまとまりを保つ固定改行クラスはテンプレートと対になっているため、文字列変更時は両方を確認する。
 * スマホ共通の中央配置はmobile-content-layout.cssへ委ね、改行はこのページ固有CSSとテンプレート側で管理する。
 */

/**
 * 1.0 学校理念の導入
 *
 * 理念の要約と最初のメッセージを同じ視線軸へ置き、長いストーリーへ入る前に主題を明確にする。
 */

.shs-about-family .philosophy-title {
	line-height: 1.55;
}

.shs-about-family .philosophy-title__line {
	display: block;
	white-space: nowrap;
}

.shs-about-family .philosophy-main {
	padding-bottom: 104px;
}

.shs-about-family .philosophy-intro-heading {
	grid-area: heading;
	align-self: center;
}

.shs-about-family .philosophy-concept-diagram {
	grid-area: diagram;
	min-width: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.shs-about-family .philosophy-concept-diagram img {
	display: block;
	width: min(100%, 650px);
	height: auto;
}

.shs-about-family .philosophy-meta {
	grid-area: meta;
	align-self: center;
}

.shs-about-family .philosophy-intro-copy {
	grid-area: copy;
	max-width: 900px;
	margin: 0;
}

.shs-about-family .philosophy-meta .p3-meta__row {
	transition:
		transform var(--shs-hover-lift-duration) var(--shs-hover-lift-ease),
		box-shadow var(--shs-hover-lift-duration) var(--shs-hover-lift-ease);
}

.shs-about-family .philosophy-meta .p3-meta__row:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(158, 83, 105, 0.08);
}

.shs-about-family .philosophy-meta .p3-meta__icon.material-symbols-outlined {
	font-size: 25px;
	line-height: 1;
	font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.shs-about-family .philosophy-intro-line,
.shs-about-family .philosophy-copy-line {
	display: block;
}

@media (min-width: 761px) {
	.shs-about-family .philosophy-copy-line {
		white-space: nowrap;
	}
}

@media (min-width: 1280px) {
	.shs-about-family .philosophy-intro-line {
		white-space: nowrap;
	}
}

@media (max-width: 1120px) {
	.shs-about-family .philosophy-concept-diagram img {
		width: min(100%, 610px);
	}

	.shs-about-family .philosophy-meta .p3-meta__row {
		min-width: 0;
	}
}

@media (max-width: 900px) {
	.shs-about-family .philosophy-intro-heading {
		text-align: center;
	}

	.shs-about-family .philosophy-intro-heading .accent-line {
		margin-right: auto;
		margin-left: auto;
	}

	.shs-about-family .philosophy-concept-diagram img {
		width: min(100%, 690px);
	}

	.shs-about-family .philosophy-intro-copy {
		max-width: 760px;
		margin-inline: auto;
	}
}

@media (max-width: 600px) {
	.shs-about-family .philosophy-concept-diagram {
		margin-inline: -8px;
	}

	.shs-about-family .philosophy-concept-diagram img {
		width: 100%;
	}

	.shs-about-family .philosophy-intro-copy {
		text-align: center;
	}
}

/**
 * 2.0 スクロールストーリー
 *
 * 理念を複数の場面へ分けて読み進められるよう、番号・本文・ビジュアルの関係を一定に保つ。
 * 固定改行用クラスはテンプレートの文節と対になっているため、文言変更時はHTMLも同時に確認する。
 */

.shs-about-family .philosophy-story {
	padding: 108px 0 126px;
	background: radial-gradient( circle at 92% 8%, rgba(239, 120, 188, 0.09), transparent 22% ), rgba(239, 120, 188, .030);
}

.shs-about-family .philosophy-story__head {
	max-width: 760px;
	margin: 0 auto 58px;
	text-align: center;
}

.shs-about-family .philosophy-story__head .accent-line {
	margin-right: auto;
	margin-left: auto;
}

.shs-about-family .philosophy-story__layout {
	display: grid;
	grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
	gap: 64px;
	align-items: start;
}

.shs-about-family .philosophy-story__visual {
	position: sticky;
	top: calc(50vh + 39px - clamp(180px, 14vw, 245px));
	align-self: start;
	min-width: 0;
}

body.admin-bar .shs-about-family .philosophy-story__visual {
	top: calc(50vh + 55px - clamp(180px, 14vw, 245px));
}

.shs-about-family .philosophy-story__media {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	min-height: 0;
	max-height: calc(100vh - 190px);
	overflow: hidden;
	background-color: var(--rose-soft);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	border: 1px solid var(--line);
	border-radius: 28px;
	box-shadow: var(--shadow);
	transition: background-image 0.55s ease, background-position 0.55s ease;
}

.shs-about-family .philosophy-story__media.is-question {
	background-image: url("../../../img/about/philosophy/story-question.webp");
	background-position: center;
}

.shs-about-family .philosophy-story__media.is-ai {
	background-image: url("../../../img/about/philosophy/story-ai.webp");
	background-position: 54% center;
}

.shs-about-family .philosophy-story__media.is-english {
	background-image: url("../../../img/about/philosophy/story-english.webp");
	background-position: center;
}

.shs-about-family .philosophy-story__media.is-action {
	background-image: url("../../../img/about/philosophy/story-action.webp");
	background-position: 35% center;
}

.shs-about-family .philosophy-story__media::before {
	content: "";
	position: absolute;
	inset: -20px;
	z-index: 0;
	background-image: inherit;
	background-size: cover;
	background-position: inherit;
	filter: blur(18px);
	opacity: 0.18;
	transform: scale(1.05);
	pointer-events: none;
}

.shs-about-family .philosophy-story__media::after {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 19px;
	pointer-events: none;
	z-index: 4;
}

.shs-about-family .philosophy-story__overlay {
	position: absolute;
	z-index: 2;
	inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(158, 83, 105, 0.74) 100%), linear-gradient(90deg, rgba(158, 83, 105, 0.06), transparent 48%);
}

.shs-about-family .philosophy-story__caption {
	position: absolute;
	z-index: 3;
	right: 34px;
	bottom: 32px;
	left: 34px;
	color: #fff;
}

.shs-about-family .philosophy-story__caption span {
	display: block;
	margin-bottom: 7px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.18em;
}

.shs-about-family .philosophy-story__caption strong {
	font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
	font-size: clamp(25px, 3vw, 35px);
	font-weight: 500;
	letter-spacing: 0.08em;
}

.shs-about-family .philosophy-story__status {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px 8px 0;
}

.shs-about-family .philosophy-story__current {
	min-width: 42px;
	color: #ef78bc;
	font-family: Georgia, serif;
	font-size: 24px;
}

.shs-about-family .philosophy-story__progress {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.shs-about-family .philosophy-story__progress span {
	height: 2px;
	background: rgba(158, 83, 105, 0.16);
	transition: background 0.35s ease, transform 0.35s ease;
}

.shs-about-family .philosophy-story__progress span.is-active {
	background: var(--rose);
	transform: scaleY(2);
}

.shs-about-family .philosophy-story__steps {
	display: grid;
	gap: 34px;
}

.shs-about-family .philosophy-step {
	position: relative;
	min-height: 68vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px 36px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid transparent;
	border-radius: 22px;
	opacity: 0.46;
	transition: opacity 0.4s ease, transform 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.shs-about-family .philosophy-step.is-active {
	opacity: 1;
	transform: translateX(8px);
	background: #fff;
	border-color: var(--line);
	box-shadow: 0 14px 38px rgba(158, 83, 105, 0.08);
}

.shs-about-family .philosophy-step__number {
	position: absolute;
	top: 24px;
	right: 28px;
	color: rgba(158, 83, 105, 0.1);
	font-family: Georgia, serif;
	font-size: 72px;
	line-height: 1;
}

.shs-about-family .philosophy-step h3 {
	margin: 14px 0 20px;
	color: #9e5369;
	font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
	font-size: clamp(30px, 3.15vw, 40px);
	font-weight: 500;
	line-height: 1.55;
	letter-spacing: 0.04em;
}

.shs-about-family .philosophy-step > p:not(.eyebrow) {
	max-width: 480px;
	margin: 0;
	color: var(--muted);
	font-size: 14px;
}

.shs-about-family .philosophy-step__title-desktop {
	display: block;
}

.shs-about-family .philosophy-step__title-mobile,
.shs-about-family .philosophy-step__description-mobile {
	display: none;
}

.shs-about-family .philosophy-step__tag {
	width: fit-content;
	margin-top: 25px;
	padding: 8px 15px;
	color: #ef78bc;
	background: var(--rose-pale);
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

/**
 * 3.0 締めくくりメッセージ
 *
 * ストーリーの結論と次ページへの導線をまとめ、装飾より本文の可読性を優先して余白を確保する。
 */

.shs-about-family .philosophy-closing {
	padding: 0 0 120px;
	background: #fff;
}

.shs-about-family .philosophy-closing .p3-message {
	margin-top: 0;
}

@media (min-width: 981px) and (max-height: 760px) {
	.shs-about-family .philosophy-story__media {
		width: min(100%, calc((100vh - 170px) * 1.3333));
		margin-inline: auto;
	}
}

@media (max-width: 980px) {
	.shs-about-family .philosophy-story__layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.shs-about-family .philosophy-story__visual {
		position: relative;
		top: auto;
		z-index: 1;
		display: block;
		min-height: 0;
	}

	body.admin-bar .shs-about-family .philosophy-story__visual {
		top: auto;
		min-height: 0;
	}

	.shs-about-family .philosophy-story__media {
		aspect-ratio: 4 / 3;
		min-height: 0;
		max-height: none;
	}

	.shs-about-family .philosophy-story__steps {
		position: relative;
		z-index: 2;
	}

	.shs-about-family .philosophy-step {
		min-height: 62vh;
		background: rgba(255, 255, 255, 0.94);
		border-color: var(--line);
		box-shadow: 0 14px 38px rgba(158, 83, 105, 0.07);
	}

	.shs-about-family .philosophy-step.is-active {
		transform: none;
	}
}

@media (max-width: 600px) {

	.shs-about-family .philosophy-main {
		padding-bottom: 72px;
	}

	.shs-about-family .philosophy-story {
		padding: 72px 0 84px;
	}

	.shs-about-family .philosophy-story__head {
		margin-bottom: 40px;
	}

	.shs-about-family .philosophy-story__title-phrase,
	.shs-about-family .philosophy-story__copy-phrase {
		display: inline-block;
		white-space: nowrap;
	}

	.shs-about-family .philosophy-story__visual {
		top: auto;
	}

	.shs-about-family .philosophy-story__media {
		aspect-ratio: 4 / 3;
		min-height: 0;
		max-height: none;
		border-radius: 20px;
	}

	.shs-about-family .philosophy-story__media::after {
		inset: 8px;
		border-radius: 14px;
	}

	.shs-about-family .philosophy-story__caption {
		right: 23px;
		bottom: 22px;
		left: 23px;
	}

	.shs-about-family .philosophy-story__steps {
		gap: 22px;
	}

	.shs-about-family .philosophy-step {
		min-height: 55vh;
		padding: 38px 25px;
		border-radius: 18px;
	}

	.shs-about-family .philosophy-step__number {
		top: 20px;
		right: 20px;
		font-size: 56px;
	}

	.shs-about-family .philosophy-step__title-desktop,
	.shs-about-family .philosophy-step__description-desktop {
		display: none;
	}

	.shs-about-family .philosophy-step__title-mobile,
	.shs-about-family .philosophy-step__description-mobile {
		display: block;
	}

	.shs-about-family .philosophy-step__title-mobile > span,
	.shs-about-family .philosophy-step__description-mobile > span {
		display: block;
		white-space: nowrap;
	}

	.shs-about-family .philosophy-closing {
		padding-bottom: 82px;
	}

}

@media (prefers-reduced-motion: reduce) {
	.shs-about-family .philosophy-step,
	.shs-about-family .philosophy-story__media {
		transition: none;
	}
}
