/* SC-ICG Cixin0711 — 本閣緣起頁面（沿用首頁視覺：Noto Serif TC 金色標題＋蟠桃、24px 圓角圖、8vw 欄距、米色紙紋色帶） */
.sc-cixin-about {
	--scx-u: min(calc(100vw / 1920), 1px);
	--scx-gold: var(--theme-palette-color-2, #BA9A6B);
	--scx-pink: var(--theme-palette-color-1, #DC5174);
	--scx-blue: var(--theme-palette-color-4, #2855A8);
	--scx-cream: var(--theme-palette-color-3, #FFF6ED);
	--scx-sand: var(--theme-palette-color-9, #F5E9DE);
	--scx-text: var(--theme-palette-color-5, #424242);
	--scx-text-2: var(--theme-palette-color-6, #5B5B5B);
	--scx-line: rgba(186, 154, 107, 0.45);
	--scx-serif: "Noto Serif TC", "Noto Sans TC", serif;
	--scx-radius: 24px;
	--scx-gap: 8vw;
	font-size: clamp(0.9375rem, calc(16 * var(--scx-u)), 1rem);
	line-height: 1.8;
	letter-spacing: 0.08em;
	color: var(--scx-text);
	overflow: clip;
}

.sc-cixin-about *,
.sc-cixin-about *::before,
.sc-cixin-about *::after {
	box-sizing: border-box;
}

.sc-cixin-about p {
	margin: 0;
}

.sc-cixin-about p + p {
	margin-top: 1.1em;
}

.sc-cixin-about__inner {
	width: min(1290px, 90vw);
	margin: 0 auto;
}

.sc-cixin-about__section {
	position: relative;
	padding: calc(120 * var(--scx-u)) 0;
}

/* ---------- 區段標題（首頁：蟠桃襯在標題左上） ---------- */
.sc-cixin-about__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: calc(80 * var(--scx-u));
}

.sc-cixin-about__eyebrow {
	font-size: 0.75em;
	letter-spacing: 0.32em;
	color: var(--scx-gold);
	opacity: 0.8;
	margin-bottom: 0.6em;
}

.sc-cixin-about h2.sc-cixin-about__title {
	position: relative;
	isolation: isolate;
	display: inline-block;
	margin: 0;
	padding-left: 0.2em;
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.8em;
	line-height: 1.4;
	letter-spacing: 0.18em;
	color: var(--scx-gold);
}

.sc-cixin-about__title span {
	position: relative;
	z-index: 1;
}

.sc-cixin-about__peach {
	position: absolute;
	z-index: 0;
	left: -0.55em;
	top: -0.5em;
	width: 2.1em;
	height: auto;
	pointer-events: none;
}

.sc-cixin-about h3.sc-cixin-about__subtitle {
	margin: 0 0 0.9em;
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.45em;
	line-height: 1.6;
	letter-spacing: 0.08em;
	color: var(--scx-text);
}

.sc-cixin-about__subtitle small {
	display: block;
	margin-top: 0.2em;
	font-family: "Noto Sans TC", sans-serif;
	font-weight: 400;
	font-size: 0.55em;
	letter-spacing: 0.2em;
	color: var(--scx-gold);
}

/* ---------- 圖文兩欄 ---------- */
.sc-cixin-about__grid {
	display: grid;
	grid-template-columns: 55fr 45fr;
	column-gap: var(--scx-gap);
	row-gap: 40px;
	align-items: center;
}

.sc-cixin-about__grid + .sc-cixin-about__grid {
	margin-top: calc(120 * var(--scx-u));
}

.sc-cixin-about__grid--reverse .sc-cixin-about__figure {
	order: -1;
}

.sc-cixin-about__deity .sc-cixin-about__grid {
	grid-template-columns: 45fr 55fr;
}

.sc-cixin-about__figure {
	position: relative;
	margin: 0;
	width: 100%;
}

.sc-cixin-about__figure::before {
	/* 金色細框往右下偏移，呼應首頁圖片層次 */
	content: "";
	position: absolute;
	inset: 18px -18px -18px 18px;
	border: 1px solid var(--scx-line);
	border-radius: var(--scx-radius);
	pointer-events: none;
}

.sc-cixin-about__figure .sc-cixin-about__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 9 / 10;
	object-fit: cover;
	border-radius: var(--scx-radius);
	position: relative;
	z-index: 1;
}

.sc-cixin-about__figure--deity .sc-cixin-about__img {
	aspect-ratio: 4 / 5;
}

.sc-cixin-about__grid--reverse .sc-cixin-about__figure::before {
	inset: 18px 18px -18px -18px;
}

.sc-cixin-about__text > p {
	font-size: 1em;
}

/* 導言 */
.sc-cixin-about__lead {
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.6em;
	line-height: 1.6;
	letter-spacing: 0.12em;
	color: var(--scx-text);
	margin-bottom: 0.9em !important;
}

/* 主祀／副主祀 膠囊 */
.sc-cixin-about ul.sc-cixin-about__deities {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	margin: 0 0 1.6em;
	padding: 0;
}

.sc-cixin-about__deities li {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 0.35em 1.1em 0.35em 0.5em;
	border: 1px solid var(--scx-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.45);
	font-family: var(--scx-serif);
	font-size: 0.95em;
	letter-spacing: 0.1em;
	color: var(--scx-text);
}

.sc-cixin-about__deities small {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.6em;
	padding: 0.15em 0.7em;
	border-radius: 999px;
	background: var(--scx-gold);
	color: #fff;
	font-family: "Noto Sans TC", sans-serif;
	font-size: 0.72em;
	letter-spacing: 0.2em;
	line-height: 1.6;
}

/* 三大壯舉 */
.sc-cixin-about ol.sc-cixin-about__feats {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 1.8em 0 0;
	padding: 0;
}

.sc-cixin-about__feats li {
	margin: 0;
	padding: 1.2em 0.8em;
	text-align: center;
	border: 1px solid var(--scx-line);
	border-radius: 16px;
	background: rgba(255, 246, 237, 0.55);
}

.sc-cixin-about__feat-no {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4em;
	height: 2.4em;
	margin-bottom: 0.6em;
	border: 1px solid var(--scx-gold);
	border-radius: 50%;
	font-family: var(--scx-serif);
	font-size: 0.85em;
	color: var(--scx-gold);
}

.sc-cixin-about__feat-name {
	display: block;
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.05em;
	letter-spacing: 0.12em;
	color: var(--scx-text);
}

/* ---------- 慈馨閣由來：牡丹底紋 ---------- */
.sc-cixin-about__origin {
	background-image: var(--scx-bg, none);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center top;
	padding-bottom: calc(160 * var(--scx-u));
}

/* ---------- 主祀母娘：廟頂剪影 + 瑤闕 + 米色紙紋 ---------- */
.sc-cixin-about__deity {
	padding: 0;
	margin-top: calc(-40 * var(--scx-u));
}

.sc-cixin-about__roof {
	position: relative;
	line-height: 0;
}

.sc-cixin-about__roof-img {
	display: block;
	width: 100%;
	height: auto;
}

.sc-cixin-about__roof .sc-cixin-about__emblem {
	position: absolute;
	left: 50%;
	top: 58%;
	width: min(84%, 1100px);
	height: auto;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.sc-cixin-about__deity-body {
	position: relative;
	margin-top: -2px; /* 避免廟頂圖與色帶間出現髮絲線 */
	padding: calc(110 * var(--scx-u)) 0 calc(240 * var(--scx-u)); /* 上方留給匾額溢出的高度 */
	background-color: var(--scx-sand);
	background-image: var(--scx-bg, none);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center bottom;
}

.sc-cixin-about__deity .sc-cixin-about__head {
	margin-bottom: calc(72 * var(--scx-u));
}

/* 聖誕／副主祀 */
.sc-cixin-about__note {
	display: flex;
	align-items: baseline;
	gap: 1em;
	margin-top: 1.6em;
	padding-top: 1.2em;
	border-top: 1px solid var(--scx-line);
}

.sc-cixin-about__note--sub {
	margin-top: 0.9em;
	padding-top: 0.9em;
}

.sc-cixin-about__note-label {
	flex: 0 0 auto;
	font-size: 0.8em;
	letter-spacing: 0.24em;
	color: var(--scx-gold);
}

.sc-cixin-about__note-value {
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.15em;
	letter-spacing: 0.12em;
	color: var(--scx-text);
}

/* ---------- 歷史沿革：時間軸 ---------- */
.sc-cixin-about__history {
	padding-top: calc(120 * var(--scx-u));
	padding-bottom: calc(160 * var(--scx-u));
}

.sc-cixin-about__history-grid {
	display: grid;
	grid-template-columns: 60fr 40fr;
	column-gap: var(--scx-gap);
	row-gap: 48px;
	align-items: start;
}

.sc-cixin-about ol.sc-cixin-about__timeline {
	--scx-tl-col: 11em; /* 年份欄寬 */
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sc-cixin-about__timeline::before {
	content: "";
	position: absolute;
	top: 0.6em;
	bottom: 0.6em;
	left: var(--scx-tl-col);
	width: 1px;
	background: var(--scx-line);
}

.sc-cixin-about__timeline li {
	position: relative;
	display: grid;
	grid-template-columns: var(--scx-tl-col) 1fr;
	column-gap: 2.4em;
	margin: 0;
	padding: 0 0 2.6em;
}

.sc-cixin-about__timeline li:last-child {
	padding-bottom: 0;
}

.sc-cixin-about__timeline li::before {
	/* 節點 */
	content: "";
	position: absolute;
	left: var(--scx-tl-col);
	top: 0.55em;
	width: 11px;
	height: 11px;
	transform: translateX(-50%);
	border: 1px solid var(--scx-gold);
	border-radius: 50%;
	background: var(--scx-cream);
	box-shadow: 0 0 0 4px rgba(255, 246, 237, 0.9);
	z-index: 1;
}

.sc-cixin-about__timeline li:first-child::before {
	background: var(--scx-gold);
}

.sc-cixin-about__year {
	padding-right: 2.2em;
	text-align: right;
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.1em;
	line-height: 1.6;
	letter-spacing: 0.1em;
	color: var(--scx-gold);
}

.sc-cixin-about__year small {
	display: block;
	font-family: "Noto Sans TC", sans-serif;
	font-weight: 400;
	font-size: 0.7em;
	letter-spacing: 0.2em;
	color: var(--scx-text-2);
}

.sc-cixin-about__event h3 {
	margin: 0 0 0.45em;
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 1.25em;
	line-height: 1.6;
	letter-spacing: 0.1em;
	color: var(--scx-text);
}

.sc-cixin-about__event p {
	font-size: 0.95em;
	color: var(--scx-text-2);
}

.sc-cixin-about__history-photos {
	display: grid;
	gap: 28px;
	position: sticky;
	top: 120px;
}

.sc-cixin-about__figure--small::before {
	inset: 12px -12px -12px 12px;
}

.sc-cixin-about__figure--small .sc-cixin-about__img {
	aspect-ratio: 1 / 1;
}

/* 沒有照片時時間軸單欄置中 */
.sc-cixin-about__history-grid--single {
	grid-template-columns: minmax(0, 880px);
	justify-content: center;
}

.sc-cixin-about--standalone .sc-cixin-about__history-grid--single {
	row-gap: 0;
}

/* ---------- 單獨使用的歷史沿革區塊 [sc_icg_k_cixin0711_history] ---------- */
.sc-cixin-about--standalone .sc-cixin-about__section {
	padding: calc(40 * var(--scx-u)) 0;
}

.sc-cixin-about--standalone:not(.alignfull) .sc-cixin-about__inner {
	width: 100%;
}

.sc-cixin-about--noframe .sc-cixin-about__figure::before {
	display: none;
}

/* ---------- 結語：燈籠照片 + 深色疊層 ---------- */
.sc-cixin-about__closing {
	padding: calc(180 * var(--scx-u)) 0;
	background-color: #3A2E26;
	background-image: linear-gradient(rgba(44, 33, 26, 0.72), rgba(44, 33, 26, 0.72)), var(--scx-bg, none);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	color: var(--scx-cream);
	text-align: center;
}

.sc-cixin-about__closing-inner {
	max-width: 880px;
}

.sc-cixin-about__closing-eyebrow {
	font-size: 0.85em;
	letter-spacing: 0.2em;
	color: var(--scx-cream);
	opacity: 0.85;
	margin-bottom: 1.2em !important;
}

.sc-cixin-about h2.sc-cixin-about__closing-title {
	margin: 0 0 1.1em;
	font-family: var(--scx-serif);
	font-weight: 700;
	font-size: 2em;
	line-height: 1.7;
	letter-spacing: 0.18em;
	color: var(--scx-cream);
}

.sc-cixin-about__closing-text {
	font-size: 1em;
	line-height: 2;
	color: var(--scx-cream);
	opacity: 0.9;
}

.sc-cixin-about__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin-top: calc(56 * var(--scx-u));
}

.sc-cixin-about a.sc-cixin-about__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: calc(180 * var(--scx-u));
	min-height: max(44px, calc(54 * var(--scx-u)));
	padding: 0 calc(36 * var(--scx-u));
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 0.9375em;
	letter-spacing: 0.16em;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sc-cixin-about a.sc-cixin-about__btn--solid {
	background: var(--scx-gold);
	border-color: var(--scx-gold);
	color: #fff;
}

.sc-cixin-about a.sc-cixin-about__btn--solid:hover {
	background: var(--scx-cream);
	border-color: var(--scx-cream);
	color: var(--scx-text);
}

.sc-cixin-about a.sc-cixin-about__btn--ghost {
	background: transparent;
	border-color: rgba(255, 246, 237, 0.7);
	color: var(--scx-cream);
}

.sc-cixin-about a.sc-cixin-about__btn--ghost:hover {
	background: rgba(255, 246, 237, 0.12);
	border-color: var(--scx-cream);
	color: var(--scx-cream);
}

/* ---------- 平板 ---------- */
@media (max-width: 1023px) {
	.sc-cixin-about {
		--scx-gap: 6vw;
	}
	.sc-cixin-about__history-grid {
		grid-template-columns: 1fr;
	}
	.sc-cixin-about__history-photos {
		position: static;
		grid-template-columns: 1fr 1fr;
	}
}

/* ---------- 手機 ---------- */
@media (max-width: 767px) {
	.sc-cixin-about {
		font-size: 0.9375rem;
	}
	.sc-cixin-about__section {
		padding: 64px 0;
	}
	.sc-cixin-about__head {
		margin-bottom: 40px;
	}
	.sc-cixin-about h2.sc-cixin-about__title {
		font-size: 1.5em;
	}
	.sc-cixin-about__grid,
	.sc-cixin-about__deity .sc-cixin-about__grid {
		grid-template-columns: 1fr;
		row-gap: 36px;
	}
	.sc-cixin-about__grid .sc-cixin-about__figure {
		order: -1; /* 手機一律圖上文下（同首頁） */
	}
	.sc-cixin-about__grid + .sc-cixin-about__grid {
		margin-top: 64px;
	}
	.sc-cixin-about__figure::before,
	.sc-cixin-about__grid--reverse .sc-cixin-about__figure::before {
		inset: 12px -12px -12px 12px;
	}
	.sc-cixin-about__figure .sc-cixin-about__img,
	.sc-cixin-about__figure--deity .sc-cixin-about__img {
		aspect-ratio: 4 / 3;
	}
	.sc-cixin-about__lead {
		font-size: 1.35em;
	}
	.sc-cixin-about ol.sc-cixin-about__feats {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}
	.sc-cixin-about__feats li {
		padding: 0.9em 0.4em;
	}
	.sc-cixin-about__feat-name {
		font-size: 0.9em;
		letter-spacing: 0.06em;
	}
	.sc-cixin-about__origin {
		padding-bottom: 96px;
	}
	.sc-cixin-about__deity {
		margin-top: 0;
	}
	.sc-cixin-about__roof .sc-cixin-about__emblem {
		width: 88%;
		top: 66%;
	}
	.sc-cixin-about__deity-body {
		padding: 84px 0 140px;
	}
	.sc-cixin-about__history {
		padding-top: 64px;
		padding-bottom: 80px;
	}
	.sc-cixin-about ol.sc-cixin-about__timeline {
		--scx-tl-col: 0.4em;
		padding-left: 0;
	}
	.sc-cixin-about__timeline li {
		grid-template-columns: 1fr;
		row-gap: 0.3em;
		padding: 0 0 2em 2em;
	}
	.sc-cixin-about__timeline li::before {
		top: 0.45em;
	}
	.sc-cixin-about__year {
		text-align: left;
		padding-right: 0;
		font-size: 1em;
	}
	.sc-cixin-about__year small {
		display: inline;
		margin-left: 0.6em;
	}
	.sc-cixin-about__history-photos {
		gap: 16px;
	}
	.sc-cixin-about__figure--small::before {
		inset: 8px -8px -8px 8px;
	}
	.sc-cixin-about__closing {
		padding: 96px 0;
	}
	.sc-cixin-about h2.sc-cixin-about__closing-title {
		font-size: 1.45em;
		letter-spacing: 0.12em;
	}
	.sc-cixin-about__br-desktop {
		display: none;
	}
	.sc-cixin-about a.sc-cixin-about__btn {
		min-width: 140px;
		min-height: 44px;
		padding: 0 24px;
		font-size: 0.875em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sc-cixin-about a.sc-cixin-about__btn {
		transition: none;
	}
}
