/* =========================================================
   ФУТЕР — 3 колонки на всю ширину
   ========================================================= */

.site-footer {
    padding: 40px 40px;             /* отступы по бокам, но контент тянется */
    background: #00634f;
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
}

.site-footer__row {
    margin: 0 auto;
    width: 100%;
    max-width: none;                /* ← было 1400px; теперь на всю ширину */
}

/* =========================================================
   СЕТКА: 3 КОЛОНКИ НА ВСЮ ШИРИНУ
   ========================================================= */
.site-footer__row--top {
    display: grid;
     grid-template-columns: 1fr 1fr 0.9fr;  /* лого+контакты шире, поиск и меню уже */
    align-items: start;
    gap: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    width: 100%;
}

/* =========================================================
   КОЛОНКА 1: ЛОГО РЯДОМ С «Контакты:» + данные
   ========================================================= */
.site-footer__brand {
    display: flex;
    flex-direction: row;            /* ← лого и контакты в строку */
    align-items: flex-start;
    gap: 24px;
    min-width: 0;
}

/* Логотип */
.site-footer__brand > a,
.site-footer__brand > img,
.site-footer__logo,
.site-footer__logo img {
    flex: 0 0 auto;
    display: block;
}

.site-footer__brand img,
.site-footer__logo img {
    display: block;
    max-height: 80px;               /* логотип покрупнее */
    width: auto;
    height: auto;
}

/* Контакты — колонка справа от лого */
.site-footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Заголовок «Контакты:» через псевдоэлемент */
.site-footer__contacts::before {
    content: "Контакты:";
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    color: #fff;
}

.site-footer__contact-item {
    line-height: 1.4;
    font-size: 15px;
}

.site-footer__contact-item strong {
    font-weight: 600;
    display: inline;
}

/* =========================================================
   КОЛОНКА 2: ПОИСК + КАРТА САЙТА — ПО ЦЕНТРУ КОЛОНКИ
   ========================================================= */
.site-footer__center {
    display: flex;
    flex-direction: column;
    align-items: center;            /* ← центр по горизонтали */
    justify-content: center;        /* ← центр по вертикали */
    gap: 16px;
    min-width: 0;
    width: 100%;
    height: 100%;
}

.site-footer__search-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    align-items: stretch;
}

/* ====== ФОРМА ПОИСКА: универсально под разные шаблоны ====== */
.site-footer__search {
    width: 100%;
}

.site-footer__search form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

/* Все прямые потомки формы — в строку */
.site-footer__search form > * {
    flex: 1 1 auto;
    min-width: 0;
}

/* Текстовое поле */
.site-footer__search input[type="text"],
.site-footer__search input[type="search"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    outline: none;
    font-size: 15px;
    min-width: 0;
    box-sizing: border-box;
    height: 42px;
}

.site-footer__search input[type="text"]::placeholder,
.site-footer__search input[type="search"]::placeholder {
    color: rgba(255,255,255,.65);
}

/* Кнопка */
.site-footer__search input[type="submit"],
.site-footer__search button {
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    cursor: pointer;
    white-space: nowrap;
    font-size: 15px;
    flex: 0 0 auto;
    height: 42px;
    box-sizing: border-box;
}

.site-footer__search input[type="submit"]:hover,
.site-footer__search button:hover {
    background: #e8f5f1;
}

/* Если шаблон поиска оборачивает поля в div — тоже в строку */
.site-footer__search form > div {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.site-footer__search form > div:last-child,
.site-footer__search form > div:has(input[type="submit"]),
.site-footer__search form > div:has(button) {
    flex: 0 0 auto;
}

/* Карта сайта — по центру */
.site-footer__sitemap {
    width: 100%;
    text-align: center;
}

.site-footer__sitemap a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: .85;
}

.site-footer__sitemap a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* =========================================================
   КОЛОНКА 3: МЕНЮ — пункты по центру колонки
   ========================================================= */
.site-footer__right {
    display: flex;
    justify-content: center;        /* ← было flex-start; колонка меню центрируется */
    align-items: flex-start;
    min-width: 0;
    width: 100%;
}

.site-footer__menu {
    width: 100%;
}

.site-footer__menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;            /* ← было flex-start; пункты по центру */
    text-align: center;             /* ← текст пунктов по центру */
}

.site-footer__menu li {
    width: 100%;
    text-align: center;             /* ← сам пункт по центру */
}

.site-footer__menu a {
    color: #fff;
    text-decoration: none;
    display: inline-block;
    padding: 2px 0;
    font-size: 15px;
    text-align: center;
}

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

/*--------------------- На контакты шире колонка----------------*/
@media (max-width: 1100px) {
	.site-footer__row--top {
    	grid-template-columns: 1.4fr 1fr 0.9fr;
	}
}

/* =========================================================
   ПЛАНШЕТ: ≤ 992px — 2 колонки
   ========================================================= */
@media (max-width: 992px) {
    .site-footer {
        padding: 32px 20px;
    }

    .site-footer__row--top {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .site-footer__brand {
        grid-column: 1 / -1;        /* лого+контакты на всю ширину сверху */
        flex-direction: row;
        gap: 24px;
    }

    .site-footer__brand img,
    .site-footer__logo img {
        max-height: 64px;
    }

    .site-footer__search-group {
        max-width: 100%;
    }

    .site-footer__center {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .site-footer__sitemap {
        text-align: left;
    }

    .site-footer__menu ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 20px;
        align-items: center;
    }

    .site-footer__menu li {
        width: auto;
    }
}

/* =========================================================
   ТЕЛЕФОН: ≤ 768px — 1 колонка
   ========================================================= */
@media (max-width: 768px) {
    .site-footer {
        padding: 28px 16px;
        font-size: 14px;
    }

    .site-footer__row--top {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-bottom: 16px;
    }

    .site-footer__brand {
        grid-column: auto;
        flex-direction: column;      /* лого над контактами на телефоне */
        align-items: flex-start;
        gap: 16px;
    }

    .site-footer__brand img,
    .site-footer__logo img {
        max-height: 56px;
    }

    .site-footer__contact-item {
        font-size: 14px;
    }

    /* Поиск по центру, на всю ширину */
    .site-footer__center {
        align-items: center;
        justify-content: center;
    }

    .site-footer__search-group {
        max-width: 100%;
        margin: 0 auto;
    }

    /* Форма поиска — вертикально на телефоне */
    .site-footer__search form {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .site-footer__search form > * {
        flex: 1 1 auto;
        width: 100%;
    }

    .site-footer__search input[type="submit"],
    .site-footer__search button {
        width: 100%;
        flex: 1 1 auto;
    }

    .site-footer__search input[type="text"],
    .site-footer__search input[type="search"] {
        font-size: 16px;             /* анти-зум iOS */
    }

    .site-footer__sitemap {
        text-align: center;
    }

    /* Меню — колонкой */
    .site-footer__menu ul {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .site-footer__menu li {
        width: 100%;
    }

    .site-footer__menu a {
        font-size: 14px;
        padding: 6px 0;
    }
}

/* =========================================================
   УЗКИЙ ТЕЛЕФОН: ≤ 480px
   ========================================================= */
@media (max-width: 480px) {
    .site-footer {
        padding: 24px 12px;
    }

    .site-footer__row--top {
        padding-bottom: 16px;
        gap: 18px;
    }

    .site-footer__brand img,
    .site-footer__logo img {
        max-height: 48px;
    }

    .site-footer__contact-item {
        font-size: 13px;
    }

    .site-footer__menu a,
    .site-footer__sitemap a {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .site-footer {
        padding: 20px 10px;
    }

    .site-footer__contact-item {
        font-size: 12.5px;
    }

    .site-footer__menu a,
    .site-footer__sitemap a {
        font-size: 12.5px;
    }
}