:root {
    --brand-color: #0044aa;
    --background-light: color-mix(in srgb, var(--brand-color) 5%, white);
    /* --background-light: #f0f0f0; */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --text-dark: #333;
    --text-light: #fff;
    --background-dark: var(--brand-color);
    --main-border: #e0e0e0;

    --main-width: 1200px;
}

html, body {
    margin: 0;
    padding: 0;

    font-family: "Roboto", sans-serif;
    font-weight: 300;
    color: var(--text-dark);

    line-height: 25px;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

footer {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    color: var(--text-light);
    background-color: var(--background-dark);
    height:auto;
}

li {
    line-height: 24px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto", sans-serif;
    color: var(--text-dark);
}

h1 {
    color: var(--text-light);
    font-size: 1em;
}

p, a {
    font-family: "Roboto", sans-serif;
    color: var(--text-dark);
}

a {
    text-decoration: none;
}

.top-menu {
    width: 100%;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    transition: background-color 1s ease;
    padding: 10px 50px;
}

.top-menu-right {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 24px;
}

.header-contacts-desktop {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contacts-panel-mobile {
    display: none;
}

.contact-icon {
    color:white;
    display: flex;
}

.top-menu.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.top-menu.scrolled .lang-bar a {
    color:var(--text-dark) !important;
}

.main-container {
    width: var(--main-width);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid var(--main-border);
    box-sizing: border-box;
    border-top: none;
    border-bottom: none;
}

.container {
    padding: 20px;
}

.text-wrapper {
    padding: 0 10px;
}


.material-symbols-outlined {
    font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
    color:white;
    display:flex;
    align-items:center;
    cursor: default;
}

.material-symbols-outlined a {
    color:var(--text-light);
    font-size: 16px;
}

.banner {
    position: relative;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to right, #ffffff80, #00000080),
        url("/../public/img/banner_good.webp") center/cover no-repeat; */
    background: url("/../public/img/banner_good.webp") center/cover no-repeat;
    filter: brightness(0.5);
    object-fit: cover;
    z-index: 1;
}

.banner-logo {
    z-index: 3;
    filter: drop-shadow(0px 0px 12px white);
}

.banner-logo a {
    display: flex;
    width: 100%;
    height: 100%;
}

.banner-logo img {
    width: 200px;
}

.banner-text {
    text-shadow: 1px 1px 2px #333, 0 0 1em #333, 0 0 0.2em #333;
    color: var(--text-light);
    font-size: clamp(2rem, 2vw + 0.5rem, 6rem);
    font-weight: 900;
    line-height: 3rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 400px;
    max-width: 100%;
}

.active {
    pointer-events: none; /* Ссылка не будет кликабельной */
    cursor: default; /* Курсор мыши изменится на стрелку */
}

.right-size-menu {
    display: flex;
    flex-direction: row;
    gap:20px;
}

.contacts-bar {
    display: flex;    
    align-items: center;
    gap: 10px;
}

.lang-bar {
    display: flex;    
    align-items: center;
}

.lang-bar a {
    /* background-color: var(--background-dark); */
    font-weight: 400;
    padding: 0px 5px;
    color:var(--text-light);
}

.lang-bar a.active {
    font-weight: 900;
    /* color: var(--text-dark);
    background-color: var(--background-light); */
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0;
}

.main-nav a {
    /* 3. Стили для самих ссылок */
    color: #112A46; /* Белый цвет текста */
    text-decoration: none; /* Убираем подчеркивание */
    font-size: 1.5rem; /* Размер шрифта */
    padding: 10px 20px; /* Внутренние отступы для кнопок */
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.main-nav a.active {
    background-color: var(--brand-color); /* Более темный фон для выделения */
    color:var(--text-light);
}

.secondary-nav {
    /* 1. Используем Flexbox для выравнивания ссылок */
    display: flex;
    justify-content: center; /* Центрируем ссылки по горизонтали */
    align-items: center; /* Выравниваем по вертикали (если элементы разной высоты) */
    flex-wrap: wrap;
    margin: 10px 0;
    
    /* 2. Задаем отступы и фон */
    padding: 0; /* Отступы сверху/снизу */
    /* border-bottom: 1px solid var(--main-border); */
    /*border-top: 1px solid var(--main-border);*/
}

.secondary-nav button {
    /* 3. Стили для самих ссылок */
    color: #112A46; /* Белый цвет текста */
    background-color: white;
    text-decoration: none; /* Убираем подчеркивание */
    font-size: 1rem; /* Размер шрифта */
    padding: 10px 20px; /* Внутренние отступы для кнопок */
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    border: none;
    cursor: pointer;
}

.secondary-nav button.active {
    background-color: var(--brand-color); /* Более темный фон для выделения */
    color: var(--text-light);
}


/* pricing */
/* ---- Стили для карточки товара ---- */
.group-title {
    background-color: var(--background-light);
    padding: 1px 20px;
}

.price-item {
    padding: 15px;
    font-family: "Roboto", sans-serif;
    border-bottom: 2px solid;
    border-bottom-color: var(--background-light);
}

/* ---- Стили для контейнера колонок ---- */
/* Этот div делает левую и правую части колонками */
.price-item-content {
    display: flex;         /* Включаем Flexbox */
    align-items: center;   /* Выравниваем элементы по центру по вертикали */
    gap: 20px;             /* Расстояние между колонками */
}

/* ---- Стили для левой и правой колонок ---- */
.item-left-column {
    flex: 3;               /* Левая колонка занимает 3 части места */
}

.item-right-column {
    flex: 1;               /* Правая колонка занимает 1 часть места */
    text-align: right;     /* Выравниваем содержимое по правому краю */
    min-width: 120px;      /* Задаем минимальную ширину для цены */
}

/* ---- Стили для элементов внутри колонок ---- */
.item-header {
    margin-bottom: 5px;
}

.item-name {
    font-weight: 500;
    font-size: 1.2em;
    color: #333;
}

.item-code {
    font-size: 1em;
    color: #777;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: bold;
}

.item-description {
    font-size: 0.95em;
    color: #555;
    line-height: 1.4;
    font-weight: 400;
}

.item-price {
    font-size: 1.5em;
    color: #112A46;
}

.no-items {
    padding: 10px;
}

.service-block {
    display: flex;
    flex-wrap: wrap; /* Разрешает перенос на меньших экранах */
    align-items: stretch; /* <--- Убедитесь, что здесь stretch (или удалите свойство) */
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--background-light);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    gap: 20px; /* Отступ между элементами */
}

.service-description {
    flex: 1 1 60%; /* Описание займет ~60% ширины */
    /* padding-right/left можно убрать, если используем gap */
}

.service-image {
    flex: 0 0 35%; /* Изображение займет ~35% (оставим место для gap) */
    max-width: 35%;
    max-height: 300px;
    /* align-content: flex-end; */
    /* Убедитесь, что у .service-image нет фиксированной высоты */
}

.service-image img {
    width: 100%;    /* Занять всю ширину родителя */
    height: 100%;   /* <--- Занять всю высоту родителя */
    object-fit: cover; /* <--- Очень важно: обрезать изображение, чтобы оно заполнило, сохраняя пропорции */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.law
{
    padding: 1rem;
    background-color: var(--background-light);
}

.law ul li {
    margin-bottom: 10px;
}

.footer-details {
    display: flex;
    gap: 20px;
    padding: 10px;
    color: var(--text-light);
}

.footer-details a {
    color: var(--text-light);
}

.contact-container {
    display: flex; /* Делаем контейнер флекс-контейнером */
    gap: 30px; /* Добавляем отступ между картой и контактами */
    align-items: flex-start; /* Выравнивает элементы по верху (по умолчанию растягивает, если нет фиксированной высоты) */
    /* flex-wrap: wrap; /* Полезно для адаптивности: позволяет элементам переноситься на новую строку */
    padding: 20px; /* Отступы по периметру контейнера */
    max-width: 1200px; /* Например, для центрирования содержимого */
    margin: 0 auto; /* Центрирование контейнера */
}

.map {
    /* Чтобы карта была адаптивной: */
    /* flex: 1; Позволяет карте занимать доступное пространство */
    width: 600px;
    min-width: 300px; /* Минимальная ширина для карты на мобильных */
    /* Или можно задать фиксированную ширину, если не нужна гибкость */
    /* width: 600px; */
}

.map iframe {
    width: 100%; /* Iframe всегда занимает 100% ширины своего родителя (.map) */
    height: 450px; /* Фиксированная высота для iframe */
    /* Для адаптивной высоты iframe, используйте трюк с padding-bottom: */
    /* position: absolute; top: 0; left: 0; height: 100%; */
    /* А на .map: position: relative; padding-bottom: 75%; height: 0; (для соотношения 4:3) */
}

.contact-content {
    flex: 1; /* Позволяет контенту занимать оставшееся доступное пространство */
    /* Или можно задать фиксированную ширину, если не нужна гибкость */
    /* width: 400px; */
    padding: 20px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {

    body {
        padding-bottom: 76px;
    }

    .main-container {
        border: none;
    }

    .container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 0;
    }

    .top-menu {
        padding: 10px;
    }

    .banner {
        height: 250px;
    }

    .banner-text {
        width: 60%;
        line-height: 3rem;
    }

    .footer-details {
        flex-direction: column;
        gap: 0px;
    }

    .service-block {
        flex-direction: column; /* Вертикальный стек */
        padding: 0;
        gap: 1rem;
        margin-bottom: 10px;
        width: auto;
        overflow: hidden;
    }

    .service-description {
        margin: 0px 10px;
    }

    .service-description, .service-image {
        max-width: 100%;
    }

    .service-image img {
        height: 300px;
        width: 100%;
    }

    .contact-container {
        flex-direction: column; /* Элементы будут располагаться в столбец */
        align-items: center; /* Центрируем по горизонтали, если они в колонку */
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .map, .contact-content {
        width: 100%; /* Занимают всю доступную ширину */
        min-width: unset; /* Сбрасываем min-width для .map */
    }

    .map iframe {
        height: 300px; /* Уменьшаем высоту карты на мобильных */
    }
    
    .header-contacts-desktop {
        display: none;
    }

    .contacts-panel-mobile {
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap:10px;
        padding: 10px 0px;
        background-color: var(--brand-color);
        position:fixed;
        bottom:0;
        left:0;
        width:100%;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    }

    .contact-icon {
        display: flex;
        flex-direction: column;
        align-items:center;
        color: var(--text-light);
    }
}
