/* Подвал: F1 минимум, F2 стандарт, F3 насыщенный. Фон — на внешнем элементе во всю ширину, контент в контейнере. */
#footer { margin-top: var(--t-footer-gap); background: var(--primary-light-background-color); color: var(--primary-text-color); }
#footer a:not(.button) { color: inherit; text-decoration: none; }
#footer a:not(.button):hover { text-decoration: underline; }
#footer ul { list-style: none; margin: 0; padding: 0; }
/* Меню нового формата (ub-menu) рисует SiteMenuWidget: колонка слева, без своих отступов и подчёркивания пункта */
#footer .site-menu__link { padding-inline: 0; border-bottom: 0; font-weight: 500; }
.footer-columns nav ul.site-menu__list { align-items: flex-start; }
/* Вид, выбранный пользователем (ub-menu, ось «направление»): колонка по умолчанию, строка при `horizontal`; у ряда документов и юридического ряда наоборот */
.footer-columns nav ul.site-menu--h { flex-direction: row; flex-wrap: wrap; gap: 4px 20px; }

#footer-nav > .page-wrapper { display: flex; flex-wrap: wrap; gap: 32px 48px; padding-block: 32px; align-items: flex-start; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; flex: 0 1 240px; min-width: 0; }
#bottom-logo img { display: block; max-height: var(--t-logo-h); width: auto; max-width: 60vw; }
.footer-columns { display: flex; flex-wrap: wrap; gap: 24px 48px; flex: 1 1 320px; min-width: 0; }
.footer-columns nav { flex: 1 1 160px; min-width: 0; }
.footer-columns nav ul { display: flex; flex-direction: column; gap: 4px; }
.footer-columns nav a { display: inline-flex; min-height: 32px; align-items: center; overflow-wrap: anywhere; }
.footer-nav-title { font-weight: 700; margin-bottom: 8px; }

#footer-socials ul { display: flex; flex-wrap: wrap; gap: 8px; }
#footer-socials a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
#footer-socials a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#footer-row-1 > .page-wrapper { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 16px; font-size: 14px; }
.footer-minimal > .page-wrapper { padding-block: 24px 0; }
.footer-minimal #footer-nav-1 ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-minimal #footer-nav-1 ul.site-menu--v { flex-direction: column; gap: 4px; }

#footer-contact > .page-wrapper { padding-block: 32px; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.footer-contacts li { display: flex; gap: 10px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
/* значок — в колонке своей ширины, приглушён: текст контакта главнее */
.footer-contacts li > i { flex: none; width: 1.1em; text-align: center; opacity: .6; }
.footer-contacts a { font-weight: 500; }
/* «Каталог» (stthm50, layouts/index/footer.html): контакты — последней колонкой в строке меню, столбиком; слоган под логотипом */
.footer-contacts-col { flex: 1 1 200px; min-width: 0; }
.footer-contacts-col .footer-contacts { flex-direction: column; gap: 10px; }
.footer-contacts-col .footer-contacts li { min-height: 32px; align-items: center; margin: 0; padding: 0; }
/* «Меню контактів» (SiteMenuWidget): пункт — значок и текст в строку; значок SVG — маской цвета текста, приглушён; пункт без ссылки — текстом */
#footer .footer-contacts-col .footer-contacts-menu.site-menu__list { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: 0; }   /* шаг строк как у колонок меню */
#footer .footer-contacts-col .footer-contacts-menu .site-menu__item { margin: 0; padding: 0; }
#footer .footer-contacts-menu .site-menu__link, #footer .footer-contacts-menu .is-text { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; overflow-wrap: anywhere; }
#footer .footer-contacts-menu .is-text { font-weight: 400; }
#footer .footer-contacts-menu .site-menu__icon {
    flex: none; width: 1.05em; height: 1.05em; background: currentColor; opacity: .6;
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
#footer .footer-contacts-menu .site-menu__img { width: 1.25em; height: 1.25em; object-fit: contain; border-radius: 0; }
.footer-tagline { margin: 0; font-size: 14px; opacity: .75; overflow-wrap: anywhere; }

/* F3: плашка с форму/контактами по ширине контейнера */
/* плашка по ширине контейнера: фон у внутренней обёртки, а не у всего подвала */
.footer-panel-contained { background: transparent; }
.footer-panel-contained .footer-plate { box-sizing: border-box; max-width: var(--t-container-max); margin-inline: auto; background: var(--primary-light-background-color); border-radius: var(--t-radius); overflow: hidden; }

@media (max-width: 600px) {
    .footer-minimal #footer-row-1 > .page-wrapper, #footer-row-1 > .page-wrapper { flex-direction: column; align-items: center; text-align: center; }
    .footer-brand, .footer-columns nav { flex-basis: 100%; }
    #footer #footer-contact form .button, #footer-contact .button { width: 100%; }
}

/* Карта разделов, подписка и юридический ряд (footer.sitemap, footer.subscribe_*, footer.legal). Пустое не выводится совсем. */
#footer li.dropdown { display: block; position: relative; }   /* движок прячет и позиционирует `.dropdown` (default.css), а NavWidget ставит его пункту с подменю */
#footer-sitemap > .page-wrapper { padding-block: 32px 8px; }
#footer-sitemap > .page-wrapper > ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px 32px; align-items: start; }
#footer-sitemap ul ul { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
#footer-sitemap ul ul ul { padding-left: 12px; font-size: 14px; }
#footer-sitemap a, #footer-sitemap .site-menu__head { display: inline-flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; }   /* .site-menu__head: заголовок группы без адреса (SiteMenuWidget, режим tree) */
#footer-sitemap > .page-wrapper > ul > li > a { font-weight: 700; }
#footer-subscribe > .page-wrapper { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; padding-block: 32px 8px; }
.footer-subscribe-text { flex: 1 1 280px; min-width: 0; }
.footer-subscribe-text p { margin: 0; overflow-wrap: anywhere; }
.footer-subscribe-body { flex: 1 1 360px; min-width: 0; max-width: 520px; }
.footer-subscribe-form { display: flex; gap: 8px; }
.footer-subscribe-form input[type="email"] {
    flex: 1 1 auto; min-width: 0; box-sizing: border-box; min-height: var(--t-tap); padding: 0 14px; font: inherit;
    background: var(--content-background-color); color: var(--content-text-color); border: 1px solid var(--content-border-color); border-radius: var(--t-radius);
}
.footer-subscribe-form .button { flex: none; min-height: var(--t-tap); }
.footer-legal ul { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
.footer-legal ul.site-menu--v { flex-direction: column; }
.footer-legal li.dropdown > ul { display: none; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 600px) {
    .footer-subscribe-form { flex-direction: column; }
    .footer-subscribe-form .button { width: 100%; }
    .footer-subscribe-body { flex-basis: 100%; max-width: none; }
    .footer-legal ul { justify-content: center; }
}

/* Блок обращения `both`: контакты слева, форма справа; на ≤900px друг под другом.
   Форма — блок forms/feedback: в подвале без своей тени и отступов, заголовок как у колонки контактов, чтобы обе колонки начинались на одной линии */
.footer-contact-both { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr); gap: 24px 56px; align-items: start; }
.footer-contact-both .footer-contacts { flex-direction: column; gap: 14px; }
.footer-contact-info, .footer-contact-form { min-width: 0; }
#footer .footer-contact-form .feedback-form { margin: 0; padding: 0; background: none; gap: 0; }
#footer-contact .footer-nav-title, #footer .footer-contact-form .section-title { margin: 0 0 16px; font-size: inherit; font-weight: 700; line-height: 1.5; text-align: left; }
#footer-contact .footer-contacts li { margin: 0; padding: 0; }
/* поля формы — одним шагом (в блоке у поля, пары полей и кнопок отступы разные) */
#footer .footer-contact-form form { display: flex; flex-direction: column; gap: 16px; }
#footer .footer-contact-form form .fieldblock { margin: 0; }
#footer .footer-contact-form form .fieldblock-hidden { display: none; }
#footer .footer-contact-form form .fieldblock-buttons { margin: 4px 0 0; }
.footer-form-note { margin: 12px 0 0; font-size: 14px; opacity: .75; overflow-wrap: anywhere; }
/* только форма: текст над и под формой по центру */
#footer .footer-contact-form--solo .section-title, .footer-contact-form--solo .footer-form-note { text-align: center; }
#footer .footer-contact-form .feedback-form-wrapper {
    margin: 0; padding: 24px; box-shadow: none; border-radius: var(--t-radius);
    background: var(--content-background-color); color: var(--content-text-color);
}
@media (max-width: 900px) { .footer-contact-both { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { #footer .footer-contact-form .feedback-form-wrapper { padding: 16px; } }

/* Контакты в минимальном подвале (footer.contact_mode = contacts): ряд по центру */
.footer-minimal .footer-contacts { justify-content: center; margin-bottom: 8px; }
