/* Мобильные стили для кнопки калькулятора */
.mobile-calc-btn {
    display: block;
    margin-left: auto;
    animation: pulse-gold 1.5s infinite;
    box-shadow: 0 0 8px rgba(197, 168, 109, 0.8);
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    transform-origin: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-calc-btn:active {
    transform: scale(0.95);
}

.mobile-calc-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 168, 109, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(197, 168, 109, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 168, 109, 0);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Улучшенная мобильная и планшетная адаптивность */
@media screen and (max-width: 1024px) {
    /* Оптимизация шрифтов */
    html {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Улучшение кликабельности */
    a, button, input, select, textarea {
        -webkit-tap-highlight-color: rgba(197, 168, 109, 0.2);
        touch-action: manipulation;
    }

    /* Оптимизация прокрутки */
    * {
        -webkit-overflow-scrolling: touch;
    }

    /* Улучшение производительности */
    .animated-background {
        will-change: transform;
    }

    .gradient-orb {
        will-change: transform;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Фиксированные элементы */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 999;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Модальные окна */
    .stages-modal,
    .calculator-modal,
    .about-modal,
    .callback-modal,
    .privacy-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stages-modal__content,
    .calculator-modal__content,
    .about-modal__content,
    .callback-modal__content,
    .privacy-modal__content {
        max-width: 95%;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }

    /* Оптимизация форм */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea {
        font-size: 16px !important; /* Предотвращает зум на iOS */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    /* Улучшение кнопок */
    button,
    .btn,
    .btn-primary,
    .btn-outline {
        min-height: 44px; /* iOS рекомендует минимум 44px */
        min-width: 44px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    /* Отключение анимаций при низком заряде батареи */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* Оптимизация для маленьких экранов */
@media screen and (max-width: 375px) {
    .mobile-calc-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    .container {
        padding: 0 10px;
    }
}

/* Оптимизация для горизонтальной ориентации */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 30px 0;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* Выравнивание статистики по левому краю в мобильной/планшетной версии */
@media screen and (max-width: 1024px) {
    .stat-item {
        text-align: left !important;
    }

    .stat-number {
        text-align: left !important;
        justify-content: flex-start !important;
    }

    .stat-label {
        text-align: left !important;
    }

    /* Адаптация grid layouts для мобильных - 1 колонка */
    .cargo-grid,
    .cargo-types-grid,
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Адаптация заголовков для маленьких экранов */
    h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }

    /* Оптимизация hero section padding */
    .hero {
        padding: 0 0 15px !important;
        min-height: auto !important;
    }

    /* Улучшение inputs калькулятора */
    .calculator input,
    .calculator select,
    .calculator textarea {
        font-size: 16px !important;
        padding: 12px !important;
        min-height: 44px !important;
    }

    .calculator label {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    /* Адаптация footer для мобильных */
    .footer-content {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .footer-section {
        width: 100% !important;
        text-align: left !important;
    }

    /* Выравнивание информации о компании по центру */
    .footer__info {
        text-align: center !important;
    }

    .footer__info h3 {
        text-align: center !important;
    }

    .footer__info p {
        text-align: center !important;
    }

    .footer__info a {
        text-align: center !important;
    }

    .footer__bottom {
        text-align: center !important;
    }

    .footer__bottom p {
        text-align: center !important;
    }

    /* Скрываем Автодоставка в футере на мобильных */
    .hide-on-mobile {
        display: none !important;
    }

    /* Скрываем изображения доставки в hero на мобильных */
    .delivery-hero-image {
        display: none !important;
    }
} 