/* ==========================================================================
   Single blog post (single.php) — loaded on single posts only, see
   sty_enqueue_assets() in inc/setup.php. The shared blog card hovers
   (related posts) live in assets/css/pages/blog.css.
   Hover colours: meta pills (green / saffron / terracotta), share buttons
   (each in its own brand colour), author card, previous (green) and next
   (saffron) article links.
   ========================================================================== */
.single-post-section { padding-top: 48px; }

/* ---- Breadcrumb ---- */
.breadcrumb-row.post-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 22px;
	font-size: 0.88rem;
	color: var(--color-text-light);
}
.breadcrumb-row.post-breadcrumb a {
	color: var(--color-primary);
	font-weight: 600;
	padding-bottom: 2px;
	background-image: linear-gradient(var(--color-secondary), var(--color-secondary));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 2px;
	transition: color var(--transition), background-size 300ms ease;
}
.breadcrumb-row.post-breadcrumb a:hover,
.breadcrumb-row.post-breadcrumb a:focus-visible {
	color: var(--color-secondary-dark);
	background-size: 100% 2px;
}
.post-breadcrumb-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.post-title {
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.15;
	margin: 14px 0 22px;
}

/* ---- Meta pills: each fills with its own colour on hover ---- */
.post-meta-row { gap: 10px; margin-bottom: 34px; font-size: 0.86rem; }
.post-meta-row .post-meta-pill {
	--pill-color: var(--color-primary);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 15px 7px 10px;
	border-radius: 999px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-text);
	font-weight: 500;
	white-space: nowrap;
	cursor: default;
	transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.post-meta-row .post-meta-pill--author { --pill-color: var(--color-secondary); }
.post-meta-row .post-meta-pill--read { --pill-color: var(--accent-terracotta); }
.post-meta-pill svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--pill-color);
	transition: color var(--transition);
}
.post-meta-row .post-meta-avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72rem;
	font-weight: 700;
	color: #fff;
	background: var(--pill-color);
	transition: background var(--transition), color var(--transition);
}
.post-meta-row .post-meta-pill:hover {
	background: var(--pill-color);
	border-color: var(--pill-color);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}
.post-meta-pill:hover svg { color: #fff; }
.post-meta-row .post-meta-pill:hover .post-meta-avatar { background: #fff; color: var(--pill-color); }

/* ---- Featured image: slow zoom + soft shade on hover ---- */
.post-hero-image { position: relative; margin-bottom: 44px; }
.post-hero-image img { display: block; transition: transform 700ms ease; }
.post-hero-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(30, 63, 54, 0.35));
	opacity: 0;
	pointer-events: none;
	transition: opacity 400ms ease;
}
.post-hero-image:hover img { transform: scale(1.04); }
.post-hero-image:hover::after { opacity: 1; }

/* ---- Article body ---- */
.post-body { font-size: 1.08rem; line-height: 1.85; color: var(--color-text); }
.post-body > p:first-of-type { font-size: 1.18rem; color: var(--color-primary-dark); }
.post-body > p:first-of-type::first-letter {
	float: left;
	margin: 6px 12px 0 0;
	font-family: var(--font-heading);
	font-size: 3.6em;
	font-weight: 700;
	line-height: 0.9;
	color: var(--color-primary);
}
.post-body a {
	color: var(--color-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(217, 138, 61, 0.5);
	text-underline-offset: 3px;
	transition: color var(--transition), text-decoration-color var(--transition);
}
.post-body a:hover { color: var(--color-secondary-dark); text-decoration-color: var(--color-secondary); }
.post-body h2,
.post-body h3 { position: relative; padding-left: 16px; }
.post-body h2::before,
.post-body h3::before {
	content: '';
	position: absolute;
	left: 0; top: 0.2em; bottom: 0.2em;
	width: 4px;
	border-radius: 4px;
	background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
}
.post-body blockquote {
	margin: 2em 0;
	padding: 22px 26px;
	border-left: 4px solid var(--color-secondary);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	background: var(--color-bg-alt);
	font-family: var(--font-heading);
	font-size: 1.2rem;
	color: var(--color-primary-dark);
}
.post-body ul,
.post-body ol { padding-left: 1.3em; margin-bottom: 1.5em; }
.post-body li { margin-bottom: 0.5em; }
.post-body li::marker { color: var(--color-secondary); }

/* ---- Footer: tag + share buttons (each hovers in its brand colour) ---- */
.post-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-top: 40px;
	padding: 22px 0;
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
}
.post-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(47, 93, 80, 0.1);
	color: var(--color-primary-dark);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: default;
	transition: background var(--transition), color var(--transition);
}
.post-tag svg { width: 14px; height: 14px; }
.post-tag:hover { background: var(--color-primary); color: #fff; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-share-label { margin-right: 4px; font-size: 0.85rem; font-weight: 600; color: var(--color-text-light); }
.share-btn {
	--share: var(--color-primary);
	position: relative;
	width: 42px;
	height: 42px;
	padding: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-primary-dark);
	cursor: pointer;
	transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.share-btn[hidden] { display: none; }
.share-btn svg { width: 18px; height: 18px; }
.share-btn--facebook { --share: #1877f2; }
.share-btn--whatsapp { --share: #25d366; }
.share-btn--x        { --share: #111111; }
.share-btn--copy     { --share: var(--color-secondary); }
.share-btn:hover,
.share-btn:focus-visible {
	background: var(--share);
	border-color: var(--share);
	color: #fff;
	transform: translateY(-3px) rotate(-6deg);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
	outline: none;
}
.share-btn.is-copied { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.share-btn.is-copied::after {
	content: 'Copied!';
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 9px;
	border-radius: 6px;
	background: var(--color-primary-dark);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	white-space: nowrap;
}

/* ---- Author card ---- */
.post-author-box {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	margin-top: 32px;
	padding: 24px 26px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.post-author-box .brand-mark { width: 56px; height: 56px; font-size: 1.6rem; transition: transform 600ms ease; }
.post-author-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-secondary-dark);
}
.post-author-box strong {
	display: block;
	margin: 2px 0 6px;
	font-family: var(--font-heading);
	font-size: 1.2rem;
	color: var(--color-primary-dark);
}
.post-author-box p { margin: 0; font-size: 0.93rem; color: var(--color-text-light); }
.post-author-box:hover { border-color: rgba(47, 93, 80, 0.4); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-author-box:hover .brand-mark { transform: rotate(360deg); }

/* ---- Previous (green) / next (saffron) article ---- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.post-nav-link {
	--nav: var(--color-primary);
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 22px;
	border-radius: var(--radius-md);
	background: var(--color-bg-alt);
	color: var(--color-primary-dark);
	transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.post-nav-link--next { --nav: var(--color-secondary); grid-column: 2; text-align: right; }
.post-nav-dir {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--nav);
	transition: color var(--transition);
}
.post-nav-link strong { font-family: var(--font-heading); font-size: 1.02rem; line-height: 1.35; }
.post-nav-link:hover { background: var(--nav); color: #fff; box-shadow: var(--shadow-md); }
.post-nav-link:hover .post-nav-dir { color: rgba(255, 255, 255, 0.85); }
.post-nav-link--prev:hover { transform: translateX(-4px); }
.post-nav-link--next:hover { transform: translateX(4px); }

/* ---- Related posts heading ---- */
.related-posts h2 { position: relative; padding-bottom: 16px; margin-bottom: 30px; }
.related-posts h2::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 64px;
	height: 3px;
	border-radius: 3px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

@media (max-width: 780px) {
	.single-post-section { padding-top: 32px; }
	.post-body { font-size: 1rem; }
	.post-body > p:first-of-type { font-size: 1.08rem; }
	.post-footer { flex-direction: column; align-items: flex-start; }
	.post-author-box { flex-direction: column; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-link--next { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.post-hero-image img,
	.post-author-box .brand-mark,
	.share-btn,
	.post-nav-link,
	.post-meta-row .post-meta-pill { transition: none; }
	.post-hero-image:hover img,
	.post-author-box:hover .brand-mark { transform: none; }
}

/* ---- Print: just the article ---- */
@media print {
	.site-header, .site-footer, .post-share, .post-nav, .related-posts, .section--alt, #comments, .comments-area { display: none !important; }
}
