/**
 * Стили для контактов в шапке и выбора города
 */

/* === Хедер === */
header,
.elementor-location-header {
    position: relative;
    z-index: 9999 !important;
    background: #fff;
}

/* Скрываем только "Услуги" из меню (Продукция заменяется на кнопку через JS) */
.elementor-nav-menu .menu-item-1733 {
    display: none !important;
}

/* Стили для ссылок в меню */
.elementor-nav-menu .elementor-item,
.elementor-nav-menu--main .elementor-item {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 120% !important;
    letter-spacing: 0 !important;
    color: #242D3C !important;
}

/* Подменю "Услуги" */
.elementor-nav-menu .sub-menu.elementor-nav-menu--dropdown {
    display: flex !important;
    flex-direction: column !important;
    max-width: 320px !important;
}

/* === Выпадающие меню "Услуги" и "Область применения" === */
.top-nav__item--services,
.top-nav__item--application-areas {
    position: relative;
}

.top-nav__item--services .sub-menu,
.top-nav__item--application-areas .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 250px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 12px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
}

.top-nav__item--services:hover .sub-menu,
.top-nav__item--application-areas:hover .sub-menu,
.top-nav__item--services .sub-menu:hover,
.top-nav__item--application-areas .sub-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.top-nav__item--services .sub-menu .menu-item,
.top-nav__item--application-areas .sub-menu .menu-item {
    display: block;
    margin: 0;
    padding: 0;
}

.top-nav__item--services .sub-menu .top-nav__link,
.top-nav__item--application-areas .sub-menu .top-nav__link {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.top-nav__item--services .sub-menu .top-nav__link:hover,
.top-nav__item--application-areas .sub-menu .top-nav__link:hover {
    background: rgba(46, 74, 147, 0.1);
    color: #2E4A93;
    padding-left: 24px;
}

.dropdown-arrow {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.top-nav__item--services:hover .dropdown-arrow,
.top-nav__item--application-areas:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* === Блок контактов в шапке === */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Стили для блока города в Elementor */
.elementor-icon-box-description {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 120% !important;
    letter-spacing: 0 !important;
    color: #242D3C !important;
}

.elementor-icon-box-description span[style*="color:#2E4892"],
.elementor-icon-box-description span[style*="color: #2E4892"] {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 120% !important;
    letter-spacing: 0 !important;
    text-decoration: underline !important;
    text-decoration-style: solid !important;
    color: #2E4892 !important;
}

/* Блок телефона */
.elementor-element-3b74700 .elementor-heading-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    line-height: 120% !important;
    letter-spacing: 0 !important;
    color: #242D3C !important;
}

/* Кнопка "Заказать звонок" */
.elementor-element-e694132 .elementor-button {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 120% !important;
    letter-spacing: 0 !important;
    text-transform: unset !important;
    background-color: #2E4892 !important;
    border-radius: 10px !important;
    max-width: 228px !important;
    padding: 16px 37px !important;
    border: none !important;
    color: #fff !important;
}

/* Исправление цветов иконок Telegram и WhatsApp */
.elementor-repeater-item-f2c0347 svg path {
    fill: #0088CC !important; /* Telegram - синий */
}

.elementor-repeater-item-f41fef4 svg path {
    fill: #25D366 !important; /* WhatsApp - зеленый */
}

/* === Кликабельные карточки товаров === */
.product__link {
    display: block;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.product__link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product__link:hover .product__image {
    opacity: 0.9;
}

.product__name {
    display: block;
    margin-top: 10px;
    color: #2E4A93 !important;
    text-decoration: none !important;
    font-weight: 500;
}

.product__link:hover .product__name {
    color: #1e3173 !important;
}

/* === Кликабельные карточки товаров Elementor === */
.e-loop-item .elementor-widget-theme-post-featured-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.e-loop-item .elementor-widget-theme-post-featured-image:hover img {
    opacity: 0.8;
    transform: scale(1.02);
}

.e-loop-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Мессенджеры */
.header-messengers {
    display: flex;
    gap: 12px;
    align-items: center;
}

.messenger-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.messenger-link--whatsapp {
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

.messenger-link--whatsapp:hover {
    background: #25D366;
    color: #fff;
    transform: translateY(-2px);
}

.messenger-link--telegram {
    color: #0088cc;
    background: rgba(0, 136, 204, 0.1);
}

.messenger-link--telegram:hover {
    background: #0088cc;
    color: #fff;
    transform: translateY(-2px);
}

/* === Блок выбора города === */
.header-city {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.header-city:hover {
    background: rgba(46, 74, 147, 0.1);
}

.header-city__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-city__label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-city__name {
    font-size: 14px;
    font-weight: 600;
    color: #2E4A93;
    border-bottom: 1px dashed #2E4A93;
}

/* === Модальное окно выбора города === */
.city-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.city-modal.active {
    display: block;
}

.city-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.city-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.city-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px !important;
    height: 50px !important;
    border: none !important;
    background: #2E4A93 !important;
    cursor: pointer;
    color: #fff !important;
    transition: opacity 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    z-index: 10;
    font-size: 20px !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-weight: normal !important;
}

.city-modal__close:hover {
    opacity: 0.8 !important;
    background: #2E4A93 !important;
}

.city-modal__close:active {
    opacity: 0.9 !important;
}

.city-modal__close img {
    width: 20px;
    height: 20px;
    display: block;
}

.city-modal__title {
    font-size: 28px;
    font-weight: 700;
    color: #2E4A93;
    margin: 0 0 24px 0;
    text-align: center;
}

.city-modal__search {
    margin-bottom: 20px;
}

.city-modal__search-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e7e7e7;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.city-modal__search-input:focus {
    border-color: #2E4A93;
    box-shadow: 0 0 0 4px rgba(46, 74, 147, 0.1);
}

.city-modal__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.city-modal__section {
    display: block;
}

.city-modal__section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2E4A93;
    margin: 0 0 8px 0;
    padding: 8px 0 4px 4px;
    border-bottom: 2px solid #e7e7e7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.city-modal__section:first-child .city-modal__section-title {
    color: #d32f2f;
    font-size: 15px;
}

.city-modal__section .city-modal__item {
    display: inline-block;
    width: auto;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 10px 16px;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
}

.city-modal__list::-webkit-scrollbar {
    width: 6px;
}

.city-modal__list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.city-modal__list::-webkit-scrollbar-thumb {
    background: #2E4A93;
    border-radius: 10px;
}

.city-modal__item {
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.city-modal__item:hover {
    border-color: #2E4A93 !important;
    background: rgba(46, 74, 147, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.city-modal__item.hidden {
    display: none !important;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* === Адаптивность === */

/* Планшеты */
@media (max-width: 1024px) {
    .header-contacts {
        gap: 20px;
    }
    
    .messenger-link {
        width: 36px;
        height: 36px;
    }
    
    .header-city {
        padding: 6px 12px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .header-contacts {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .phone, .mail {
        flex: 1 1 auto;
    }
    
    .header-messengers {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
    
    .messenger-link {
        width: 44px;
        height: 44px;
    }
    
    .header-city {
        position: relative;
        padding: 6px 10px;
    }
    
    .header-city svg {
        width: 14px;
        height: 18px;
    }
    
    .header-city__label {
        font-size: 10px;
    }
    
    .header-city__name {
        font-size: 13px;
    }
    
    .city-modal__content {
        padding: 24px;
        width: 95%;
        max-height: 90vh;
    }
    
    .city-modal__title {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .city-modal__list {
        max-height: 60vh;
    }
    
    .city-modal__section .city-modal__item {
        padding: 12px 14px;
        font-size: 15px;
        margin-right: 6px;
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .header-city__label {
        display: none;
    }
    
    .city-modal__content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .city-modal__title {
        font-size: 20px;
    }
}

