/* ЭкспертКПП v50: компактный мобильный каталог (две карточки в ряд).
   Загружается после старых таблиц стилей и не затрагивает десктоп. */
@media (max-width: 767px) {
  #services .service-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px !important;
    align-items: stretch;
  }
  #services .service-card {
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 15px !important;
    box-shadow: 0 7px 21px rgba(15,39,60,.07) !important;
  }
  #services .service-image {
    position: relative !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.6 / 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #services .service-image > img,
  #services .service-image > img[src*="/service-photos/"] {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #services .service-image-index {
    top: 9px !important;
    left: 9px !important;
    min-width: 31px !important;
    padding: 5px 7px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
  }
  #services .service-card-content {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding: 13px 11px 12px !important;
  }
  #services .service-card h3 {
    margin: 0 0 7px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: -.018em !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    hyphens: none !important;
  }
  #services .service-card-content > p {
    margin: 0 0 12px !important;
    font-size: 11px !important;
    line-height: 1.42 !important;
    color: #667788 !important;
    display: block !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
  }
  #services .service-bottom {
    margin-top: auto !important;
    padding-top: 10px !important;
    gap: 9px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }
  #services .service-bottom > div {
    width: 100% !important;
    min-width: 0 !important;
  }
  #services .service-bottom small {
    display: block !important;
    margin: 0 0 2px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }
  #services .service-bottom strong {
    display: block !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    letter-spacing: -.015em !important;
    white-space: nowrap !important;
  }
  #services .service-bottom a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 8px 0 10px !important;
    margin: 0 !important;
    gap: 5px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
    text-align: left !important;
  }
  #services .service-bottom a::after {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 21px !important;
    width: 21px !important;
    height: 21px !important;
    border-radius: 8px !important;
    background-size: 11px 11px !important;
  }

  /* Только кнопки управляют горизонтальными слайдерами на телефонах. */
  .work-slider-shell .work-slider,
  .reviews-section .review-carousel {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: auto !important;
    touch-action: pan-y !important;
    overscroll-behavior-x: none !important;
    cursor: default !important;
    user-select: auto !important;
  }
  .work-slider-shell .work-slider.is-dragging,
  .reviews-section .review-carousel.is-dragging {
    cursor: default !important;
  }
  .work-slider-shell .slider-toolbar > p {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }
}

@media (max-width: 360px) {
  #services .service-grid {gap: 8px !important;}
  #services .service-card-content {padding: 11px 9px 10px !important;}
  #services .service-card h3 {font-size: 11.5px !important;}
  #services .service-card-content > p {font-size: 10px !important;}
  #services .service-bottom small {font-size: 9px !important;}
  #services .service-bottom strong {font-size: 16px !important;}
  #services .service-bottom a {font-size: 10px !important;padding: 0 6px 0 8px !important;}
  #services .service-bottom a::after {flex-basis: 19px !important;width: 19px !important;height: 19px !important;}
}
