/* MedicalMag — тёмный компактный подвал. Разметка — /local/templates/aspro-premier/page_blocks/footer_2.php */
.mm-footer {
	--mmf-bg: #13271f;
	--mmf-bg-2: #0f2019;
	--mmf-text: #c3d0ca;
	--mmf-muted: #8ea39a;
	--mmf-head: #fff;
	--mmf-accent: #9fd18f;
	--mmf-line: rgba(255, 255, 255, .1);
	background: var(--mmf-bg) !important;
	color: var(--mmf-text);
	border: 0 !important;
	margin-top: 0;
}
.mm-footer a { color: var(--mmf-text) !important; text-decoration: none !important; transition: color .15s ease; }
.mm-footer a:hover { color: var(--mmf-accent) !important; }
.mm-footer a span { border-bottom: 0 !important; }

/* ---------- Основная часть ---------- */
.mm-footer__main {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr);
	gap: 32px;
	padding: 44px 0 36px;
}
.mm-footer__menu:empty, .mm-footer__menu:not(:has(a)) { display: none; }
.mm-footer__main:not(:has(.mm-footer__menu:nth-of-type(5) a)) { grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, .9fr)) minmax(0, 1.55fr); }

.mm-footer__logo img, .mm-footer__logo svg { display: block; height: 34px; width: auto; filter: brightness(0) invert(1); }
.mm-footer__slogan { margin: 14px 0 18px; max-width: 250px; font-size: 13px; line-height: 1.45; color: var(--mmf-muted); }

/* Заголовки колонок и пункты меню Aspro */
.mm-footer .bottom-menu .items > .item-link:first-child .title,
.mm-footer__title { margin: 0 0 14px; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--mmf-head); }
.mm-footer .bottom-menu .items > .item-link:first-child .title a { color: var(--mmf-head) !important; }
.mm-footer .bottom-menu .wrap { display: grid; gap: 6px; }
.mm-footer .bottom-menu .wrap .item-link, .mm-footer .bottom-menu .wrap .item { margin: 0; padding: 0; }
.mm-footer .bottom-menu .wrap a, .mm-footer .bottom-menu .wrap .font_14 { font-size: 13.5px; line-height: 18px; }
.mm-footer .bottom-menu .items > .item-link:first-child { margin-bottom: 0; }

/* Aspro даёт пунктам меню свои отступы и gap — снимаем, ритм задаёт .wrap */
.mm-footer .bottom-menu .item-link, .mm-footer .bottom-menu .item, .mm-footer .bottom-menu .title { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
.mm-footer .bottom-menu .items > .item-link:first-child { margin-bottom: 12px !important; height: auto !important; min-height: 0 !important; }
.mm-footer .bottom-menu .items > .item-link:first-child > i { display: none; }
.mm-footer .bottom-menu .items > .item-link:first-child .title { margin: 0 !important; }
.mm-footer__logo { display: inline-block; }
.mm-footer__logo a { display: inline-block !important; width: auto !important; height: auto !important; }

/* Контакты */
.mm-footer__contacts { display: block !important; }
.mm-footer__contacts .footer__info-item { margin: 0 0 8px; }
.mm-footer__phone .phones__phone-link, .mm-footer__phone .phones__phone-link span { font-size: 18px !important; font-weight: 700; color: var(--mmf-head) !important; }
.mm-footer__phone .more-arrow svg, .mm-footer__phone .more-arrow path { fill: var(--mmf-muted) !important; }
.mm-footer__email, .mm-footer__email a { font-size: 14px; color: var(--mmf-accent) !important; }
.mm-footer__address, .mm-footer__address * { font-size: 13px !important; line-height: 1.45; color: var(--mmf-muted) !important; }
.mm-footer__contacts .email__title, .mm-footer__contacts .address__title, .mm-footer__contacts .footer__info-title { display: none; }
.mm-footer__callback {
	display: inline-flex; align-items: center; width: auto !important; margin-top: 8px; height: 38px; padding: 0 18px; border: 1px solid rgba(159, 209, 143, .55); border-radius: 7px;
	background: transparent; color: var(--mmf-accent); font-size: 14px; font-weight: 600; cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.mm-footer__callback:hover { background: var(--mmf-accent); color: var(--mmf-bg); }

/* Иконки контактов и ровный перенос адреса */
.mm-footer__contacts .footer__info-item { position: relative; padding-left: 26px; margin-bottom: 9px; }
.mm-footer__contacts .footer__info-item::before {
	content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px;
	background-position: center; background-size: contain; background-repeat: no-repeat;
}
.mm-footer__address::before { top: 2px !important; margin-top: 0 !important; }
.mm-footer__phone::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239fd18f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 1.5 1.5 3.3c0 5.8 5.4 11.2 11.2 11.2l1.8-2.5-3.9-2.6-1.4 1.4C7.2 10.1 5.9 8.8 5.3 6.8l1.4-1.4L4 1.5Z'/%3E%3C/svg%3E"); }
.mm-footer__email::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239fd18f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.5' y='3' width='13' height='10' rx='2'/%3E%3Cpath d='m2 4 6 5 6-5'/%3E%3C/svg%3E"); }
.mm-footer__address::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239fd18f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 6.7c0 4.2-5 7.8-5 7.8s-5-3.6-5-7.8a5 5 0 0 1 10 0Z'/%3E%3Ccircle cx='8' cy='6.7' r='1.8'/%3E%3C/svg%3E"); }
.mm-footer__address, .mm-footer__address * { text-wrap: balance; }
.mm-footer__callback { margin-top: 6px; }

/* Соцсети: одноцветные иконки на тёмном */
.mm-footer__social .social__items { gap: 8px !important; }
.mm-footer__social .social__link {
	width: 32px; height: 32px; border-radius: 8px; background-color: rgba(255, 255, 255, .08);
	opacity: .72; transition: opacity .15s ease;
}
.mm-footer__social .social__item:hover .social__link { opacity: 1; }

/* ---------- Нижняя строка ---------- */
.mm-footer__bottom {
	display: flex; align-items: center; gap: 12px 32px; flex-wrap: wrap;
	padding: 18px 0 22px; border-top: 1px solid var(--mmf-line);
	font-size: 12.5px; line-height: 1.45; color: var(--mmf-muted);
}
.mm-footer__legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; flex: 1 1 520px; }
.mm-footer__legal, .mm-footer__legal * { color: var(--mmf-muted) !important; font-size: 12.5px !important; }
.mm-footer__license a, .mm-footer__license a * { font-weight: 400 !important; color: var(--mmf-muted) !important; }
.mm-footer__legal a:hover { color: var(--mmf-accent) !important; }
.mm-footer__pays { opacity: .75; }
.mm-footer__pays img, .mm-footer__pays svg, .mm-footer__pays i { max-height: 18px; }
.mm-footer__pays .pay-systems__items, .mm-footer__pays ul { gap: 14px !important; }
.mm-footer__developer { margin-left: auto; opacity: .7; }
.mm-footer__developer:hover { opacity: 1; }
.mm-footer #bx-composite-banner:empty { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1199px) {
	.mm-footer__main, .mm-footer__main:not(:has(.mm-footer__menu:nth-of-type(5) a)) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
	.mm-footer__brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
	.mm-footer__slogan { margin: 0; }
}
@media (max-width: 767px) {
	.mm-footer__main, .mm-footer__main:not(:has(.mm-footer__menu:nth-of-type(5) a)) { grid-template-columns: 1fr; gap: 0; padding: 28px 0 20px; }
	.mm-footer__brand { display: block; margin-bottom: 18px; }
	.mm-footer__slogan { margin: 10px 0 14px; }
	.mm-footer__menu { padding: 12px 0; border-top: 1px solid var(--mmf-line); }
	.mm-footer .bottom-menu .items > .item-link:first-child .title { margin: 0; }
	.mm-footer .bottom-menu .wrap { padding-top: 10px; }
	.mm-footer__menu svg { fill: var(--mmf-muted); }
	.mm-footer .bottom-menu .items > .item-link:first-child { margin-bottom: 0 !important; }
	.mm-footer .bottom-menu .items > .item-link:first-child > i { display: inline-block; }
	.mm-footer__contacts { padding-top: 16px; border-top: 1px solid var(--mmf-line); }
	.mm-footer__developer { margin-left: 0; }
}

/* Отступ подвала под мобильную панель иконок (до 991px включительно) */
@media (max-width: 991px) {
	.footer, #footer, .mm-footer {
		padding-bottom: 90px !important;
	}
	.mm-footer__bottom {
		padding-bottom: 24px !important;
	}
	/* Чтобы панель плавающего чата не перекрывала нижнюю строку и меню */

	/* Центрирование и ровное распределение иконок нижней панели на планшетах */
	.bottom-icons-panel__content {
		justify-content: center !important;
	}
	.bottom-icons-panel__content-link {
		min-width: 68px !important;
		max-width: 92px !important;
		flex: 1 1 auto !important;
	}
}
