/* Дополнительные стили для мобильной версии */

/* Улучшение мобильного меню */
@media (max-width: 992px) {
    .header-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Центрирование логотипа в мобильном хедере */
    .header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 10px;
        height: 80px;
        position: relative;
    }
    
    .header-mobile__center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        width: auto;
    }
    
    .header-mobile__logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 165px;
        position: relative;
        top: 0;
    }
    
    .header-mobile__menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .header-mobile__menu.is-open {
        display: block;
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Улучшение кнопок в мобильном меню */
    .header-mobile__help-button {
        margin: 10px 20px;
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 25px;
    }
    
    /* Улучшение навигации в мобильном меню */
    .header-mobile__menu-navbar .nav-links__item {
        border-bottom: 1px solid #f0f0f0;
        padding: 15px 20px;
    }
    
    .header-mobile__menu-navbar .nav-links__item-link {
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }
    
    .header-mobile__menu-navbar .nav-links-submenu__item-link {
        font-size: 16px;
        color: #666;
        padding: 8px 0;
    }
}

/* Улучшение отзывчивости для очень маленьких экранов */
@media (max-width: 480px) {
    .header-mobile__logo {
        width: 165px;
    }
    
    .header-mobile__center {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .header-mobile__help-button {
        margin: 8px 15px;
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Исправление для iOS Safari */
@supports (-webkit-touch-callout: none) {
    .header-mobile__menu {
        -webkit-overflow-scrolling: touch;
    }
}

/* Улучшение доступности и touch-событий */
.header-mobile__button,
.js-mobile-menu-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

.header-mobile__button:focus {
    outline: 2px solid #5DCAC6;
    outline-offset: 2px;
}

.header-mobile__menu-navbar .nav-links__item-link:focus,
.header-mobile__menu-navbar .nav-links-submenu__item-link:focus {
    outline: 2px solid #5DCAC6;
    outline-offset: 2px;
}

/* Анимация для мобильного меню */
.header-mobile__menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-100%);
}

.header-mobile__menu.is-open {
    transform: translateX(0);
}

/* Fallback для устройств без JavaScript */
.no-js .header-mobile__menu {
    position: static;
    display: block;
    opacity: 1;
    transform: none;
    height: auto;
    overflow: visible;
}

.no-js .header-mobile__button {
    display: none;
}

/* Улучшение для очень маленьких экранов */
@media (max-width: 320px) {
    .header-mobile__button,
    .js-mobile-menu-button {
        min-height: 40px;
        min-width: 40px;
        padding: 8px;
    }
    
    .header-mobile__menu {
        top: 70px;
    }
}

/* Улучшение скролла на мобильных устройствах */
@media (max-width: 992px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Исправление для мобильных форм */
@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px !important; /* Предотвращает зум на iOS */
    }
    
    .btn {
        min-height: 44px; /* Минимальная высота для удобного нажатия */
    }
}

/* Улучшение карточек на мобильных устройствах */
@media (max-width: 768px) {
    .aid-card {
        margin-bottom: 20px;
    }
    
    .aid-card__description {
        padding: 15px;
    }
    
    .card-child-wrapper {
        margin: 10px;
        border-radius: 15px;
    }
}

/* Исправление для модальных окон на мобильных */
@media (max-width: 768px) {
    .modal__container {
        margin: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
} 

/* Скрытие линий на мобильных устройствах */
@media (max-width: 768px) {
    .line2,
    .line3,
    .line6 {
        display: none !important;
    }
} 