/* Основные стили для мобильного блока контактов */
.mobile-contacts {
    width: 100%;
    padding: 10px;
    background: #fff;
    margin-bottom: 0px;
    position: relative;
}

/* Стили для заголовка блока */
.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}

/* Стили для содержимого контактов */
.contacts-content {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    display: none;
    transition: all 0.3s ease;
    background-color: #fff;
}

/* Стили для иконок */
.contact-icon {
    margin: 0 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}


.contact-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Стили для ссылок внутри иконок */
.contact-icon a {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

/* Общие стили для всех иконок */
.phone-icon,
.mail-icon,
.whatsapp-icon,
.telegram-icon,
.location-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Стили для конкретных иконок */
.phone-icon {
    background-image: url('/upload/icons/phone.png');
}

.mail-icon {
    background-image: url('/upload/icons/mail.png');
}

.whatsapp-icon {
    background-image: url('/upload/icons/whatsapp.png');
}

.telegram-icon {
    background-image: url('/upload/icons/telegram.png');
}

.location-icon {
    background-image: url('/upload/icons/location.png');
}

/* Стили для текста "Контакты" */
.contacts-header span {
    text-align: right;
    flex: 1;
    margin-right: 10px;
    font-weight: 800;
    font-size: 16px;
    color: #e21afc;
}

/* Стили для стрелки */
.arrow {
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Медиа-запросы для адаптивности */
@media screen and (max-width: 768px) {
    .mobile-contacts {
        padding: 15px;
    }
    
    .contact-icon {
        width: 36px;
        height: 36px;
    }
}

@media screen and (max-width: 480px) {
    .contact-icon {
        width: 30px;
        height: 30px;
    }
    
    .contacts-header span {
        font-size: 21px;
    }
}


/* Медиа-запросы в CSS, которые будут скрывать блок на больших экранах */
@media screen and (min-width: 768px) {
    .mobile-contacts {
        display: none !important;
    }
}


/* для размеров иконок */
@media screen and (max-width: 480px) {
    .contact-icon {
        width: 50px;
        height: 50px;
        margin: 10px;
    }

    .phone-icon,
    .mail-icon,
    .whatsapp-icon,
    .telegram-icon,
    .location-icon {
        width: 32px;
        height: 32px;
    }
}


/* для размеров иконок */
@media screen and (max-width: 480px) {
.contacts-header {
        display: flex;
        align-items: center;
        margin-right: 20px; /* Добавляем отступ */
    }
}

@media screen and (max-width: 480px) {
.contacts-content {
padding-left: 0px
}
}


/* Дополнительные правки стилей для правок */
@media screen and (max-width: 768px) {
    /* Позиционирование блока контактов относительно шапки */
    .mobile-contacts {
        position: relative;
        z-index: 1000;
    }

    /* Корректировка позиционирования содержимого контактов */
    .contacts-content {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 2px 5px rgb(0 0 0 / 0%);
    }

    /* Корректировка отступов для правильного выравнивания */
    .contacts-header {
        padding: 15px 0px;
    }

    /* Центрирование иконок и увеличение их размера */
    .contacts-content {
        justify-content: left;
        flex-wrap: wrap;
    }

    /* Увеличение размера иконок */
    .contact-icon {
        width: 60px;
        height: 60px;
        margin: 15px;
    }

    /* Корректировка размера самих изображений иконок */
    .phone-icon,
    .mail-icon,
    .whatsapp-icon,
    .telegram-icon,
    .location-icon {
        width: 48px;
        height: 48px;
    }

    /* Стили для выравнивания текста "Контакты" */
    .contacts-header span {
        margin-right: auto;
    }

    /* Стили для стрелки */
    .arrow {
        margin-left: 10px;
        color:  #e21afc;
    }
}

@media screen and (max-width: 480px) {
    /* Уменьшение размеров для очень маленьких экранов */
    .contact-icon {
        width: 50px;
        height: 50px;
        margin: 10px;
    }

    .phone-icon,
    .mail-icon,
    .whatsapp-icon,
    .telegram-icon,
    .location-icon {
        width: 36px;
        height: 36px;
    }
}


/* !!! Для увеличение иконок */
@media screen and (max-width: 768px) {
    /* Увеличение размера всего блока с иконками */
    .contacts-content {
        padding: 15px; /* Увеличиваем отступы вокруг иконок */
    }

    /* Увеличение размера контейнера иконок */
    .contact-icon {
        width: 65px; /* Увеличиваем ширину контейнера */
        height: 65px; /* Увеличиваем высоту контейнера */
        margin: 15px; /* Увеличиваем отступы между иконками */
    }

    /* Увеличение размера самих изображений иконок */
    .phone-icon,
    .mail-icon,
    .whatsapp-icon,
    .telegram-icon,
    .location-icon {
        width: 56px !important; /* Увеличиваем размер изображений */
        height: 56px !important;
    }

    /* Для очень маленьких экранов */
    @media screen and (max-width: 480px) {
        .contact-icon {
            width: 60px;
            height: 60px;
            margin: 5px;
        }

        .phone-icon,
        .mail-icon,
        .whatsapp-icon,
        .telegram-icon,
        .location-icon {
            width: 48px;
            height: 48px;
        }
    }
}


/* !!!!Централизируем иконки по ширине */
@media screen and (max-width: 768px) {
    .contacts-content {
        justify-content: center; /* Центрируем элементы по горизонтали */
        flex-wrap: wrap;
        display: flex; /* Убедимся, что используется flex-layout */
        align-items: center; /* Центрируем по вертикали */
        width: 100%; /* Занимает всю доступную ширину */
    }

    .contact-icon {
        margin: 15px auto; /* Добавляем отступы и центрируем */
        display: flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box; /* Для корректного расчёта размеров */
  }
}

@media screen and (max-width: 480px) {
    .contacts-content {
        padding: 15px; /* Дополнительные отступы для маленьких экранов */
    }

    .contact-icon {
        margin: 10px auto;
    }
}


/* !!!!Для уменьшение интервала между иконками с приоритетом */
@media screen and (max-width: 768px) {
    .contact-icon {
        margin: 10px 5px !important; /* Уменьшаем горизонтальный отступ до 5px */
        width: 60px !important;
        height: 60px !important;
    }

    .contacts-content {
        padding: 5px !important; /* Уменьшаем padding контейнера */
        gap: 6px !important; /* Добавляем gap между элементами flex-контейнера */
        margin-left: -6px !important; /* Cдвигаем в левую часть */
;
    }
}

@media screen and (max-width: 480px) {
    .contact-icon {
        margin: 8px 3px !important; /* Ещё меньше отступ для маленьких экранов */
    }
}


/* Для одного уровня с лого блок "Контакты" */
@media screen and (max-width: 768px) {
    .header-block {
        display: flex;
        align-items: center;
        justify-content: space-between; /* Располагаем элементы по краям */
        padding: 10px 20px; /* Добавляем отступы для всего блока */
    }

    .header-logo {
        flex: 0 0 auto; /* Фиксируем размер логотипа */
        max-width: 100%;
    }

    .contacts-header {
        display: flex;
        align-items: center;
        cursor: pointer;
        margin-left: auto; /* Прижимаем к правому краю */
    }
}


/* Убедимся, что содержимое контактов изначально скрыто */
.contacts-content {
    display: none !important; /* !important для переопределения возможных стилей Битрикс */
    flex-wrap: nowrap;
    justify-content: space-around;
    padding: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    width: 100%;
}

/* Добавляем дополнительный класс для управления видимостью */
.contacts-content.active {
    display: flex !important;
    justify-content: flex-end;
}



/* Для сброса отступов */
.contacts-content,
.contact-icon {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ! Добавляем позиционирование для блока контактов */
.mobile-contacts {
    position: relative !important;
    z-index: 9999 !important; /* Высокий приоритет отображения */
}

/* Стили для заголовка блока */
.contacts-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
}

/* Добавляем анимацию для плавного появления */
.contacts-content {
    position: absolute !important;
    top: 100% !important; /* Располагаем под заголовком */
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    
    &.active {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Добавляем отступ для меню при открытии контактов */
.contacts-content.active ~ .main-menu {
    margin-top: calc(100% + 30px) !important; /* 100% высота блока + отступ */
    transition: margin 0.3s ease !important;
}

/* Если меню находится выше */
.main-menu {
    position: relative !important;
    z-index: 9998 !important;
}


.contacts-content {
    min-width: 100% !important;
    max-width: 100% !important;
}


/* Стили для содержимого контактов с полной границей - до этого урезалось */
.contacts-content {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    
    /* Добавляем полную границу */
    border: 0px solid #e0e0e0 !important; /* Цвет границы */
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 15px !important;
    
    &.active {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Корректируем отступы для правильного отображения границы */
.mobile-contacts {
    padding: 0 !important; /* Убираем внешние отступы */
    width: 100% !important;
    left: 5px !important;  /* Сдвигаем на 5px в правую сторону */
}

/* Медиа-запросы для адаптивности границы */
@media screen and (max-width: 768px) {
    .contacts-content {
        border-width: 1px !important;
        border-style: solid !important;
        border-color: #e0e0e0 !important;
    }
}

@media screen and (max-width: 480px) {
    .contacts-content {
        border-width: 1px !important;
        padding: 10px !important;
    }
}

/* скрыть границу блока с иконками */
@media screen and (max-width: 768px) {
 .contacts-content {
 border: none !important;
 }
}


/* Стили для правок стрелки снизу от заголовка блока с !important */
.contacts-header {
 display: flex !important;
 flex-direction: column !important; /* Меняем направление на вертикальное */
 align-items: center !important; /* Центрируем по горизонтали */
 cursor: pointer !important;
 padding: 10px 0 !important;
 border-bottom: 1px solid #e0e0e0 !important;
 background-color: #fff !important;
 transition: all 0.3s ease !important; /* Добавляем плавность */
 position: relative !important;
}

/* Стили для текста "Контакты" с приоритетом */
.contacts-header span {
 margin-bottom: 5px !important; /* Добавляем отступ снизу */
 font-weight: 800 !important;
 font-size: 16px !important;
 color: #e21afc !important;
 text-align: center !important; /* Центрируем текст */
 display: block !important;
}

/* Стили для стрелки с приоритетом */
.arrow {
 font-size: 16px !important;
 cursor: pointer !important;
 transition: transform 0.2s ease !important, font-size 0.2s ease !important;
 display: block !important;
}

/* Медиа-запросы для адаптивности с приоритетом */
@media screen and (max-width: 768px) {
.contacts-header {
 padding: 8px 0 !important;
 }
 
.contacts-header span {
 font-size: 18px !important;
 }
 
.arrow {
 font-size: 17px !important;
 }
}

/* Дополнительные правила для предотвращения конфликтов */
.contacts-header,
.contacts-header span,
.arrow {
 box-sizing: border-box !important;
 margin: 0 !important;
 padding: 0 !important;
}



.header-block__contacts {
	display: none;
}

@media screen and (max-width: 768px) {
.header-block {
            display: flex;
        align-items: normal;
    justify-content: space-between;
    transition: all .3s;
}

.header-block__contacts {
    margin-right: 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: center;
	font-family: Arial, sans-serif;
	font-weight: 800;
}

a.header-block__contacts-toggle {
    text-transform: uppercase;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all .3s;
    z-index: 1;
    color: #3d4692;
	font-size: 17px;
}

a.header-block__contacts-toggle:before, a.header-block__contacts-toggle:after {
    content: '';
    display: block;
    position: absolute;
    opacity: 0;
}

a.header-block__contacts-toggle:after {
    content: '\f0d7';
    font-family: FontAwesome;
    font-size: 14px;
    bottom: 0;
    line-height: 0;
    transition: all .3s;
}

a.header-block__contacts-toggle:before {
    height: 2px;
    width: 10px;
    background: #3d4692;
    bottom: 4px;
    transition: all .3s;
}

.header-block__socials {
    position: absolute;
    display: flex;
    gap: 3px;
    justify-content: center;
    align-items: center;
    transition: bottom .3s;
    bottom: calc(50% - 20px);
    width: 100%;
}

a.header-block__social {
    width: 17px;
    min-width: 17px;
    height: 17px;
    border-radius: 100%;
    transition: all .3s;
}

.header-block.opened {
    padding-bottom: 55px;
}

.header-block.opened a.header-block__contacts-toggle {
    padding-bottom: 1.5em;
}

.header-block.opened a.header-block__contacts-toggle:before {
    bottom: .9em;
    height: 3px;
    width: 100%;
    opacity: 1;
}

.header-block.opened a.header-block__contacts-toggle:after {
    font-size: 22px;
    line-height: .2;
    opacity: 1;
}



.header-block.opened .header-block__socials {
    top: auto;
    bottom: -52px;
    height: 55px;
    left: auto;
    right: -22px;
    transform: none;
    width: 100vw;
    animation: mymove .3s linear;
    gap: 0;
	justify-content: space-around;
}

.header-block.opened a.header-block__social {
    width: 50px;
    height: 50px;
    animation: myscale .3s linear;
}

a.header-block__social i {
    width: 100%!important;
    height: 100%!important;
    display: block;
}

.phone-icon {
    background-image: url('/upload/icons/phone.png');
}

.mail-icon {
    background-image: url('/upload/icons/mail.png');
}

.whatsapp-icon {
    background-image: url('/upload/icons/whatsapp.png');
}

.telegram-icon {
    background-image: url('/upload/icons/telegram.png');
}

.location-icon {
    background-image: url('/upload/icons/location.png');
}

@keyframes mymove {
0% { 
    bottom: 1.8em;
    width: 100%;
}
50% { 
    bottom: -48px;
    width: 300%;
}
100% { 
    bottom: -48px;
    width: 100vw;
}
}

@keyframes myscale {
0% { 
    width: 17px;
    height: 17px;
}
50% { 
    width: 22px;
    height: 22px;
}
100% { 
    width: 40px;
    height: 40px;
}
}
}