/* Мобильная оптимизация — главная и страницы услуг */

/* Чекбокс согласия */
.consent-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
    min-height: 44px;
}
.consent-check__input {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    flex-shrink: 0;
    border-radius: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #0b0f19;
    accent-color: #f59e0b;
    cursor: pointer;
}
.consent-check__text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
}

@media (max-width: 1023px) {
    html {
        scroll-padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    }

    /* Шапка */
    header.fixed {
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Секции — компактнее */
    section {
        scroll-margin-top: 4.5rem;
    }

    /* Заголовки секций */
    section h2.font-display {
        font-size: clamp(1.5rem, 6.5vw, 2rem) !important;
        line-height: 1.15;
    }

    section .max-w-3xl > p {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    /* Hero */
    section.relative.min-h-0 h1 {
        font-size: clamp(1.65rem, 7.5vw, 2.25rem) !important;
    }

    /* Карточки услуг — без hover-прыжка на тач */
    .glass-card-hover:hover {
        transform: none;
    }

    /* 3D слои */
    #tech-3d .perspective-container {
        width: min(100%, 280px) !important;
    }
    #tech-3d .road-3d-scene {
        height: 200px !important;
        transform: rotateX(16deg) rotateY(-20deg) rotateZ(2deg);
    }
    #tech-3d .layer-3d {
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }
    #tech-3d .layer-3d::after,
    #tech-3d .layer-3d::before {
        display: none;
    }
    #tech-3d .lg\:col-span-6.space-y-6 {
        margin-bottom: 0.5rem;
    }
    #tech-3d .glass-card.rounded-2xl {
        padding: 1rem !important;
    }
    #tech-3d .flex.items-center.space-x-4.bg-brand\/5 {
        padding: 0.85rem;
        gap: 0.75rem;
    }
    #tech-3d .flex.items-center.space-x-4.bg-brand\/5 p {
        font-size: 0.75rem;
    }

    /* Калькулятор */
    #calculator input[type="range"] {
        height: 8px;
        min-height: 8px;
    }
    #calculator .custom-select__trigger {
        min-height: 48px;
    }
    #calculator .custom-select__option {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    #calculator label.flex.items-center span.text-sm {
        font-size: 0.8125rem;
        line-height: 1.4;
    }
    #calculator input[type="text"],
    #calculator input[type="tel"],
    #calculator input[type="number"],
    #calculator textarea {
        min-height: 48px;
        font-size: 16px !important; /* без зума iOS */
    }
    #calculator button[type="submit"] {
        min-height: 52px;
        font-size: 0.875rem;
    }

    /* Формы заявок */
    form input[type="text"],
    form input[type="tel"],
    form textarea,
    form select {
        min-height: 48px;
        font-size: 16px !important;
    }
    form button[type="submit"] {
        min-height: 52px;
    }

    /* Галерея */
    #gallery .grid {
        gap: 0.75rem;
    }
    #gallery .gallery-filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    #gallery .gallery-filters button {
        flex-shrink: 0;
        white-space: nowrap;
        min-height: 40px;
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    /* Прайс */
    .price-row span.text-lg {
        font-size: 1rem;
    }
    .price-includes {
        padding: 0.85rem;
    }
    .price-includes li {
        font-size: 0.8125rem;
    }

    /* Футер */
    footer .grid {
        gap: 1.5rem;
    }
    footer details > summary {
        font-size: 0.8125rem;
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
    }

    /* Мобильное меню */
    .mobile-nav-panel {
        max-height: calc(100dvh - 4rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-nav-scroll a,
    .mobile-nav-scroll button {
        min-height: 44px;
    }

    /* Нижняя панель */
    .mobile-bottom-bar a {
        min-height: 48px;
    }

    /* Страницы услуг */
    .uslugi-hero h1 {
        font-size: clamp(1.5rem, 6.5vw, 2rem) !important;
        line-height: 1.15;
    }
    .uslugi-hero p {
        font-size: 0.9rem;
    }
    .lead-form-card {
        padding: 1rem !important;
    }
    .lead-form-card input,
    .lead-form-card textarea {
        min-height: 48px;
        font-size: 16px !important;
    }
    .lead-form-card button[type="submit"] {
        min-height: 52px;
    }
    .faq-item summary {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 380px) {
    #tech-3d .road-3d-scene {
        height: 180px !important;
    }
    .hero-stats .col-span-2 {
        grid-column: span 2 / span 2;
    }
}
