/*
 * Сторінка «Про нас». Спирається на дизайн-систему сторінки центру
 * (center.css, класи tmo-cp-*), тут — лише те, чого в ній немає:
 * показники в хіроу, списки напрямів, таблиця ліжкового фонду, місця в рейтингу.
 */

.tmo-ab-main {
	--ab-accent: var(--tmo-blue);
	--ab-accent-soft: rgba(115, 156, 210, 0.14);
}

/* ------------------------------------------------- Головний екран */

.tmo-ab-hero .tmo-cp-hero__title,
.tmo-ab-hero .tmo-cp-hero__subtitle,
.tmo-ab-hero__text {
	max-width: 900px;
}

.tmo-ab-hero__text {
	margin: 14px 0 0;
	font-size: 17px;
	line-height: 1.7;
	color: var(--cp-muted);
}

.tmo-ab-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}

.tmo-ab-hero .tmo-cp-hero__content {
	/* Текст і показники — одна колонка, фото поруч на всю її висоту. */
	align-self: start;
}

/* У вужчій колонці показники стають сіткою 2×2, а не ламаються 3+1. */
.tmo-ab-hero .tmo-ab-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tmo-ab-hero .tmo-ab-fact__inner {
	height: 100%;
}

.tmo-ab-fact__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 84px;
	padding: 16px 26px 16px 20px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-radius);
	background: rgba(255, 255, 255, 0.75);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.tmo-ab-fact__inner:hover,
a.tmo-ab-fact__inner:focus-visible {
	border-color: rgba(115, 156, 210, 0.7);
	box-shadow: var(--cp-shadow);
	transform: translateY(-2px);
}

.tmo-ab-fact__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--ab-accent-soft);
	color: var(--tmo-blue-dark);
}

.tmo-ab-fact__value {
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	color: var(--tmo-blue-dark);
}

.tmo-ab-fact__label {
	max-width: 150px;
	font-size: 15px;
	line-height: 1.3;
	color: var(--cp-muted);
}

/* Карусель у хіроу: фото трохи менше за текстову колонку. */

.tmo-ab-hero .tmo-cp-hero__grid {
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
	gap: 40px;
	/* Фото тягнеться на всю висоту текстової колонки — від крихт до показників. */
	align-items: stretch;
}

.tmo-ab-hero__slider {
	display: flex;
	width: 100%;
	max-width: 680px;
	margin-left: auto;
}

.tmo-ab-hero__slides {
	position: relative;
	flex: 1;
	min-height: 480px;
}

.tmo-ab-hero__slide {
	position: absolute;
	inset: 0;
	z-index: 1;
	margin: 0;
	opacity: 0;
	transition: opacity 0.9s ease;
}

/* Перший слайд активний уже в розмітці, тож без JS видно саме його. */
.tmo-ab-hero__slide.is-active {
	z-index: 2;
	opacity: 1;
}

.tmo-ab-hero__slide img {
	height: 100%;
	aspect-ratio: auto;
}

.tmo-ab-hero__dots {
	position: absolute;
	left: 20px;
	bottom: 20px;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgb(255 255 255 / 62%);
	box-shadow: 0 6px 18px rgba(30, 53, 86, 0.12);
	backdrop-filter: blur(6px);
}

.tmo-ab-hero__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(58, 81, 110, 0.32);
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.tmo-ab-hero__dot:hover {
	background: rgba(58, 81, 110, 0.55);
}

.tmo-ab-hero__dot.is-active {
	width: 24px;
	background: var(--tmo-coral);
}

@media (prefers-reduced-motion: reduce) {
	.tmo-ab-hero__slide {
		transition: none;
	}
}

/* ------------------------------------------------------ Текст секцій */

.tmo-ab-prose {
	max-width: 900px;
}

.tmo-ab-prose p {
	margin: 0 0 16px;
}

.tmo-ab-prose p:last-child {
	margin-bottom: 0;
}

.tmo-ab-prose__muted {
	color: var(--cp-muted);
}

.tmo-ab-subtitle {
	margin: 44px 0 20px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tmo-blue-dark);
}

/* ----------------------------------------- Списки напрямів і пацієнтів */

.tmo-ab-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 12px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ab-list--wide {
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.tmo-ab-list__item {
	display: flex;
	gap: 12px;
	font-size: 16.5px;
	line-height: 1.6;
	color: #3b4552;
}

.tmo-ab-list__mark {
	display: grid;
	place-items: center;
	flex: none;
	width: 26px;
	height: 26px;
	margin-top: 2px;
	border-radius: 50%;
	background: rgba(245, 122, 117, 0.14);
	color: var(--tmo-coral);
}

.tmo-ab-list__mark .tmo-icon {
	width: 16px;
	height: 16px;
}

.tmo-ab-note {
	display: flex;
	gap: 14px;
	max-width: 900px;
	margin: 24px 0 0;
	padding: 20px 24px;
	border-radius: var(--cp-radius-sm);
	background: var(--cp-tint);
	font-size: 16.5px;
	line-height: 1.6;
	color: #3b4552;
}

.tmo-ab-note__icon {
	flex: none;
	color: var(--tmo-blue-dark);
}

/* ------------------------------------------ Плитки напрямів діяльності */

/* Сітка 4 × 4 на 16 напрямів; висоту рядка задає найдовша назва в ньому. */
.tmo-ab-dirs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Іконка ліворуч, назва праворуч по центру — відступи однакові згори й знизу. */
.tmo-ab-dir {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px 16px 16px;
	border: 1px solid rgba(115, 156, 210, 0.18);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 8px 22px rgba(30, 53, 86, 0.05);
}

.tmo-ab-dir__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: rgba(115, 156, 210, 0.14);
	color: #3f6fae;
}

.tmo-ab-dir__icon svg {
	width: 36px;
	height: 36px;
	stroke-width: 2;
}

.tmo-ab-dir__title {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.15;
	color: var(--tmo-blue-dark);
}

/* ------------------------------------------------ Текст поруч із фото */

.tmo-ab-split {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.75fr);
	gap: 44px;
	align-items: center;
}

.tmo-ab-split--top {
	align-items: start;
}

/* Фото ліворуч, текст праворуч. */
.tmo-ab-split--flip .tmo-ab-split__media {
	order: -1;
}

.tmo-ab-split__media {
	margin: 0;
}

.tmo-ab-split__text .tmo-ab-note {
	max-width: none;
}

/* Поруч із фото список іде однією колонкою — рядки й так довгі. */
.tmo-ab-split .tmo-ab-list {
	grid-template-columns: minmax(0, 1fr);
}

.tmo-ab-split__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--cp-radius);
	box-shadow: var(--cp-shadow);
}

.tmo-ab-split__media--tall img {
	aspect-ratio: 3 / 4;
}

.tmo-ab-split__caption,
.tmo-ab-band__caption {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--cp-muted);
}

/* Широке фото на всю ширину секції. */
.tmo-ab-band {
	margin: 36px 0 0;
}

.tmo-ab-band img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 21 / 8;
	object-fit: cover;
	border-radius: var(--cp-radius);
	box-shadow: var(--cp-shadow);
}

/* ------------------------------------- Кому надається допомога: підблоки */

.tmo-ab-care {
	display: grid;
	gap: 18px;
}

/* Фото врівень із краями картки — його обрізає сама картка. */
.tmo-ab-care__item {
	display: grid;
	grid-template-columns: 340px minmax(0, 1fr);
	align-items: stretch;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-radius);
	background: #fff;
	overflow: hidden;
}

/* Парні підблоки — фото праворуч. */
.tmo-ab-care__item--flip {
	grid-template-columns: minmax(0, 1fr) 340px;
}

.tmo-ab-care__item--flip .tmo-ab-care__media {
	order: 2;
}

.tmo-ab-care__media {
	margin: 0;
	min-height: 260px;
}

.tmo-ab-care__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tmo-ab-care__body {
	padding: 34px 38px;
}

.tmo-ab-care__title {
	margin: 0 0 16px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tmo-blue-dark);
}

.tmo-ab-care .tmo-ab-list {
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

/* ------------------------------------------------------- Показники */

.tmo-ab-stats {
	margin-bottom: 0;
}

.tmo-cp-section--bg-plain .tmo-ab-stats .tmo-cp-stat,
.tmo-cp-section--bg-tint .tmo-ab-stats .tmo-cp-stat,
.tmo-cp-section--bg-plain .tmo-ab-staff__stats .tmo-cp-stat,
.tmo-cp-section--bg-tint .tmo-ab-staff__stats .tmo-cp-stat {
	border: 1px solid var(--cp-line);
}

/* ------------------------------------------------- Кадровий потенціал */

.tmo-ab-staff {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 28px;
	align-items: stretch;
}

.tmo-ab-staff__media {
	margin: 0;
}

.tmo-ab-staff__media img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 2 / 1;
	object-fit: cover;
	border-radius: var(--cp-radius);
}

/*
 * Плитки двома рядами: 3 + 2. Шість колонок — перші три показники беруть
 * по дві, останні два по три, тож обидва ряди заповнені без дірок.
 */
.tmo-ab-staff__stats {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
}

.tmo-ab-staff__stats > .tmo-cp-stat {
	grid-column: span 2;
}

.tmo-ab-staff__stats > .tmo-cp-stat:nth-child(n + 4) {
	grid-column: span 3;
}

/* --------------------------------------------------- Клінічні центри */

/* Три в рядок, як у схемі документа: кольорова плашка + назва центру. */
.tmo-ab-centers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ab-center {
	display: flex;
}

.tmo-ab-center__inner {
	display: flex;
	align-items: stretch;
	gap: 0;
	width: 100%;
	min-height: 144px;
	border: 1px solid rgba(115, 156, 210, 0.35);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.tmo-ab-center__inner:hover,
a.tmo-ab-center__inner:focus-visible {
	border-color: rgba(115, 156, 210, 0.8);
	box-shadow: var(--cp-shadow);
	transform: translateY(-2px);
}

/* Фото врівень із краями картки — обрізає сама картка. */
.tmo-ab-center__media {
	flex: none;
	width: 212px;
	background: var(--cp-tint);
}

.tmo-ab-center__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tmo-ab-center__title {
	flex: 1;
	align-self: center;
	padding: 18px 16px 18px 20px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--tmo-blue-dark);
}

.tmo-ab-center__go {
	align-self: center;
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin-right: 16px;
	border-radius: 50%;
	background: rgba(115, 156, 210, 0.14);
	color: var(--tmo-blue-dark);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tmo-ab-center__go .tmo-icon {
	width: 18px;
	height: 18px;
}

a.tmo-ab-center__inner:hover .tmo-ab-center__go,
a.tmo-ab-center__inner:focus-visible .tmo-ab-center__go {
	background: var(--tmo-coral);
	color: #fff;
}

/* ---------------------------------------------------- Ліжковий фонд */

/* Підсумок: число врівень із краєм плашки, як у картках місць. */
.tmo-ab-beds__total {
	display: flex;
	align-items: stretch;
	margin-bottom: 18px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-radius);
	background: #fff;
	overflow: hidden;
}

.tmo-ab-beds__total-value {
	display: grid;
	place-items: center;
	flex: none;
	width: 150px;
	background: rgba(245, 122, 117, 0.14);
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
	color: var(--tmo-coral);
}

.tmo-ab-beds__total-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-self: center;
	padding: 22px 26px;
}

.tmo-ab-beds__total-text strong {
	font-size: 19px;
	font-weight: 700;
	color: var(--tmo-blue-dark);
}

.tmo-ab-beds__total-text span {
	font-size: 15.5px;
	line-height: 1.5;
	color: var(--cp-muted);
}

/* Підрозділи — плитки 3 в рядок. */
.tmo-ab-beds {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tmo-ab-bed {
	display: flex;
	flex-direction: column;
	padding: 24px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-radius);
	background: #fff;
}

.tmo-ab-bed__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.tmo-ab-bed__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: rgba(115, 156, 210, 0.14);
	color: #3f6fae;
}

.tmo-ab-bed__icon .tmo-icon {
	width: 22px;
	height: 22px;
}

.tmo-ab-bed__value {
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	color: var(--tmo-blue-dark);
}

.tmo-ab-bed__unit {
	align-self: flex-end;
	font-size: 14.5px;
	color: var(--cp-muted);
}

.tmo-ab-bed__title {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--tmo-blue-dark);
}

.tmo-ab-bed__profiles {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--cp-muted);
}

/* ---------------------------------------------------------- Рейтинг */

.tmo-ab-ranks {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}

/* Номер місця врівень із краями картки — обрізає сама картка. */
.tmo-ab-rank {
	display: flex;
	align-items: stretch;
	min-height: 104px;
	border-radius: var(--cp-radius);
	background: #fff;
	border: 1px solid var(--cp-line);
	overflow: hidden;
}

.tmo-ab-rank__place {
	display: grid;
	place-items: center;
	flex: none;
	width: 76px;
	background: rgba(245, 122, 117, 0.14);
	font-size: 50px;
	font-weight: 800;
	line-height: 1;
	color: var(--tmo-coral);
}

.tmo-ab-rank__text {
	align-self: center;
	padding: 18px 22px;
	font-size: 16px;
	line-height: 1.5;
	color: #3b4552;
}

/* ----------------------------------------------- Освіта й наука */

.tmo-ab-edu {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
	gap: 28px 44px;
	align-items: start;
}

.tmo-ab-edu__media {
	position: sticky;
	top: 90px;
}

.tmo-ab-edu .tmo-ab-chairs {
	grid-column: auto;
	/* Кафедри — між абзацом зі вступом і абзацом про співробітників. */
	margin: 22px 0;
	grid-template-columns: minmax(0, 1fr);
}

.tmo-ab-edu .tmo-cp-feature {
	padding: 18px 20px;
}

/* ------------------------------------------------------- Планшети */

@media (max-width: 1100px) {
	.tmo-ab-beds {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tmo-ab-centers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tmo-ab-dirs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tmo-ab-hero .tmo-cp-hero__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-hero__slider {
		max-width: 480px;
		margin-inline: 0;
	}

	.tmo-ab-hero__slides {
		min-height: 0;
		aspect-ratio: 4 / 5;
	}
}

@media (max-width: 700px) {
	.tmo-ab-hero .tmo-ab-facts {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-hero__dots {
		left: 12px;
		bottom: 12px;
		padding: 7px 10px;
		gap: 7px;
	}
}

@media (max-width: 900px) {
	.tmo-ab-staff {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-staff__media img {
		aspect-ratio: 16 / 10;
	}

	.tmo-ab-staff__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tmo-ab-staff__stats > .tmo-cp-stat,
	.tmo-ab-staff__stats > .tmo-cp-stat:nth-child(n + 4) {
		grid-column: auto;
	}

	.tmo-ab-care__item,
	.tmo-ab-care__item--flip {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-care__media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.tmo-ab-care__body {
		padding: 26px 24px;
	}

	/* На вузькому екрані фото завжди над текстом. */
	.tmo-ab-care__item--flip .tmo-ab-care__media {
		order: 0;
	}

	.tmo-ab-list,
	.tmo-ab-list--wide,
	.tmo-ab-split,
	.tmo-ab-edu {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-edu__media {
		position: static;
	}

	/* На вузькому екрані фото — під текстом, а не над ним. */
	.tmo-ab-split--flip .tmo-ab-split__media {
		order: 0;
	}

	.tmo-ab-split__media--tall img {
		aspect-ratio: 4 / 3;
	}

	.tmo-ab-band img {
		aspect-ratio: 16 / 9;
	}

	.tmo-ab-facts .tmo-ab-fact {
		flex: 1 1 240px;
	}

	.tmo-ab-fact__inner {
		height: 100%;
	}
}

@media (max-width: 700px) {
	.tmo-ab-beds {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-beds__total-value {
		width: 110px;
		font-size: 34px;
	}

	.tmo-ab-beds__total-text {
		padding: 18px 20px;
	}

	.tmo-ab-staff__stats {
		grid-template-columns: minmax(0, 1fr);
	}

	.tmo-ab-rank__place {
		width: 62px;
		font-size: 26px;
	}

	.tmo-ab-rank__text {
		padding: 16px 18px;
	}

	.tmo-ab-centers {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.tmo-ab-center__media {
		width: 144px;
	}

	.tmo-ab-dirs {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.tmo-ab-dir {
		gap: 14px;
		padding: 14px 18px 14px 14px;
	}

	.tmo-ab-dir__icon {
		width: 48px;
		height: 48px;
		border-radius: 12px;
	}

	.tmo-ab-dir__icon svg {
		width: 30px;
		height: 30px;
	}

	.tmo-ab-subtitle {
		font-size: 20px;
	}

	.tmo-ab-beds__table th,
	.tmo-ab-beds__table td {
		padding: 14px 16px;
	}

	.tmo-ab-note {
		padding: 16px 18px;
	}
}
