/**
 * Theme Name: Blocksy Child
 * Description: Designed by SC-ICG.
 * Author: SC-ICG
 * Template: blocksy
 * Text Domain: blocksy
 */

/* =========================================================
   KV Article Components v1.0（2026-07-11）
   文章內元件：文章導讀 / 馬克筆重點 / FAQ 卡 / 表格
   / Prompt 範本框 / 文末 CTA。
   配色取自品牌色盤：紫 #ae6cdc、丁香紫 #cd92f8、
   水藍 #8dd3dd、墨紫 #180027。scope 僅 .single-post。
   ========================================================= */

:root {
	--kv-ink: #180027;
	--kv-text: #3e3a39;
	--kv-purple: #ae6cdc;
	--kv-lilac: #cd92f8;
	--kv-aqua: #8dd3dd;
	--kv-line: #e1e8ed;
	--kv-grad: linear-gradient(120deg, var(--kv-purple), var(--kv-aqua));
}

/* ---------- 章節標題：左側漸層直條 ---------- */
.single-post .entry-content > h2 {
	position: relative;
	margin-top: 1.7em;
	padding-left: 20px;
}
.single-post .entry-content > h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: .14em;
	bottom: .14em;
	width: 5px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--kv-purple), var(--kv-aqua));
}

/* ---------- 清單節奏：項目之間留呼吸 ---------- */
.single-post .entry-content > ul > li,
.single-post .entry-content > ol > li {
	margin-bottom: 12px;
	line-height: 1.9;
}
.single-post .entry-content > ul > li:last-child,
.single-post .entry-content > ol > li:last-child {
	margin-bottom: 0;
}

/* ---------- 馬克筆劃重點與粗體 ---------- */
/* <u>＝水藍馬克筆（主）；<mark>＝丁香紫馬克筆（次） */
.single-post .entry-content u {
	text-decoration: none;
	font-style: normal;
	font-weight: 600;
	color: var(--kv-ink);
	background: linear-gradient(transparent 58%, rgba(141, 211, 221, .55) 58%, rgba(141, 211, 221, .55) 94%, transparent 94%);
	padding: 0 3px;
}
.single-post .entry-content mark {
	font-weight: 600;
	color: var(--kv-ink);
	background: linear-gradient(transparent 58%, rgba(205, 146, 248, .42) 58%, rgba(205, 146, 248, .42) 94%, transparent 94%);
	padding: 0 3px;
}
.single-post .entry-content strong {
	color: var(--kv-ink);
}
.single-post .entry-content li::marker {
	color: var(--kv-purple);
	font-weight: 700;
}

/* ---------- 文章導讀 ---------- */
.single-post .entry-content .kv-guide {
	position: relative;
	margin: 4px 0 24px;
	padding: 30px 34px 28px;
	background: linear-gradient(135deg, #faf6fe 0%, #f2fafc 100%);
	border: 1px solid #eadcf7;
	border-radius: 18px;
	overflow: hidden;
}
.single-post .entry-content .kv-guide::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--kv-grad);
}
.single-post .entry-content .kv-guide ul {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: kvguide;
}
.single-post .entry-content .kv-guide li {
	position: relative;
	counter-increment: kvguide;
	padding-left: 46px;
	margin: 0 0 16px;
	line-height: 1.85;
}
.single-post .entry-content .kv-guide li:last-child {
	margin-bottom: 0;
}
.single-post .entry-content .kv-guide li::before {
	content: counter(kvguide, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: .3em;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .05em;
	background: var(--kv-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.single-post .entry-content .kv-guide li + li {
	padding-top: 16px;
	border-top: 1px dashed rgba(174, 108, 220, .25);
}
.single-post .entry-content .kv-guide li + li::before {
	top: calc(.3em + 16px);
}

/* ---------- 最後更新提示（時效型文章頂部） ---------- */
.single-post .entry-content .kv-updated {
	background: linear-gradient(135deg, #faf6fe 0%, #f2fafc 100%);
	border: 1px solid #eadcf7;
	border-radius: 12px;
	padding: 14px 20px;
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.75;
	color: var(--kv-text);
}
.single-post .entry-content .kv-updated strong {
	color: var(--kv-ink);
}
.single-post .entry-content .kv-updated a {
	color: var(--kv-purple);
	text-decoration: none;
	border-bottom: 1px solid rgba(174, 108, 220, .4);
}
.single-post .entry-content .kv-updated a:hover {
	color: var(--kv-ink);
	border-color: var(--kv-ink);
}

/* ---------- FAQ 手風琴（原生 details，開一收一） ---------- */
.single-post .entry-content .kv-faq {
	margin: 4px 0 8px;
	interpolate-size: allow-keywords; /* 支援的瀏覽器可動畫展開到 auto 高度 */
}
.single-post .entry-content .kv-faq details {
	background: #fff;
	border: 1px solid var(--kv-line);
	border-radius: 14px;
	margin: 0 0 12px;
	overflow: hidden;
	transition: border-color .25s ease, box-shadow .25s ease;
}
.single-post .entry-content .kv-faq details:hover {
	border-color: rgba(174, 108, 220, .45);
}
.single-post .entry-content .kv-faq details[open] {
	border-color: rgba(174, 108, 220, .55);
	box-shadow: 0 12px 30px rgba(24, 0, 39, .10);
}
.single-post .entry-content .kv-faq summary {
	display: flex;
	align-items: center;
	gap: 14px;
	position: relative;
	padding: 18px 56px 18px 20px;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	font-size: 16.5px;
	line-height: 1.6;
	color: var(--kv-ink);
	transition: background-color .2s ease;
}
.single-post .entry-content .kv-faq summary:hover {
	background: #fcfaff;
}
.single-post .entry-content .kv-faq summary::-webkit-details-marker {
	display: none;
}
/* Q 徽章 */
.single-post .entry-content .kv-faq summary::before {
	content: "Q";
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	border-radius: 9px;
	background: var(--kv-grad);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}
/* 右側箭頭，展開時旋轉 */
.single-post .entry-content .kv-faq summary::after {
	content: "";
	position: absolute;
	right: 24px;
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--kv-purple);
	border-bottom: 2px solid var(--kv-purple);
	transform: translateY(-70%) rotate(45deg);
	transition: transform .3s ease;
}
.single-post .entry-content .kv-faq details[open] summary::after {
	transform: translateY(-30%) rotate(225deg);
}
.single-post .entry-content .kv-faq .kv-faq__a {
	margin: 0;
	padding: 2px 24px 20px 62px;
	font-size: 15.5px;
	line-height: 1.85;
	color: var(--kv-text);
}
/* 展開／收合動畫（支援 ::details-content 的瀏覽器） */
.single-post .entry-content .kv-faq details::details-content {
	opacity: 0;
	block-size: 0;
	overflow: hidden;
	transition: block-size .35s ease, opacity .3s ease, content-visibility .35s allow-discrete;
}
.single-post .entry-content .kv-faq details[open]::details-content {
	opacity: 1;
	block-size: auto;
}

/* ---------- 表格 ---------- */
.single-post .entry-content .wp-block-table {
	overflow-x: auto;
}
.single-post .entry-content .wp-block-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--kv-line);
	border-radius: 14px;
	overflow: hidden;
}
.single-post .entry-content .wp-block-table th {
	background: var(--kv-ink);
	color: #fff;
	font-weight: 600;
	text-align: left;
	padding: 13px 18px;
	font-size: 15px;
	border: 0;
}
.single-post .entry-content .wp-block-table td {
	padding: 13px 18px;
	font-size: 15px;
	line-height: 1.75;
	border: 0;
	border-top: 1px solid var(--kv-line);
	vertical-align: top;
}
.single-post .entry-content .wp-block-table tbody tr:nth-child(even) td {
	background: #faf7fd;
}
.single-post .entry-content .wp-block-table figcaption {
	margin-top: 10px;
	font-size: 13px;
	color: #8a8483;
	text-align: left;
}

/* ---------- 程式碼框與 Prompt 範本 ---------- */
.single-post .entry-content .wp-block-code {
	background: linear-gradient(160deg, #221136, var(--kv-ink));
	border: 1px solid rgba(205, 146, 248, .28);
	border-radius: 14px;
	padding: 24px 26px;
	color: #efe7f7;
}
.single-post .entry-content .wp-block-code code {
	background: transparent;
	color: inherit;
	font-size: 14.5px;
	line-height: 1.95;
	white-space: pre-wrap;
	padding: 0;
}
.single-post .entry-content .kv-prompt {
	position: relative;
	padding-top: 50px;
}
.single-post .entry-content .kv-prompt::before {
	content: "PROMPT 範本";
	position: absolute;
	top: 17px;
	left: 26px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .24em;
	color: var(--kv-aqua);
}

/* ---------- 文末 CTA v3（動態極光背景） ---------- */
.single-post .entry-content .kv-cta-v3 {
	position: relative;
	overflow: hidden;
	margin: 48px 0 24px;
	padding: 44px 40px 22px;
	border-radius: 20px;
	background: linear-gradient(150deg, #2e1850 0%, #1d0a38 52%, #251043 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 18px 50px rgba(24, 0, 39, .18);
	color: #efeaf6;
}
/* 兩顆緩慢漂移的光暈（極光感） */
.single-post .entry-content .kv-cta-v3::before,
.single-post .entry-content .kv-cta-v3::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(46px);
	will-change: transform;
}
.single-post .entry-content .kv-cta-v3::before {
	width: 460px;
	height: 460px;
	right: -130px;
	top: -170px;
	background: radial-gradient(circle, rgba(141, 211, 221, .55) 0%, rgba(141, 211, 221, .18) 45%, transparent 68%);
	animation: kv-aurora-a 14s ease-in-out infinite alternate;
}
.single-post .entry-content .kv-cta-v3::after {
	width: 520px;
	height: 520px;
	left: -160px;
	bottom: -220px;
	background: radial-gradient(circle, rgba(205, 146, 248, .5) 0%, rgba(205, 146, 248, .16) 45%, transparent 68%);
	animation: kv-aurora-b 18s ease-in-out infinite alternate;
}
@keyframes kv-aurora-a {
	0%   { transform: translate(0, 0) scale(1); }
	100% { transform: translate(-90px, 70px) scale(1.22); }
}
@keyframes kv-aurora-b {
	0%   { transform: translate(0, 0) scale(1); }
	100% { transform: translate(80px, -60px) scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
	.single-post .entry-content .kv-cta-v3::before,
	.single-post .entry-content .kv-cta-v3::after {
		animation: none;
	}
}
/* 內容浮在光暈之上 */
.single-post .entry-content .kv-cta-v3 > * {
	position: relative;
	z-index: 1;
}
.single-post .entry-content .kv-cta-v3__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--kv-aqua);
}
.single-post .entry-content .kv-cta-v3__title {
	margin: 0 0 12px;
	font-size: 26px;
	line-height: 1.4;
	color: #fff;
}
.single-post .entry-content .kv-cta-v3__desc {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.75;
	color: rgba(239, 234, 246, .78);
}
.single-post .entry-content .kv-cta-v3__item {
	padding: 22px 0;
}
.single-post .entry-content .kv-cta-v3__item + .kv-cta-v3__item {
	border-top: 1px solid rgba(255, 255, 255, .13);
}
.single-post .entry-content .kv-cta-v3__item h4 {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
	color: #fff;
}
.single-post .entry-content .kv-cta-v3__item p {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.75;
	color: rgba(239, 234, 246, .72);
}
.single-post .entry-content a.kv-cta-v3__link {
	color: var(--kv-aqua);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(141, 211, 221, .45);
	padding-bottom: 2px;
	transition: color .2s ease, border-color .2s ease;
}
.single-post .entry-content a.kv-cta-v3__link:hover {
	color: #fff;
	border-color: #fff;
}
.single-post .entry-content a.kv-cta-v3__btn {
	display: inline-block;
	background: var(--kv-grad);
	color: var(--kv-ink);
	font-weight: 700;
	font-size: 15px;
	padding: 12px 28px;
	border-radius: 999px;
	text-decoration: none;
	transition: filter .2s ease, transform .2s ease;
}
.single-post .entry-content a.kv-cta-v3__btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: var(--kv-ink);
}

/* ---------- 行動裝置 ---------- */
@media (max-width: 689.98px) {
	.single-post .entry-content .kv-guide {
		padding: 24px 22px 22px;
	}
	.single-post .entry-content .kv-guide li {
		padding-left: 38px;
	}
	.single-post .entry-content .kv-cta-v3 {
		padding: 34px 24px 14px;
	}
	.single-post .entry-content .kv-cta-v3__title {
		font-size: 22px;
	}
	.single-post .entry-content .kv-faq summary {
		padding: 16px 46px 16px 16px;
		gap: 12px;
		font-size: 15.5px;
	}
	.single-post .entry-content .kv-faq summary::after {
		right: 18px;
	}
	.single-post .entry-content .kv-faq .kv-faq__a {
		padding: 2px 18px 18px 56px;
	}
	.single-post .entry-content .kv-prompt::before {
		left: 22px;
	}
	.single-post .entry-content .wp-block-code {
		padding: 20px 22px;
	}
	.single-post .entry-content .kv-prompt {
		padding-top: 46px;
	}
}
