/* Исправления для мобильных устройств и iOS */
/* CSS-hint: Эти свойства используются для мобильной оптимизации и могут вызывать предупреждения в некоторых валидаторах */

/* Предотвращение zoom на iOS при фокусе на input */
@supports (-webkit-touch-callout: none) {
    .form__input,
    .form__select,
    .form__textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        border-radius: 8px;
        transform: scale(1);
        transition: transform 0.1s ease;
    }
}

/* Исправление бургер-меню */
.burger {
    width: 48px !important;
    height: 48px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    -webkit-appearance: none;
    appearance: none;
}

.burger span {
    width: 24px !important;
    height: 2px !important;
    margin: 3px 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 1px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: var(--text-dark) !important;
}

.burger:hover span {
    background-color: var(--primary-color) !important;
    box-shadow: none !important;
}

.burger:focus {
    outline: none !important;
    box-shadow: none !important;
}

.burger--active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) !important;
    background-color: var(--primary-color) !important;
    box-shadow: none !important;
}

.burger--active span:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
    box-shadow: none !important;
}

.burger--active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) !important;
    background-color: var(--primary-color) !important;
    box-shadow: none !important;
}

/* Убираем все возможные границы и outlines */
.burger,
.burger:focus,
.burger:focus-visible,
.burger:active,
.burger:visited {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Предотвращение двойного тапа на iOS */
.form__input,
.form__select,
.form__textarea,
.btn {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* Исправление для мобильной навигации */
@media (max-width: 768px) {
    .nav__link {
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-height: 44px !important;
        display: flex;
        align-items: center;
    }
    
    .menu-overlay {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
    
    .nav {
        padding: 80px 20px 40px !important;
        height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Сближаем иконку телефона с гамбургером */
    .header__mobile-contacts {
        gap: 0px !important;
        margin-right: 0px !important;
        padding-left: 0px !important;
    }
    
    /* Убираем лишние отступы у контактов */
    .header__mobile-contact {
        margin: 0 !important;
        padding: 0 !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Оптимизация для мобильных иконок контактов */
    .header__mobile-contact {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Обеспечиваем одинаковую жирность для иконки телефона */
    .header__mobile-contact i {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-weight: 900 !important;
    }
}
