/* Mobile Adaptation Styles - Полный рефакторинг */

/* Базовые мобильные стили */
@media (max-width: 768px) {
    
    /* ===== МОБИЛЬНАЯ ШАПКА ===== */
    
    /* Скрываем десктопную шапку */
    .desktop-header {
        display: none !important;
    }
    
    /* Скрываем десктопное выпадающее меню на мобильных */
    .desktop-dropdown {
        display: none !important;
    }
    
    /* Показываем мобильную шапку */
    .mobile-header {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
    }
    
    /* ===== HERO СЕКЦИИ ===== */
    
    /* Основная Hero секция - увеличенный размер только для главной и услуг */
    .hero:not(.hero-about),
    section.hero:not(.hero-about),
    #home.hero:not(.hero-about) {
        margin-top: 125px !important; /* Высота единой мобильной шапки (80px + 45px) */
        padding-top: 125px !important;
        min-height: 1073px !important; /* 975px * 1.1 = 1073px (+10%) */
        height: 1073px !important; /* 975px * 1.1 = 1073px (+10%) */
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        top: 125px !important; /* Принудительно опускаем на высоту шапки */
        left: 0 !important;
        right: 0 !important;
        z-index: 1 !important;
        display: flex !important;
        align-items: flex-start !important; /* Изменено с center на flex-start */
        justify-content: center !important;
        overflow: hidden !important;
        clear: both !important;
    }
    
    /* Hero секция "Обо мне" - уменьшенная на 100px */
    .hero-about,
    section.hero-about {
        margin-top: 0 !important;
        padding-top: 0 !important; /* Убираем отступ сверху */
        min-height: calc(100vh - 100px) !important; /* Уменьшено на 100px */
        height: calc(100vh - 100px) !important; /* Уменьшено на 100px */
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1 !important;
        clear: both !important;
    }
    
    /* Радикальное исправление для страницы "Обо мне" */
    body:has(.hero-about) .hero-about,
    body:has(section.hero-about) section.hero-about {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        position: relative !important;
        z-index: 1 !important;
        clear: both !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        min-height: calc(100vh - 100px) !important;
        height: calc(100vh - 100px) !important;
    }
    
    /* iOS Safari fix - учитываем Safe Area */
    @supports (-webkit-touch-callout: none) {
        .hero:not(.hero-about),
        section.hero:not(.hero-about),
        #home.hero:not(.hero-about) {
            margin-top: calc(125px + env(safe-area-inset-top)) !important;
            top: calc(125px + env(safe-area-inset-top)) !important;
        }
    }
    
    /* Project Hero секция */
    .project-hero,
    section.project-hero {
        margin-top: 125px !important;
        padding: 80px 0 20px 0 !important; /* 80px сверху для шапки */
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1 !important;
        clear: both !important;
    }
    
    
    /* Изображение в About Hero - показываем полностью по горизонтали */
    .hero-about-photo img {
        object-position: calc(50% - 100px) center !important; /* Смещаем изображение на 100px влево */
        object-fit: contain !important; /* Изменено с cover на contain для полного отображения */
        width: 195% !important; /* Увеличено на 30% (150% * 1.3 = 195%) */
        height: 195% !important; /* Увеличено на 30% (150% * 1.3 = 195%) */
        transform: translateY(10px) translateX(-100px) !important; /* Смещаем изображение вниз на 10px и влево на 100px */
    }
    
    /* Надпись "АШУР АХМЕДОВ" - увеличиваем расстояние между строками и смещаем */
    .hero-about-content {
        left: calc(75% - 5px) !important; /* Смещаем на 5px влево */
        top: calc(50% + 50px) !important; /* Смещаем на 50px вниз */
    }
    
    .hero-about-title {
        line-height: 0.9 !important; /* Увеличиваем расстояние между строками с 0.9 до 1.2 */
    }
    
    .hero-about-name-line2 {
        margin-top: 5px !important; /* Увеличиваем отступ между строками */
    }
    
    /* Portfolio Header секция */
    .portfolio-header,
    section.portfolio-header {
        margin-top: 0 !important;
        padding-top: 125px !important; /* 80px + 45px = 125px (опущено на 45px) */
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1 !important;
        clear: both !important;
        min-height: 200px !important;
        height: 10vh !important;
    }
    
    /* Заголовки всех страниц проектов - опускаем на 50px */
    .portfolio-header-content {
        margin-top: 115px !important; /* Опускаем заголовки проектов на 50px */
    }
    
    /* Специфично для страницы портфолио - опускаем надпись "ИНТЕРЬЕРЫ" */
    body.portfolio-page .portfolio-header-content {
        margin-top: 150px !important; /* Увеличиваем отступ для опускания текста */
    }
    
    /* ===== HERO КОНТЕНТ ===== */
    
    .hero-video {
        margin-top: px !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: -1 !important;
    }
    
    .hero-video video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .hero-content {
        position: absolute !important;
        top: calc(75% + 80px) !important; /* Опускаем на 75% от верха + 80px */
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        display: flex !important;
        align-items: flex-start !important; /* Изменено с center на flex-start */
        justify-content: center !important;
        text-align: center !important;
        color: #fff !important;
        z-index: 3 !important;
        padding: 0 20px !important;
    }
    
    .hero-title {
        font-size: 24px !important;
        letter-spacing: 1px !important;
        margin: 0 !important;
        text-transform: lowercase !important;
    }
    
    /* Project Hero контент */
    .project-hero-content {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .project-hero-image img {
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .project-info h1 {
        font-size: 1.5rem !important;
    }
    
    .project-meta {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .project-meta span {
        font-size: 0.9rem !important;
        padding: 6px 12px !important;
    }
    
    .project-info p {
        font-size: 1rem !important;
    }
    
    /* ===== КАРТОЧКИ ПРОЕКТОВ ===== */
    
    /* Секции проектов */
    .projects {
        padding: 60px 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Контейнеры проектов - убираем горизонтальные отступы */
    .projects .container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Сетка проектов */
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Карточки проектов */
    .project-card,
    .portfolio-item {
        height: auto !important;
        min-height: 280px !important;
        max-height: 350px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }
    
    /* Изображения проектов - увеличены на 40% */
    .project-image {
        height: 252px !important; /* было 180px, стало 252px (+40%) */
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .project-card img,
    .portfolio-item img {
        height: 252px !important; /* было 180px, стало 252px (+40%) */
        width: 100% !important;
        object-fit: cover !important;
    }
    
    /* Информация о проектах */
    .project-info {
        padding: 15px !important;
        background: #000 !important;
        color: #fff !important;
    }
    
    .project-info h3 {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
        color: #fff !important;
    }
    
    .project-info p {
        font-size: 14px !important;
        color: #ccc !important;
        margin: 0 !important;
    }
    
    /* ===== ГАЛЕРЕЯ ===== */
    
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        width: 100% !important;
    }
    
    .gallery-item {
        aspect-ratio: 16/9 !important;
        height: 150px !important;
        width: 100% !important;
    }
    
    /* ===== ГАЛЕРЕЯ ПРОЕКТОВ - УБИРАЕМ ГОРИЗОНТАЛЬНЫЕ ОТСТУПЫ ===== */
    
    /* Максимально специфичные селекторы для переопределения отступов */
    .project-gallery .container,
    section.project-gallery .container,
    .project-gallery > .container {
        padding: 0 !important; /* Убираем горизонтальные отступы */
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .project-gallery-grid,
    .project-gallery .project-gallery-grid {
        padding: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .project-animated-image,
    .project-single-image {
        width: 100% !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .project-animated-image video,
    .project-single-image img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* ===== КНОПКИ ===== */
    
    .btn-universal,
    .btn-primary,
    .btn-secondary {
        padding: 8px 16px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }
    
    /* ===== ФУТЕРЫ "ПРИМЕР ПРОЕКТА" И "ЭКСКУРСИЯ" ===== */
    
    .tour-section {
        padding: 40px 0 !important; /* Уменьшаем с 60px до 40px */
        min-height: auto !important;
    }
    
    .tour-form-container h2 {
        font-size: 1.8rem !important; /* Уменьшаем с 2.5rem до 1.8rem */
        letter-spacing: 0.5px !important;
        margin-bottom: 15px !important; /* Уменьшаем отступ */
    }
    
    .tour-form-container p {
        font-size: 0.9rem !important; /* Уменьшаем с 1rem до 0.9rem */
        margin-bottom: 20px !important; /* Уменьшаем с 30px до 20px */
        line-height: 1.4 !important;
    }
    
    .form-inputs {
        flex-direction: column !important;
        gap: 15px !important; /* Уменьшаем с 20px до 15px */
    }
    
    .tour-form {
        gap: 20px !important; /* Уменьшаем с 25px до 20px */
    }
    
    .tour-form input {
        padding: 12px 0 !important; /* Уменьшаем с 15px до 12px */
        font-size: 1rem !important; /* Уменьшаем с 1.1rem до 1rem */
    }
    
    .tour-form .btn-universal {
        width: 100% !important;
        padding: 10px 20px !important; /* Уменьшаем padding */
        font-size: 0.8rem !important; /* Уменьшаем с 0.7rem до 0.8rem */
        min-height: 36px !important; /* Уменьшаем высоту */
    }
    
    .tour-form .btn-universal--medium {
        padding: 8px 16px !important; /* Уменьшаем padding */
        font-size: 0.7rem !important;
        min-height: 32px !important; /* Уменьшаем высоту */
        width: 120px !important; /* Уменьшаем ширину с 150px до 120px */
    }
    
    /* ===== СТРАНИЦА УСЛУГ ===== */
    
    /* Секция услуг - выравниваем с секцией этапов */
    .projects.services-section {
        padding: 40px 0 !important; /* Точно такие же отступы как у process-section */
        background: #000 !important;
    }
    
    .services-intro {
        padding: 0 20px !important; /* Точно такие же отступы как у process-section h2 */
        max-width: 1100px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .services-intro h2 {
        font-size: 1.8rem !important; /* Уменьшаем с 2.5rem */
        margin-bottom: 15px !important; /* Уменьшаем отступ */
    }
    
    .services-intro p {
        font-size: 0.9rem !important; /* Уменьшаем с 1.1rem */
        margin-bottom: 20px !important; /* Уменьшаем отступ */
    }
    
    /* Сетка услуг - выравниваем с process-steps */
    .services-grid {
        grid-template-columns: 1fr !important; /* Одна колонка на мобильных */
        gap: 20px !important; /* Точно такие же отступы как у process-steps */
        margin-top: 30px !important; /* Уменьшаем отступ сверху */
        padding: 0 20px !important; /* Точно такие же отступы как у process-steps */
        max-width: 1100px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Карточки услуг */
    .service-card {
        padding: 20px 15px !important; /* Уменьшаем padding */
        min-height: 180px !important; /* Уменьшаем высоту */
        border-radius: 10px !important; /* Уменьшаем радиус */
    }
    
    .service-icon svg {
        width: 40px !important; /* Уменьшаем с 55px */
        height: 40px !important; /* Уменьшаем с 55px */
    }
    
    .service-card h3 {
        font-size: 1rem !important; /* Уменьшаем с 1.21rem */
        margin-bottom: 10px !important; /* Уменьшаем отступ */
        line-height: 1.2 !important; /* Уменьшаем межстрочный интервал */
    }
    
    .service-card p {
        font-size: 0.85rem !important; /* Уменьшаем с 0.99rem */
        line-height: 1.4 !important; /* Уменьшаем межстрочный интервал */
    }
    
    /* Секция этапов проектирования - выравниваем с секцией услуг */
    .process-section {
        padding: 40px 0 !important; /* Точно такие же отступы как у services-section */
        background: rgba(255, 255, 255, 0.02) !important;
    }
    
    .process-section h2 {
        font-size: 1.8rem !important; /* Уменьшаем с 2.5rem */
        margin-bottom: 30px !important; /* Уменьшаем отступ */
        padding: 0 20px !important; /* Точно такие же отступы как у services-intro */
        max-width: 1100px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Сетка этапов - выравниваем с services-grid */
    .process-steps {
        grid-template-columns: 1fr !important; /* Одна колонка на мобильных */
        gap: 20px !important; /* Точно такие же отступы как у services-grid */
        padding: 0 20px !important; /* Точно такие же отступы как у services-grid */
        max-width: 1100px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Карточки этапов */
    .process-step {
        padding: 20px 15px !important; /* Уменьшаем padding */
        min-height: 180px !important; /* Уменьшаем высоту */
        border-radius: 10px !important; /* Уменьшаем радиус */
    }
    
    .step-number {
        width: 40px !important; /* Уменьшаем с 55px */
        height: 40px !important; /* Уменьшаем с 55px */
        font-size: 1.2rem !important; /* Уменьшаем с 1.5rem */
        margin-bottom: 15px !important; /* Уменьшаем отступ */
    }
    
    .process-step h3 {
        font-size: 1rem !important; /* Уменьшаем с 1.21rem */
        margin-bottom: 10px !important; /* Уменьшаем отступ */
        line-height: 1.2 !important; /* Уменьшаем межстрочный интервал */
    }
    
    .process-step p {
        font-size: 0.85rem !important; /* Уменьшаем с 0.99rem */
        line-height: 1.4 !important; /* Уменьшаем межстрочный интервал */
    }
    
    /* ===== ТЕКСТ ===== */
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* ===== ОТСТУПЫ ===== */
    
    section {
        padding: 40px 20px !important;
    }
    
    .container {
        padding: 0 15px !important;
    }
    
    /* ===== МОБИЛЬНОЕ МЕНЮ ===== */
    
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mobile-menu {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 50% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.9) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        padding: 20px !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    /* iOS 26 Safari - прозрачная SafeArea для мобильного меню */
    @supports (-webkit-touch-callout: none) and (max-width: 768px) {
        .mobile-menu {
            /* Продолжаем меню в нижнюю SafeArea */
            height: 100% !important;
            height: calc(100% + env(safe-area-inset-bottom)) !important;
            height: calc(100vh + env(safe-area-inset-bottom)) !important;
            padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
            /* Убеждаемся что меню покрывает всю область */
            bottom: 0 !important;
            /* Дополнительная защита для прозрачной адресной строки */
            min-height: 100% !important;
            min-height: calc(100% + env(safe-area-inset-bottom)) !important;
            min-height: calc(100vh + env(safe-area-inset-bottom)) !important;
            /* Принудительное покрытие всей области */
            margin-bottom: calc(-1 * env(safe-area-inset-bottom)) !important;
        }
        
        .mobile-menu-overlay {
            /* Overlay тоже должен покрывать всю область */
            height: 100% !important;
            height: calc(100% + env(safe-area-inset-bottom)) !important;
            height: calc(100vh + env(safe-area-inset-bottom)) !important;
            /* Дополнительная защита для прозрачной адресной строки */
            min-height: 100% !important;
            min-height: calc(100% + env(safe-area-inset-bottom)) !important;
            min-height: calc(100vh + env(safe-area-inset-bottom)) !important;
            /* Принудительное покрытие всей области */
            margin-bottom: calc(-1 * env(safe-area-inset-bottom)) !important;
        }
    }
    
    .mobile-menu-overlay.active .mobile-menu {
        transform: translateX(0) !important;
    }
    
    /* Android specific - right side menu */
    .android-device .mobile-menu {
        width: 50% !important;
        left: auto !important;
        right: 0 !important;
        transform: translateX(100%) !important;
    }
    
    .android-device .mobile-menu-overlay.active .mobile-menu {
        transform: translateX(0) !important;
    }
    
    /* iOS specific - right side menu */
    .ios-device .mobile-menu {
        width: 50% !important;
        left: auto !important;
        right: 0 !important;
        transform: translateX(100%) !important;
    }
    
    .ios-device .mobile-menu-overlay.active .mobile-menu {
        transform: translateX(0) !important;
    }
    
    /* Mobile Menu Content */
    .mobile-menu-header {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-menu-close {
        width: 30px !important;
        height: 30px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-menu-close span {
        position: absolute !important;
        width: 20px !important;
        height: 2px !important;
        background: #ffffff !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-menu-close span:first-child {
        transform: rotate(45deg) !important;
    }
    
    .mobile-menu-close span:last-child {
        transform: rotate(-45deg) !important;
    }
    
    .mobile-menu-nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        margin-top: 80px !important;
        margin-bottom: 40px !important;
        width: 100% !important;
    }
    
    .mobile-menu-link {
        color: #ffffff !important;
        text-decoration: none !important;
        font-size: 1.125rem !important;
        font-weight: 300 !important;
        font-family: 'Montserrat', sans-serif !important;
        transition: color 0.3s ease !important;
        text-align: left !important;
    }
    
    .mobile-menu-link:hover {
        color: #ccc !important;
    }
    
    .mobile-menu-contact {
        margin-top: auto !important;
        padding-bottom: 20px !important;
        width: 100% !important;
    }
    
    .mobile-menu-phone {
        margin-bottom: 20px !important;
    }
    
    .mobile-menu-phone p {
        color: #ffffff !important;
        font-size: 0.9rem !important;
        font-weight: 375 !important;
        margin: 0 0 8px 0 !important;
    }
    
    .mobile-menu-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
    }
    
    .mobile-menu-actions .btn-universal {
        min-width: 80px !important;
        padding: 6px 12px !important;
        font-size: 0.6rem !important;
        width: 175px !important; /* 80px + 15px gap + 80px = 175px (размер Telegram + gap + WhatsApp) */
    }
    
    .mobile-menu-social {
        display: flex !important;
        gap: 15px !important;
        flex-wrap: wrap !important;
    }
    
    .mobile-menu-social .btn-universal {
        min-width: 80px !important;
        padding: 6px 12px !important;
        font-size: 0.6rem !important;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ ===== */
@media (max-width: 480px) {
    
    /* Hero секция - увеличенный размер только для главной и услуг */
    .hero:not(.hero-about),
    section.hero:not(.hero-about),
    #home.hero:not(.hero-about) {
        min-height: 688px !important; /* 625px * 1.1 = 688px (+10%) */
        height: 688px !important; /* 625px * 1.1 = 688px (+10%) */
        padding-top: 90 !important;
    }
    
    /* Hero секция "Обо мне" - уменьшенная на 100px на маленьких экранах */
    .hero-about,
    section.hero-about {
        min-height: calc(100vh - 100px) !important; /* Уменьшено на 100px */
        height: calc(100vh - 100px) !important; /* Уменьшено на 100px */
        padding-top: 0 !important; /* Убираем отступ сверху */
    }
    
    .hero-title {
        font-size: 20px !important;
    }
    
    /* Карточки проектов */
    .project-card,
    .portfolio-item {
        min-height: 252px !important;
        max-height: 308px !important;
    }
    
    .project-image {
        height: 202px !important; /* было 144px, стало 202px (+40%) */
    }
    
    .project-card img,
    .portfolio-item img {
        height: 202px !important; /* было 144px, стало 202px (+40%) */
    }
    
    .project-info {
        padding: 12px !important;
    }
    
    .project-info h3 {
        font-size: 14px !important;
    }
    
    .project-info p {
        font-size: 12px !important;
    }
    
    /* Галерея */
    .gallery-item {
        height: 120px !important;
    }
    
    /* Галерея проектов на очень маленьких экранах */
    .project-gallery .container {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .project-gallery-grid {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Мобильное меню */
    .mobile-menu {
        width: 75% !important;
    }
    
    .ios-device .mobile-menu {
        width: 75% !important;
    }
    
    .android-device .mobile-menu {
        width: 75% !important;
    }
    
    /* iOS 26 Safari - прозрачная SafeArea для мобильного меню на маленьких экранах */
    @supports (-webkit-touch-callout: none) and (max-width: 480px) {
        .mobile-menu {
            /* Продолжаем меню в нижнюю SafeArea на маленьких экранах */
            height: 100% !important;
            height: calc(100% + env(safe-area-inset-bottom)) !important;
            padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
            bottom: 0 !important;
            /* Дополнительная защита для прозрачной адресной строки */
            min-height: 100% !important;
            min-height: calc(100% + env(safe-area-inset-bottom)) !important;
        }
        
        .mobile-menu-overlay {
            /* Overlay тоже должен покрывать всю область на маленьких экранах */
            height: 100% !important;
            height: calc(100% + env(safe-area-inset-bottom)) !important;
            /* Дополнительная защита для прозрачной адресной строки */
            min-height: 100% !important;
            min-height: calc(100% + env(safe-area-inset-bottom)) !important;
        }
    }
    
    /* Project Hero изображения */
    .project-hero-image img {
        height: 150px !important;
    }
    
    /* About Hero изображение на очень маленьких экранах */
    .hero-about-photo img {
        object-position: calc(50% - 100px) center !important; /* Смещаем изображение на 100px влево */
        object-fit: contain !important;
        width: 195% !important; /* Увеличено на 30% (150% * 1.3 = 195%) */
        height: 195% !important; /* Увеличено на 30% (150% * 1.3 = 195%) */
        transform: translateY(30px) translateX(-100px) !important; /* Смещаем изображение вниз на 30px и влево на 100px */
    }
    
    /* Надпись "АШУР АХМЕДОВ" на очень маленьких экранах */
    .hero-about-content {
        left: calc(75% - 5px) !important; /* Смещаем на 5px влево */
        top: calc(50% + 50px) !important; /* Смещаем на 50px вниз */
    }
    
    .hero-about-title {
        line-height: 0.9 !important; /* Увеличиваем расстояние между строками */
    }
    
    .hero-about-name-line2 {
        margin-top: 5px !important; /* Увеличиваем отступ между строками */
    }
    
    /* ===== СТРАНИЦА УСЛУГ НА ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНАХ ===== */
    
    /* Секция услуг - выравниваем с секцией этапов */
    .projects.services-section {
        padding: 30px 0 !important; /* Точно такие же отступы как у process-section */
    }
    
    .services-intro {
        padding: 0 15px !important; /* Точно такие же отступы как у process-section h2 */
    }
    
    .services-intro h2 {
        font-size: 1.5rem !important; /* Еще меньше */
        margin-bottom: 12px !important;
    }
    
    .services-intro p {
        font-size: 0.8rem !important; /* Еще меньше */
        margin-bottom: 15px !important;
    }
    
    /* Сетка услуг - выравниваем с process-steps */
    .services-grid {
        gap: 15px !important; /* Точно такие же отступы как у process-steps */
        margin-top: 20px !important;
        padding: 0 15px !important; /* Точно такие же отступы как у process-steps */
    }
    
    /* Карточки услуг */
    .service-card {
        padding: 15px 12px !important; /* Еще меньше padding */
        min-height: 150px !important; /* Еще меньше высота */
        border-radius: 8px !important;
    }
    
    .service-icon svg {
        width: 35px !important; /* Еще меньше */
        height: 35px !important;
    }
    
    .service-card h3 {
        font-size: 0.9rem !important; /* Еще меньше */
        margin-bottom: 8px !important;
        line-height: 1.1 !important;
    }
    
    .service-card p {
        font-size: 0.8rem !important; /* Еще меньше */
        line-height: 1.3 !important;
    }
    
    /* Секция этапов проектирования - выравниваем с секцией услуг */
    .process-section {
        padding: 30px 0 !important; /* Точно такие же отступы как у services-section */
    }
    
    .process-section h2 {
        font-size: 1.5rem !important; /* Еще меньше */
        margin-bottom: 20px !important;
        padding: 0 15px !important; /* Точно такие же отступы как у services-intro */
    }
    
    /* Сетка этапов - выравниваем с services-grid */
    .process-steps {
        gap: 15px !important; /* Точно такие же отступы как у services-grid */
        padding: 0 15px !important; /* Точно такие же отступы как у services-grid */
    }
    
    /* Карточки этапов */
    .process-step {
        padding: 15px 12px !important; /* Еще меньше padding */
        min-height: 150px !important; /* Еще меньше высота */
        border-radius: 8px !important;
    }
    
    .step-number {
        width: 35px !important; /* Еще меньше */
        height: 35px !important;
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }
    
    .process-step h3 {
        font-size: 0.9rem !important; /* Еще меньше */
        margin-bottom: 8px !important;
        line-height: 1.1 !important;
    }
    
    .process-step p {
        font-size: 0.8rem !important; /* Еще меньше */
        line-height: 1.3 !important;
    }
    
    /* ===== ФУТЕРЫ НА ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНАХ ===== */
    
    .tour-section {
        padding: 30px 0 !important; /* Еще больше уменьшаем */
    }
    
    .tour-form-container h2 {
        font-size: 1.5rem !important; /* Еще меньше заголовок */
        margin-bottom: 12px !important;
    }
    
    .tour-form-container p {
        font-size: 0.8rem !important; /* Еще меньше текст */
        margin-bottom: 15px !important;
    }
    
    .form-inputs {
        gap: 12px !important; /* Еще меньше отступы */
    }
    
    .tour-form {
        gap: 15px !important;
    }
    
    .tour-form input {
        padding: 10px 0 !important; /* Еще меньше padding */
        font-size: 0.9rem !important;
    }
    
    .tour-form .btn-universal {
        padding: 8px 16px !important;
        font-size: 0.7rem !important;
        min-height: 32px !important;
    }
    
    .tour-form .btn-universal--medium {
        padding: 6px 12px !important;
        font-size: 0.6rem !important;
        min-height: 28px !important;
        width: 100px !important;
    }
}

/* ===== КРИТИЧЕСКОЕ ПЕРЕОПРЕДЕЛЕНИЕ ===== */
@media (max-width: 768px) {
    /* Максимально специфичные селекторы для принудительного опускания Hero */
    body .hero:not(.hero-about),
    body section.hero:not(.hero-about),
    body #home.hero:not(.hero-about),
    html body .hero:not(.hero-about),
    html body section.hero:not(.hero-about),
    html body #home.hero:not(.hero-about) {
        margin-top: 125px !important;
        top: 125px !important; /* Принудительно опускаем Hero под шапку */
    }
    
    body .project-hero,
    body section.project-hero,
    body .hero-about,
    body section.hero-about,
    body .portfolio-header,
    body section.portfolio-header {
        margin-top: 0 !important;
        padding-top: 125px !important; /* 80px + 45px = 125px (опущено на 45px) */
    }
    
    /* КРИТИЧЕСКОЕ ПЕРЕОПРЕДЕЛЕНИЕ ДЛЯ ГАЛЕРЕИ ПРОЕКТОВ */
    html body .project-gallery .container,
    html body section.project-gallery .container,
    html body .project-gallery > .container {
        padding: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    html body .project-gallery-grid {
        padding: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ===== КАРУСЕЛЬ ДЛЯ ВЕРТИКАЛЬНЫХ КАДРОВ ===== */

/* Скрываем карусели на десктопе */
@media (min-width: 769px) {
    .project-carousel {
        display: none !important;
    }
    
    .project-row {
        display: grid !important;
    }
}

@media (max-width: 768px) {
    /* Строки по умолчанию скрыты, показываются только те, которые не преобразованы в карусели */
    .project-row {
        display: none !important;
    }
    
    /* Показываем строки, которые не были преобразованы в карусели (через JavaScript) */
    .project-row:not([style*="display: none"]) {
        display: grid !important;
    }
    
    /* Показываем карусели */
    .project-carousel {
        display: block !important;
        width: 100% !important;
        margin: 15px 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        background: #000 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    }
    
    .carousel-slides {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        transition: transform 0.3s ease-in-out !important;
    }
    
    .carousel-slide {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        transform: translateX(100%) !important;
        transition: all 0.3s ease-in-out !important;
        z-index: 1 !important;
    }
    
    .carousel-slide.active {
        position: relative !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        z-index: 2 !important;
    }
    
    .carousel-slide img,
    .carousel-slide video {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 8px !important;
        min-height: 300px !important;
        object-fit: cover !important;
    }
    
    /* Навигация карусели */
    .carousel-navigation {
        position: absolute !important;
        top: 50% !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 10px !important;
        pointer-events: none !important;
        z-index: 3 !important;
    }
    
    .carousel-prev,
    .carousel-next {
        background: rgba(0, 0, 0, 0.8) !important;
        border: none !important;
        border-radius: 50% !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        pointer-events: auto !important;
        color: #fff !important;
    }
    
    .carousel-prev:hover,
    .carousel-next:hover {
        background: rgba(0, 0, 0, 0.9) !important;
        transform: scale(1.1) !important;
    }
    
    .carousel-prev svg,
    .carousel-next svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Индикаторы карусели */
    .carousel-indicators {
        position: absolute !important;
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 6px !important;
        z-index: 3 !important;
    }
    
    .carousel-indicator {
        width: 6px !important;
        height: 6px !important;
        border-radius: 50% !important;
        border: none !important;
        background: rgba(255, 255, 255, 0.5) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        padding: 0 !important;
    }
    
    .carousel-indicator.active {
        background: #fff !important;
        transform: scale(1.2) !important;
    }
    
    .carousel-indicator:hover {
        background: rgba(255, 255, 255, 0.8) !important;
        transform: scale(1.1) !important;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .project-carousel {
        margin: 8px 0 !important;
        border-radius: 4px !important;
    }
    
    .carousel-slide img,
    .carousel-slide video {
        border-radius: 4px !important;
        min-height: 250px !important;
    }
    
    .carousel-navigation {
        padding: 0 8px !important;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 32px !important;
        height: 32px !important;
    }
    
    .carousel-prev svg,
    .carousel-next svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .carousel-indicators {
        bottom: 8px !important;
        gap: 4px !important;
    }
    
    .carousel-indicator {
        width: 5px !important;
        height: 5px !important;
    }
}

/* ===== СКРЫТИЕ/ПОКАЗ ЭЛЕМЕНТОВ ===== */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
}

/* Показ элементов только на десктопе */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: block !important;
    }
}

/* ===== РАДИКАЛЬНОЕ ИСПРАВЛЕНИЕ ДЛЯ СТРАНИЦЫ "ОБО МНЕ" ===== */
@media (max-width: 768px) {
    /* Максимально специфичные селекторы для принудительного удаления отступов */
    html body .hero-about,
    html body section.hero-about,
    body .hero-about,
    body section.hero-about,
    .hero-about,
    section.hero-about {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        position: relative !important;
        z-index: 1 !important;
        clear: both !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        min-height: calc(100vh - 100px) !important;
        height: calc(100vh - 100px) !important;
    }
    
    /* Дополнительное исправление для всех возможных селекторов */
    #home.hero-about,
    section#home.hero-about,
    .hero#home.hero-about {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        position: relative !important;
        z-index: 1 !important;
        clear: both !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        min-height: calc(100vh - 100px) !important;
        height: calc(100vh - 100px) !important;
    }
}