/* === Сброс и общие настройки === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Подключение локальных шрифтов (TTF) === */
@font-face {
    font-family: 'Montserrat';
    src: url('/local/templates/pto/fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('/local/templates/pto/fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('/local/templates/pto/fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('/local/templates/pto/fonts/Montserrat-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* === Основные стили === */
body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem; /* 16px */
    line-height: 1.2;
    color: #000;
    background-color: #EFF5F9;
    ;
}

.container {
    max-width: 120rem; /* 1200px */
    margin: 0 auto;
    padding: 0 1rem;
}

/* === ХЕДЕР === */
.header {
    background-color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0; /* 16px */
}

.header__top-inner {
    display: flex;
    align-items: center;
    gap: 2rem; /* расстояние между логотипом, меню, поиском, кнопкой */
    width: 100%;
}

.logo img {
    height: 3rem; /* 48px */
}

/* Верхнее меню */
.main-menu ul {
    list-style: none;
    display: flex;
    gap: 1rem; /* 16px */
    margin: 0;
    padding: 0;
}

.main-menu a {
    text-decoration: none;
    color: #000;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 0.75rem; /* 8px 12px */
    display: block;
    transition: background-color 0.3s;
}

.main-menu a:hover {
    background-color: #e0e0e0;
}

.main-menu-list > li {
    position: relative;
}

.sub-menu {
    width: auto;           /* Ширина по содержимому */
    min-width: max-content;/* Современный способ — ширина по самой длинной строке */
    white-space: nowrap;   /* Запрещаем перенос строк */
    padding: 8px 0;        /* Вертикальные отступы */
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
}


.main-menu-list > li:hover .sub-menu {
    display: block;
}

.sub-menu li {
    padding: 0 20px;
}

.sub-menu a {
    color: #000;
    text-decoration: none;
    display: block;
    padding: 5px 0;
}

/* Блок поиска */
.search-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-block form {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 12px;
    padding: 10px 18px 10px 14px;
    width: 175px;
    height: 39px;
    box-sizing: border-box;
}

.search-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.search-input {
    background: none;
    border: none;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #000;
    width: 100%;
    padding: 0;
    margin: 0;
}

.search-input::placeholder {
    color: #888;
}

/* Кнопка для слабовидящих */
.contrast-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem; /* 24px */
    color: #000;
    padding: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer__top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-contacts-block,
    .footer-menu-block,
    .footer-social-block {
        flex: 0 0 100%;
    }

    .footer-menu-block {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-bottom-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center; /* Ссылки по центру */
    }
}

/* === ФУТЕР === */
.footer {
    background-color: #fff;
    color: #2a2a2a;
    padding: 2rem 0;
}

/* --- Контейнеры футера --- */
.container_footer_top,
.container_footer_bottom {
    max-width: 120rem; /* 1200px */
    margin: 0 auto;
    padding: 0 4rem;
}

/* --- ВЕРХНЯЯ ЧАСТЬ ФУТЕРА --- */
.footer__top {
    margin-bottom: 2rem;
}

.footer-top-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr; /* Пропорции: контакты - меню - соцсети */
    gap: 2rem;
}

.footer-contacts-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 3rem; /* 32px */
    margin-bottom: 1rem;
}

.footer-contacts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.footer-contacts-list li {
    margin-bottom: 0.25rem;
}

.footer-contacts-list a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contacts-list a:hover {
    color: #fff;
}



.footer-menu {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-menu-section {
    flex: 1;
}

.footer-menu-section h3 {
    font-weight: 500 !important;
    margin-bottom: 10px;
    color: #000;
}

.footer-menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-section li {
    margin-bottom: 5px;
}

.footer-menu-section a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-menu-section a:hover {
    color: #000;
}

.footer-social-block {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social img {
    width: 56px;
    height: 56px;
    vertical-align: middle;
}

/* --- НИЖНЯЯ ЧАСТЬ ФУТЕРА --- */
.footer__bottom {
    padding-top: 1rem;
}

.footer-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Текст - копирайт - ссылки */
    gap: 5 rem;
    align-items: center;
    text-align: center;
}

.footer-copyright-text p {
    font-size: 0.75rem;
    margin: 0;
    text-align: left;
    margin-right: 5 rem;
}

.footer-copyright p {
    font-size: 0.875rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-end; /* Ссылки справа */
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer-top-row {
        grid-template-columns: 1fr; /* Все элементы вертикально */
        gap: 1.5rem;
    }

    .footer-menu-block {
        grid-template-columns: 1fr; /* Меню тоже вертикально */
    }

    .footer-bottom-row {
        grid-template-columns: 1fr; /* Элементы нижней части тоже вертикальны */
        gap: 0.5rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center; /* Центрируем ссылки */
    }
}

/* === Адаптивность: стандартные брейкпоинты === */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 1rem;
    }

    .header__top-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .main-menu ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo img {
        height: 2.5rem; /* 40px */
    }

    .footer__top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer__social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 0.75rem;
    }

    .header__top {
        padding: 0.75rem 0;
    }

    .header__controls {
        gap: 0.75rem;
    }

    .search-block form {
        width: 150px;
        padding: 8px 16px 8px 12px;
    }

    .search-icon {
        width: 18px;
        height: 18px;
    }

    .search-input {
        font-size: 0.9375rem; /* 15px */
    }

    .contrast-btn {
        font-size: 1.25rem; /* 20px */
    }

    .main-menu a {
        padding: 0.5rem 0.5rem;
        font-size: 0.9375rem;
    }
}