/* Mobile Menu Improvements */
.mobile-menu-toggle {
    display: none;
}

/* Desktop menu */
@media (min-width: 769px) {
    .header-nav {
        display: flex !important;
    }
    
    .mobile-menu-toggle,
    .btn-menu {
        display: none !important;
    }
    
    .header-menu {
        display: none !important;
    }
}

/* Mobile menu */
@media (max-width: 768px) {
    .mobile-menu-toggle,
    .btn-menu {
        display: block !important;
    }
    
    .header-menu {
        display: block !important;
    }
    
    .header-nav {
        /* Убираем display: none, используем логику из mobile-adaptive.css */
    }
    
    .header-nav.open {
        /* Убираем display: flex, используем логику из mobile-adaptive.css */
    }
    
    /* Стилизация кнопки меню */
    .btn-menu {
        background: #ebeb47;
        border: 2px solid #ebeb47;
        cursor: pointer;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        transition: all 0.3s ease;
        position: relative;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        box-shadow: 0 4px 12px rgba(235, 235, 71, 0.3);
    }
    
    .btn-menu:hover,
    .btn-menu:active {
        background: #d4d43a;
        border-color: #d4d43a;
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(235, 235, 71, 0.4);
    }
    
    .btn-menu.active {
        background: #d4d43a;
        border-color: #d4d43a;
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(235, 235, 71, 0.4);
    }
    
    .icon-bar {
        width: 24px;
        height: 3px;
        background: #000;
        margin: 3px 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
        transform-origin: center;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    
    .btn-menu.active .icon-bar:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .btn-menu.active .icon-bar:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .btn-menu.active .icon-bar:nth-child(3) {
        transform: rotate(-45deg) translate(9px, -8px);
    }
}

/* Header improvements - ТОЛЬКО для мобильных */
@media (max-width: 768px) {
    .header__top {
        padding: 12px 0;
    }
    
    .container.flexible {
        padding: 0 16px;
    }
    
    .header-logo img {
        max-height: 40px;
        width: auto;
    }
    
    .header-nav {
        /* Убираем display: none, используем логику из mobile-adaptive.css */
    }
    
    .header-menu {
        display: flex;
        align-items: center;
    }
    
    .header-menu .link {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #000;
        text-decoration: none;
        white-space: nowrap;
    }
    
    /* НЕ скрываем нижнюю навигацию на мобильных - она нужна для меню */
    .header__bottom {
        /* Убираем display: none, используем логику из mobile-adaptive.css */
    }
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Hero section improvements - только для мобильных */
@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding: 60px 0;
    }
    
    .hero__content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 28px;
        margin-bottom: 16px;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 24px;
        line-height: 1.5;
    }
}

/* Intro section improvements - только для мобильных */
@media (max-width: 768px) {
    .intro {
        padding: 60px 0;
        text-align: center;
    }
    
    .intro__content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .intro__info_title {
        font-size: 28px;
        margin-bottom: 16px;
        line-height: 1.2;
    }
    
    .intro__info_text {
        font-size: 18px;
        margin-bottom: 24px;
        line-height: 1.6;
    }
    
    .intro__buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-top: 24px;
    }
    
    .intro__buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 28px;
        font-size: 16px;
        text-align: center;
    }
}

/* About section improvements - только для мобильных */
@media (max-width: 768px) {
    .about {
        padding: 80px 0;
        text-align: center;
    }
    
    .about__content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .about__info_title {
        font-size: 28px;
        margin-bottom: 16px;
        line-height: 1.2;
    }
    
    .about__info_text {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
}

/* Product section improvements - только для мобильных */
@media (max-width: 768px) {
    .product {
        padding: 60px 0;
    }
    
    .product__content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .product__title {
        text-align: center;
        font-size: 28px;
        margin-bottom: 24px;
    }
}

/* TripBox banner improvements - только для мобильных */
@media (max-width: 768px) {
    .tripbox-banner {
        margin: 24px auto;
        max-width: 100%;
        text-align: center;
    }
    
    .tripbox-banner h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .tripbox-banner p {
        font-size: 16px;
        margin-bottom: 20px;
    }
}

/* Дополнительные улучшения для мобильных */
@media (max-width: 768px) {
    /* Улучшения для мобильного меню */
    .header-nav .nav {
        padding: 20px 15px;
    }
    
    .header-nav .nav .link {
        padding: 16px 0;
        font-size: 18px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Улучшения для кнопок на мобильных */
    .btn {
        min-height: 48px;
        padding: 14px 24px;
        font-size: 16px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .btn:hover,
    .btn:active {
        transform: translateY(-1px);
    }
    
    /* Улучшения для ссылок */
    .link {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .intro {
        padding: 40px 0;
    }
    
    .intro__info_title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .intro__info_text {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .intro__buttons .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .about {
        padding: 60px 0;
    }
    
    .about__info_title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .about__info_text {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }
    
    .stat-card {
        padding: 24px 16px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .product__title {
        font-size: 24px;
    }
    
    .tripbox-banner h3 {
        font-size: 18px;
    }
    
    .tripbox-banner p {
        font-size: 14px;
    }
    
    /* Улучшения для очень маленьких экранов */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .header-nav .nav {
        padding: 16px 12px;
    }
    
    .header-nav .nav .link {
        padding: 14px 0;
        font-size: 16px;
    }
    
    .btn-menu {
        width: 40px;
        height: 40px;
        padding: 10px;
    }
    
    .icon-bar {
        width: 20px;
        height: 2px;
    }
}

/* Chat button improvements */
.chat-button {
    transition: all 0.3s ease !important;
}

.chat-button:hover {
    transform: scale(1.05) !important;
}

.chat-widget {
    transition: all 0.3s ease !important;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hardware acceleration for animations - только для мобильных */
@media (max-width: 768px) {
    .hero h1,
    .hero p,
    .intro__info_title,
    .intro__info_text,
    .intro__buttons,
    .about__info_title,
    .about__info_text,
    .btn-menu,
    .icon-bar,
    .chat-button {
        will-change: transform;
        transform: translateZ(0);
    }
}

/* Focus improvements */
.btn:focus,
.link:focus {
    outline: 2px solid #ebeb47;
    outline-offset: 2px;
}

/* Better spacing */
.section {
    margin-bottom: 60px;
}

.section:last-child {
    margin-bottom: 0;
}

/* Footer improvements */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer__main {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer__nav_wrapper {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer__nav {
        text-align: center;
    }
    
    .footer__nav_title {
        font-size: 18px;
        margin-bottom: 16px;
        font-weight: 700;
        color: #ebeb47;
    }
    
    .footer__nav_link {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .footer__nav_link a {
        padding: 8px 16px;
        border-radius: 8px;
        background: rgba(235, 235, 71, 0.1);
        transition: all 0.3s ease;
        text-decoration: none;
        color: #000;
        font-weight: 500;
    }
    
    .footer__nav_link a:hover {
        background: #ebeb47;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(235, 235, 71, 0.3);
    }
    
    .footer__newsletter {
        text-align: center;
        max-width: 100%;
    }
    
    .footer__newsletter_title {
        font-size: 20px;
        margin-bottom: 20px;
        font-weight: 600;
    }
    
    .footer__newsletter_form {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .footer__newsletter_form input {
        padding: 14px 16px;
        border: 2px solid #ebeb47;
        border-radius: 8px;
        font-size: 16px;
        background: #fff;
    }
    
    .footer__newsletter_form button {
        padding: 14px 24px;
        background: #ebeb47;
        color: #000;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .footer__newsletter_form button:hover {
        background: #d4d43a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(235, 235, 71, 0.3);
    }
    
    .copy {
        text-align: center;
        margin-top: 20px;
        font-size: 14px;
        color: #666;
    }
    
    .back.toTop {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .back__title.show-mobile {
        display: block;
        position: fixed;
        bottom: 80px;
        right: 20px;
        background: #ebeb47;
        color: #000;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
}

/* Improved touch targets */
@media (max-width: 768px) {
    button,
    .btn,
    .link,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
    }
    
    /* Better scrolling on iOS */
    .header-nav,
    .chat-widget {
        -webkit-overflow-scrolling: touch;
    }
}
