/* =========================================================
   Custom single post layout
   Hero / TOC + Content + Related Content / Author / Related
   ========================================================= */

:root {
	--gpc-primary: #16305c;
	--gpc-accent-bg: #eaf2ff;
	--gpc-accent-text: #1856c4;
	--gpc-text: #1f2733;
	--gpc-muted: #6b7684;
	--gpc-border: #e6e9ef;
	--gpc-card-bg: #ffffff;
	--gpc-surface: #f7f9fc;
	--gpc-radius: 12px;
	--gpc-radius-sm: 8px;
	--gpc-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
	--gpc-sticky-offset: 100px;
}

.gpc-single * {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

/* ---------- Hero ---------- */
.gpc-hero {
	display: flex;
	align-items: center;
	gap: 40px;
	background: var(--gpc-surface);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	padding: 32px 36px;
	margin-bottom: 40px;
}

.gpc-hero__inner {
	flex: 1;
	min-width: 0;
	margin: 0;
}

@media (max-width: 782px) {
	.gpc-hero {
		flex-direction: column;
		align-items: stretch;
		padding: 24px 20px;
	}
}

.gpc-badge {
	display: inline-block;
	background: var(--gpc-accent-bg);
	color: var(--gpc-accent-text);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 16px;
}

.gpc-badge:hover {
	text-decoration: underline;
}

/* Breadcrumb */
.gpc-breadcrumb {
	margin-bottom: 14px;
}

.gpc-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: var(--gpc-muted);
}

.gpc-breadcrumb li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.gpc-breadcrumb a {
	color: var(--gpc-muted);
	text-decoration: none;
}

.gpc-breadcrumb a:hover {
	color: var(--gpc-accent-text);
	text-decoration: underline;
}

.gpc-breadcrumb [aria-current='page'] {
	color: var(--gpc-text);
	font-weight: 600;
}

.gpc-breadcrumb__sep {
	opacity: 0.5;
}

/* Featured Snippet / Quick Answer box */
.gpc-quick-answer {
	background: var(--gpc-accent-bg);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	padding: 18px 20px;
	margin: 20px 0 0;
}

.gpc-quick-answer__label {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--gpc-primary);
}

.gpc-quick-answer__intro {
	margin: 0 0 10px;
	font-size: 15px;
	color: var(--gpc-text);
}

.gpc-quick-answer__list {
	margin: 0;
	padding-left: 20px;
}

.gpc-quick-answer__list li {
	margin-bottom: 8px;
	font-size: 14.5px;
	color: var(--gpc-text);
	line-height: 1.6;
}

.gpc-quick-answer__list li:last-child {
	margin-bottom: 0;
}

.gpc-hero__title {
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.2;
	font-weight: 700;
	color: var(--gpc-text);
	margin: 0 0 16px;
}

.gpc-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--gpc-muted);
	margin-bottom: 16px;
}

.gpc-hero__author {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.gpc-hero__author img {
	border-radius: 50%;
	width: 28px;
	height: 28px;
}

.gpc-hero__author a {
	color: var(--gpc-text);
	font-weight: 600;
	text-decoration: none;
}

.gpc-hero__dot {
	opacity: 0.6;
}

.gpc-share {
	display: flex;
	gap: 8px;
}

.gpc-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--gpc-surface);
	color: var(--gpc-primary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--gpc-border);
}

.gpc-share__link:hover {
	background: var(--gpc-accent-bg);
}

.gpc-hero__image {
	flex: 0 0 380px;
}

.gpc-hero__image img {
	width: 100%;
	display: block;
	border-radius: var(--gpc-radius);
	box-shadow: var(--gpc-shadow);
}

@media (max-width: 782px) {
	.gpc-hero__image {
		flex-basis: auto;
	}
}

/* ---------- Content + Sidebar layout ---------- */
.gpc-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	max-width: 1160px;
	margin: 0 auto;
	align-items: start;
}

@media (min-width: 1024px) {
	.gpc-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
	}
}

.gpc-content {
	max-width: 780px;
	color: var(--gpc-text);
	line-height: 1.75;
	font-size: 16px;
}

.gpc-content h2,
.gpc-content h3 {
	scroll-margin-top: var(--gpc-sticky-offset);
}

.gpc-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--gpc-radius-sm);
}

.gpc-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
}

.gpc-content table th,
.gpc-content table td {
	border: 1px solid var(--gpc-border);
	padding: 10px 12px;
	text-align: left;
}

/* ---------- Sidebar ---------- */
.gpc-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

@media (min-width: 1024px) {
	.gpc-sidebar {
		position: sticky;
		top: var(--gpc-sticky-offset);
		max-height: calc(100vh - var(--gpc-sticky-offset) - 24px);
		overflow-y: auto;
	}
}

.gpc-box {
	background: var(--gpc-surface);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	overflow: hidden;
}

.gpc-box__title {
	display: block;
	background: var(--gpc-accent-bg);
	color: var(--gpc-primary);
	font-size: 15px;
	font-weight: 700;
	padding: 14px 18px;
	margin: 0;
	cursor: pointer;
}

.gpc-toc summary::-webkit-details-marker {
	display: none;
}

.gpc-toc__list {
	list-style: none;
	margin: 0;
	padding: 12px 18px 18px;
}

.gpc-toc__item {
	margin: 0 0 4px;
	font-size: 14px;
	border-left: 2px solid transparent;
	border-radius: 4px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gpc-toc__item a {
	display: block;
	padding: 6px 10px;
}

.gpc-toc__item--h3 a {
	padding-left: 24px;
}

.gpc-toc__item a {
	color: var(--gpc-muted);
	text-decoration: none;
}

.gpc-toc__item a:hover {
	color: var(--gpc-accent-text);
}

.gpc-toc__item.is-current {
	background: var(--gpc-accent-bg);
	border-left-color: var(--gpc-accent-text);
}

.gpc-toc__item a.is-active {
	color: var(--gpc-accent-text);
	font-weight: 700;
}

.gpc-toc__empty {
	font-size: 13px;
	color: var(--gpc-muted);
	list-style: none;
}

/* Related Content box (in sidebar) */
.gpc-related-box__list {
	list-style: none;
	margin: 0;
	padding: 10px 18px 18px;
}

.gpc-related-box__item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 0;
	text-decoration: none;
	border-bottom: 1px solid var(--gpc-border);
}

.gpc-related-box__list li:last-child .gpc-related-box__item {
	border-bottom: none;
}

.gpc-related-box__thumb img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: var(--gpc-radius-sm);
	display: block;
}

.gpc-related-box__title {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--gpc-text);
	line-height: 1.4;
}

.gpc-related-box__date {
	display: block;
	font-size: 12px;
	color: var(--gpc-muted);
	margin-top: 4px;
}

/* ---------- Author box ---------- */
.gpc-author-box {
	max-width: 780px;
	margin: 48px 0 0;
	display: flex;
	gap: 20px;
	background: var(--gpc-surface);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	padding: 24px;
}

.gpc-author-box__avatar img {
	border-radius: 50%;
	width: 64px;
	height: 64px;
}

.gpc-author-box__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--gpc-muted);
	margin: 0 0 4px;
}

.gpc-author-box__name {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
}

.gpc-author-box__name a {
	color: var(--gpc-text);
	text-decoration: none;
}

.gpc-author-box__bio {
	margin: 0;
	color: var(--gpc-muted);
	font-size: 14.5px;
	line-height: 1.6;
}

/* ---------- Related Articles ---------- */
.gpc-related-articles {
	max-width: 1160px;
	margin: 56px auto 0;
	padding: 32px 0;
}

.gpc-related-articles__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.gpc-related-articles__head h2 {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
}

.gpc-related-articles__nav {
	display: flex;
	gap: 8px;
}

.gpc-arrow {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--gpc-border);
	background: var(--gpc-card-bg);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--gpc-primary);
}

.gpc-arrow:hover {
	background: var(--gpc-accent-bg);
}

.gpc-related-articles__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 260px;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	scrollbar-width: thin;
}

.gpc-card {
	scroll-snap-align: start;
	background: var(--gpc-card-bg);
	border: 1px solid var(--gpc-border);
	border-radius: var(--gpc-radius);
	overflow: hidden;
	box-shadow: var(--gpc-shadow);
}

.gpc-card__image {
	position: relative;
	display: block;
}

.gpc-card__image img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}

.gpc-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--gpc-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}

.gpc-card__body {
	padding: 14px 16px 18px;
}

.gpc-card__date {
	font-size: 12px;
	color: var(--gpc-muted);
	margin: 0 0 6px;
}

.gpc-card__title {
	font-size: 15px;
	line-height: 1.4;
	margin: 0 0 10px;
}

.gpc-card__title a {
	color: var(--gpc-text);
	text-decoration: none;
}

.gpc-card__link {
	font-size: 13px;
	font-weight: 600;
	color: var(--gpc-accent-text);
	text-decoration: none;
}

@media (max-width: 640px) {
	.gpc-author-box {
		flex-direction: column;
		align-items: flex-start;
	}
}
