/**
 * Single Post — 프론트엔드 스타일
 *
 * 각 섹션(.hc-key-answer, .hc-tldr, .hc-related, .hc-cta)은
 * 독립된 클래스로 분리되어 개별 디자인 수정이 가능합니다.
 */

/* =============================================================================
   3컬럼 레이아웃: [TOC] | [콘텐츠] | [홍보 위젯]
   ============================================================================= */

.hc-single-layout {
	display: grid !important;
	grid-template-columns: 300px 800px 300px !important;
	gap: 0 !important;
	width: 100% !important;
	max-width: 1400px !important;
	margin: 0 auto !important;
	padding: 40px 0 80px !important;
	box-sizing: border-box !important;
	align-items: start;
}

/* 사이드바 없을 때 */
.hc-single-layout:not(.hc-has-sidebar) {
	grid-template-columns: 300px 800px 300px !important;
}

/* 좌우 사이드바 overflow 방지 */
.hc-toc-sidebar,
.hc-promo-sidebar {
	overflow: hidden;
	min-width: 0;
}

.hc-single-wrap {
	min-width: 0;
	padding: 0 20px;
	box-sizing: border-box;
}

.hc-single {
	font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", sans-serif;
	color: #191F28;
	line-height: 1.8;
}

/* =============================================================================
   좌측 사이드바 — 목차 (TOC)
   ============================================================================= */

.hc-toc-sidebar {
	position: sticky;
	top: 80px;
	padding: 0 20px 0 0;
	width: 300px;
	box-sizing: border-box;
}

.hc-toc {
	background: #F8F9FA;
	border: 1px solid #E5E8EB;
	border-radius: 12px;
	padding: 20px 22px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hc-toc-heading {
	font-size: 13px;
	font-weight: 700;
	color: #4E5968;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 12px;
	padding: 0;
}

.hc-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hc-toc-list li {
	margin-bottom: 6px;
}

.hc-toc-link {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #8B95A1;
	text-decoration: none;
	padding: 4px 0 4px 12px;
	border-left: 2px solid transparent;
	transition: all 0.2s;
	line-height: 1.4;
	word-break: keep-all;
}

.hc-toc-link:hover,
.hc-toc-link.is-active {
	color: #0064FF;
	border-left-color: #0064FF;
}

/* =============================================================================
   우측 사이드바 — 홍보 위젯
   ============================================================================= */

.hc-promo-sidebar {
	position: sticky;
	top: 80px;
	padding: 0 0 0 20px;
	width: 300px;
	box-sizing: border-box;
}

.hc-promo-widget {
	background: #FFFFFF;
	border: 1px solid #E5E8EB;
	border-radius: 12px;
	overflow: hidden;
	text-align: center;
}

.hc-promo-thumb {
	overflow: hidden;
}

.hc-promo-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.hc-promo-title {
	font-size: 15px;
	font-weight: 700;
	color: #191F28;
	margin: 16px 16px 12px;
	line-height: 1.4;
	word-break: keep-all;
}

.hc-promo-btn {
	display: block;
	margin: 0 16px 16px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	color: #FFFFFF !important;
	background: #0064FF;
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.2s;
}

.hc-promo-btn:hover {
	background: #191F28;
	color: #FFFFFF !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =============================================================================
   메타 (카테고리 + 날짜)
   ============================================================================= */

.hc-single-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.hc-single-cat {
	display: inline-block;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 600;
	color: #0064FF;
	background: #EBF3FF;
	border-radius: 20px;
	text-decoration: none;
	transition: background 0.2s;
}

.hc-single-cat:hover {
	background: #D4E5FF;
	color: #0064FF;
}

.hc-single-date {
	font-size: 13px;
	color: #8B95A1;
}

/* =============================================================================
   제목
   ============================================================================= */

.hc-single-title {
	font-size: 32px;
	font-weight: 800;
	line-height: 1.35;
	color: #191F28;
	margin: 0 0 28px;
	letter-spacing: -0.5px;
	word-break: keep-all;
}

/* =============================================================================
   핵심 답변
   ============================================================================= */

.hc-key-answer {
	background: linear-gradient(135deg, #EBF3FF 0%, #F0F7FF 100%);
	border-left: 4px solid #0064FF;
	border-radius: 0 12px 12px 0;
	padding: 20px 24px;
	margin-bottom: 28px;
}

.hc-key-answer p {
	font-size: 16px;
	font-weight: 500;
	color: #1B3A5C;
	line-height: 1.7;
	margin: 0;
}

/* =============================================================================
   3줄 요약
   ============================================================================= */

.hc-tldr {
	background: #F8F9FA;
	border: 1px solid #E5E8EB;
	border-radius: 12px;
	padding: 24px 28px;
	margin-bottom: 36px;
}

.hc-tldr-title {
	font-size: 15px;
	font-weight: 700;
	color: #4E5968;
	margin: 0 0 14px;
	padding: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.hc-tldr-list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: tldr;
}

.hc-tldr-list li {
	position: relative;
	padding-left: 32px;
	margin-bottom: 10px;
	font-size: 15px;
	font-weight: 500;
	color: #333D4B;
	line-height: 1.6;
	counter-increment: tldr;
}

.hc-tldr-list li:last-child {
	margin-bottom: 0;
}

.hc-tldr-list li::before {
	content: counter(tldr);
	position: absolute;
	left: 0;
	top: 2px;
	width: 22px;
	height: 22px;
	background: #0064FF;
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 400;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* =============================================================================
   본문
   ============================================================================= */

.hc-single-content {
	margin-bottom: 48px;
}

.hc-single-content h2 {
	font-size: 24px;
	font-weight: 700;
	color: #191F28;
	margin: 40px 0 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid #F2F4F6;
}

.hc-single-content h3 {
	font-size: 19px;
	font-weight: 600;
	color: #333D4B;
	margin: 32px 0 12px;
}

.hc-single-content p {
	font-size: 16px;
	color: #4E5968;
	margin: 0 0 16px;
}

.hc-single-content ul,
.hc-single-content ol {
	padding-left: 24px;
	margin: 0 0 20px;
}

.hc-single-content li {
	font-size: 15px;
	color: #4E5968;
	margin-bottom: 6px;
	line-height: 1.7;
}

.hc-single-content code {
	background: #F2F4F6;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 14px;
	color: #D6336C;
}

.hc-single-content blockquote {
	border-left: 3px solid #0064FF;
	background: #F8F9FA;
	margin: 20px 0;
	padding: 16px 20px;
	border-radius: 0 8px 8px 0;
}

.hc-single-content blockquote p {
	color: #333D4B;
	font-style: italic;
}

/* =============================================================================
   관련글
   ============================================================================= */

.hc-related {
	margin-bottom: 40px;
	padding-top: 40px;
	border-top: 1px solid #E5E8EB;
}

.hc-related-title {
	font-size: 18px;
	font-weight: 700;
	color: #191F28;
	margin: 0 0 20px;
}

.hc-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.hc-related-card {
	display: block;
	background: #FFFFFF;
	border: 1px solid #E5E8EB;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	transition: all 0.2s;
}

.hc-related-card:hover {
	border-color: #0064FF;
	box-shadow: 0 4px 16px rgba(0, 100, 255, 0.1);
	transform: translateY(-2px);
}

.hc-related-thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.hc-related-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.hc-related-card:hover .hc-related-thumb img {
	transform: scale(1.05);
}

.hc-related-info {
	padding: 14px 16px;
}

.hc-related-card-title {
	font-size: 14px;
	font-weight: 600;
	color: #333D4B;
	margin: 0 0 6px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hc-related-date {
	font-size: 12px;
	color: #8B95A1;
}

/* =============================================================================
   용어 정리
   ============================================================================= */

.hc-glossary {
	margin-bottom: 32px;
}

.hc-glossary-label {
	font-size: 14px;
	font-weight: 700;
	color: #4E5968;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid #E5E8EB;
}

.hc-glossary-item {
	background: #FFFFFF;
	border: 1px solid #E5E8EB;
	border-radius: 8px;
	padding: 18px 22px;
	margin-bottom: 10px;
	transition: border-color 0.2s;
}

.hc-glossary-item:hover {
	border-color: #D4E5FF;
}

.hc-glossary-item:last-child {
	margin-bottom: 0;
}

.hc-glossary-term {
	font-size: 15px;
	font-weight: 700;
	color: #191F28;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.hc-glossary-term::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	background: #0064FF;
	border-radius: 50%;
	flex-shrink: 0;
}

.hc-glossary-row {
	display: flex;
	gap: 10px;
	margin-bottom: 6px;
	line-height: 1.75;
}

.hc-glossary-row:last-child {
	margin-bottom: 0;
}

.hc-glossary-row-label {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	color: #8B95A1;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-top: 2px;
	min-width: 62px;
}

.hc-glossary-row-text {
	font-size: 14px;
	color: #4E5968;
}

.hc-glossary-easy-row .hc-glossary-row-label {
	color: #0064FF;
}

.hc-glossary-easy-row .hc-glossary-row-text {
	color: #333D4B;
	font-weight: 500;
}

/* =============================================================================
   CTA
   ============================================================================= */

.hc-cta {
	background: #F8F9FA;
	border: 1px solid #E5E8EB;
	border-radius: 12px;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.hc-cta-title {
	font-size: 14px;
	font-weight: 700;
	color: #4E5968;
	margin: 0 0 12px;
	letter-spacing: 0.3px;
}

.hc-cta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	background: #FFFFFF;
	border-radius: 8px;
	margin-bottom: 6px;
	transition: box-shadow 0.2s;
}

.hc-cta-row:last-child {
	margin-bottom: 0;
}

.hc-cta-row:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hc-cta-text {
	font-size: 15px;
	font-weight: 500;
	color: #333D4B;
}

.hc-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--color-primary, #0064FF) !important;
	background: none;
	border: none;
	border-radius: 0;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s;
}

.hc-cta-btn svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s;
}

.hc-cta-btn:hover {
	color: var(--color-primary-hover, #0050CC) !important;
	background: none;
	transform: none;
	box-shadow: none;
}

.hc-cta-btn:hover svg {
	transform: translateX(2px);
}

/* =============================================================================
   GEO 레이아웃 — AI 인용 최적화 (FAQ / 용어집)
   1컬럼 클린 구조, h2 + p 중심, 최대 720px
   ============================================================================= */

.hc-geo-layout {
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 40px 20px 80px;
	box-sizing: border-box;
}

.hc-geo-wrap {
	width: 100%;
	max-width: 720px;
}

.hc-geo-article .hc-single-title {
	font-size: 28px;
	margin-bottom: 24px;
}

/* GEO 요약 블럭 — AI 인용에 최적화된 스타일 */
.hc-geo-summary {
	background: linear-gradient(135deg, #F0F7FF 0%, #F8FBFF 100%);
	border: 1px solid #D4E5FF;
	border-left: 4px solid #0064FF;
	border-radius: 0 12px 12px 0;
	padding: 24px 28px;
	margin-bottom: 40px;
}

.hc-geo-summary .hc-tldr-title {
	color: #0064FF;
	font-size: 14px;
	margin-bottom: 12px;
}

/* GEO 본문 — h2 + p 클린 구조 강조 */
.hc-geo-content h2 {
	font-size: 22px;
	font-weight: 700;
	color: #191F28;
	margin: 36px 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #F2F4F6;
}

.hc-geo-content h2:first-child {
	margin-top: 0;
}

.hc-geo-content p {
	font-size: 16px;
	color: #4E5968;
	line-height: 1.8;
	margin: 0 0 24px;
}

/* =============================================================================
   반응형
   ============================================================================= */

/* =============================================================================
   반응형 — 태블릿 (사이드바 숨김, 1컬럼)
   ============================================================================= */

/* =============================================================================
   반응형 — 태블릿 (1024px 이하)
   ============================================================================= */

@media (max-width: 1024px) {
	.hc-single-layout,
	.hc-single-layout:not(.hc-has-sidebar) {
		grid-template-columns: 1fr !important;
		max-width: 100% !important;
		gap: 0 !important;
		padding: 24px 20px 60px !important;
	}

	.hc-single-wrap {
		padding: 0;
		width: 100%;
		max-width: 760px;
		margin: 0 auto;
	}

	/* 목차 — collapsible */
	.hc-toc-sidebar {
		position: static;
		width: 100% !important;
		max-width: 760px;
		margin: 0 auto 20px;
		padding: 0;
	}

	.hc-toc {
		background: #F8F9FA;
		border: 1px solid #E5E8EB;
		border-radius: 10px;
		padding: 0;
		overflow: hidden;
	}

	.hc-toc-heading {
		margin: 0;
		padding: 14px 18px;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: space-between;
		user-select: none;
		-webkit-tap-highlight-color: transparent;
	}

	.hc-toc-heading::after {
		content: '';
		width: 8px;
		height: 8px;
		border-right: 2px solid #8B95A1;
		border-bottom: 2px solid #8B95A1;
		transform: rotate(45deg);
		transition: transform 0.2s;
		flex-shrink: 0;
	}

	.hc-toc.is-open .hc-toc-heading::after {
		transform: rotate(-135deg);
	}

	.hc-toc-list {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
		padding: 0 18px;
	}

	.hc-toc.is-open .hc-toc-list {
		max-height: 500px;
		padding: 0 18px 14px;
	}

	.hc-toc-link {
		padding: 5px 0 5px 12px;
		font-size: 13px;
	}

	/* 우측 위젯 — 하단 배치, 썸네일 제거 */
	.hc-promo-sidebar {
		position: static;
		order: 10;
		width: 100% !important;
		max-width: 760px;
		margin: 32px auto 0;
		padding: 0;
	}

	.hc-promo-widget {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		text-align: left;
		padding: 16px 20px;
	}

	.hc-promo-thumb {
		display: none;
	}

	.hc-promo-title {
		margin: 0;
		font-size: 14px;
		flex: 1;
	}

	.hc-promo-btn {
		display: inline-block;
		margin: 0;
		padding: 8px 16px;
		font-size: 13px;
		white-space: nowrap;
		flex-shrink: 0;
	}
}

/* =============================================================================
   반응형 — 모바일 (768px 이하)
   ============================================================================= */

@media (max-width: 768px) {
	/* GEO 레이아웃 */
	.hc-geo-layout {
		padding: 16px 16px 48px;
	}

	.hc-geo-article .hc-single-title {
		font-size: 22px;
	}

	.hc-geo-summary {
		padding: 20px 22px;
	}

	.hc-geo-content h2 {
		font-size: 19px;
	}

	/* 일반 레이아웃 */
	.hc-single-layout {
		padding: 16px 16px 48px !important;
	}

	.hc-single-wrap {
		max-width: 100%;
	}

	.hc-single-title {
		font-size: 22px;
		letter-spacing: -0.3px;
	}

	.hc-key-answer {
		padding: 16px 18px;
		border-radius: 0 10px 10px 0;
	}

	.hc-key-answer p {
		font-size: 15px;
	}

	.hc-tldr {
		padding: 18px 20px;
		border-radius: 10px;
	}

	.hc-tldr-title {
		font-size: 13px;
	}

	.hc-tldr-list li {
		font-size: 14px;
		padding-left: 28px;
	}

	.hc-tldr-list li::before {
		width: 20px;
		height: 20px;
		font-size: 11px;
	}

	/* 본문 타이포그래피 축소 */
	.hc-single-content h2 {
		font-size: 19px;
		margin: 32px 0 12px;
	}

	.hc-single-content h3 {
		font-size: 16px;
		margin: 24px 0 10px;
	}

	.hc-single-content p {
		font-size: 15px;
	}

	.hc-single-content li {
		font-size: 14px;
	}

	.hc-single-content code {
		font-size: 13px;
	}

	/* 관련글 — 가로형 카드 */
	.hc-related-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.hc-related-card {
		display: grid;
		grid-template-columns: 80px 1fr;
		border-radius: 10px;
	}

	.hc-related-thumb {
		aspect-ratio: 1;
		border-radius: 10px 0 0 10px;
		overflow: hidden;
	}

	.hc-related-info {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 10px 14px;
	}

	.hc-related-card-title {
		font-size: 13px;
	}

	/* 용어 정리 */
	.hc-glossary-label {
		font-size: 13px;
	}

	.hc-glossary-item {
		padding: 14px 16px;
		border-radius: 8px;
	}

	.hc-glossary-term {
		font-size: 14px;
	}

	.hc-glossary-row {
		flex-direction: column;
		gap: 2px;
	}

	.hc-glossary-row-label {
		min-width: auto;
		font-size: 11px;
	}

	.hc-glossary-row-text {
		font-size: 13px;
	}

	/* CTA */
	.hc-cta {
		padding: 14px 16px;
		border-radius: 10px;
	}

	.hc-cta-row {
		flex-direction: column;
		text-align: center;
		gap: 6px;
		padding: 10px 12px;
		border-radius: 8px;
	}

	.hc-cta-text {
		font-size: 14px;
	}

	.hc-cta-btn {
		width: 100%;
		justify-content: center;
		font-size: 13px;
	}

	/* 우측 위젯 — 하단 sticky */
	.hc-promo-sidebar {
		position: static;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0;
		padding: 0;
		order: unset;
	}

	.hc-promo-widget {
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		z-index: 999 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 12px !important;
		padding: 7px 16px !important;
		margin-bottom: 0 !important;
		border-radius: 0 !important;
		border: none !important;
		border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
		background: #191F28 !important;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
		text-align: left !important;
		overflow: hidden !important;
	}

	.hc-promo-title {
		font-size: 14px !important;
		font-weight: 600 !important;
		color: #FFFFFF !important;
		margin: 0 !important;
		flex: 1 !important;
	}

	.hc-promo-btn {
		padding: 6px 26px !important;
		font-size: 12px !important;
		font-weight: 400 !important;
		border-radius: 6px !important;
		flex-shrink: 0 !important;
		margin: 0 !important;
		display: inline-block !important;
	}

	/* CTA "바로 가기" 텍스트 숨김, 화살표만 표시 */
	.hc-cta-row {
		flex-direction: row;
		text-align: left;
		gap: 0;
		padding: 10px 14px;
		justify-content: space-between;
		align-items: center;
	}

	.hc-cta-text {
		font-size: 14px;
		flex: 1;
	}

	.hc-cta-btn {
		width: auto;
		justify-content: center;
		font-size: 0;
		gap: 0;
		padding: 8px;
	}

	.hc-cta-btn svg {
		width: 18px;
		height: 18px;
	}

	/* sticky 위젯 높이만큼 하단 여백 */
	.hc-single-layout {
		padding-bottom: 80px !important;
	}
}
