/* =============================================================
   mobile-fixes.css — точкові фікси мобільної адаптації.
   Підключається ПІСЛЯ style.css → може override за потреби.
   Кожна секція — окрема сторінка / компонент. Правки додавайте
   в кінець своєї секції, не мішайте зі стилями інших сторінок.
   ============================================================= */

/* ============ HEADER / FOOTER / MENU / GLOBAL COMPONENTS ============ */
/* Впливає на всі сторінки — тримаємо тут, а не у HOME. */

/* Динамічна X-кнопка popup пошуку (додається JS у header.twig) призначена
   тільки для мобільного popup. На десктопі — завжди ховаємо, щоб не було
   зайвого X у правому куті .heser-search. Мобільний popup показує її через
   .heser-search.is-open .heser-search__close нижче. */
.heser-search__close { display: none !important; }

/* Blog article H1 — єдиний розмір і на десктопі, і на мобі. */
.blog-article__h1 { font-size: 22px !important; }

/* У статтях блогу не показуємо картки лікарів (.doc-card) — ні з контенту,
   ні з модулів content_top/bottom у межах контейнера статті. */
#information-contact.is-blog-article .doc-card,
#information-contact.is-blog-article .col-sm-4.col-xs-12:has(> .doc-card) { display: none !important; }

/* Футер на ширинах 769–991px (bootstrap-контейнер 750px): ліва колонка
   (Trustpilot, соцмережі, лого) і біла картка меню стояли поруч, меню
   стискалось до колонок ~70px — заголовки й пункти ламались по словах,
   іконки соцмереж переносились. Тут ставимо ліву колонку рядком над
   карткою, а меню — у три рівні колонки на всю ширину. */
@media (min-width: 769px) and (max-width: 991.98px) {
  .all-footer { flex-direction: column; gap: 24px; }
  .left-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
  .left-footer > div { margin-bottom: 0; }
  .left-footer .adres-footer:empty, .left-footer .phone-footer:empty { display: none; }
  .footer_menus__box { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .footer_menu:last-child { min-width: 0; }
}

/* Шапка на 768–1199px: меню (у style.css — white-space: nowrap), пошук 200px
   і вибір мови стояли в один рядок і не вміщались — вилазили за правий край,
   сторінка прокручувалась убік (на 820px — до 1104px). Меню лишаємо першим
   рядком, пошук на всю ширину й мову — другим. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .heser-all { flex-wrap: wrap; row-gap: 12px; }
  .heser-menu { flex: 1 1 100%; }
  .heser-search { flex: 1 1 0; min-width: 0; }
  .heser-search .input-group, .heser-search input { width: 100% !important; }
  .heser-land { flex: 0 0 auto; }
}
/* 768–991px: пункти меню на 3px вужчі з кожного боку, щоб влізли в 720px.
   Блок «We are not just a clinic selection service»: картинка 610px не
   стискалась і виштовхувала текст за екран — ставимо колонки одна під одною. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .heser-menu .navbar-nav > li > a { padding-left: 9px; padding-right: 9px; }
  .block_first-all { flex-direction: column; align-items: center; gap: 24px; }
  .block_first-all > .c-sm-6 { width: 100%; }
  .block_first-img img { max-width: 100%; height: auto; }
}
/* Блок вкладок «Pay safely / How it works / Why us?» має свій контейнер
   max-width 1280px з padding 0 — нижче 1280px він прилипав до країв екрана.
   Вирівнюємо по ширині звичайного .container, як FAQ під ним. */
@media (min-width: 768px) and (max-width: 991.98px) { .medhome-tabs__container { max-width: 750px; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .medhome-tabs__container { max-width: 970px; } }
@media (min-width: 1200px) and (max-width: 1309.98px) { .medhome-tabs__container { max-width: 1170px; } }
/* style.css:25 вмикає .container 1280px від min-width 1280px, не враховуючи
   смугу прокрутки (~15px): на ноутбуках 1280px контейнер ширший за видиму
   область, праві 15px обрізаються (телефон у шапці), блоки липнуть до лівого
   краю. До 1310px лишаємо стандартні 1170px. */
@media (min-width: 1280px) and (max-width: 1309.98px) { .container { width: 1170px; } }

@media (max-width: 767.98px) {
  /* Форма у футері: кнопки WhatsApp/Telegram/Viber у сітці 3×1fr не
     стискались нижче ширини тексту — Viber виходив за картку (на 360px —
     за екран). minmax(0,1fr) + менші іконка й відступи. */
  .channels { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .channels__btn { min-width: 0; }
  .form-footer--glass .ask-form .channels__btn { gap: 5px; padding-left: 4px !important; padding-right: 4px !important; }
  .form-footer--glass .channels__btn svg { width: 20px; height: 20px; }
}

@media (max-width: 767.98px) {
  /* Радіус хедера на мобі — менший (перебиває 32px зі style.css:33) */
  header {
    border-radius: 0 0 15px 15px !important;
  }
  /* Container всередині хедера — мінімальний padding, щоб кнопки
     ряду menu/калькулятор/пошук/мова тягнулись до країв. */
  header .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  /* ==== Верхній хедер: лого зліва + «Замовити дзвінок» справа ====
     Ховаємо все зайве (trustpilot, соц-іконки, номер телефону) —
     ці елементи дублюються в нижньому mob-0tab або меню. */
  .header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    flex-wrap: nowrap !important;
  }
  .trustpilot { display: none !important; }
  .header-soc { display: none !important; }
  .phonebtn { display: none !important; }

  #logo {
    flex: 1 1 auto;
    max-width: 60%;
    padding: 0 !important;
  }
  #logo img,
  #logo .img-responsive {
    max-height: 36px;
    width: auto;
    max-width: 100%;
    display: block;
  }

  .header-info {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
  }
  .header-phone {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .callbtn {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 13px !important;
    min-height: 38px;
  }
  .callbtn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px !important;
    min-height: 38px;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 22px;
    white-space: nowrap;
  }

  /* Логотип */
  .navbar-header .navbar-brand,
  .navbar-brand { padding: 8px 12px !important; }
  .navbar-brand img { max-height: 40px; width: auto; }

  /* Bootstrap navbar-collapse (стандартне мобільне меню) */
  .navbar-collapse {
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .navbar-toggle.mnav-btn {
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 8px 14px !important;
    margin: 0 !important;
  }

  /* ==== Кастомне мобільне меню mnav (3 рівні, split tap-зони) ====
     Кожен .mnav-item.has-sub / .mnav-subitem.has-sub = flex-wrap рядок:
       [ <a> посилання (гнеться) ] [ <button>▾ (фіксована ширина) ]
       [ .mnav-sub на всю ширину (flex-basis: 100%) ]
     — тап по назві = перехід на сторінку, тап по ▾ = розкрити акордеон. */
  .mnav-item,
  .mnav-subitem {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-bottom: 1px solid rgba(3, 62, 140, 0.08);
    background: #fff;
  }
  .mnav-link,
  .mnav-sublink,
  .mnav-sublink--lvl3 {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding: 14px 16px !important;
    min-height: 48px;
    font-size: 15px !important;
    line-height: 1.3;
    color: #1D2430 !important;
    text-decoration: none;
    background: transparent !important;
    border: 0 !important;
   
    margin: 0 !important;
    font-weight: 600;
  }
  .mnav-link {
    font-weight: 700;
    color: #033E8C !important;
  }
  .mnav-link:hover,
  .mnav-sublink:hover,
  .mnav-sublink--lvl3:hover {
    background: rgba(3, 62, 140, 0.05) !important;
    color: #033E8C !important;
  }
  .mnav-toggle,
  .mnav-toggle--lvl2,
  .mnav-toggle--lvl3,
  .mnav-toggle--btn {
    flex: 0 0 auto;
    width: 52px !important;
    min-width: 52px !important;
    min-height: 48px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    background: transparent !important;
    color: #033E8C !important;
    font-size: 16px !important;
    cursor: pointer;
  }
  .mnav-toggle:hover,
  .mnav-toggle--btn:hover {
    background: rgba(3, 62, 140, 0.05) !important;
  }
  .mnav-chev {
    display: inline-block;
    transition: transform .2s ease;
    opacity: .8;
  }
  .mnav-item.is-open > .mnav-toggle .mnav-chev,
  .mnav-subitem.is-open > .mnav-toggle .mnav-chev {
    transform: rotate(180deg);
  }
  /* Панель підменю — на всю ширину під a+button */
  .mnav-item > .mnav-sub,
  .mnav-subitem > .mnav-sub {
    flex-basis: 100%;
    width: 100%;
    padding: 0 !important;
    background: rgba(3, 62, 140, 0.03);
  }
  .mnav-sub--lvl3 {
    background: rgba(3, 62, 140, 0.05) !important;
    padding-left: 0 !important;
  }
  .mnav-sublist,
  .mnav-sublist--lvl3 {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
  }
  /* Візуальний відступ вложених рівнів (лівий бордер як «дерево») */
  .mnav-sublist .mnav-subitem {
    padding-left: 12px;
    border-left: 2px solid rgba(3, 62, 140, 0.10);
    margin-left: 12px;
  }
  .mnav-sublist--lvl3 .mnav-subitem {
    padding-left: 8px;
    border-left: 2px solid rgba(3, 62, 140, 0.15);
    margin-left: 20px;
  }
  .mnav-sublink { font-weight: 600; }
  .mnav-sublink--lvl3 { font-weight: 500; font-size: 14px !important; }
  .mnav-overlay { touch-action: none; }
  .mnav__head {
    padding: 12px 16px !important;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mnav__title { font-size: 16px !important; font-weight: 700; }
  .mnav__close {
    min-width: 40px;
    min-height: 40px;
    padding: 8px !important;
    font-size: 20px;
  }
  .mnav__body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  /* ==== Ряд меню: 🍔 Меню · Калькулятор · 🔍 Пошук · 🇺🇦 Мова ====
     Всі 4 елементи в одному flex-рядку з align-items:center — по одній
     висоті 40px, щоб не стрибали по вертикалі. */
  .heser-all {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 0 !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    min-height: 56px;
  }
  .heser-menu {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .heser-menu #menu,
  .heser-menu .navbar,
  .heser-menu .navbar-header {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 40px !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    border: 0 !important;
  }
  .heser-menu .mnav-btn,
  .heser-menu .navbar-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    background: rgba(3, 62, 140, 0.06) !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    color: #033E8C !important;
  }
  .heser-menu .mnav-btn .fa-bars,
  .heser-menu .mnav-btn i { font-size: 16px; }
  .heser-menu .mnav-btn #category,
  .heser-menu .mnav-btn .visible-xs { font-size: 13px; font-weight: 600; }

  .heser-btn-mob {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0;
    max-width: 120px;
    height: 40px !important;
    padding: 0 !important;
    min-height: 40px !important;
    font-size: 14px !important;
    margin: 0 !important;
    border-radius: 12px;
  }
  .heser-btn-mob a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 8px 12px !important;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border-radius: 12px !important;
    white-space: nowrap;
    border: 1.5px solid rgba(3, 62, 140, 0.15);
  }

  /* Пошук на мобі = 40×40 іконка. Плаваюча popup-панель по кліку.
     Перекриваємо глобальне .heser-search{display:none} з style.css. */
  .heser-search {
    display: flex !important;
    flex: 0 0 auto !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
  }
  .heser-search #search {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 12px;
  }
  .heser-search #search > input[name="search"] { display: none !important; }
  .heser-search #search > button,
  .heser-search #search .btn-lg {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(3, 62, 140, 0.06) !important;
    border: 0 !important;
    border-radius: 12px !important;
    color: #033E8C !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }
  .heser-search #search > button svg {
    width: 20px !important;
    height: 20px !important;
  }
  .heser-search #search > button:hover,
  .heser-search #search > button:focus {
    background: rgba(3, 62, 140, 0.12) !important;
    outline: 0 !important;
  }
  .heser-search #search-autocomplete { display: none !important; }

  /* Плаваюча panel пошуку (активна при .is-open) */
  .heser-search.is-open #search > input[name="search"] {
    display: block !important;
    position: fixed !important;
    top: 60px;
    left: 12px;
    right: 12px;
    width: auto !important;
    height: 48px !important;
    padding: 12px 44px 12px 16px !important;
    font-size: 16px !important;
    background: #fff !important;
    border: 1px solid #E1E7F0 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(3, 62, 140, .18) !important;
    z-index: 10001;
    color: #1D2430 !important;
  }
  .heser-search.is-open #search > button {
    position: fixed !important;
    top: 60px;
    right: 16px;
    width: 48px !important;
    height: 48px !important;
    background: transparent !important;
    z-index: 10002;
  }
  .heser-search.is-open #search-autocomplete {
    display: block !important;
    position: fixed !important;
    top: 116px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #E1E7F0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(3, 62, 140, .15);
    z-index: 10001;
    padding: 8px;
  }
  .heser-search.is-open .search-autocomplete__group-title {
    padding: 8px 10px 4px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7a90;
    font-weight: 700;
  }
  .heser-search.is-open .search-autocomplete__list {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;
  }
  .heser-search.is-open .search-autocomplete__item a {
    display: block;
    padding: 12px 10px;
    font-size: 14.5px;
    color: #1D2430;
    text-decoration: none;
    border-radius: 8px;
    line-height: 1.3;
  }
  .heser-search.is-open .search-autocomplete__item a:hover,
  .heser-search.is-open .search-autocomplete__item a:focus {
    background: rgba(3, 62, 140, 0.06);
    color: #033E8C;
  }
  .heser-search.is-open .search-autocomplete__empty {
    padding: 20px 12px;
    text-align: center;
    color: #6b7a90;
    font-size: 14px;
  }
  /* Затемнення позаду при відкритому пошуку.
     Вішаємо на body (клас .search-open додає JS), а НЕ на .heser-search::before —
     бо .heser-search сидить всередині хедера, і його ::before потрапляє у локальний
     stacking context (дропдауни фільтрів ms-docfilter тоді пробиваються зверху). */
  body.search-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, .5);
    z-index: 10000;
    backdrop-filter: blur(2px);
    pointer-events: auto;
  }
  /* Щоб інпут/автоксеклит/X-кнопка (z-index 10001-10003) гарантовано були
     ВИЩЕ, навіть якщо їхній батько .heser-search у локальному контексті — піднімаємо
     header цілком. */
  body.search-open header {
    position: relative;
    z-index: 10001;
  }

  /* Кнопка закриття (X) popup пошуку — показується лише коли is-open */
  .heser-search__close {
    display: none;
  }
  .heser-search.is-open .heser-search__close {
    display: flex !important;
    position: fixed !important;
    top: 60px;
    right: 16px;
    width: 48px !important;
    height: 48px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, .18) !important;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    border-radius: 50% !important;
    color: #fff !important;
    cursor: pointer;
    z-index: 10003;
    box-shadow: none !important;
  }
  .heser-search.is-open .heser-search__close:hover,
  .heser-search.is-open .heser-search__close:focus {
    background: #fff !important;
    color: #033E8C !important;
    outline: 0 !important;
  }
  /* Заховати оригінальну кнопку-пошук (лупу) коли popup відкритий —
     її роль виконує X-close. */
  .heser-search.is-open #search > button {
    display: none !important;
  }
  /* Під час popup пошуку — ховаємо ряд шапки (бургер/калькулятор/мова),
     щоб вони не перекривали popup. .heser-all знаходиться в тому ж
     stacking context (z-index:1 на .heser-all зі style.css), тож просто
     ставимо opacity:0 + pointer-events:none. */
  body.search-open .heser-menu,
  body.search-open .heser-btn-mob,
  body.search-open .heser-land {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* Мова: прапор 24×18 як у Screenshot_13 — висота 40px як інші */
  .heser-land {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: nowrap !important;
    height: 40px !important;
  }
  .heser-land .pull-left { float: none !important; }
  .heser-land form { margin: 0; }
  .heser-land .btn-group { display: inline-flex; height: 40px; align-items: center; }
  .heser-land .btn.dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    background: rgba(3, 62, 140, 0.06) !important;
    border: 0 !important;
    border-radius: 12px !important;
    color: #033E8C !important;
    box-shadow: none !important;
    line-height: 1 !important;
  }
  .heser-land .btn.dropdown-toggle img {
    width: 24px !important;
    height: 18px !important;
    object-fit: cover;
    border-radius: 3px;
    display: block;
  }
  .heser-land .btn.dropdown-toggle svg {
    width: 10px;
    height: 6px;
  }
  .heser-land .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    min-width: 160px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    padding: 6px;
  }
  .heser-land .dropdown-menu li button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px !important;
    min-height: 44px;
    font-size: 14px;
    text-align: left;
    border-radius: 6px;
  }
  .heser-land .dropdown-menu li button img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
  }
  .header-soc-mob {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
  }
  .trustpilot-mob {
    padding: 8px 16px;
    text-align: center;
    font-size: 12px;
  }

  /* Bottom mob tab (mob-0tab — швидка форма контакту) */
  .mob-0tab {
    padding: 8px 12px !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
  }
  .mob-0tab__title {
    font-size: 13px !important;
    margin-bottom: 6px;
  }
  .mob-0tab__form {
    display: flex;
    gap: 6px;
    align-items: stretch;
  }
  .mob-0tab__phone-wrap { flex: 1 1 auto; min-width: 0; }
  .mob-0tab__phone-input {
    display: flex;
    gap: 4px;
  }
  .mob-0tab__flag { width: 42px; flex: 0 0 auto; }
  .mob-0tab__input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px !important;
    min-height: 44px;
    padding: 8px 10px !important;
  }
  .mob-0tab__btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px !important;
    font-size: 14px;
    white-space: nowrap;
  }
  .mob-0tab__channel-wrap { position: relative; }
  .mob-cc,
  .mob-0tab__channel {
    min-height: 44px;
    padding: 8px 10px !important;
    font-size: 13px;
  }
  .mob-cc__ic { font-size: 16px; }
  .mob-cc-list {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    border-radius: 8px;
    z-index: 100;
  }

  /* FOOTER — головний */
  .bg-footer { padding: 24px 0 100px; } /* нижній відступ під mob-0tab */
  .all-footer {
    display: block !important;
  }
  .left-footer,
  .rigth-footer {
    width: 100% !important;
    padding: 0 12px !important;
    margin-bottom: 20px;
  }
  .logo-footer { text-align: center; margin-bottom: 12px; }
  .logo-footer img { max-height: 60px; }
  .texts-footer { font-size: 13.5px; line-height: 1.5; text-align: center; }
  .adres-footer { font-size: 13.5px; text-align: center; }
  .icon-footer { text-align: center; }
  .icon-footer img { width: 24px; height: 24px; }
  .soc-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
  }
  .soc-footer a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .trip-footer {
    text-align: center;
    font-size: 12px;
  }

  /* Footer menus (колонки посилань) */
 
  .all-botom-f {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 12px !important;
  }
  .left-botom-f,
  .rigth-botom-f { text-align: center; }

  /* Ask card / call-back форма у footer */
  .ask-card {
    border-radius: 14px;
  }
  .ask-form { padding: 0; }
  .ask-form__bg { padding: 12px; }
  .ask-extra { flex-direction: column; gap: 8px; }
  .ask-more { font-size: 13px; text-align: center; }
  .ask-trust { justify-content: center; gap: 8px; }

  /* F-input / f-label (мовні форми) */
  .f-input,
  .f-textarea {
    width: 100% !important;
    font-size: 16px !important;
    min-height: 46px;
    padding: 10px 12px !important;
  }
  .f-textarea { min-height: 90px; }
  .f-label { font-size: 13px; }

  /* Phone input у формах */
  .phone-input,
  .phone-footer {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
  }
  .phone-country,
  .phone-input__country { flex: 0 0 auto; }
  .phone-field,
  .phone-input__field { flex: 1 1 auto; min-width: 0; }

  /* Кнопка "Надіслати" у формах */
  .btn-send {
    width: 100% !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    justify-content: center;
  }

  /* Форма-футер (велика форма 4 крокам) */
  .items-form-footer { padding: 0; }
  .item-form-footer,
  .item-form-footer.first,
  .item-form-footer.secon,
  .item-form-footer.thre,
  .item-form-footer.four {
    width: 100% !important;
    padding: 12px !important;
    margin-bottom: 10px;
  }
  .title-form-footer { font-size: 16px !important; line-height: 1.25; }
  .text-form-footer { font-size: 13.5px; line-height: 1.45; }
  .num-form-footer { font-size: 20px; }
  .icon-form-footer { font-size: 22px; }
  .info-form-footer { font-size: 13px; }
  .left-form-footer,
  .righr-form-footer { width: 100% !important; padding: 0 12px !important; }

  /* Modal (thx / help / callback) — на всю ширину */
  .modal.fade .modal-dialog,
  .modal-dialog,
  .modal-dialog.modal-lg,
  .ub-thx-modal__dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
  }
  .modal-content,
  .ub-thx-modal__content {
    border-radius: 0 !important;
    min-height: 100vh;
  }
  .modal-header,
  .modal-body,
  .modal-footer { padding: 16px 14px !important; }
  .modal-footer .btn { min-height: 46px; }
  .modal.fade.in { padding-right: 0 !important; }

  /* Channels widget у footer (WhatsApp/Telegram/Viber) */
  .channels {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .channels__btn {
    padding: 10px 6px !important;
    font-size: 12px !important;
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }
  .channels__txt { font-size: 11px !important; }

  /* Checkline (галочки згоди) */
  .checkline { padding: 8px 0; }
  .checkline__box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.4;
  }
  .checkline__box input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }

  /* Form-footer glass (спливна форма) */
  .form-footer,
  .form-footer--glass {
    padding: 20px 16px !important;
    border-radius: 14px 14px 0 0 !important;
  }
  .form-footer__close {
    min-width: 44px;
    min-height: 44px;
    padding: 10px !important;
    top: 8px !important;
    right: 8px !important;
    font-size: 20px;
  }

  /* Breadcrumb */
  .breadcrumb {
    padding: 8px 12px !important;
    margin-bottom: 12px !important;
    font-size: 12.5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
  .breadcrumb > li { display: inline-block; }
}

/* ============ БАЗА (діє на всіх сторінках) ============ */
@media (max-width: 767.98px) {
  html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  body {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
  }
  /* Уникнути горизонтального скролу — картинки не вилазять */
  img, video, iframe, svg { max-width: 100%; height: auto; }
  /* iOS: input font-size ≥16px запобігає авто-зумуванню при фокусі */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="number"],
  input[type="password"],
  textarea,
  select { font-size: 16px !important; }
  /* Комфортна кнопка на дотик — ≥44px */
  button, .btn, a.btn, [role="button"] {
    min-height: 44px;
    line-height: 1.3;
  }
  /* Safe-area для iOS (iPhone з notch): нижні sticky-панелі не заходять під home-indicator */
  .mob-0tab,
  .fixed-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  }
  /* Плавний inertia-скрол у скрольованих контейнерах */
  .table-responsive,
  .horizontal-scroll,
  [data-scroll] {
    -webkit-overflow-scrolling: touch;
  }
}

/* ============ HOME / ГОЛОВНА ============ */
@media (max-width: 767.98px) {




  /* Home top categories (спеціалізації) — 2 колонки */
  .home-topcats { padding: 20px 12px; }
  .home-topcats__list,
  .home-topcats__grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .home-topcats__card { padding: 12px !important; }
  .home-topcats__title { font-size: 13.5px !important; }
  .home-topcats__img { width: 40px; height: 40px; }

  /* MedHome tabs — pills у горизонтальний скрол, картки колонкою */
  .medhome-tabs { padding: 20px 0; }
  .medhome-tabs__title,
  .medhome-tabs__title--wide { font-size: 22px !important; line-height: 1.25; padding: 0 12px; }
  .medhome-tabs__subtitle { font-size: 14px; padding: 0 12px; }
  .medhome-tabs__container { padding: 0 12px; }
  .medhome-tabs__nav {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .medhome-tabs__nav::-webkit-scrollbar { display: none; }
  .medhome-tabs__pill {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13px !important;
    padding: 8px 14px !important;
  }
  .medhome-tabs__cards,
  .medhome-tabs__cards--steps {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .medhome-tabs__card { padding: 14px !important; }
  .medhome-tabs__card-title { font-size: 15px !important; }
  .medhome-tabs__card-desc { font-size: 13.5px !important; line-height: 1.45; }
  .medhome-tabs__step { padding: 14px !important; }
  .medhome-tabs__step-title { font-size: 15px !important; }
  .medhome-tabs__illus { margin-top: 18px; }
  .medhome-tabs__illus img { width: 100%; }

  /* Home block-form (форма зворотного зв'язку на головній) */
  .home-block-form { padding: 20px 12px; }
  .home-block-title { font-size: 22px !important; line-height: 1.25; }
  .home-block-text { font-size: 14.5px; line-height: 1.5; }
  .home-bock-content { padding: 16px !important; border-radius: 14px; }

  /* Contact-mini (двошарова форма з phone + channels) */
  .contact-mini,
  .contact-mini--glass { padding: 16px !important; border-radius: 14px; }
  .contact-mini__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-mini__title { font-size: 17px !important; }
  .contact-mini__sub { font-size: 13.5px; }
  .contact-mini__col { width: 100% !important; margin-bottom: 10px; }
  .contact-mini__btn { width: 100%; justify-content: center; min-height: 46px; }
  .contact-mini__note { font-size: 12px; text-align: center; }

  .contact-mini2 { padding: 16px !important; border-radius: 14px; }
  .contact-mini2__row { flex-direction: column; gap: 10px; }
  .contact-mini2__actions { width: 100%; }
  .contact-mini2__btn { width: 100%; min-height: 46px; }
  .contact-mini2-right { width: 100%; text-align: center; }

  /* Phone input у формах */
  .phone-input { flex-wrap: nowrap; }
  .phone-input__country { flex: 0 0 auto; }
  .phone-input__field { flex: 1 1 auto; min-width: 0; }


}

@media (max-width: 400px) {
  /* Дуже маленькі екрани — top categories в 1 колонку */
  .home-topcats__list,
  .home-topcats__grid { grid-template-columns: 1fr !important; }
}

/* ============ CLINICS LIST / СПИСОК КЛІНІК ============ */
@media (max-width: 767.98px) {
  .bg-clinics { padding: 16px 0 32px; }

  /* Фільтр-панель ms-docfilter — вертикальний стек, повна ширина */
  .ms-docfilter { padding-left: 12px; padding-right: 12px; }
  .ms-docfilter__filters {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .ms-docfilter__control {
    width: 100% !important;
    min-height: 46px;
    padding: 10px 14px !important;
    font-size: 15px !important;
  }
  .ms-docfilter__field {
    width: 100% !important;
    font-size: 16px !important; /* без iOS-зуму */
  }
  .ms-docfilter__bottom {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px;
  }
  .ms-docfilter__bottom-left { flex-direction: column; gap: 6px; align-items: flex-start; }
  .ms-docfilter__count { font-size: 13.5px; }
  .ms-docfilter__advanced { width: 100%; text-align: center; }
  .ms-docfilter__dropdown {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Топ-категорії клінік (плитки з doc_list__grid) — 2 колонки */
  .doc_list__grid,
  .doc_list__grid.more {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .doc_list__item {
    grid-column: span 1 !important; /* скасовуємо do-wide на мобі */
    padding: 10px !important;
    min-height: auto !important;
  }
  .doc_list__item.do-wide { grid-column: span 1 !important; }
  .doc_list__more { padding: 12px !important; font-size: 14px; }
  .doc_list__specialties { padding: 0 12px; }

  /* Картки клінік — вертикальні (фото зверху, контент знизу) */
  .cline-all { padding: 0 12px; }
  .cline-card {
    flex-direction: column !important;
    padding: 14px !important;
    border-radius: 14px;
    margin-bottom: 14px;
  }
  .cline-card__photo,
  .cline-card__side {
    width: 100% !important;
    max-width: 100% !important;
  }
  .cline-card__photo-img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 12px;
  }
  .cline-card__main { width: 100% !important; padding: 0 !important; }
  .cline-card__header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cline-card__title { font-size: 18px !important; line-height: 1.25; }
  .cline-card__location { font-size: 13px; }
  .cline-card__desc { font-size: 14px; line-height: 1.5; }
  .cline-card__tags { flex-wrap: wrap; gap: 5px; }
  .cline-tag { font-size: 11px !important; padding: 3px 8px !important; }

  /* Рейтинг */
  .cline-card__rating-block,
  .cline-card__rating-block_irema {
    flex-wrap: wrap;
    gap: 6px;
  }
  .cline-card__rating-score { font-size: 16px !important; font-weight: 700; }
  .cline-card__rating-stars { font-size: 14px; }
  .cline-card__rating-count { font-size: 12px; }

  /* Мініатюри фото — горизонтальний скрол */
  .cline-card__thumbs {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: none;
    margin: 10px 0;
  }
  .cline-card__thumbs::-webkit-scrollbar { display: none; }
  .cline-card__thumb-img {
    flex: 0 0 auto;
    width: 78px !important;
    height: 58px !important;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Послуги/ціни — вертикальні рядки */
  .cline-card__services { margin-top: 10px; }
  .cline-card__service-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 8px 0 !important;
    gap: 3px;
  }
  .cline-card__service-name { font-size: 13.5px; }
  .cline-card__service-price { font-size: 13px; font-weight: 700; }
  .cline-card__service-more { font-size: 13px; text-align: center; }

  /* Блок експерта/лікаря на картці */
  .cline-card__expert {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px !important;
    border-radius: 12px;
  }
  .cline-card__expert-img,
  .cline-card__expert-avatar { width: 48px; height: 48px; }
  .cline-card__expert-name { font-size: 14px; }
  .cline-card__expert-exp { font-size: 12.5px; }

  /* Кнопки CTA — на всю ширину, стек */
  .cline-card__buttons {
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 12px;
  }
  .cline-card__btn,
  .cline-card__btn--primary,
  .cline-card__btn--outline {
    width: 100% !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    justify-content: center;
  }
  .cline-card__read-more { font-size: 13px; margin-top: 8px; }

  /* Credit-plate (гарант) */
  .credit {
    padding: 12px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .credit__avatar { width: 44px; height: 44px; }
  .credit__name { font-size: 14px; }
  .credit__bio { font-size: 12.5px; line-height: 1.4; }
  .credit__label { font-size: 11px; }

  /* Пагінація */
  .clinics-pagination,
  .clinics-pagination.pagin { padding: 16px 12px !important; }
  .clinics-pagination__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .clinics-pagination__links a,
  .clinics-pagination__links span {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ============ CLINIC (product.twig) / КАРТКА КЛІНІКИ ============ */
@media (max-width: 767.98px) {
  .clinic-container { padding: 0 12px; }

  /* Верх картки: 2 колонки → стек */
  .clin-top {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px 0 !important;
  }
  .left-clin-top,
  .right-clin-top {
    width: 100% !important;
    max-width: 100% !important;
  }
  .clinic-inform { padding: 0; }
  .clinic-infa {
    max-width: 100% !important;
    font-size: 14.5px;
    line-height: 1.5;
  }
  .icon-infa { width: 42px; height: 42px; }
  .infa-item {
    padding: 10px 12px !important;
    gap: 10px;
    align-items: flex-start;
  }
  .clinic-price { font-size: 15px; }
  .rey-clin { flex-wrap: wrap; gap: 6px; font-size: 13px; }
  .rate-num { font-size: 15px; font-weight: 700; }
  .hstar { font-size: 14px; }

  /* Адреса */
  .adres-clin { font-size: 13.5px; line-height: 1.4; }

  /* Sticky-навігація якорями (ic-anchors) — горизонтальний скрол */
  .ic-anchors__bar {
    padding: 8px 12px !important;
    gap: 8px;
  }
  .ic-anchors__nav {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px !important;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
  }
  .ic-anchors__nav::-webkit-scrollbar { display: none; }
  .ic-anchors__nav a,
  .ic-anchors__nav button {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13px !important;
    padding: 7px 12px !important;
    min-height: 38px;
  }
  .ic-anchors__rate { display: none; } /* економимо місце */
  .ic-anchors__cta {
    flex: 0 0 auto;
    font-size: 13px !important;
    padding: 8px 14px !important;
    min-height: 40px;
  }

  /* Галерея клініки */
  .clinic-gallery {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin: 12px 0;
  }
  .clinic-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Секції клінік (clinic-section) */
  .clinic-section { padding: 20px 0 !important; }
  .clinic-section h2,
  .clinic-section h3 { font-size: 20px !important; line-height: 1.25; }
  .clinic-about { font-size: 14.5px; line-height: 1.5; }
  .read-more { font-size: 14px; padding: 10px 14px; }

  /* Аккордеон FAQ / інші (clinic-accordion, acc-*) */
  .clinic-accordion,
  .acc-wrap { padding: 0; }
  .acc-section {
    padding: 12px !important;
    border-radius: 12px;
    margin-bottom: 8px;
  }
  .acc-title {
    font-size: 15px !important;
    padding: 12px 0 !important;
    padding-right: 32px !important; /* місце під стрілку */
  }
  .acc-body { font-size: 14px; line-height: 1.5; padding: 0 0 12px; }
  .acc-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Аккредитації (acc-chip) */
  .acc-chip {
    padding: 8px 12px !important;
    gap: 8px;
  }
  .acc-chip__logo { width: 32px; height: 32px; }
  .acc-chip__name { font-size: 13px; }

  /* Лікарі клініки (row.doctors-grid, .col-sm-4.doc-item) */
  .doctors-grid { margin: 0 -6px !important; }
  .doc-item,
  .col-sm-4.doc-item {
    width: 50% !important;
    padding: 0 6px !important;
    margin-bottom: 12px;
  }
  .scard,
  .scard__body { padding: 10px !important; }
  .scard__img,
  .scard__media {
    width: 100% !important;
    height: 120px !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .scard__name { font-size: 14px !important; line-height: 1.2; }
  .scard__meta,
  .scard__loc { font-size: 12px; }

  /* Процедури — таблиця → картки */
  .proc-columns.row { margin: 0 !important; }
  .col-price,
  .col-sm-6.col-price { width: 100% !important; padding: 0 !important; }
  .proc-list { padding: 0; }
  .proc-card,
  .proc-row {
    padding: 12px !important;
    border-radius: 10px;
    margin-bottom: 8px;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
  }
  .proc-name { font-size: 14.5px; font-weight: 600; }
  .proc-price { font-size: 14px; font-weight: 700; }
  .proc-right { align-self: stretch; }
  .proc-more { display: block; text-align: center; padding: 12px; }
  .price-items { padding: 0; }

  /* Before/After галерея */
  .befaft-section { padding: 16px 0; }
  .befaft-title { font-size: 20px; line-height: 1.25; }
  .befaft-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .befaft-card { padding: 10px !important; }
  .befaft-imgwrap { grid-template-columns: 1fr 1fr; }
  .befaft-img { width: 100%; height: 180px; object-fit: cover; }
  .befaft-caption { font-size: 13px; }
  .befaft-pager { justify-content: center; flex-wrap: wrap; gap: 4px; }
  .bf-btn { min-width: 40px; min-height: 40px; }
  .bf-pages { font-size: 13px; }

  /* Локація / карта */
  .loc__wrap { padding: 14px !important; }
  .loc__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 10px;
  }
  .loc__title { font-size: 17px; }
  .loc__name { font-size: 14px; }
  .loc__addr { font-size: 13.5px; line-height: 1.45; }
  .loc__mapwrap {
    width: 100% !important;
    height: 220px !important;
    margin: 12px 0;
    border-radius: 10px;
    overflow: hidden;
  }
  .loc__map { width: 100%; height: 100%; }
  .loc__meta { flex-direction: column; gap: 8px; align-items: flex-start; }
  .loc__author { gap: 8px; }
  .loc__ava,
  .loc__ava-initial { width: 32px; height: 32px; }
  .loc__ainfo { font-size: 12.5px; }
  .loc__badge { font-size: 11px; padding: 2px 6px; }

  /* Готелі поряд (hotels) */
  .hotels__wrap { padding: 0; }

  /* Банер пакета */
  .clinic-package-banner {
    padding: 14px !important;
    border-radius: 14px;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
  }
  .clinic-package-banner__name { font-size: 15px; }
  .clinic-package-banner__desc { font-size: 13.5px; }
  .clinic-package-banner__price-row { flex-wrap: wrap; gap: 6px; }
  .clinic-package-banner__price { font-size: 20px; font-weight: 800; }
  .clinic-package-banner__term { font-size: 13px; }

  /* Chip-фільтри (Тип клініки / послуги) */
  .chip {
    font-size: 13px !important;
    padding: 6px 12px !important;
    min-height: 34px;
  }

  /* Публікація/автор (addpub) */
  .addpub { padding: 12px !important; font-size: 12.5px; }
}

/* ============ DOCTORS LIST / СПИСОК ЛІКАРІВ ============ */
@media (max-width: 767.98px) {
  .doc_list.container { padding: 16px 12px 32px; }

  /* Заголовок топ-блоку */
  .doc_list_top { padding: 16px 0; }
  .doc_list__title { font-size: 22px !important; line-height: 1.25; }
  .doc_list__desc,
  .doc_list__text { font-size: 14.5px; line-height: 1.5; }

  /* Плитки спеціалізацій (перед списком лікарів) */
  .doc_list__specialties { padding: 0; margin-bottom: 20px; }
  .doc_list__grid,
  .doc_list__grid.more {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .doc_list__item { padding: 10px !important; grid-column: span 1 !important; }
  .doc_list__item.do-wide { grid-column: span 1 !important; }
  .doc_list__image { width: 40px; height: 40px; }
  .doc_list__link { font-size: 13.5px !important; line-height: 1.2; }
  .doc_list__btn,
  .doc_list__more {
    width: 100%;
    padding: 12px !important;
    font-size: 14px;
    min-height: 44px;
    text-align: center;
    justify-content: center;
  }

  /* Картки лікарів (ms-doc-card) — вертикальний стек */
  .ms-doc-card {
    flex-direction: column !important;
    padding: 14px !important;
    border-radius: 14px;
    margin-bottom: 14px;
    gap: 12px;
  }
  .ms-doc-card__left,
  .ms-doc-card__center,
  .ms-doc-card__actions {
    width: 100% !important;
    max-width: 100% !important;
  }
  .ms-doc-card__photo {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
  }
  .ms-doc-card__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
  .ms-doc-card__name { font-size: 17px !important; line-height: 1.25; }
  .ms-doc-card__desc { font-size: 13.5px; line-height: 1.5; text-align: left; }
  .ms-doc-card__body { padding: 0; }

  /* Бейджі */
  .ms-doc-card__badges {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .ms-doc-card__badge,
  .ms-doc-card__badge--light,
  .ms-doc-card__badge--success {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }

  /* Клініка + локація */
  .ms-doc-card__clinic {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 10px !important;
  }
  .ms-doc-card__clinic-link { font-size: 14px; }
  .ms-doc-card__clinic-location,
  .ms-doc-card__clinic-locationin { font-size: 12.5px; }

  /* Мови */
  .ms-doc-card__languages {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  .ms-doc-card__languages-label { font-size: 12px; }
  .ms-doc-card__flag { font-size: 18px; }

  /* Рейтинг */
  .ms-doc-card__rating { justify-content: center; }
  .ms-doc-card__rating-value { font-size: 16px; font-weight: 700; }
  .ms-doc-card__rating-count { font-size: 12px; }

  /* Ціни / послуги */
  .ms-doc-card__prices { flex-direction: column; gap: 6px; }
  .ms-doc-card__price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 6px 0 !important;
  }
  .ms-doc-card__price-label { font-size: 13px; }
  .ms-doc-card__price-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 15px;
    min-height: 44px;
  }

  /* Відгук останній */
  .ms-doc-card__review { padding: 10px !important; border-radius: 10px; }
  .ms-doc-card__review-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .ms-doc-card__review-avatar { width: 32px; height: 32px; }
  .ms-doc-card__review-name { font-size: 13.5px; }
  .ms-doc-card__review-date,
  .ms-doc-card__review-rating,
  .ms-doc-card__review-meta { font-size: 12px; }
  .ms-doc-card__review-text { font-size: 13.5px; line-height: 1.45; }
  .ms-doc-card__review-btn {
    width: 100%;
    padding: 10px;
    min-height: 44px;
    justify-content: center;
    font-size: 13.5px;
  }

  /* CTA-кнопки */
  .ms-doc-card__actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .ms-doc-card__btn,
  .ms-doc-card__btn--primary,
  .ms-doc-card__btn--ghost {
    width: 100% !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    justify-content: center;
  }
  .ms-doc-card__read-more {
    font-size: 13.5px;
    padding: 8px 0;
    display: block;
    text-align: center;
  }
}

/* ============ DOCTOR / КАРТКА ЛІКАРЯ ============ */
@media (max-width: 767.98px) {
  .bg-toper-mc { padding: 12px 0; }
  .clinic-container { padding: 0 12px; }

  /* Топ-блок з фото + основа */
  .topindoc {
    padding: 16px 0 !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  .cln-left { width: 100% !important; text-align: center; }
  .doc-card,
  .doc-main {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 14px !important;
    border-radius: 14px;
  }
  .doc-photo,
  .doc-media {
    width: 140px !important;
    height: 140px !important;
    border-radius: 50%;
    margin: 0 auto;
    object-fit: cover;
  }
  .doc-name { font-size: 20px !important; line-height: 1.25; }
  .doc-meta { font-size: 14px; text-align: center; }
  .doc-badge { font-size: 12px; padding: 3px 8px; }
  .doc-clinic {
    flex-direction: column;
    text-align: center;
    padding: 10px !important;
    gap: 6px;
  }
  .doc-rating { justify-content: center; }
  .rate-num { font-size: 16px; font-weight: 700; }
  .stars { font-size: 15px; }
  .title-doct.indoc {
    font-size: 22px !important;
    line-height: 1.25;
    padding: 0 12px;
  }
  .doc-bottmo {
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
  }

  /* Мета-параметри (Стаж, Мови тощо) */
  .meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
  }
  .meta__label { font-size: 11px; text-transform: uppercase; opacity: .7; }
  .meta__val { font-size: 14px; font-weight: 600; }

  /* Опис лікаря (typo) */
  .typo,
  .typo__wrap { padding: 0; }
  .typo h2, .typo h3, .typo__wrap h2, .typo__wrap h3 { font-size: 18px !important; }
  .typo p, .typo__wrap p { font-size: 14.5px; line-height: 1.55; }

  /* Клініки, де приймає лікар (hcard) */
  .hcard {
    flex-direction: column !important;
    padding: 12px !important;
    border-radius: 12px;
    gap: 10px;
  }
  .hcard__media {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .hcard__body { padding: 0 !important; }
  .hcard__name { font-size: 15.5px !important; line-height: 1.25; }
  .hcard__desc { font-size: 13.5px; }
  .hcard__badge { font-size: 11px; }
  .hcard__inf { font-size: 13px; }
  .hcollage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .hcollage__img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }

  /* Пакети (paked) — картки в 1 колонку */
  .paked { padding: 20px 0; }
  .paked__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 0 12px;
  }
  .paked__title { font-size: 20px; line-height: 1.25; }
  .paked__all { font-size: 13.5px; text-align: right; }
  .paked-card {
    flex-direction: column !important;
    padding: 14px !important;
    border-radius: 14px;
    margin-bottom: 12px;
  }
  .paked-card__media {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .paked-card__content,
  .paked-card__body { width: 100% !important; padding: 0 !important; }
  .paked-card__row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .paked-card__name { font-size: 15.5px; line-height: 1.25; }
  .paked-card__meta { font-size: 12.5px; }
  .paked-card__clinic,
  .paked-card__cln { font-size: 13px; }
  .paked-card__price { font-size: 19px; font-weight: 800; }
  .paked-card__summary {
    padding: 10px !important;
    align-items: flex-start;
    gap: 8px;
  }
  .paked-card__summary-text { font-size: 13px; line-height: 1.4; }
  .paked-card__btn {
    width: 100%;
    padding: 12px;
    min-height: 46px;
    font-size: 15px;
    justify-content: center;
  }

  /* Секція пакетів (pkg-section) */
  .pkg-section { padding: 20px 12px; }
  .pkg-section__inner { padding: 0; }

  /* Розділювач між секціями */
  .divider { margin: 16px 0; }
}

/* ============ PACKAGES LIST / СПИСОК ПАКЕТІВ ============ */
@media (max-width: 767.98px) {
  .ms-doc-list.container { padding: 16px 12px; }
  .pkg-section.container { padding: 16px 12px; }
  .pkg-section__inner { padding: 0; }

  /* ms-docfilter — вже покрито в CLINICS LIST, тут додаю специфічне */
  .ms-docfilter__inner { padding: 12px !important; }
  .ms-docfilter__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .ms-docfilter__title { font-size: 17px !important; }
  .ms-docfilter__label { font-size: 12.5px !important; }
  .ms-docfilter__select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    min-height: 46px;
  }
  .ms-docfilter__dropdown--cat,
  .ms-docfilter__dropdown--spec {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ms-docfilter_bottom { flex-direction: column; gap: 8px; }
  .ms-docfilter_filte_count { font-size: 13px; text-align: center; }

  /* Статистика (ms-stat) — 2 колонки на мобі */
  .ms-stat { padding: 12px; }
  .ms-stat__inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .ms-stat__item,
  .ms-stat__item--last {
    padding: 10px !important;
    flex-direction: column !important;
    text-align: center;
    gap: 4px;
  }
  .ms-stat__icon { font-size: 22px; }
  .ms-stat__number { font-size: 18px !important; font-weight: 800; }
  .ms-stat__text { font-size: 12px !important; line-height: 1.3; }

  /* Плитки категорій пакетів (doc_list) — 2 колонки */
  .doc_list.container.incat { padding: 16px 12px; }
  .doc_list__image.incat { width: 40px; height: 40px; }

  /* Картки пакетів (pkgc) — вертикальний стек */
  .pkgc {
    flex-direction: column !important;
    padding: 14px !important;
    border-radius: 14px;
    margin-bottom: 14px;
    gap: 12px;
  }
  .pkgc__body { padding: 0 !important; width: 100% !important; }
  .pkgc__badge { font-size: 11px; padding: 3px 8px; }
  .pkgc__deadline { font-size: 12px; }
  .pkgc__ava,
  .pkgc__ava--clinic,
  .pkgc__ava--doc {
    width: 32px !important;
    height: 32px !important;
  }
  .pkgc__cta {
    width: 100% !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    justify-content: center;
  }

  /* Аккордеон деталей пакета всередині картки (pkgc__acc) */
  .pkgc__acc,
  .pkgc__acc-content { padding: 0; }
  .pkgc__acc-sum {
    padding: 10px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px;
  }
  .pkgc__acc-prev { font-size: 13.5px; }
  .pkgc__acc-t { font-size: 14px; font-weight: 600; }
  .pkgc__acc-ic { flex: 0 0 auto; }
  .pkgc__acc-chev,
  .pkgc__chev { font-size: 14px; }

  /* Кредити (man-credits) під списком */
  .man-credits { padding: 16px 12px; }
  .man-credits__inner { flex-direction: column; gap: 12px; }

  /* Порожній стан (noneifo) */
  .noneifo {
    padding: 24px 16px !important;
    text-align: center;
    font-size: 15px;
  }
}

/* ============ PACKAGE / КАРТКА ПАКЕТА ============ */

/* ============ CATEGORY / НАПРЯМКИ ============ */
/* Категорія використовує cline-card як CLINICS LIST (правила діють).
   Тут — тільки унікальні класи цієї сторінки. */
@media (max-width: 767.98px) {
  .clin-alldoc_title {
    font-size: 20px !important;
    line-height: 1.25;
    padding: 12px !important;
  }

  /* Обгортка фото зі стикерами */
  .cline-card__photo-wrap {
    width: 100% !important;
    position: relative;
  }

  /* Стикери (акції, вигоди) — компактніші */
  .cline-card__sticker,
  .cline-card__sticker--top,
  .cline-card__sticker--bottom {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
  .cline-card__sticker-top-inner {
    flex-wrap: wrap;
    gap: 4px;
  }
  .cline-card__sticker-top-icon { font-size: 14px; }
  .cline-card__sticker-bottom-left,
  .cline-card__sticker-bottom-right {
    font-size: 11px;
  }
  .cline-card__sticker-bottom-desc1,
  .cline-card__sticker-bottom-desc2 {
    font-size: 10.5px;
    line-height: 1.3;
  }

  /* Блок пакета всередині картки клініки */
  .cline-card__package {
    padding: 10px !important;
    border-radius: 10px;
    margin-top: 10px;
  }
  .cline-card__package-name { font-size: 14px; font-weight: 600; }
  .cline-card__package-price { font-size: 15px; font-weight: 800; }
  .cline-card__package-term { font-size: 12.5px; }
}

/* ============ CHARITY / БЛАГОДІЙНІСТЬ ============ */
@media (max-width: 767.98px) {
  /* ---- Список карток благодійних програм (ub-don-card) ---- */
  .ub-don-card__grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 12px !important;
  }
  .ub-don-card {
    padding: 14px !important;
    border-radius: 14px;
    flex-direction: column !important;
  }
  .ub-don-card__media {
    width: 100% !important;
    height: auto !important;
  }
  .ub-don-card__img,
  .ub-don-card__ph {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .ub-don-card__body,
  .ub-don-card__side { width: 100% !important; padding: 0 !important; }

  .ub-don-card__titleRow {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ub-don-card__title { font-size: 17px !important; line-height: 1.25; }
  .ub-don-card__flag { font-size: 22px; }
  .ub-don-card__text { font-size: 14px; line-height: 1.5; }

  /* Тапи */
  .ub-don-card__tagRow { flex-wrap: wrap; gap: 5px; }
  .ub-don-card__tag { font-size: 11px !important; padding: 3px 8px !important; }

  /* Мета (сума, місто, дата) */
  .ub-don-card__meta {
    flex-direction: column;
    gap: 10px;
    padding: 12px !important;
  }
  .ub-don-card__metaTop { flex-wrap: wrap; gap: 8px; }
  .ub-don-card__metaItem { gap: 6px; }
  .ub-don-card__metaIcon { width: 20px; height: 20px; }
  .ub-don-card__metaText { font-size: 13px; }
  .ub-don-card__metaSub { font-size: 11.5px; }

  /* Дні залишилось */
  .ub-don-card__daysLeft {
    flex-direction: column;
    align-items: center;
    padding: 10px !important;
    text-align: center;
  }
  .ub-don-card__daysNum { font-size: 22px !important; font-weight: 800; }
  .ub-don-card__daysLbl { font-size: 12px; }

  /* Прогрес збору */
  .ub-status { padding: 10px 0; }
  .ub-status__track { height: 8px !important; }
  .ub-status__value { font-size: 13px; font-weight: 700; }
  .ub-status__value--left,
  .ub-status__value--right { font-size: 13px; }

  /* Фото програми (thumbs) */
  .ub-don-card__photos {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: none;
  }
  .ub-don-card__photos::-webkit-scrollbar { display: none; }
  .ub-don-card__thumbs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  /* CTA + соцмережі */
  .ub-don-card__actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .ub-don-card__btn {
    width: 100% !important;
    min-height: 46px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    justify-content: center;
  }
  .ub-don-card__social {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .ub-don-card__soc {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .ub-don-card__line { margin: 12px 0; }

  /* Пагінація благодійності */
  .ub-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px 12px;
  }
  .ub-pagination a,
  .ub-pagination span {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .ub-empty { padding: 24px 16px !important; text-align: center; font-size: 15px; }

  /* Кнопки статусу (mc1-btn) */
  .mc1-btn,
  .mc1-btn--primary,
  .mc1-btn--secondary,
  .mc1-btn--active,
  .mc1-btn--close,
  .mc1-btn--inactive {
    padding: 8px 14px !important;
    font-size: 13px !important;
    min-height: 40px;
  }

  /* ---- Сторінка окремої благодійної програми (charity_info) ---- */
  .chc-wrap { padding: 12px !important; }
  .chc-grid {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  .chc-col-left,
  .chc-col-right { width: 100% !important; margin-bottom: 16px; }

  .chc-title { font-size: 20px !important; line-height: 1.25; padding: 0 12px; }
  .chc-formbox {
    padding: 14px !important;
    border-radius: 12px;
  }
  .chc-row { flex-direction: column; gap: 10px; }
  .chc-inp,
  .chc-sel {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 16px !important;
    min-height: 46px;
  }
  .chc-ta {
    width: 100% !important;
    font-size: 16px !important;
    min-height: 100px;
    padding: 10px 12px !important;
  }
  .chc-submit,
  .chc-btn-more {
    width: 100% !important;
    padding: 12px 16px !important;
    min-height: 46px;
    font-size: 15px !important;
    justify-content: center;
  }
  .chc-list { padding: 0; }
  .chc-msg { padding: 12px !important; font-size: 14px; }
  .chc-pager {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }
  .chc-actions {
    flex-direction: column;
    gap: 8px;
  }

  /* Діагноз/лікування картки на сторінці */
  .blag_diag,
  .blag_le {
    padding: 12px !important;
    margin-bottom: 10px;
  }
}

/* ============ BLOG / БЛОГ ============ */
@media (max-width: 767.98px) {
  /* Blog latest — сітка публікацій в 1 колонку */
  .items-blog {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 12px;
  }
  .item-blog {
    padding: 12px !important;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }
  .img-blog { width: 100%; margin-bottom: 10px; }
  .img-blog img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
  }
  .caption-blog { padding: 0; }
  .caption-blog a { font-size: 16px; line-height: 1.3; font-weight: 700; }
  .info-blog {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12.5px;
    margin: 8px 0;
  }
  .cat-blog { font-size: 11.5px; padding: 3px 8px; }
  .bloger,
  .avatar { font-size: 13px; }
  .title-clin { font-size: 22px !important; line-height: 1.25; padding: 0 12px; }
  .addpub { font-size: 12px; padding: 6px 10px; }

  /* Blog filter row */
  .blog-filter-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 0 12px !important;
  }
  .blog-filter-row .ms-docfilter__field { gap: 2px !important; }
  .blog-filter-row .ms-docfilter__label { font-size: 12px; line-height: 1.1; }
  /* Порожній label перед "Застосувати" — не займає рядок */
  .blog-filter-btn > .ms-docfilter__label { display: none; }
  .blog-filter-btn { width: 100%; text-align: center; min-height: 44px; margin-top: 4px; }
  /* Внутрішній padding блогової фільтр-карти — щільніше */
  .ms-docfilter.container .ms-docfilter__inner { padding: 10px !important; }

  /* Blog article — типографія */
  .typo,
  .typo__wrap {
    padding: 0 12px !important;
    max-width: 100% !important;
  }
  .typo h1, .typo__wrap h1 { font-size: 24px !important; line-height: 1.25 !important; margin-bottom: 12px; }
  .typo h2, .typo__wrap h2 { font-size: 20px !important; line-height: 1.3 !important; margin-top: 20px; }
  .typo h3, .typo__wrap h3 { font-size: 17px !important; line-height: 1.3 !important; margin-top: 16px; }
  .typo p, .typo__wrap p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 12px;
  }
  .typo ul, .typo ol,
  .typo__wrap ul, .typo__wrap ol {
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
  }
  .typo li, .typo__wrap li { margin-bottom: 6px; }
  .typo img,
  .typo__wrap img {
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 10px;
  }
  .typo blockquote,
  .typo__wrap blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.55;
    border-left-width: 3px;
  }
  .typo table,
  .typo__wrap table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }

  /* Стара категорія блогу (OpenCart стандарт з .product-list) */
  .product-list.product-layout {
    padding: 12px !important;
    margin-bottom: 12px;
  }
  .product-list .image {
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 10px;
  }
  .product-list .image img { width: 100%; height: auto; }
  .product-list .caption {
    padding: 0 !important;
    width: 100% !important;
  }
  .product-list h4 { font-size: 17px; line-height: 1.3; }
  .product-list .description { font-size: 14px; line-height: 1.5; }
}

/* ============ INFO PAGES / ІНФО-СТОРІНКИ ============ */
/* Общі: content_bottom, text_l, block_first-* тощо. typo/typo__wrap
   вже покриті у BLOG (стаття). */
@media (max-width: 767.98px) {
  .content_bottom { padding: 0 12px; }
  .text_l { padding: 0 12px; font-size: 15px; line-height: 1.6; }

  /* MedAssist about — картки переваг */
  .ic-medassist-benefits {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 12px;
  }
  .ic-medassist-benefit-card,
  .ic-medassist-benefit-card--wide {
    padding: 14px !important;
    border-radius: 12px;
    grid-column: span 1 !important;
  }
  .ic-medassist-benefit-title { font-size: 15px !important; line-height: 1.25; }
  .ic-medassist-benefit-desc,
  .ic-medassist-benefit-text { font-size: 13.5px; line-height: 1.5; }

  .ic-medassist-bottom { padding: 20px 12px; }
  .ic-medassist-bottom-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ic-medassist-bottom-body { font-size: 14.5px; line-height: 1.55; }

  /* Consultant (координатори) */
  .block_first-all {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 12px;
  }
  .block_first-item {
    flex-direction: column !important;
    padding: 14px !important;
    border-radius: 12px;
    gap: 10px;
  }
  .block_first-img,
  .block_first-img-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  .block_first-img-item {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .block_first-info { width: 100% !important; padding: 0 !important; }
  .block_first-title { font-size: 17px !important; line-height: 1.25; }
  .block_first-text { font-size: 13.5px; line-height: 1.5; }
  .block_first-rew { font-size: 13px; }
  .block_first-info-item {
    padding: 6px 0;
    font-size: 13.5px;
  }
  .c-sm-6 { width: 100% !important; padding: 0 !important; }

  /* Ic-coord-card */
  .ic-coord-card {
    flex-direction: column !important;
    padding: 14px !important;
    gap: 10px;
    border-radius: 12px;
  }

  /* Стандартна .typo сторінка про (already handled by BLOG article rules) */

  /* Sitemap */
  ul.sitemap,
  .sitemap ul { padding-left: 16px; font-size: 15px; }
}

/* ============ SEARCH / ПОШУК ============ */
@media (max-width: 767.98px) {
  /* common/search — Bootstrap-стандарт */
  .search-autocomplete {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .input-group .form-control.input-lg {
    font-size: 16px !important;
    height: 46px;
  }
  .btn.btn-default.btn-lg {
    font-size: 15px;
    min-height: 46px;
    padding: 10px 16px;
  }
}

/* ============ REVIEWS (відгуки) ============ */
@media (max-width: 767.98px) {
  .ic-review-bg { padding: 12px 0 32px; }
  .ic-reviews {
    padding: 0 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ic-reviews__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 12px 12px;
  }
  .ic-reviews__illustration { display: none; }
  .ic-reviews__add-btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    font-size: 15px;
    justify-content: center;
  }
  .ic-reviews__allimg {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 0 12px 8px;
    scrollbar-width: none;
  }
  .ic-reviews__allimg::-webkit-scrollbar { display: none; }
  .ic-reviews__media-strip {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: none;
  }
  .ic-reviews__media-strip::-webkit-scrollbar { display: none; }
  .ic-reviews__media-thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Картка відгуку */
  .ic-review-card {
    padding: 14px !important;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .ic-review-card__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ic-review-card__head,
  .ic-review-card__head-l {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .ic-review-card__avatar-wrap,
  .ic-review-card__avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }
  .ic-review-card__name-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ic-review-card__name { font-size: 15px !important; font-weight: 700; }
  .ic-review-card__flag { font-size: 15px; }
  .ic-review-card__date { font-size: 12.5px; }
  .ic-review-card__source {
    font-size: 12px;
    gap: 4px;
  }
  .ic-review-card__source-icon { width: 14px; height: 14px; }
  .ic-review-card__stars { font-size: 15px; }
  .ic-review-card__meta-row {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
  }
  .ic-review-card__doctor-row {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
  }

  .ic-review-card__body { padding: 0; }
  .ic-review-card__text { font-size: 14px; line-height: 1.55; }
  .ic-review-card__more-btn {
    width: 100%;
    padding: 10px;
    min-height: 44px;
    font-size: 13.5px;
    justify-content: center;
  }

  /* Плюси / мінуси */
  .ic-review-card__bullets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ic-review-card__bullet,
  .ic-review-card__bullet--plus,
  .ic-review-card__bullet--minus {
    font-size: 13.5px;
    line-height: 1.4;
  }

  /* Фото до відгуку */
  .ic-review-card__photos {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    scrollbar-width: none;
  }
  .ic-review-card__photos::-webkit-scrollbar { display: none; }
  .ic-review-card__photo {
    flex: 0 0 auto;
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Координатор під відгуком */
  .ic-review-card__coordinator {
    padding: 10px !important;
    border-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .ic-review-card__coordinator-name { font-size: 13.5px; font-weight: 600; }
  .ic-review-card__coordinator-text { font-size: 13px; line-height: 1.4; }
}

/* ============ REMAINING PAGES + FINAL POLISH ============ */
@media (max-width: 767.98px) {
  /* Compare table — картки замість таблиці */
  .table.table-bordered {
    display: block;
    font-size: 13px;
  }
  .table.table-bordered thead,
  .table.table-striped thead {
    display: none;
  }
  .table.table-bordered tbody,
  .table.table-striped tbody {
    display: block;
  }
  .table.table-bordered tbody tr,
  .table.table-striped tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 10px;
  }
  .table.table-bordered tbody td,
  .table.table-striped tbody td {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,.05) !important;
    text-align: left !important;
  }
  .table tbody tr td:last-child { border-bottom: none !important; }
  /* Column stretch у order tables — інша поведінка */
  .order-list td { display: table-cell !important; }
  .btn-block { display: block; width: 100%; min-height: 46px; }

  /* Product review table (список відгуків OpenCart) */
  .rating { font-size: 15px; }

  /* Text-right/left → text-center на дуже вузьких */
  .row > .col-sm-6.text-right,
  .row > .col-sm-6.text-left {
    text-align: center !important;
    margin-bottom: 10px;
  }

  /* Bootstrap responsive utilities — забезпечити правильну поведінку */
  .visible-xs { display: block !important; }
  .visible-xs-inline { display: inline !important; }
  .visible-xs-inline-block { display: inline-block !important; }
  .hidden-xs { display: none !important; }

  /* Pull-right / pull-left → скидаємо на мобі */
  .buttons .pull-right,
  .buttons .pull-left,
  .page-header .pull-right {
    float: none !important;
  }
  .page-header {
    padding: 12px !important;
    text-align: center;
  }
  .page-header h1 {
    font-size: 22px !important;
    line-height: 1.25;
    margin: 0 0 10px;
  }

  /* Кнопка закриття хрестика в alerts тощо */
  .close {
    float: none !important;
    margin: 0;
    opacity: .7;
    padding: 6px 10px;
    min-width: 40px;
    min-height: 40px;
    font-size: 22px;
    line-height: 1;
  }

  /* Panels (Bootstrap) — акуратний padding */
  .panel { border-radius: 10px; margin-bottom: 12px; }
  .panel-heading { padding: 12px 14px !important; font-size: 15px; }
  .panel-body { padding: 14px !important; }
  .panel-footer { padding: 10px 14px !important; }

  /* Забороняємо overflow-x на всіх контейнерах */
  .container, .row, [class^="col-"] { max-width: 100%; }

  /* Форми загалом — прибираємо стандартну висоту .form-group у .form-horizontal */
  .form-horizontal .form-group {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* .well у корзині / компере */
  .well.well-sm { padding: 12px !important; }

  /* Помилки валідації текстом справа від input → знизу */
  .text-danger {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.4;
  }

  /* Клас .visible-lg-block / .hidden-md на iPad landscape тощо — залишаємо
     стандартну Bootstrap логіку. Тут — тільки для xs. */
}

/* Landscape орієнтація малих телефонів — коротший вертикальний padding */
@media (max-width: 767.98px) and (orientation: landscape) and (max-height: 500px) {
  .hero-cta { padding: 12px 0 !important; }
  .home-block-form,
  .clinic-section { padding: 12px 0 !important; }
  .cline-card__photo-img { height: 140px !important; }
  .doc-photo,
  .doc-media { width: 100px !important; height: 100px !important; }
  .hcard__media,
  .paked-card__media { height: 120px !important; }
  .loc__mapwrap { height: 160px !important; }
  .mob-0tab {
    padding: 6px 12px !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px) !important;
  }
}

/* Дуже вузькі екрани (<360px) — трохи менший шрифт */
@media (max-width: 359.98px) {
  html { font-size: 14px; }
  .hero-cta__title { font-size: 22px !important; }
  .medhome-tabs__title { font-size: 20px !important; }
  .home-dirs__title { font-size: 20px !important; }
  .ms-doc-card__name,
  .cline-card__title,
  .doc-name { font-size: 16px !important; }
  .ms-doc-card__btn,
  .cline-card__btn,
  .paked-card__btn,
  .ub-don-card__btn { font-size: 14px !important; padding: 10px 12px !important; }
  .mob-0tab__title { display: none; } /* економія 20px висоти */
  .breadcrumb { font-size: 11.5px; }
}

/* Prefer-reduced-motion — вимикаємо анімації для тих, хто просив */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ CALCULATOR (treatbox) ============ */
@media (max-width: 767.98px) {
  .treatbox { padding: 12px !important; }
  .treatbox__card {
    padding: 16px !important;
    border-radius: 14px;
  }
  .treatbox__title {
    font-size: 20px !important;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .treatbox__subtitle { font-size: 14px; line-height: 1.5; }
  .treatbox__note { font-size: 12.5px; }

  /* Пили типів лікування — обгортання */
  .treatbox__pills,
  .treatbox__chips {
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
  }
  .treatbox__pill,
  .treatbox__chip {
    padding: 8px 12px !important;
    font-size: 13px !important;
    min-height: 40px;
  }

  /* Селект (Країна / Клініка / Процедура) */
  .treatbox__select,
  .treatbox__selectEl {
    width: 100%;
    font-size: 16px !important;
    min-height: 46px;
    padding: 10px 12px !important;
  }

  /* Тумблери (Опції) */
  .treatbox__toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .treatbox__toggle {
    padding: 10px 12px !important;
    font-size: 14px;
    min-height: 44px;
  }
  .treatbox__toggleText { font-size: 13.5px; }
  .treatbox__switch { flex: 0 0 auto; }

  /* CTA + чеврон */
  .treatbox__cta,
  .treatbox__btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    justify-content: center;
  }
  .treatbox__more { text-align: center; padding: 10px; }
  .treatbox__chev,
  .treatbox__icon { font-size: 16px; }
}

/* ============ CHECKOUT + ACCOUNT ============ */
/* Стандартні Bootstrap 3 form-horizontal сторінки OpenCart. Робимо
   форми зручними для мобільного: лейбли зверху, поля повна ширина,
   inputs 46px + font 16px (без iOS zoom), кнопки Primary/Default 46px. */
@media (max-width: 767.98px) {
  /* Загальний контейнер сторінок account/checkout */
  .container > .row > [class^="col-sm-"],
  .container > .row > [class*=" col-sm-"] {
    margin-bottom: 16px;
  }

  /* Bootstrap form-horizontal → в стек */
  .form-horizontal .control-label,
  .form-horizontal .col-sm-2.control-label {
    text-align: left !important;
    padding-top: 0 !important;
    padding-bottom: 6px !important;
    width: 100% !important;
    float: none !important;
  }
  .form-horizontal .col-sm-2,
  .form-horizontal .col-sm-3,
  .form-horizontal .col-sm-4,
  .form-horizontal .col-sm-6,
  .form-horizontal .col-sm-8,
  .form-horizontal .col-sm-10 {
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    float: none !important;
  }
  .form-horizontal .form-group { margin-bottom: 14px; }
  .form-control {
    font-size: 16px !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
  }
  textarea.form-control { min-height: 90px !important; }
  select.form-control { padding-right: 32px !important; }

  /* Кнопки в стек */
  .buttons {
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 0;
  }
  .buttons .btn,
  .buttons a.btn,
  .buttons button.btn {
    width: 100% !important;
    min-height: 46px;
    font-size: 15px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    text-align: center;
  }
  .buttons .pull-right,
  .buttons .pull-left {
    float: none !important;
    width: 100%;
  }

  /* Well-контейнери (login/register two-col) */
  .well {
    padding: 16px !important;
    margin-bottom: 16px;
    border-radius: 10px;
  }

  /* Login row: 2×.col-sm-6 → 1col */
  .container > .row > .col-sm-6 {
    width: 100% !important;
    float: none !important;
    padding: 0 12px !important;
  }

  /* Account dashboard — списки посилань */
  .list-unstyled { padding-left: 0; margin: 0; }
  .list-unstyled li a {
    display: block;
    padding: 12px 14px;
    min-height: 46px;
    font-size: 15px;
    border-radius: 8px;
  }

  /* Alerts */
  .alert {
    padding: 12px 14px !important;
    margin: 12px 0 !important;
    font-size: 14px;
    line-height: 1.4;
  }
  .alert.alert-dismissible .close {
    padding: 10px !important;
    font-size: 20px;
    line-height: 1;
    min-height: 44px;
    min-width: 44px;
  }

  /* Checkbox / radio — комфортніші розміри */
  .checkbox,
  .radio {
    padding-left: 24px;
    margin: 6px 0;
  }
  .checkbox label,
  .radio label {
    font-size: 14px;
    line-height: 1.4;
    padding-top: 2px;
  }
  .checkbox input[type="checkbox"],
  .radio input[type="radio"] {
    margin-left: -24px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
  }

  /* input-group (номер телефону, копи-код тощо) */
  .input-group {
    display: flex;
    flex-direction: row;
  }
  .input-group .form-control { min-width: 0; }
  .input-group .input-group-addon {
    padding: 8px 10px;
    font-size: 14px;
    min-height: 46px;
    display: flex;
    align-items: center;
  }
  .input-group-btn .btn {
    padding: 10px 14px !important;
    min-height: 46px;
    font-size: 14px;
  }

  /* Order tables → скрол */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table {
    font-size: 13px;
  }
  .table td, .table th {
    padding: 8px 6px !important;
    white-space: nowrap;
  }

  /* Cart page (checkout/cart) */
  .cart-info { padding: 0; }
  .cart-info .img-thumbnail {
    max-width: 80px !important;
    padding: 2px;
  }
  #accordion .panel {
    margin-bottom: 12px !important;
  }
  #accordion .panel-heading { padding: 12px !important; }
  #accordion .panel-heading .panel-title a {
    font-size: 15px;
    display: block;
    padding-right: 20px;
  }
  #accordion .panel-body { padding: 14px !important; }
}
