/**
 * Single blog post — purple clinical editorial (zarclinic tokens).
 */

.site-main--single-post {
	background:
		radial-gradient(ellipse 55% 40% at 100% 0%, rgba(245, 240, 248, 0.9), transparent 70%),
		linear-gradient(180deg, #fbfafc 0%, #ffffff 28%);
}

.c-single-post__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem);
	padding-block: calc(var(--header-height) + 1.5rem) clamp(3rem, 6vw, 5rem);
	align-items: start;
}

@media (min-width: 1024px) {
	.c-single-post__layout {
		grid-template-columns: minmax(0, 1fr) min(300px, 28%);
		gap: clamp(2rem, 3.5vw, 3rem);
	}
}

.c-single-post__breadcrumb {
	margin-block-end: 1rem;
}

.c-single-post__title {
	margin: 0 0 1.15rem;
	font-family: var(--font-heading);
	font-size: clamp(1.65rem, 3vw, 2.35rem);
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: var(--purple-dark);
	text-wrap: balance;
}

.c-single-post__thumb {
	margin: 0 0 1.25rem;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--bg-lavender);
	border: 1px solid var(--surface-border);
	box-shadow: var(--shadow-soft);
}

.c-single-post__thumb-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.c-single-post__thumb-caption {
	margin: 0;
	padding: 0.65rem 1rem;
	font-size: var(--text-sm);
	color: var(--text-muted);
	text-align: center;
	background: rgba(255, 255, 255, 0.72);
}

/* Byline */
.c-post-byline {
	margin-block-end: 1.5rem;
	padding: 0.95rem 1.05rem;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-soft);
}

.c-post-byline__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1.35rem;
}

.c-post-byline__item {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.c-post-byline__label {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--text-muted);
}

.c-post-byline__value {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-main);
}

.c-post-byline__value a {
	color: inherit;
	text-decoration: none;
}

.c-post-byline__value a:hover,
.c-post-byline__value a:focus-visible {
	color: var(--purple-deep);
}

.c-post-byline__author {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.c-post-byline__avatar {
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 50%;
	object-fit: cover;
}

.c-post-byline__item--badge {
	justify-content: flex-end;
}

/* Doctor medical review badge (drzarganj-style) */
.c-doctor-badge {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
	padding: 0.3rem 0.7rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: #047857;
	background: #ecfdf5;
	border: 1px solid rgba(4, 120, 87, 0.15);
	border-radius: 999px;
}

.c-doctor-badge__icon {
	font-size: 0.85rem;
	line-height: 1;
	font-weight: 800;
}

.c-doctor-badge__doctor {
	font-weight: 600;
	color: #065f46;
}

.c-doctor-badge__doctor::before {
	content: "·";
	margin-inline-end: 0.35rem;
	opacity: 0.55;
}

.c-doctor-badge__score {
	font-weight: 800;
	direction: ltr;
	unicode-bidi: isolate;
}

/* Prose */
.c-prose {
	font-size: clamp(0.95rem, 1.05vw, 1.05rem);
	line-height: 1.95;
	color: var(--text-main);
}

.c-prose > *:first-child {
	margin-block-start: 0;
}

.c-prose h2,
.c-prose h3,
.c-prose h4 {
	margin-block: 1.75rem 0.75rem;
	font-family: var(--font-heading);
	font-weight: 750;
	line-height: 1.4;
	color: var(--purple-dark);
}

.c-prose h2 {
	font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.c-prose h3 {
	font-size: clamp(1.1rem, 1.5vw, 1.25rem);
}

.c-prose p {
	margin-block: 0 1.1rem;
}

.c-prose ul,
.c-prose ol {
	margin: 0 0 1.15rem;
	padding-inline-start: 1.25rem;
}

.c-prose li + li {
	margin-block-start: 0.35rem;
}

.c-prose a {
	color: var(--purple-deep);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.c-prose img,
.c-prose figure img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-md);
}

.c-prose figure {
	margin: 1.5rem 0;
}

.c-prose figcaption,
.c-prose .wp-caption-text {
	margin-block-start: 0.5rem;
	font-size: var(--text-sm);
	color: var(--text-muted);
	text-align: center;
}

.c-prose blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.15rem;
	border-inline-start: 3px solid var(--purple-main);
	background: var(--bg-lavender);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	color: var(--purple-dark);
}

[dir='ltr'] .c-prose blockquote {
	border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* TOC */
.c-toc {
	margin: 0 0 1.5rem;
	padding: 1.1rem 1.2rem;
	background: linear-gradient(180deg, #ffffff 0%, var(--bg-lavender) 160%);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-soft);
}

.c-toc__title {
	display: block;
	margin-block-end: 0.65rem;
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--purple-dark);
}

.c-toc ol {
	margin: 0;
	padding-inline-start: 1.2rem;
}

.c-toc li + li {
	margin-block-start: 0.35rem;
}

.c-toc a {
	color: var(--text-main);
	text-decoration: none;
	font-size: 0.92rem;
	line-height: 1.55;
}

.c-toc a:hover,
.c-toc a:focus-visible {
	color: var(--purple-deep);
}

.c-toc__sub {
	list-style: circle;
}

/* Author */
.c-author-box {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	margin-block-start: 2rem;
	padding: 1.15rem 1.2rem;
	background: #fff;
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
}

.c-author-box__media {
	display: block;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	overflow: hidden;
	background: var(--bg-lavender);
}

.c-author-box__media--placeholder {
	background: linear-gradient(145deg, var(--bg-lavender), var(--purple-light));
}

.c-author-box__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.c-author-box__label {
	margin: 0 0 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--text-muted);
}

.c-author-box__name {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	font-weight: 800;
}

.c-author-box__name a {
	color: var(--purple-dark);
	text-decoration: none;
}

.c-author-box__bio {
	margin: 0 0 0.55rem;
	font-size: 0.88rem;
	line-height: 1.7;
	color: var(--text-muted);
}

.c-author-box__more {
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--purple-deep);
	text-decoration: none;
}

.c-author-box__more:hover {
	text-decoration: underline;
}

/* Related */
.c-related {
	margin-block-start: 2.5rem;
	padding-block-start: 2rem;
	border-block-start: 1px solid var(--surface-border);
}

.c-related__head {
	margin-block-end: 1.15rem;
}

.c-related__title {
	margin: 0;
	font-size: clamp(1.2rem, 2vw, 1.45rem);
	font-weight: 800;
	color: var(--purple-dark);
}

.c-related__lead {
	margin: 0.35rem 0 0;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.c-related__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--grid-gap);
}

@media (min-width: 700px) {
	.c-related__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.c-single-post__comments {
	margin-block-start: 2.5rem;
}

/* Comments */
.c-comments {
	margin-block-start: 0.5rem;
	padding: 1.35rem 1.35rem 1.45rem;
	background: #fff;
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
}

.c-comments__title {
	margin: 0 0 1.15rem;
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--purple-dark);
}

.c-comments__list {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.c-comments__list .children {
	list-style: none;
	margin: 0.85rem 0 0;
	padding: 0;
	padding-inline-start: 1rem;
	border-inline-start: 2px solid rgba(139, 91, 183, 0.14);
}

.c-comment {
	margin: 0 0 1rem;
}

.c-comment__body {
	padding: 1rem 1.05rem;
	background: var(--bg-mist);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-md);
}

.c-comment__header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-block-end: 0.75rem;
}

.c-comment__avatar {
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	overflow: hidden;
	border-radius: 50%;
	background: var(--bg-lavender);
}

.c-comment__avatar-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.c-comment__author {
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--purple-dark);
	line-height: 1.35;
}

.c-comment__author a {
	color: inherit;
	text-decoration: none;
}

.c-comment__date {
	display: inline-block;
	margin-block-start: 0.15rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text-muted);
	text-decoration: none;
}

.c-comment__content {
	font-size: 0.92rem;
	line-height: 1.8;
	color: var(--text-main);
}

.c-comment__content p:last-child {
	margin-block-end: 0;
}

.c-comment__awaiting {
	margin: 0 0 0.65rem;
	padding: 0.55rem 0.75rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--purple-deep);
	background: var(--bg-lavender);
	border-radius: var(--radius-sm);
}

.c-comment__footer {
	margin-block-start: 0.65rem;
}

.c-comment__reply a {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--purple-deep);
	text-decoration: none;
}

.c-comment__reply a:hover {
	text-decoration: underline;
}

.c-comments__closed {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.c-comments__reply-title {
	margin: 0 0 0.85rem;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--purple-dark);
}

.c-comments__cancel-reply a {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--purple-main);
}

.c-comment-respond {
	margin-block-start: 0.35rem;
	padding-block-start: 1.15rem;
	border-block-start: 1px solid var(--surface-border);
}

.c-comments--empty .c-comment-respond {
	padding-block-start: 0;
	border-block-start: 0;
}

.c-comment-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 700px) {
	.c-comment-form {
		grid-template-columns: 1fr 1fr;
	}

	.c-comment-form .comment-form-comment,
	.c-comment-form .comment-form-cookies-consent,
	.c-comment-form .form-submit,
	.c-comment-form .logged-in-as,
	.c-comment-form .comment-notes {
		grid-column: 1 / -1;
	}
}

.c-comment-form p {
	margin: 0;
}

.c-comment-form label {
	display: block;
	margin-block-end: 0.35rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--purple-dark);
}

.c-comment-form .required {
	color: #b42318;
}

.c-comment-form input[type='text'],
.c-comment-form input[type='email'],
.c-comment-form input[type='url'],
.c-comment-form textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-md);
	background: #fff;
	color: var(--text-main);
	font-family: inherit;
	font-size: 0.92rem;
	line-height: 1.5;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.c-comment-form textarea {
	min-height: 7rem;
	resize: vertical;
	line-height: 1.75;
}

.c-comment-form input:focus,
.c-comment-form textarea:focus {
	outline: none;
	border-color: rgba(139, 91, 183, 0.45);
	box-shadow: 0 0 0 3px rgba(139, 91, 183, 0.12);
}

.c-comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.82rem;
	color: var(--text-muted);
}

.c-comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 500;
	line-height: 1.55;
}

.c-comment-form .form-submit {
	display: flex;
	justify-content: flex-start;
}

.c-comment-form .form-submit .c-button,
.c-comment-form .form-submit input[type='submit'] {
	appearance: none;
	border: 0;
	cursor: pointer;
	min-height: 46px;
	padding: 0.7rem 1.25rem;
	border-radius: var(--radius-full);
	background: var(--plum);
	color: #fff;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 700;
}

.c-comment-form .form-submit .c-button:hover,
.c-comment-form .form-submit input[type='submit']:hover {
	background: var(--eggplant);
}

.c-comment-form .logged-in-as {
	font-size: 0.84rem;
	color: var(--text-muted);
}

/* Sidebar rail */
.c-single-post__sidebar {
	position: sticky;
	top: calc(var(--header-height) + 1rem);
	align-self: start;
}

.c-sidebar-rail {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
}

.c-sidebar-rail__cta {
	padding: 1.15rem 1.1rem 1.05rem;
	background:
		radial-gradient(ellipse 80% 70% at 100% 0%, rgba(184, 138, 221, 0.18), transparent 60%),
		linear-gradient(165deg, #fbf7fd 0%, #f3eaf8 100%);
	border-bottom: 1px solid var(--surface-border);
}

.c-sidebar-rail__eyebrow {
	margin: 0 0 0.3rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--purple-main);
}

.c-sidebar-rail__cta-title {
	margin: 0 0 0.4rem;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.4;
	color: var(--purple-dark);
}

.c-sidebar-rail__cta-text {
	margin: 0 0 0.85rem;
	font-size: 0.84rem;
	line-height: 1.7;
	color: var(--text-muted);
}

.c-sidebar-rail__cta-actions {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.c-sidebar-rail__cta-actions .c-button {
	justify-content: center;
	width: 100%;
}

.c-sidebar-rail__phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.55rem 0.75rem;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--text-main);
	text-decoration: none;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-sm);
	direction: ltr;
	unicode-bidi: isolate;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.c-sidebar-rail__phone:hover {
	color: var(--purple-deep);
	border-color: rgba(139, 91, 183, 0.28);
	background: #fff;
}

.c-sidebar-rail__phone svg {
	flex-shrink: 0;
	color: var(--purple-main);
}

.c-sidebar-rail__widgets {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 0.65rem;
	background: var(--bg-mist);
}

.c-sidebar-rail__panel {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-md);
}

.c-sidebar-rail__panel-head {
	padding: 0.7rem 0.9rem;
	background: var(--bg-lavender);
	border-bottom: 1px solid var(--surface-border);
}

.c-sidebar-rail__panel-title {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 800;
	color: var(--purple-dark);
}

.c-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.c-sidebar-list__item {
	margin: 0;
	border-bottom: 1px solid rgba(92, 52, 125, 0.07);
}

.c-sidebar-list__item:last-child {
	border-bottom: none;
}

.c-sidebar-list__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	padding: 0.72rem 0.85rem;
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease;
}

.c-sidebar-list__link:hover,
.c-sidebar-list__link:focus-visible {
	background: var(--bg-lavender);
}

.c-sidebar-list__item.is-current .c-sidebar-list__link {
	background: rgba(139, 91, 183, 0.08);
	cursor: default;
}

.c-sidebar-list__item.is-current .c-sidebar-list__label {
	color: var(--purple-deep);
}

.c-sidebar-list__label {
	flex: 1;
	min-width: 0;
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--text-main);
}

.c-sidebar-list__meta,
.c-sidebar-list__count {
	flex-shrink: 0;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--text-muted);
}

.c-sidebar-list__count {
	min-width: 1.6rem;
	padding: 0.15em 0.45em;
	text-align: center;
	background: var(--bg-lavender);
	border-radius: var(--radius-full);
	color: var(--purple-deep);
}

@media (max-width: 1023px) {
	.c-single-post__sidebar {
		position: static;
		order: 2;
	}
}
