/* =====================================================
   mobile-fix.css
   Подключить в default.htm последним:
   <link rel="stylesheet" href="{{ 'assets/css/mobile-fix.css' | theme }}"/>
   ===================================================== */

/* ===== ЗАПРЕТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА =====
   Это причина того что слайдер занимает только
   половину экрана на мобильном */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* ===== ГЕРОЙ — полная ширина на мобильном ===== */
.hero {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 0;
    right: 0;
}
.hero-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ===== ФУТЕР — мобильная адаптация ===== */
@media(max-width: 900px) {
    footer > div:first-child {
        grid-template-columns: 1fr !important;
        padding: 2.5rem 1.25rem !important;
    }
    footer > div:first-child > div:last-child {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
}
@media(max-width: 480px) {
    footer > div:first-child > div:last-child {
        grid-template-columns: 1fr !important;
    }
}

/* ===== НОВОСТИ — карточки на мобильном ===== */
@media(max-width: 480px) {
    .news-card-img { height: 180px !important; }
    .news-card-body { padding: 1.125rem !important; }
    .news-card-title { font-size: .95rem !important; }
}

/* ===== ИЗОБРАЖЕНИЯ В ТЕКСТЕ НОВОСТИ ===== */
.nb img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* ===== ТАБЛИЦЫ В ТЕКСТЕ — скролл на мобильном ===== */
.nb table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== СТРАНИЦА НОВОСТИ — hero ===== */
@media(max-width: 640px) {
    .article-hero-title,
    h1.article-hero-title {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
}

/* ===== КАТАЛОГ — карточки ===== */
@media(max-width: 640px) {
    .catalog-modal-box {
        padding: 1.25rem !important;
    }
}

/* ===== КОНТАКТЫ — форма ===== */
@media(max-width: 640px) {
    .contacts-grid {
        grid-template-columns: 1fr !important;
    }
    .contact-info-card, .contact-form-card {
        padding: 1.5rem !important;
    }
}

/* ===== ОБЩЕЕ — кнопки не вылезают ===== */
@media(max-width: 480px) {
    .btn-callback {
        padding: .55rem 1.125rem !important;
        font-size: .78rem !important;
    }
    .page-header {
        font-size: 1.75rem !important;
    }
    .section-title {
        font-size: 1.5rem !important;
    }
}

/* ===== HERO ТЕКСТ НА МОБИЛЬНОМ ===== */
@media(max-width: 640px) {
    .hero-title {
        font-size: 1.625rem !important;
        line-height: 1.2 !important;
    }
    .hero-subtitle {
        font-size: .95rem !important;
    }
    .hero-content {
        padding: 2rem 1.25rem !important;
    }
    .hero-text-box {
        max-width: 100% !important;
    }
}
