/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Фиксированная шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Отступ для основного контента, чтобы не прятался под шапкой */
.main-vertical-wrapper {
    padding-top: 120px; /* высота шапки на десктопе, скорректировать при необходимости */
}

@media (max-width: 767px) {
    .main-vertical-wrapper {
        padding-top: 72px; /* высота шапки на мобиле, скорректировать при необходимости */
    }
}

/* ===== HEADER ===== */
.main-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

/* Верхний уровень хедера */
.header-top {
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Логотип - слева */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 44px;
    width: 44px;
    margin-right: 10px;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: bold;
    font-size: 18px;
    line-height: 1.2;
}

.logo-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

/* Правая часть - контакты */
.header-top-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-top-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-separator {
    width: 1px;
    height: 20px;
    background-color: #e5e5e5;
}

/* Селектор города */
.city-selector {
    position: relative;
}

.city-selector-trigger {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.city-selector-trigger:hover {
    background-color: #f8f9fa;
}

/* Номер телефона */
.phone-number {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.phone-number:hover {
    color: #007bff;
}

/* Телефон */
.phone-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.phone-link:hover {
    color: #007bff;
}

/* Разделитель */
.separator {
    width: 1px;
    height: 20px;
    background-color: #e5e5e5;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-selector-current {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.lang-selector-current:hover {
    background-color: #f8f9fa;
}

.lang-arrow {
    transition: transform 0.3s ease;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 80px;
    margin-top: 4px;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-content {
    padding: 8px 0;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.lang-option:hover {
    background-color: #f8f9fa;
}

.lang-option.active {
    background-color: #e3f2fd;
    font-weight: 600;
}

/* Mobile Language Selector */
.lang-selector-mobile {
    position: relative;
    margin-right: 16px;
}

.lang-selector-current-mobile {
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-arrow-mobile {
    transition: transform 0.3s ease;
}

.lang-dropdown-mobile {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1002;
    min-width: 70px;
    margin-top: 4px;
    display: none;
}

.lang-dropdown-mobile.active {
    display: block;
}

.lang-option-mobile {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.lang-option-mobile:hover {
    background-color: #f8f9fa;
}

.lang-option-mobile.active {
    background-color: #e3f2fd;
    font-weight: 600;
}

/* Счетчик заказов */
.orders-count {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-left: 16px;
}

.orders-icon {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}

.orders-text-block {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.orders-number {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.orders-text {
    font-size: 12px;
    color: #666;
}

/* Выпадающее меню городов */
.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 200px;
    margin-top: 4px;
}

.city-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.city-dropdown-content {
    padding: 8px 0;
}

.city-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.city-option:hover {
    background-color: #f8f9fa;
}

.city-option.active {
    background-color: #e3f2fd;
}

.city-option-name {
    font-weight: 500;
}

.city-check {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.city-option.active .city-check {
    opacity: 1;
}

/* ===== НАВИГАЦИЯ ===== */
.header-nav-desktop {
    padding: 16px 0;
}

.header-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav {
    flex: 1;
    margin-right: 20px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    color: #007bff;
}

.header-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.nav-separator {
    width: 1px;
    height: 20px;
    background-color: #e5e5e5;
}

/* Мега-меню */
.nav-item-dropdown {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 8px;
    min-width: 900px;
    max-width: 1100px;
    width: max-content;
}

.nav-item-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 24px;
}

.mega-menu-column {
    min-width: 0;
}

.mega-menu-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.mega-menu-list {
    list-style: none;
}

.mega-menu-list li {
    margin-bottom: 6px;
}

.mega-menu-link {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: block;
    padding: 2px 0;
}

.mega-menu-link:hover {
    color: #007bff;
}

/* ===== МОБИЛЬНЫЕ ЭЛЕМЕНТЫ ===== */
.header-mobile-controls {
    display: none;
    align-items: center;
}

.hamburger-button {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.hamburger-button span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

.hamburger-button:hover span {
    background: #007bff;
}

.hamburger-button.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-button.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-button.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    visibility: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.mobile-menu-panel.active {
    right: 0;
    visibility: visible;
    opacity: 1;
    position: fixed;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.menu-open, html.menu-open {
    overflow-x: hidden !important;
    width: 100vw !important;
    position: relative !important;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.mobile-menu-logo {
    flex-shrink: 0;
}

.mobile-menu-logo img {
    height: 28px;
    width: auto;
}

.close-mobile-menu {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.close-mobile-menu span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.close-mobile-menu span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-mobile-menu span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu-content {
    padding: 20px 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.mobile-menu-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.accordion-arrow {
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-arrow svg {
    width: 12px;
    height: 8px;
    color: #666;
}

/* Стили подменю аккордеона */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    display: none; /* Скрыто по умолчанию */
}

.mobile-submenu.active {
    max-height: 1000px;
    display: block; /* Показываем когда активно */
}

.mobile-submenu-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.mobile-submenu-link:last-child {
    border-bottom: none;
}

.mobile-submenu-link:hover {
    background-color: #e3f2fd;
    color: #007bff;
}

/* Футер мобильного меню */
.mobile-menu-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* Блок "Стать клинером" */
.become-cleaner-block {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #ff6b35;
    border-radius: 12px;
    margin-bottom: 20px;
    color: white;
}

.become-cleaner-icon {
    margin-right: 12px;
    flex-shrink: 0;
}

.become-cleaner-content {
    flex: 1;
}

.become-cleaner-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.become-cleaner-income {
    font-size: 14px;
    opacity: 0.9;
}

/* Выбор города */
.city-selector {
    display: flex;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
    font-size: 16px;
    color: #333;
}

.city-selector .city-icon {
    margin-right: 8px;
    font-size: 18px;
}

.city-selector .city-name {
    font-weight: 500;
}

/* Кнопки контактов */
.contact-buttons {
    display: flex;
    gap: 12px;
}

.contact-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.contact-button.phone {
    background: #007bff;
    color: white;
}

.contact-button.phone:hover {
    background: #0056b3;
}

.contact-button.telegram {
    background: #e3f2fd;
    color: #1976d2;
}

.contact-button.telegram:hover {
    background: #bbdefb;
}

.contact-button-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0;
}

.contact-button-text {
    white-space: nowrap;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    /* Скрыть десктопное меню */
    .header-nav-desktop {
        display: none !important;
    }
    
    /* Скрыть правую часть хедера на мобильных */
    .header-top-right {
        display: none !important;
    }
    
    /* Показать мобильные элементы */
    .header-mobile-controls {
        display: flex !important;
    }
    
    .hamburger-button {
        display: flex !important;
    }
    
    /* Разрешить отображение мобильного меню на мобильных устройствах */
    .mobile-menu-panel,
    .mobile-menu-overlay {
        visibility: hidden; /* По умолчанию скрыто */
        opacity: 0;
        pointer-events: none;
    }
    
    .mobile-menu-panel.active,
    .mobile-menu-overlay.active {
        visibility: visible !important; /* Показываем когда активно */
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Адаптация логотипа */
    .logo-img {
        height: 32px;
    }
    
    /* Уменьшить отступы */
    .header-top {
        padding: 8px 0;
    }
    
    /* Убедимся что контейнер правильно выравнивается */
    .header-top-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
}

@media (min-width: 769px) {
    /* Скрыть мобильное меню на десктопе */
    .mobile-menu-panel,
    .mobile-menu-overlay {
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        z-index: -9999 !important;
    }
    
    .header-mobile-controls {
        display: none !important;
    }
}

/* Скрыть мобильные элементы на десктопе */
@media (min-width: 769px) {
    .mobile-menu-bottom {
        display: none !important;
    }
    
    .mobile-main-strip {
        display: none !important;
    }
    
    /* Скрыть мобильные элементы управления */
    .header-mobile-controls {
        display: none !important;
    }
}

/* Скрыть только пункты подвала на мобильной версии */
@media (max-width: 768px) {
    .footer-list {
        display: none !important;
    }
    
    .footer-title {
        display: none !important;
    }
} 

/* Нижний блок мобильного меню */
.mobile-menu-bottom {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100px;
}

/* Селектор города в мобильной версии */
.city-selector-mobile {
    position: relative;
    display: flex;
    justify-content: flex-start; /* Город влево */
    margin-bottom: auto; /* Отталкиваем кнопки вниз */
}

.city-current {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.city-current:hover {
    color: #333;
}

.city-icon {
    margin-right: 8px;
    font-size: 16px;
}

.city-name {
    font-weight: 500;
    color: #333 !important;
    display: inline-block !important;
    visibility: visible !important;
    margin-right: 8px;
}

.city-arrow {
    transition: transform 0.2s ease;
    color: #6c757d;
}

.city-current.active .city-arrow {
    transform: rotate(180deg);
}

/* Выпадающий список городов в мобильной версии */
.header-mobile-controls {
    display: flex;
    align-items: center;
}

.city-dropdown-mobile {
    position: absolute;
    top: 100%;
    left: 0; /* Изменено с right на left */
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.city-dropdown-mobile.active {
    display: block;
}

.city-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f8f9fa;
}

.city-option:last-child {
    border-bottom: none;
}

.city-option:hover {
    background: #f8f9fa;
}

/* Кнопки контактов */
.contact-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end; /* Кнопки вправо */
    margin-top: 20px; /* Дополнительный отступ сверху */
}

.contact-btn {
    flex: 0 0 auto; /* Убираем flex: 1, чтобы кнопки не растягивались */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px; /* Минимальная ширина кнопок */
}

.contact-btn svg {
    margin-right: 8px;
    flex-shrink: 0;
}

.phone-btn {
    background: #007bff;
    color: white;
}

.phone-btn:hover {
    background: #0056b3;
}

.telegram-btn {
    background: #0088cc;
    color: white;
}

.telegram-btn:hover {
    background: #006699;
} 

/* Мобильная горизонтальная полоска с основными пунктами */
.mobile-main-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 10;
}
.mobile-main-strip-link {
  color: #888;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 8px;
  transition: color 0.2s;
}
.mobile-main-strip-link:hover {
  color: #ff9900;
}
@media (min-width: 768px) {
  .mobile-main-strip {
    display: none;
  }
} 

body.mobile-menu-open .mobile-main-strip {
  display: none !important;
} 

/* Исправленный селектор для аккордеона мобильного меню */
.mobile-menu .mobile-menu-item.active .mobile-submenu {
    display: block !important;
    max-height: 1000px !important;
    overflow: visible !important;
} 

/* УНИВЕРСАЛЬНЫЙ ХАК: раскрытие подменю мобильного меню при active */
.mobile-menu-item.active .mobile-submenu {
    display: block !important;
    max-height: none !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    z-index: 99999 !important;
    overflow: visible !important;
    background: #f8f9fa !important;
} 

.accordion-header, .mobile-menu-link {
    cursor: pointer;
    user-select: none;
}
.accordion-header * {
    cursor: pointer;
} 