/* Shared phone and tablet layout adjustments. */
@media (max-width: 991px) {
  .am-nav-row > *, .am-booking-grid > *, .am-city-card > *,
  .reference-catalog .tj-service-2-box { min-width: 0; }
  .reference-catalog .tj-service-2-item { width: 100%; max-width: 100%; }
  .am-area-steps { grid-template-columns: 1fr; gap: 22px; }
  .am-city-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-area-section-head { flex-wrap: wrap; gap: 12px; }
  .am-area-assistance { padding: 24px; }
  main :is(input, select, textarea) { min-width: 0; font-size: 16px; }
  main .tj-primary-btn { white-space: normal; text-align: center; }
  .am-contact-map-heading { flex-wrap: wrap; }
  .am-header .am-menu-toggle { min-width: 90px; min-height: 44px; }
  .am-header .am-navigation { max-width: 100%; }
  .am-header .am-mega-menu { min-width: 0; }
}
@media (max-width: 767px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  main :is(p, li), footer :is(p, li) { overflow-wrap: break-word; }
  main img, footer img { max-width: 100%; }
  main iframe { max-width: 100%; }
  main .tj-slider-title { font-size: clamp(32px, 7vw, 46px); line-height: 1.18; }
  main .tj-slider-thumb { margin-inline: auto; }
  .am-social-sidebar {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: auto;
    transform: none;
    flex-direction: row;
    gap: 6px;
    padding: 6px;
    border: 1px solid #e9e3d0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 16px #17105c18;
  }
  .am-social-link, .am-social-icon { width: 36px; height: 36px; }
  .am-social-label { display: none; }
  .back-to-top-wrapper, .back-to-top-wrapper.back-to-top-btn-show {
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .am-booking > .container { padding-inline: 16px; }
  .am-booking-grid { gap: 24px; }
  .am-booking-panel { padding: 22px 18px; }
  .am-booking-intro > h2 { font-size: 30px; }
  .am-booking-form-heading h2 { font-size: 28px; }
  .am-booking .reference-enquiry :is(input, select, textarea) { font-size: 16px; }
  .am-booking .reference-enquiry label { font-size: 17px; }
  .am-booking-help > a { font-size: 18px; overflow-wrap: anywhere; }
  .am-contact-map-frame iframe { height: 300px; }
  .tj-footer-bottom-row { row-gap: 16px; }
  .tj-footer-copyright-menu ul { flex-wrap: wrap; justify-content: center; gap: 12px; }
}
@media (max-width: 575px) {
  .container { padding-inline: 16px; }
  body, main p, main li, footer p, footer li, .tj-footer-widget-paragraph {
    font-size: 17px;
    line-height: 1.65;
  }
  .am-header .am-nav-row { min-height: 76px; column-gap: 10px; padding-block: 10px; }
  .am-header .am-logo { width: 220px; }
  .am-header .am-menu-toggle { padding: 10px; font-size: 14px; gap: 7px; }
  .am-phones { font-size: 12px; gap: 6px; }
  .am-header .am-nav-links > li > a, .am-header .am-services-menu > summary { font-size: 17px; }
  .am-header .am-menu-group a, .am-header .am-area-menu-links > a { font-size: 16px; }
  main .tj-section-title { font-size: clamp(28px, 8vw, 34px); }
  main :is(.am-area-section-head h2, .am-area-overview-intro h2, .am-city-intro h2, .am-city-steps h2) {
    font-size: 29px;
    letter-spacing: -.4px;
  }
  .am-city-services, .am-city-cards, .am-area-grid { grid-template-columns: minmax(0, 1fr); }
  .am-city-card { padding: 20px 16px; gap: 12px; }
  .am-city-card h3 { font-size: 24px; }
  .am-city-actions { align-items: stretch; flex-direction: column; gap: 16px; }
  .am-area-button { width: 100%; font-size: 16px; }
  .am-city-photo { height: 250px; }
  #homepage-services .am-profile-grid { justify-content: center; row-gap: 20px; }
  #homepage-services .am-profile-column { max-width: 100%; }
  #homepage-services .am-profile-card { max-width: 370px; }
  #homepage-services .am-profile-title { font-size: 24px; }
  #homepage-services .am-profile-description { font-size: 17px; }
  .reference-catalog { gap: 22px; }
  .reference-catalog .tj-service-2-item { display: flex; flex-direction: column; align-items: stretch; }
  .reference-catalog .tj-service-2-thumb { flex: none; width: 100%; }
  .reference-catalog .tj-service-2-thumb img { height: 230px; min-height: 0; object-fit: cover; }
  .reference-catalog .tj-service-2-box { width: 100%; padding: 22px 18px; }
  .reference-sidebar, .reference-value { padding: 22px 18px; }
  main .tj-service-details-image img { max-height: 300px; }
  .am-contact-map-heading h2 { font-size: 29px; }
  .am-contact-map-link { width: 100%; font-size: 16px; padding: 12px; }
}
/* Keep social links on the right edge on phones too. */
@media (max-width: 767px) {
  body { padding-bottom: 0; }
  .am-social-sidebar {
    top: 50%;
    bottom: auto;
    left: auto;
    right: max(5px, env(safe-area-inset-right, 0px));
    transform: translateY(-50%);
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}