/* «Наші спеціалісти» (template-specialist.php). Стиль узгоджено з npc-pages.css / npc-reviews.css */
.npc-sp {
	--npc-green: #007a53;
	--npc-green-dark: #00653f;
	--npc-ink: #2b2b2b;
	--npc-muted: #6b6b6b;
	--npc-line: #e3e3e3;
	--npc-tint: #e8f3ee;
	background: #f2f2f2;
	padding: 24px 0 72px;
	font-family: 'Open Sans', sans-serif;
	color: var(--npc-ink);
}
.npc-sp *, .npc-sp *::before, .npc-sp *::after { box-sizing: border-box; }
.npc-sp ul { list-style: none; margin: 0; padding: 0; }
.npc-sp li::before { display: none; content: none; }

/* ---------- Вступ ---------- */
.npc-sp__intro {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin: 8px 0 28px;
}
.npc-sp__title {
	margin: 0 0 12px;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 44px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-sp__lead {
	max-width: 640px;
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--npc-muted);
}
.npc-sp__stats {
	flex: 0 0 auto;
	display: flex;
	gap: 12px;
	margin: 0;
}
.npc-sp__stats > div {
	min-width: 150px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--npc-line);
	border-radius: 16px;
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: 4px;
}
.npc-sp__stats dt { font-size: 14px; font-weight: 400; color: var(--npc-muted); }
.npc-sp__stats dd { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--npc-green); }

/* ---------- Навігація по відділеннях ---------- */
.npc-sp__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 40px;
}
.npc-sp__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 16px;
	background: #fff;
	border: 1px solid var(--npc-line);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--npc-ink);
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease;
}
.npc-sp__nav a:hover,
.npc-sp__nav a:focus-visible { border-color: var(--npc-green); color: var(--npc-green); text-decoration: none; }

/* ---------- Відділення ---------- */
.npc-sp__group { margin: 0 0 48px; scroll-margin-top: 110px; }
.npc-sp__group-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--npc-line);
	font-family: 'Open Sans', sans-serif;
	font-size: 24px;
	line-height: 1.3;
	font-weight: 700;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-sp__group-title span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--npc-tint);
	color: var(--npc-green);
	font-size: 14px;
	font-weight: 700;
}

.npc-sp__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}
.npc-sp__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	background: #fff;
	border: 1px solid var(--npc-line);
	border-radius: 20px;
	overflow: hidden;
}
.npc-sp__photo {
	position: relative;
	aspect-ratio: 4 / 5;
	background: #eaeaea;
	overflow: hidden;
}
.npc-sp__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
}
.npc-sp__noface {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 56px;
	font-weight: 700;
	color: #bdbdbd;
}
.npc-sp__body { flex: 1 1 auto; padding: 18px 20px 20px; }
.npc-sp__name {
	margin: 0 0 8px;
	font-family: 'Open Sans', sans-serif;
	font-size: 18px;
	line-height: 1.35;
	font-weight: 700;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-sp__role {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--npc-muted);
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.npc-sp__more { margin-top: 14px; border-top: 1px solid var(--npc-line); padding-top: 12px; }
.npc-sp__more summary {
	cursor: pointer;
	list-style: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--npc-green);
}
.npc-sp__more summary::-webkit-details-marker { display: none; }
.npc-sp__more summary::after { content: " +"; }
.npc-sp__more[open] summary::after { content: " −"; }
.npc-sp__edu, .npc-sp__pubs { margin-top: 10px; font-size: 14px; line-height: 1.55; }
.npc-sp__edu h3 { margin: 10px 0 4px; font-size: 14px; font-weight: 700; text-transform: none; }
.npc-sp__edu ul { padding-left: 16px; list-style: disc; }
.npc-sp__pubs li { margin: 0 0 6px; }
.npc-sp__pubs a { color: var(--npc-green); }

/* ---------- Заклик ---------- */
.npc-sp__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 28px 32px;
	background: #fff;
	border: 1px solid var(--npc-line);
	border-radius: 20px;
}
.npc-sp__cta-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.npc-sp__cta-text { margin: 0; font-size: 15px; color: var(--npc-muted); }
.npc-sp .npc-sp__cta-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 28px;
	border-radius: 999px;
	background: var(--npc-green);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s ease;
}
.npc-sp .npc-sp__cta-btn:hover { background: var(--npc-green-dark); color: #fff; text-decoration: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1199px) {
	.npc-sp__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
	.npc-sp__intro { flex-direction: column; align-items: flex-start; }
	.npc-sp__title { font-size: 34px; }
	.npc-sp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.npc-sp { padding: 16px 0 48px; }
	.npc-sp__title { font-size: 28px; }
	.npc-sp__lead { font-size: 16px; }
	.npc-sp__stats { width: 100%; }
	.npc-sp__stats > div { flex: 1 1 0; min-width: 0; padding: 12px 14px; }
	.npc-sp__stats dd { font-size: 24px; }
	.npc-sp__nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 -15px 28px; padding: 0 15px 6px; scrollbar-width: none; }
	.npc-sp__nav::-webkit-scrollbar { display: none; }
	.npc-sp__nav a { flex: 0 0 auto; white-space: nowrap; }
	.npc-sp__group { margin-bottom: 36px; }
	.npc-sp__group-title { font-size: 20px; }
	.npc-sp__grid { gap: 12px; }
	.npc-sp__body { padding: 14px; }
	.npc-sp__name { font-size: 16px; }
	.npc-sp__role { font-size: 13px; }
	.npc-sp__cta { flex-direction: column; align-items: stretch; padding: 20px; }
}
@media (max-width: 479px) {
	/* Горизонтальна картка: фото ліворуч, текст праворуч */
	.npc-sp__grid { grid-template-columns: 1fr; }
	.npc-sp__card { flex-direction: row; align-items: stretch; border-radius: 16px; }
	.npc-sp__photo { flex: 0 0 104px; aspect-ratio: auto; min-height: 130px; }
	.npc-sp__photo img { position: absolute; inset: 0; }
}

/* ================= Сторінка лікаря (single-specialist.php) ================= */
.npc-doc { padding-top: 24px; }
.npc-doc .npc-doc__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--npc-green);
	text-decoration: none;
}
.npc-doc .npc-doc__back:hover { color: var(--npc-green-dark); text-decoration: none; }
.npc-doc__card {
	display: grid;
	grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	margin: 0 0 56px;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--npc-line);
	border-radius: 24px;
}
.npc-doc__photo {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 18px;
	background: #f4f4f4;
}
.npc-doc__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 15%;
}
.npc-doc__body { min-width: 0; padding-top: 6px; }
.npc-doc .npc-doc__dept {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	margin: 0 0 14px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--npc-tint);
	color: var(--npc-green);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}
.npc-doc .npc-doc__dept:hover { background: var(--npc-green); color: #fff; text-decoration: none; }
.npc-doc .npc-doc__name {
	margin: 0 0 14px;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 38px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-doc__role {
	max-width: 680px;
	margin: 0 0 26px;
	font-size: 17px;
	line-height: 1.65;
	color: var(--npc-muted);
	white-space: pre-line;
	overflow-wrap: anywhere;
}
.npc-doc__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 8px; }
.npc-doc .npc-doc__phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 26px;
	border: 1px solid #dcdcdc;
	border-radius: 999px;
	background: #fff;
	color: var(--npc-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease;
}
.npc-doc .npc-doc__phone:hover { border-color: var(--npc-green); color: var(--npc-green); text-decoration: none; }
.npc-doc__block { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--npc-line); }
.npc-doc .npc-doc__block h2 {
	margin: 0 0 12px;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-doc__block .npc-sp__edu,
.npc-doc__block .npc-sp__pubs { margin-top: 0; font-size: 15px; line-height: 1.65; }
.npc-doc__mates .npc-sp__name a,
.npc-sp .npc-sp__name a { color: inherit; text-decoration: none; }
.npc-doc__mates .npc-sp__name a:hover,
.npc-sp .npc-sp__name a:hover { color: var(--npc-green); }
.npc-doc__mates .npc-sp__photo { display: block; }
.npc-sp .npc-sp__profile {
	display: inline-flex;
	margin-top: 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--npc-green);
	text-decoration: none;
}
.npc-sp .npc-sp__profile:hover { color: var(--npc-green-dark); text-decoration: none; }
@media (max-width: 991px) {
	.npc-doc__card { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 28px; padding: 22px; }
	.npc-doc .npc-doc__name { font-size: 30px; }
	.npc-doc__role { font-size: 16px; }
}
@media (max-width: 767px) {
	.npc-doc__card { grid-template-columns: 1fr; gap: 20px; padding: 16px; border-radius: 20px; margin-bottom: 40px; }
	.npc-doc__photo { max-width: 340px; width: 100%; margin: 0 auto; }
	.npc-doc .npc-doc__name { font-size: 26px; }
	.npc-doc__actions { flex-direction: column; }
	.npc-doc__actions > a { width: 100%; }
}
.npc-sp a.npc-sp__photo { display: block; }
