/* Общие стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1160px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Класс, который будет добавляться к меню при прокрутке */
.main-navigation.sticky-nav {
    position: fixed; /* Фиксируем меню относительно окна браузера */
    top: 0;          /* Прижимаем к самому верху */
    left: 0;         /* Растягиваем на всю ширину */
    right: 0;
    width: 100%;
    z-index: 990;   /* Устанавливаем высокий z-index, чтобы меню было поверх всего контента */

    /* Небольшая тень для визуального отделения от контента, который прокручивается под меню */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Плавное появление */
    animation: fadeInDown 0.3s ease-in-out;
}

/* Простой эффект анимации для плавности */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
   ВАЖНО: Добавляем отступ для body, когда меню становится "липким".
   Это предотвратит "прыжок" контента вверх, когда меню вырвется из потока документа.
   Этот отступ будет добавляться и убираться с помощью JavaScript.
*/
body.nav-is-sticky {
    /* Отступ будет равен высоте вашего меню */
    /* Мы зададим его динамически через JS */
}

/* Верхняя панель */
.top-bar {
    background-color: var(--bg-color); /* Или другой цвет фона, если он отличается */
    padding: 10px 0;
    font-size: 0.9em;
}

.top-bar-content {
    display: flex;
    justify-content: right;
    gap: 25px;
    align-items: center;
}

.phone-number {
    font-weight: bold;
    color: #333;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px; /* Скругление слева */
    outline: none;
}

.search-form button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-left: none;
    background-color: #fff;
    cursor: pointer;
    border-radius: 0 20px 20px 0; /* Скругление справа */
    color: #888;
}
.search-form button:hover {
    background-color: #f0f0f0;
}


.language-switcher {
    cursor: pointer;
    color: #333;
}
.language-switcher .fa-chevron-down {
    font-size: 0.8em;
    margin-left: 5px;
}

/* Основная навигация */
.main-navigation {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Легкая тень */
    border-radius: 15px; /* Скругление как на картинке */
    margin: 0px auto; /* Центрирование и отступы */
    width: calc(90% - 20px); /* Чтобы внутренний .container не растягивал */
    max-width: calc(1160px);
}

.main-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 20px;
}

.logo img {
    height: 40px; /* Подберите высоту логотипа */
    display: block;
}

.site-nav ul {
    display: flex;
}

.site-nav ul li {
    margin: 0 15px; /* Отступы между пунктами меню */
    position: relative; /* Для позиционирования выпадающего меню */
}

.site-nav ul li a {
    color: #333;
    padding: 10px 0;
    display: block;
    font-size: 0.95em;
    transition: color 0.3s ease;
}
.site-nav ul li a .icon-small {
    font-size: 0.7em;
    margin-left: 4px;
    opacity: 0.7;
}

.site-nav ul li a:hover {
    color: #00b853; /* Цвет при наведении (зеленый с картинки) */
}

/* Выпадающее меню */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Появляется под родительским элементом */
    left: 0;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px; /* Скругление выпадающего меню */
    padding: 10px 0;
    min-width: 200px; /* Минимальная ширина выпадающего меню */
    z-index: 1000;
}
.site-nav li .dropdown-menu {
    display: none;
}

.site-nav ul li.dropdown:hover .dropdown-menu {
    display: block; /* Показываем при наведении на родительский li */
}

.dropdown-menu li a {
    padding: 10px 20px;
    white-space: nowrap;
    font-size: 0.9em;
    display: flex; /* Для выравнивания иконки и текста */
    align-items: center;
}

.dropdown-menu li a i {
    margin-right: 10px;
    color: #555; /* Цвет иконок в выпадающем меню */
    width: 20px; /* Фиксированная ширина для иконок */
    text-align: center;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color); /* Цвет при наведении (зеленый с картинки) */
}


.cta-button {
    background-color: var(--primary-color); /* Зеленый цвет кнопки */
    color: #fff !important; /* Важно, чтобы перебить другие стили ссылок */
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.cta-button:hover {
    background-color: #c1ebd5; /* Более темный зеленый при наведении */
}

/* Хлебные крошки */
.breadcrumbs-container {
    padding: 15px 0;
    font-size: 0.9em;
    color: #555;
}
.breadcrumbs {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumbs li {
    margin-right: 5px;
}

.breadcrumbs li::after {
    content: "/";
    margin-left: 5px;
    color: #aaa;
}

.breadcrumbs li:last-child::after {
    content: ""; /* Убираем слеш у последнего элемента */
}

.breadcrumbs li a {
    color: #555;
}

.breadcrumbs li a:hover {
    text-decoration: underline;
    color: #00b853;
}

.breadcrumbs li.active {
    color: #333; /* Активная крошка */
    font-weight: normal;
}

/* ======================================= */
/* ====== MOBILE HEADER & NAV STYLES ===== */
/* ======================================= */

/* Mobile Header (the bar at the top on small screens) */
.mobile-header {
    display: none; /* Hidden by default, shown via media query */
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mobile-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-button-mobile {
    background-color: #00b853; /* Green from image */
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-menu .line {
    width: 30px;
    height: 3px;
    background-color: #333;
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Mobile Navigation Panel (the slide-in menu) */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 400px;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling for long menus */
}

.mobile-nav-panel.is-open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.close-menu-btn {
    font-size: 36px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Accordion Menu Styles */
.mobile-menu-accordion {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex-grow: 1; /* Pushes footer down */
}

.accordion-item .accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}
.accordion-item .accordion-trigger i {
    transition: transform 0.3s ease;
}

.accordion-item.is-open .accordion-trigger i {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.submenu ul {
    list-style: none;
    padding: 10px 0 10px 15px; /* Indent sub-items */
    margin: 0;
}
.submenu li a {
    display: block;
    padding: 10px 0;
    color: #555;
    text-decoration: none;
    font-size: 16px;
}

/* Mobile Nav Footer */
.mobile-nav-footer {
    margin-top: auto; /* Pushes to bottom */
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.contact-info {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}
.contact-info a {
    color: #333;
    text-decoration: none;
    margin-left: 15px;
}

.social-icons {
    margin-bottom: 25px;
}
.social-icons a {
    color: #00b853; /* Green from image */
    font-size: 24px;
    margin-right: 20px;
    text-decoration: none;
}

.cta-button-mobile-menu {
    display: block;
    width: auto;
    background-color: #00b853;
    color: white;
    padding: 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
}

/* ======================================= */
/* ====== RESPONSIVE MEDIA QUERIES ======= */
/* ======================================= */

/* Adjust breakpoint as needed. 992px is a common choice. */
@media (max-width: 992px) {
    /* Hide desktop navigation */
    .top-bar,
    .main-navigation {
        display: none;
    }

    /* Show mobile header */
    .mobile-header {
        display: block;
    }
}

/* Верхняя панель - стили для Language Switcher */
.language-switcher {
    position: relative; /* Необходимо для позиционирования выпадающего списка */
    cursor: pointer;
    color: #333;
}

.current-lang {
    display: flex;
    align-items: center;
    padding: 5px 0; /* Небольшой отступ для кликабельности */
}

.current-lang span {
    margin-right: 5px;
}

.current-lang .icon-small {
    font-size: 0.7em;
    opacity: 0.7;
    transition: transform 0.2s ease-in-out;
}

.language-dropdown {
    display: none; /* Скрыт по умолчанию */
    position: absolute;
    top: 90%; /* Появляется под .current-lang */
    right: 0;  /* Выравнивание по правому краю родителя */
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 5px 0;
    min-width: 150px; /* Минимальная ширина списка */
    z-index: 1001; /* Выше других элементов на странице */
    margin-top: 5px; /* Небольшой отступ сверху */
}

.language-switcher:hover .language-dropdown,
.language-switcher .current-lang:focus + .language-dropdown, /* Показ по фокусу на .current-lang */
.language-switcher .language-dropdown:hover { /* Чтобы не скрывался при наведении на сам список */
    display: block;
}

/* Поворот стрелки при открытии */
.language-switcher:hover .current-lang .icon-small,
.language-switcher .current-lang:focus .icon-small {
    transform: rotate(180deg);
}

.language-dropdown li {
    list-style: none;
}

.language-dropdown li a.lang-option {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    white-space: nowrap;
}

.language-dropdown li a.lang-option:hover {
    background-color: #f5f5f5;
    color: #00b853; /* Цвет при наведении */
}

.language-dropdown li a.lang-option.active {
    font-weight: bold;
    color: #00b853; /* Цвет активного языка */
    background-color: var(--primary-light); /* Легкий фон для активного */
}
/* Footer Styles */
.site-footer {
    background-color: #333; /* Темно-серый фон, как на примере */
    color: #ccc; /* Светло-серый текст по умолчанию */
    padding: 60px 0 20px;
    font-size: 0.875em; /* 14px, если базовый 16px */
    line-height: 1.7;
}

.site-footer a {
    color: #f0f0f0; /* Более светлый цвет для ссылок */
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #00b853; /* Зеленый цвет при наведении (как в шапке) */
    text-decoration: underline;
}

.site-footer h4 {
    color: #fff; /* Белый цвет для заголовков колонок */
    font-size: 0.95em; /* Чуть больше основного текста футера */
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: bold;
}

.footer-main-content {
    display: flex;
    flex-wrap: wrap; /* Для переноса на маленьких экранах */
    justify-content: space-between;
    gap: 30px; /* Пространство между колонками */
    margin-bottom: 30px;
}

.footer-col {
    flex: 1; /* Колонки стараются занять равное пространство */
    min-width: 200px; /* Минимальная ширина колонки до переноса */
}
.footer-col-logo-social {
    flex-grow: 0.8; /* Растет чуть меньше остальных */
}

.footer-logo img {
    max-width: 100px; /* Подберите размер логотипа */
    margin-bottom: 20px;
    display: block;
}

.social-icons {
    display: flex;
    gap: 10px; /* Пространство между иконками */
    margin-bottom: 25px;
}

.social-icons li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #fff; /* Белый фон кружка */
    color: #333; /* Цвет иконки внутри кружка */
    border-radius: 50%;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-icons li a:hover {
    background-color: #00b853; /* Зеленый фон при наведении */
    color: #fff;
    text-decoration: none;
}

.partner-logos .partner-logo img {
    max-width: 140px; /* Подберите размер */
    display: block;
    margin-bottom: 15px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.partner-logos .partner-logo:hover img {
    opacity: 1;
}


.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.app-store-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.app-store-buttons img {
    height: 40px; /* Стандартная высота для кнопок магазинов */
    width: auto;
    display: block;
}

.payment-icons {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.payment-icons img {
    height: 20px; /* Подберите высоту иконок */
    width: auto;
    opacity: 0.9;
}

.footer-divider {
    border: 0;
    border-top: 1px solid #444; /* Цвет разделителя */
    margin: 30px 0;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start; /* Выравнивание по верху для групп */
    gap: 20px;
    margin-bottom: 30px;
    font-size: 0.8em; /* Мельче текст для юридических ссылок */
}
.footer-legal-links a {
    display: block; /* Чтобы каждая ссылка была на новой строке в своей группе */
    margin-bottom: 5px;
    color: #bbb;
}
.footer-legal-links span {
    display: block;
    margin-bottom: 5px;
    color: #bbb;
}
.legal-group-left, .legal-group-center, .legal-group-right {
    flex: 1;
    min-width: 180px;
}
.legal-group-center {
    text-align: center; /* Центральная группа по центру */
}
.legal-group-right {
    text-align: right; /* Правая группа по правому краю */
}


.footer-disclaimer-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #2a2a2a; /* Чуть другой фон для этого блока */
    border-radius: 8px;
}

.disclaimer-text {
    flex: 2; /* Занимает больше места */
    font-size: 0.75em;
    color: #aaa;
    min-width: 280px;
}
.disclaimer-text a {
    color: #ccc;
    text-decoration: underline;
}
.disclaimer-text a:hover {
    color: #00b853;
}

.cta-trustline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Кнопка и иконка справа */
    gap: 10px;
    min-width: 200px;
}

.trustline-button {
    background-color: #00b853; /* Зеленая кнопка */
    color: #fff !important; /* Важно, чтобы перебить общий цвет ссылок */
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.trustline-button:hover {
    background-color: #00b853; /* Темнее при наведении */
}

.trustline-icon {
    font-size: 1.5em; /* Размер иконки вопроса */
    color: #ccc;
}
.trustline-icon:hover {
    color: #fff;
    text-decoration: none;
}


.footer-company-info {
    font-size: 0.75em; /* Очень мелкий текст для реквизитов */
    color: #999;
    text-align: left; /* Центрируем этот блок */
}

.footer-company-info p {
    margin-bottom: 8px;
    line-height: 1.5;
}
.footer-company-info .site-developer {
    margin-top: 15px;
}
.footer-company-info .site-developer a {
    color: #aaa;
}
.footer-company-info .site-developer a:hover {
    color: #00b853;
}

/* Адаптивность (базовая) */
@media (max-width: 992px) {
    .footer-col {
        flex-basis: calc(50% - 15px); /* Две колонки в ряд */
        min-width: unset;
    }
    .footer-col-logo-social {
        flex-basis: 100%; /* Первая колонка на всю ширину */
        text-align: center;
    }
    .footer-col-logo-social .footer-logo img {
        margin-left: auto;
        margin-right: auto;
    }
    .social-icons {
        justify-content: center;
    }
    .partner-logos {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .footer-legal-links {
        flex-direction: column;
        align-items: center; /* Центрируем все группы */
        text-align: center;
    }
    .legal-group-left, .legal-group-center, .legal-group-right {
        text-align: center !important; /* Переопределяем выравнивание */
        width: 100%;
        margin-bottom: 10px;
    }
    .footer-disclaimer-cta {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cta-trustline {
        justify-content: center; /* Кнопка по центру */
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .footer-col {
        flex-basis: 100%; /* Одна колонка в ряд */
    }
}




/* --- Контейнер для контента --- */
.error-container {
    text-align: center; /* Центрируем текст внутри контейнера */
    background-color: #ffffff; /* Белый фон для карточки */
    padding: 50px 60px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07); /* Легкая тень для объема */
}

/* --- Заголовок "404" --- */
.error-code {
    font-size: 12rem; /* Очень большой размер шрифта */
    font-weight: 900; /* Самое жирное начертание */
    color: #2c3e50; /* Темно-серый цвет */
    margin: 0;
    line-height: 1; /* Убираем лишние отступы по высоте */
}

/* --- Текстовое сообщение об ошибке --- */
.error-message {
    font-size: 1.75rem; /* Размер поменьше, чем у заголовка */
    font-weight: 700;
    color: #34495e; /* Чуть светлее, чем 404 */
    margin-top: 10px;
    margin-bottom: 40px;
    letter-spacing: 1px; /* Небольшое расстояние между буквами */
}

/* --- Зеленая кнопка --- */
.home-button {
    display: inline-block; /* Чтобы можно было задать padding */
    text-decoration: none; /* Убираем подчеркивание у ссылки */
    
    background-color: #04b46c; /* Тот самый зеленый цвет из макета */
    color: #ffffff; /* Белый текст */
    
    padding: 14px 32px; /* Внутренние отступы для размера кнопки */
    border-radius: 50px; /* Сильно скругленные углы для формы "пилюли" */
    
    font-size: 1rem;
    font-weight: 700;

    transition: background-color 0.3s ease, transform 0.2s ease; /* Плавные переходы для hover-эффекта */
}

/* --- Эффект при наведении на кнопку --- */
.home-button:hover {
    background-color: #03a35f; /* Делаем цвет чуть темнее */
    transform: translateY(-2px); /* Слегка приподнимаем кнопку */
}
/* --- Стили для блока личного кабинета и авторизации --- */

.user-profile-block {
    position: relative; /* Необходимо для позиционирования выпадающего меню */
    display: flex;
    align-items: center;
}

/* Ссылка для входа и триггер выпадающего меню */
.login-link,
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px; /* Расстояние между иконкой и текстом */
    text-decoration: none;
    color: #333; /* Цвет текста, настройте под свой дизайн */
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.login-link:hover,
.profile-trigger:hover {
    background-color: #f0f0f0; /* Легкий фон при наведении */
}

/* Иконки внутри блока */
.user-profile-block .fas {
    font-size: 1.2em; /* Размер иконки */
    color: var(--primary-color); /* Цвет иконки, настройте под свой дизайн */
}

.user-profile-block .icon-small {
    font-size: 0.7em;
    color: #888;
    transition: transform 0.2s;
}

/* Выпадающее меню */
.profile-menu {
    display: none; /* Меню по умолчанию скрыто */
    position: absolute;
    top: 90%; /* Появляется сразу под блоком */
    right: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    margin: 5px 0 0 0;
    min-width: 220px; /* Минимальная ширина меню */
    z-index: 1000;
}

/* Показываем меню при наведении на родительский блок .profile-dropdown */
.profile-dropdown:hover .profile-menu {
    display: block;
}

/* Вращение стрелочки при наведении */
.profile-dropdown:hover .profile-trigger .icon-small {
    transform: rotate(180deg);
}

/* Ссылки в меню */
.profile-menu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap; /* Чтобы текст не переносился */
    transition: background-color 0.2s;
}

.profile-menu li a:hover {
    background-color: #f5f5f5;
}

/* Разделитель в меню */
.profile-menu li.separator {
    height: 1px;
    background-color: #e9ecef;
    margin: 8px 0;
}

/* Ссылка "Выйти" может иметь особый стиль */
.profile-menu li a[href*="logout=yes"] {
    color: #d9534f; /* Например, красный цвет */
}

/* Стили для корректного отображения поля ввода телефона с флагами */
.final-quiz-form .iti {
    width: 100%; /* Заставляем контейнер с флагом занимать всю ширину */
}

.final-quiz-form .iti__country-list {
    z-index: 10; /* Чтобы выпадающий список стран был поверх других элементов */
}