/* avtoutil.com — мобильная «шкура». Своя палитра сайта: синий выезд + янтарь.
   Подключается ПОСЛЕДНЕЙ в header.php, действует до 767 px и на телефоне боком (до 1000 px при высоте до 500 px). Тексты не меняет. */
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) {
  :root { --c-blue: #0b4ea2; --c-blue-d: #083a7a; --c-amber: #ffb300; --c-ink: #1f2a3d; --c-mute: #5b6880; --c-bg: #f2f5fa; --c-card: #fff; }
  html, body { background: var(--c-bg) !important; }
  body { color: var(--c-ink); -webkit-text-size-adjust: 100%; }
  .wrapper { background: transparent !important; padding: 0 !important; }

  /* Шапка */
  .header { position: sticky; top: 0; z-index: 50; background: #fff !important; box-shadow: 0 2px 10px rgba(11,78,162,.08); padding: 8px 14px !important; height: auto !important; }
  .header a[href^="tel:"] { background: var(--c-bg); color: var(--c-blue) !important; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 15px !important; text-decoration: none !important; white-space: nowrap; }

  /* Меню */
  details.mnav { margin: 10px 14px 0 !important; }
  details.mnav > summary { background: #fff !important; color: var(--c-blue) !important; border: 1.5px solid #d6e2f3 !important; border-radius: 14px !important; padding: 12px 16px !important; font-weight: 700; box-shadow: none !important; }
  details.mnav[open] > summary { border-radius: 14px 14px 0 0 !important; }
  details.mnav ul, details.mnav nav { background: #fff; border: 1.5px solid #d6e2f3; border-top: 0; border-radius: 0 0 14px 14px; margin: 0 !important; padding: 6px 0 !important; }
  details.mnav a { display: block; padding: 11px 16px !important; color: var(--c-ink) !important; font-size: 16px !important; text-decoration: none !important; border-bottom: 1px solid #eef2f8; }

  .container { padding: 0 14px !important; display: flex; flex-direction: column; }
  .content { order: 1; width: auto !important; float: none !important; padding: 0 !important; background: transparent !important; }
  .sidebar { order: 2; width: auto !important; float: none !important; margin: 18px 0 0 !important; padding: 16px !important; background: var(--c-card) !important; border-radius: 18px; box-shadow: 0 4px 18px rgba(16,40,80,.06); }

  /* Первый экран: H1 + оффер — одна карточка */
  .content > h1#pagetitle, .content > h1:first-child {
    margin: 14px 0 0 !important; padding: 22px 20px 10px !important; border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-d) 100%) !important;
    color: #fff !important; font-size: 25px !important; line-height: 1.22 !important; font-weight: 800 !important; letter-spacing: -.01em; text-align: left !important;
  }
  .content > .m-offer {
    margin: 0 0 18px !important; padding: 2px 20px 22px !important; border-radius: 0 0 20px 20px;
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-d) 100%) !important; color: #dce8fb !important;
    box-shadow: 0 10px 24px rgba(11,78,162,.22);
  }
  .content > .m-offer, .content > .m-offer * { text-align: left !important; }
  .content > .m-offer p, .content > .m-offer span, .content > .m-offer div { color: #dce8fb !important; font-size: 15px !important; }
  .content > .m-offer a { display: flex !important; align-items: center; justify-content: center; width: 100% !important; box-sizing: border-box; min-height: 52px; margin: 12px 0 0 !important; padding: 12px 14px !important; border-radius: 14px !important; font-size: 17px !important; font-weight: 800 !important; line-height: 1.2 !important; white-space: normal !important; text-decoration: none !important; text-align: center !important; }
  .content > .m-offer a[href^="tel:"] { background: var(--c-amber) !important; color: #1b1300 !important; border: 0 !important; white-space: nowrap !important; font-size: 16px !important; letter-spacing: -.01em; }
  .content > .m-offer a:not([href^="tel:"]) { background: rgba(255,255,255,.1) !important; color: #fff !important; border: 1.5px solid rgba(255,255,255,.55) !important; }

  /* Текст */
  .content, .content * { text-align: left !important; }
  .content p, .content li, .content span, .content i, .content em { font-size: 16px !important; line-height: 1.6 !important; color: var(--c-ink) !important; font-family: inherit !important; }
  .content [style*="color"], .content font { color: var(--c-ink) !important; }
  .content p { margin: 0 0 12px !important; }
  .content h2, .content h3 { color: var(--c-blue) !important; font-size: 21px !important; line-height: 1.3 !important; font-weight: 800 !important; margin: 26px 0 10px !important; padding-left: 12px; border-left: 4px solid var(--c-amber); }
  .content a { color: var(--c-blue) !important; }

  /* Вступительные вопросы — мягкая карточка */
  .content > .m-offer + p, .content > .m-offer + p + p, .content > .m-offer + p + p + p {
    background: var(--c-card); margin: 0 0 8px !important; padding: 12px 14px !important; border-radius: 14px; box-shadow: 0 2px 10px rgba(16,40,80,.05);
  }

  /* Преимущества: нумерованные карточки */
  .content ol { list-style: none !important; counter-reset: adv; padding: 0 !important; margin: 10px 0 16px !important; }
  .content ol > li { counter-increment: adv; position: relative; background: var(--c-card); margin: 0 0 10px !important; padding: 14px 14px 14px 56px !important; border-radius: 16px; box-shadow: 0 3px 14px rgba(16,40,80,.06); }
  .content ol > li::before { content: counter(adv); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--c-amber); color: #1b1300; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
  .content ul > li { margin-bottom: 6px !important; }

  /* Шаги «Всего 2 шага» (курсивные строки) — карточки */
  .content ol.steps > li { background: #fff8e1; box-shadow: none; }
  .content .ask-block { background: var(--c-card); border-radius: 18px; padding: 16px; margin: 18px 0; box-shadow: 0 3px 14px rgba(16,40,80,.06); }
  .content .ask-block a[href^="tel:"] { font-size: 22px !important; font-weight: 800; text-decoration: none !important; }
  .content .licence-note p, .content .licence-note li { font-size: 14px !important; color: var(--c-mute) !important; }
  .content .licence-note ul { padding-left: 18px !important; }

  /* Длинный блок контактов-текста внутри h2 — обычный текст */
  .content h2 span, .content h2 p { font-weight: 400 !important; font-size: 15px !important; color: var(--c-mute) !important; border: 0 !important; padding: 0 !important; }
  .content h2 p:first-child a, .content h2 a[href^="tel:"] { font-size: 22px !important; font-weight: 800 !important; color: var(--c-blue) !important; }

  /* Форма заявки */
  .reqBox, #zapros-vyvoza { background: var(--c-card) !important; border: 0 !important; border-radius: 20px !important; padding: 20px 16px !important; margin: 20px 0 !important; box-shadow: 0 8px 26px rgba(16,40,80,.10) !important; }
  .reqBox .rq-title { font-size: 21px !important; font-weight: 800 !important; color: var(--c-blue) !important; margin: 0 0 6px !important; }
  .reqBox .rq-sub { color: var(--c-mute) !important; font-size: 15px !important; }
  .reqBox input[type=text], .reqBox input[type=tel], .reqBox textarea { width: 100% !important; box-sizing: border-box; min-height: 48px; font-size: 16px !important; border: 1.5px solid #d6e2f3 !important; border-radius: 12px !important; padding: 12px 14px !important; background: #fbfcfe !important; }
  .reqBox textarea { min-height: 84px; }
  .reqBox button, .reqBox input[type=submit] { width: 100% !important; min-height: 52px; border: 0 !important; border-radius: 14px !important; background: var(--c-amber) !important; color: #1b1300 !important; font-size: 17px !important; font-weight: 800 !important; }
  .reqBox .rq-agree, .reqBox .rq-agree * { font-size: 13px !important; color: var(--c-mute) !important; }

  /* Картинки и ролики */
  .content img { max-width: 100% !important; height: auto !important; border-radius: 14px; }
  .content iframe, .content video { max-width: 100% !important; border-radius: 14px; }

  /* Боковая колонка: навигация и отзывы */
  .sidebar .leftNav { padding: 0 !important; margin: 0 0 10px !important; }
  .sidebar .leftNav li { list-style: none; border-bottom: 1px solid #eef2f8; }
  .sidebar .leftNav a { display: block; padding: 11px 2px; color: var(--c-blue) !important; font-weight: 600; text-decoration: none !important; }
  .sidebar h3 { color: var(--c-ink) !important; font-size: 17px !important; margin: 14px 0 6px !important; }
  .sidebar p, .sidebar i { font-size: 15px !important; line-height: 1.55 !important; color: var(--c-mute) !important; font-style: normal !important; }

  /* Подвал */
  .footer { background: #0a2342 !important; color: #c9d6ea !important; margin-top: 22px !important; padding: 22px 14px 96px !important; border-radius: 22px 22px 0 0; }
  .footer .footerIn { width: auto !important; padding: 0 !important; }
  .footer [class^="column"] { float: none !important; width: auto !important; margin: 0 0 14px !important; }
  .footer p, .footer span, .footer li { color: #c9d6ea !important; font-size: 15px !important; text-align: left !important; }
  .footer a { color: #fff !important; }
  .footer a[href="/svedeniya-o-kompanii/"] { color: #9fb2cf !important; font-size: 12px !important; }
}
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) {
  /* Страницы без блока-оффера (города, статьи, услуги): заголовок — цельная карточка */
  .content > h1#pagetitle:not(:has(+ .m-offer)) { border-radius: 20px !important; padding: 20px !important; margin: 14px 0 16px !important; box-shadow: 0 8px 20px rgba(11,78,162,.18); }
  .content .breadcrumbs, .content .bx-breadcrumb, .breadcrumbs { font-size: 13px !important; color: var(--c-mute) !important; margin: 10px 0 0 !important; }
}
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) {
  .footer .footerLogo { display: inline-block !important; background: #fff; border-radius: 12px; padding: 6px 10px; margin-bottom: 10px; }
  .footer .column1 { text-align: left !important; }
}

/* Стрелка хлебных крошек без шрифта Font Awesome; ссылка согласия не переносится по слогам */
i.bx-breadcrumb-item-angle.fa { font-family: inherit; font-style: normal; font-weight: 400; margin: 0 6px; }
i.bx-breadcrumb-item-angle.fa-angle-right::before { content: "›"; }
.reqBox .rq-agree, .reqBox .rq-agree a { -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; }
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) {
  .reqBox .rq-agree label { display: block !important; }
  .reqBox .rq-agree input { float: left; margin: 2px 10px 4px 0 !important; }
  .reqBox .rq-agree a { white-space: nowrap; }
}

/* Мобильный вид всех типов страниц. Номер телефона не разрывается ни на какой ширине. */
a[href^="tel:"] { white-space: nowrap !important; }
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) {
  /* вырез экрана iPhone боком: отступы не меньше безопасной зоны */
  .header, .container { padding-left: max(14px, env(safe-area-inset-left)) !important; padding-right: max(14px, env(safe-area-inset-right)) !important; }
  .footer { padding-left: max(14px, env(safe-area-inset-left)) !important; padding-right: max(14px, env(safe-area-inset-right)) !important; padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  /* место под нижнюю панель уже есть в подвале: без второй серой полосы под ним */
  body, body.inside { padding-bottom: 0 !important; }

  /* телефон внутри абзаца: без «ступеньки» в строке, зона нажатия та же за счёт отступов */
  .content p a[href^="tel:"], .content li a[href^="tel:"] { display: inline !important; padding: 10px 0 !important; }

  /* ролик YouTube в статье: по ширине колонки, 16:9 (было 344 px высоты с чёрными полосами) */
  .content iframe[src*="youtube"] { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }

  /* хлебные крошки: читаемый размер, ссылки удобнее нажимать */
  .content .bx-breadcrumb, .content .bx-breadcrumb * { font-size: 14px !important; }
  .content .bx-breadcrumb a { padding: 10px 0; }

  /* список статей: поиск и номера страниц под палец */
  .content .search-form form { display: flex; gap: 8px; align-items: stretch; margin: 4px 0 16px; }
  .content .search-form input[type="text"] { flex: 1 1 auto; min-width: 0; width: auto !important; min-height: 44px; box-sizing: border-box; padding: 8px 12px; font-size: 16px; border: 1.5px solid #d6e2f3; border-radius: 12px; background: #fff; }
  .content .search-form input[type="submit"] { flex: 0 0 auto; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--c-blue); color: #fff; font: 700 16px/1 Arial, Helvetica, sans-serif; }
  .content font.text a, .content font.text b { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; box-sizing: border-box; }

  /* колонка: пункты меню синие, обычным шрифтом, без пустых строк из редактора */
  .sidebar .leftNav a { padding: 12px 4px !important; min-height: 44px; box-sizing: border-box; background-image: none !important; }
  .sidebar .leftNav a, .sidebar .leftNav a .caption { font: 600 16px/1.35 Arial, Helvetica, sans-serif !important; color: var(--c-blue) !important; }
  .sidebar h3:has(> br:only-child), .sidebar div:has(> br:only-child) { display: none; }

  /* подвал: логотип отдельной строкой, «Сведения о компании» читаемые */
  .footer .footerLogo { display: table !important; }
  .footer a[href="/svedeniya-o-kompanii/"] { font-size: 14px !important; display: inline-block; padding: 10px 0 !important; }

  /* мелкий текст: не меньше 14–15 px */
  .content .licence-note p, .content .licence-note li { font-size: 15px !important; }
  .reqBox .rq-agree, .reqBox .rq-agree * { font-size: 14px !important; }
  .content .rv__meta { font-size: 14px !important; }
  .privacy-policy-cookies-informer__confirm { min-width: 44px; min-height: 44px; }

  /* телефон в шапке: зона нажатия 44 px (было 34) */
  .header a[href^="tel:"] { display: inline-flex !important; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 14px !important; }
  /* 404: «Перейти на главную» — настоящая кнопка (было 17 px текстовой ссылкой) */
  .content .page-btn a { display: inline-flex !important; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--c-amber); color: #1b1300 !important; font-weight: 800; text-decoration: none !important; }
}
/* телефон боком: экран низкий — шапка не закрепляется, текст не растягивается на всю ширину */
@media (min-width: 768px) and (max-width: 1000px) and (max-height: 500px) {
  .header { position: static !important; }
  .container { max-width: 720px; margin: 0 auto !important; box-sizing: border-box; }
  details.mnav { max-width: 692px; margin: 10px auto 0 !important; }
  .privacy-policy-cookies-informer_bottom-inside, .privacy-policy-cookies-informer_bottom-over { right: auto !important; max-width: 520px !important; }
}

/* Доводка вида. */
/* «Отзывы» в боковой колонке (inline #f16522, 2,9:1) -> тёмный оттенок той же гаммы #b04800 (5,6:1 на белом) */
span[style*="#f16522" i] { color: #b04800 !important; }
/* cookie: текст 15 px на телефоне */
@media (max-width: 767px), (max-width: 1000px) and (max-height: 500px) {
  .privacy-policy-cookies-informer__txt { font-size: 15px !important; line-height: 1.35 !important; }
}
/* низкий экран (320x568, телефон боком): плашка компактнее, вместе с нижней панелью ~30% высоты; кегль 13 px */
@media (max-width: 767px) and (max-height: 568px), (max-width: 1000px) and (max-height: 500px) {
  .privacy-policy-cookies-informer_bottom-inside, .privacy-policy-cookies-informer_bottom-over { left: 8px !important; right: 8px !important; max-width: none !important; bottom: calc(68px + env(safe-area-inset-bottom)) !important; padding: 4px 48px 4px 10px !important; min-height: 0 !important; }
  .privacy-policy-cookies-informer__txt { font-size: 13px !important; line-height: 1.25 !important; }
  .privacy-policy-cookies-informer__confirm { width: 44px !important; height: 44px !important; }
}
