/*
 * Bloomcare — подвал сайта и звёзды в блоке отзыва.
 *
 * Подход: desktop-first. Десктоп — от 993px; планшет 768–992px — Figma 496:6269;
 * мобилка ≤767px — Figma 487:30464.
 */

/* -------------------------------------------------------------------------
 * Звёзды (общие утилиты)
 * ------------------------------------------------------------------------- */

.bc-stars__star {
	color: var(--bc-color-border);
	margin-right: 2px;
}

.bc-stars__star--on {
	color: #e3b008;
}

/* -------------------------------------------------------------------------
 * Оболочка подвала
 * ------------------------------------------------------------------------- */

.site-footer {
	padding: 40px 20px;
	background: var(--bc-color-header-footer);
	color: rgba(255, 255, 255, 0.92);
	margin-top: clamp(40px, 6vw, 64px);
	font-family: var(--bc-font-sans);
}

.site-footer a {
	color: rgba(255, 255, 255, 0.92);
}

.site-footer a:hover {
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Десктоп: верхняя сетка (4 колонки)
 * ------------------------------------------------------------------------- */

/*
 * Колонки по умолчанию не растягиваются: flex-grow: 0, ширина по контенту.
 * Свободное место уходит в промежутки (justify-content: space-between), а не в ширину колонок.
 */
.site-footer__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding-bottom: 24px;
}

.site-footer__top > .site-footer__col:not(.site-footer__col--brand) {
	flex: 0 1 auto;
	min-width: 0;
}

/* -------------------------------------------------------------------------
 * Логотип и типовые колонки
 * ------------------------------------------------------------------------- */

.site-footer__logo-link {
	display: inline-block;
	line-height: 0;
}

.site-footer__logo-img {
	height: 24px;
	width: auto;
	max-width: 181px;
	object-fit: contain;
}

.site-footer__heading {
	font-family: var(--bc-font-sans);
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.4;
	margin: 0 0 14px;
	color: #fff;
	opacity: 0.7;
}

.site-footer__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0;
	align-items: center;
}

.site-footer__socials a {
	display: inline-flex;
	line-height: 0;
}

.site-footer__socials img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

.site-footer .bc-button--ghost {
	border-color: var(--bc-color-accent);
	color: #fff;
	background: transparent;
}

.site-footer .bc-button--ghost:hover {
	background: rgba(204, 124, 97, 0.15);
	color: #fff;
	border-color: var(--bc-color-accent);
}

.site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__menu a {
	text-decoration: none;
	display: inline-block;
	padding: 6px 0;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.35;
	color: #fff;
}

.site-footer__menu a:hover {
	text-decoration: underline;
}

/*
 * Контакты — Figma 487:29296 (узел 44:3935 / строки 44:3936–44:3957):
 * столбец gap 12px между строками; в строке gap 8px иконка–текст;
 * в тексте gap 3px между подписью и значением; иконки 18×18; 16-med, #fff.
 */
.site-footer__contacts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.site-footer__contact-line {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	min-width: 0;
}

.site-footer__contact-text {
	margin: 0;
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 3px;
	min-width: 0;
	font-family: var(--bc-font-sans);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	font-variant-numeric: lining-nums proportional-nums;
	color: #fff;
}

.site-footer__contact-label,
.site-footer__contact-value {
	font: inherit;
	line-height: inherit;
	color: inherit;
}

.site-footer__support {
	color: var(--white, #fff);
	font-variant-numeric: lining-nums proportional-nums;
	font-family: Manrope, var(--bc-font-sans);
	font-size: 16px;
	font-style: normal;
	font-weight: 500;
	line-height: 135%;
	display: inline-block;
	padding: 12px 24px;
	gap: 20px;
	border-radius: 16px;
	border: 1px solid var(--bc-color-accent);
	margin-top: 12px;
}

.site-footer__col--ctas {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: auto;
	max-width: 227px;
	flex: 0 0 auto;
}

/*
 * Figma 280:14570 — карточка «Оценка» (Frame 33:6916 / 2131331754).
 * Одна строка: [иконка 28×28] [gap 4px] [оценка 26px bold] [gap 14px] [звёзды 130×26].
 */
.site-footer__stars {
	line-height: 0;
}

.site-footer__stars-card {
	background-color: #ffffff;
	border-radius: 20px;
	padding: 16px;
	width: 249px;
	max-width: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	color: var(--bc-color-header-footer);
}

.site-footer__stars-top {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	width: 100%;
	min-height: 28px;
}

.site-footer__stars-meta {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
	min-width: 0;
}

.site-footer__stars-pin-wrap {
	position: relative;
	display: block;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	overflow: hidden;
}

.site-footer__stars-pin {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
	width: 28px;
	height: 28px;
	max-width: none;
	object-fit: contain;
	object-position: center;
}

.site-footer__stars-value {
	margin: 0;
	padding: 0;
	font-family: var(--bc-font-sans);
	font-weight: 700;
	font-size: 26px;
	line-height: 1.1;
	letter-spacing: -1.04px;
	color: #cc7c61;
	font-variant-numeric: lining-nums proportional-nums;
	white-space: nowrap;
	flex: 0 0 auto;
}

.site-footer__stars-badge {
	position: relative;
	flex: 0 0 130px;
	width: 130px;
	height: 26px;
	overflow: hidden;
	line-height: 0;
}

.site-footer__stars-badge img {
	display: block;
	width: 130px;
	height: 26px;
	max-width: none;
	object-fit: contain;
	object-position: left center;
}

.site-footer__stars-label {
	margin: 0;
	width: 100%;
	font-family: var(--bc-font-sans);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.35;
	color: #583826;
}

/*
 * Figma 280:14570 — две CTA (Frame 33:6962 / 2131331762).
 */
.site-footer .site-footer__col--ctas > a.site-footer__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	height: 46px;
	padding: 10px 24px;
	border-radius: 16px;
	font-family: var(--bc-font-sans);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	text-align: center;
	font-variant-numeric: lining-nums proportional-nums;
	border-style: solid;
	border-width: 1px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.site-footer .site-footer__col--ctas > a.site-footer__cta--solid {
	background-color: #cc7c61;
	border-color: #cc7c61;
	color: #ffffff;
}

.site-footer .site-footer__col--ctas > a.site-footer__cta--solid:hover,
.site-footer .site-footer__col--ctas > a.site-footer__cta--solid:focus-visible {
	background-color: var(--bc-color-accent-dark);
	border-color: var(--bc-color-accent-dark);
	color: #ffffff;
}

.site-footer .site-footer__col--ctas > a.site-footer__cta--outline {
	background-color: transparent;
	border-color: #cc7c61;
	color: #ffffff;
}

.site-footer .site-footer__col--ctas > a.site-footer__cta--outline:hover,
.site-footer .site-footer__col--ctas > a.site-footer__cta--outline:focus-visible {
	background-color: rgba(204, 124, 97, 0.15);
	border-color: #cc7c61;
	color: #ffffff;
}

.site-footer__cta img {
	flex-shrink: 0;
}

/* -------------------------------------------------------------------------
 * Десктоп: нижняя сетка (юридический блок — 2 колонки).
 * Figma 280:14570 / 487:29296: слева ~500px, gap 24px, справа ~676px при ширине 1200px.
 * ------------------------------------------------------------------------- */

.site-footer__bottom {
	display: grid;
	grid-template-columns: minmax(0, 500fr) minmax(0, 676fr);
	column-gap: 24px;
	row-gap: 16px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: -0.26px;
	color: rgba(255, 255, 255, 0.75);
	align-items: start;
}

.site-footer__legal,
.site-footer__legal-nav {
	min-width: 0;
}

/* Figma: Manrope Regular, opacity 80 */
.site-footer__legal {
	font-family: var(--bc-font-sans);
	color: rgba(255, 255, 255, 0.8);
}

.site-footer__legal p {
	margin: 0;
}

/*
 * Figma 280:14570 — юридические ссылки (узел 33:7581): Onest Regular, 13px,
 * opacity 80, flex-wrap, gap 12px × 14px, выравнивание по началу.
 */
.site-footer__legal-nav {
	font-family: var(--bc-font-ui);
	align-self: start;
}

.site-footer__legal-nav .site-footer__menu--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
	justify-content: flex-start;
	gap: 12px 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__legal-nav .site-footer__menu--inline > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__legal-nav .site-footer__menu--inline a {
	display: inline-block;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: 400;
	line-height: inherit;
	letter-spacing: inherit;
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	white-space: nowrap;
	font-variant-numeric: lining-nums proportional-nums;
}

.site-footer__legal-nav .site-footer__menu--inline a:hover,
.site-footer__legal-nav .site-footer__menu--inline a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * Планшет: 768px–992px (Figma 496:6269)
 * Верх: слева лого + соцсети, справа карточка рейтинга; ниже — 3 колонки.
 * ------------------------------------------------------------------------- */

@media (max-width: 992px) and (min-width: 768px) {
	.site-footer {
		padding: 32px 20px;
		margin-top: clamp(32px, 5vw, 48px);
	}

	.site-footer__top {
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: flex-start;
		row-gap: 32px;
		column-gap: 24px;
		padding-bottom: 24px;
	}

	/* Полная ширина; внутри сетка: слева колонка лого + соцсети, справа звёзды */
	.site-footer__col--brand {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto;
		column-gap: 24px;
		row-gap: 20px;
		flex: 1 1 100%;
		width: 100%;
		max-width: 100%;
		align-items: start;
	}

	.site-footer__col--brand .site-footer__logo-link {
		grid-column: 1;
		grid-row: 1;
		align-self: start;
	}

	.site-footer__col--brand .site-footer__socials {
		grid-column: 1;
		grid-row: 2;
		margin: 0;
		gap: 10.667px;
	}

	.site-footer__col--brand .site-footer__socials img {
		width: 32px;
		height: 32px;
	}

	.site-footer__col--brand .site-footer__stars {
		grid-column: 2;
		grid-row: 1 / -1;
		align-self: start;
		justify-self: end;
	}

	.site-footer__logo-img {
		height: 18px;
		max-width: 136px;
	}

	.site-footer__stars-card {
		width: 249px;
	}

	.site-footer__stars-value {
		font-weight: 600;
		font-size: 24px;
		line-height: 1.25;
		letter-spacing: 0;
	}

	/* Три колонки: общие flex для не-бренда — в базовых стилях выше */

	.site-footer__top > .site-footer__col:nth-child(2) {
		flex: 0 1 147px;
		max-width: 147px;
	}

	/* Средняя колонка: контент по ширине строк, блок целиком по центру ряда (Figma 496:6304) */
	.site-footer__top > .site-footer__col:nth-child(3) {
		flex: 0 1 auto;
		max-width: none;
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	.site-footer__top > .site-footer__col:nth-child(2) {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	.site-footer__top > .site-footer__col:nth-child(3) > .site-footer__heading,
	.site-footer__top > .site-footer__col:nth-child(3) > .site-footer__contacts-list,
	.site-footer__top > .site-footer__col:nth-child(3) > .site-footer__support {
		width: max-content;
		max-width: 100%;
	}

	/* CTA: обе 186px по ширине, padding 12×24, столбец прижат вправо (Figma 496:6325) */
	.site-footer__top > .site-footer__col.site-footer__col--ctas {
		flex: 0 0 auto;
		max-width: none;
		width: auto;
		align-items: flex-end;
		gap: 12px;
	}

	.site-footer .site-footer__col--ctas > a.site-footer__cta {
		width: 188px;
		max-width: 100%;
		min-height: 0;
		height: auto;
		padding: 12px 24px;
		box-sizing: border-box;
	}

	.site-footer__heading {
		font-size: 15px;
		line-height: 1.45;
		font-weight: 400;
		margin-bottom: 0;
	}

	.site-footer__menu {
		display: flex;
		flex-direction: column;
		gap: 14px;
		align-items: flex-start;
	}

	.site-footer__menu a {
		font-size: 15px;
		line-height: 1.45;
		font-weight: 500;
		padding: 0;
	}

	.site-footer__top > .site-footer__col:nth-child(3) .site-footer__support {
		margin-top: 0;
	}

	/* Юридический блок: одна колонка, шаг 16px между абзацем и ссылками */
	.site-footer__bottom {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding-top: 24px;
	}

	.site-footer__legal-nav .site-footer__menu--inline {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 16px;
	}

	.site-footer__legal-nav .site-footer__menu--inline a {
		white-space: normal;
	}
}

/* -------------------------------------------------------------------------
 * Мобильный футер: ≤ 767px (Figma 487:30464)
 * ------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.site-footer {
		padding: 32px 20px;
		margin-top: clamp(32px, 8vw, 48px);
	}

	.site-footer__top {
		flex-direction: column;
		align-items: stretch;
		gap: 26px;
		padding-bottom: 0;
	}

	.site-footer__top > .site-footer__col {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	/* Бренд: лого → соцсети → карточка, шаг 20px */
	.site-footer__col--brand {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	.site-footer__col--brand .site-footer__stars {
		align-self: flex-start;
		width: 100%;
		max-width: 249px;
	}

	.site-footer__stars-card {
		width: 100%;
		max-width: 249px;
		box-sizing: border-box;
	}

	.site-footer__logo-img {
		height: 18px;
		max-width: 136px;
	}

	.site-footer__socials {
		margin: 0;
		gap: 10.667px;
	}

	.site-footer__socials img {
		width: 32px;
		height: 32px;
	}

	.site-footer__stars-value {
		font-weight: 600;
		font-size: 24px;
		line-height: 1.25;
		letter-spacing: 0;
	}

	/* Разделы / контакты: заголовок + блок, шаг 14px */
	.site-footer__top > .site-footer__col:nth-child(2),
	.site-footer__top > .site-footer__col:nth-child(3) {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.site-footer__heading {
		font-size: 16px;
		line-height: 1.4;
		font-weight: 400;
		margin: 0;
		width: 100%;
	}

	.site-footer__menu {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		width: 100%;
	}

	.site-footer__menu a {
		font-size: 16px;
		font-weight: 500;
		line-height: 1.35;
		padding: 0;
		font-variant-numeric: lining-nums proportional-nums;
	}

	.site-footer__contacts-list {
		width: 100%;
	}

	/*
	 * Три кнопки одной ширины 227px и высоты 46px, padding 10×24 — как «Личный кабинет» /
	 * «Клиника в Москве» в Figma 487:30464 (рамка поддержки в макете py-12, вёрстка
	 * выравнивается по двум нижним CTA для единого блока).
	 */
	.site-footer__top > .site-footer__col:nth-child(3) .site-footer__support {
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 0;
		align-self: flex-start;
		width: 227px;
		max-width: 100%;
		min-height: 0;
		height: 46px;
		box-sizing: border-box;
		padding: 10px 24px;
		font-size: 16px;
		line-height: 1.35;
		border-radius: 16px;
	}

	/*
	 * Колонка CTA: Figma 227px. Селектор сильнее `.site-footer__top > .site-footer__col { width:100% }`,
	 * иначе кнопки растягиваются на всю ширину экрана. align-self — против align-items:stretch у __top.
	 */
	.site-footer__top > .site-footer__col.site-footer__col--ctas {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		align-self: flex-start;
		width: 227px;
		max-width: 100%;
		min-width: 0;
		gap: 12px;
		flex: 0 0 auto;
	}

	.site-footer .site-footer__top > .site-footer__col.site-footer__col--ctas > a.site-footer__cta {
		width: 100%;
		min-width: 0;
		height: 46px;
		min-height: 46px;
		padding: 10px 24px;
		box-sizing: border-box;
		font-size: 16px;
		line-height: 1.35;
	}

	.site-footer__bottom {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		margin-top: 24px;
		padding-top: 16px;
		border-top: 1px solid rgba(255, 255, 255, 0.15);
		font-size: 13px;
		line-height: 1.35;
		letter-spacing: -0.26px;
	}

	.site-footer__legal-nav .site-footer__menu--inline {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 16px;
	}

	.site-footer__legal-nav .site-footer__menu--inline a {
		white-space: normal;
	}
}