/*
 * Our Locations index — mobile polish only
 * Source: html_maket/neweditsandmobile/JBY-Our-Locations-dev
 * Desktop stays in custom_yacht_style.css; this file only adjusts ≤960 / ≤680 / ≤600 / ≤560.
 */

/* ---------- Tablet / mobile stack (template ≤960) ---------- */
@media (max-width: 960px) {
  html:has(#jb_body.page-locations),
  html:has(#jb_body.page-locations) body {
    overflow-x: hidden;
  }

  #jb_body.page-locations .locations-page__wrap {
    padding: 0 24px;
  }

  #jb_body.page-locations .locations-page__intro {
    white-space: normal;
    /* template keeps 20/28 on tablet; live custom had shrunk this */
    font-size: 20px;
    line-height: 28px;
  }

  #jb_body.page-locations .locations-page__title {
    font-size: 28px;
    line-height: 40px;
  }

  #jb_body.page-locations .loc-body {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }

  #jb_body.page-locations .loc-map-wrap {
    position: static;
    order: -1;
  }

  #jb_body.page-locations .locations-page__map {
    height: 360px;
  }

  /* Filter tabs: one-line horizontal scroll rail (edge bleed like template) */
  #jb_body.page-locations .loc-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 36px -24px 0;
    padding: 0 24px 2px;
  }

  #jb_body.page-locations .loc-filter::-webkit-scrollbar {
    display: none;
  }

  #jb_body.page-locations .loc-filter button {
    flex: 0 0 auto;
  }

  /* Footer expert block on this page (template ≤960) */
  #jb_body.page-locations .site-foot__expert.expert,
  #jb_body.page-locations .expert.site-foot__expert {
    padding: 56px 24px;
    min-height: auto;
  }

  #jb_body.page-locations .site-foot__expert h2,
  #jb_body.page-locations .expert.site-foot__expert h2 {
    font-size: 24px;
    line-height: 36px;
  }
}

/* ---------- Help / expert one-line title + full-width CTA (template ≤680) ---------- */
@media (max-width: 680px) {
  #jb_body.page-locations .site-foot__expert h2,
  #jb_body.page-locations .expert.site-foot__expert h2,
  #jb_body.page-locations .help h2 {
    white-space: nowrap;
    font-size: clamp(16px, 5.8vw, 28px);
    line-height: 1.25;
  }

  #jb_body.page-locations .site-foot__expert .btn,
  #jb_body.page-locations .expert.site-foot__expert .btn,
  #jb_body.page-locations .help .btn,
  #jb_body.page-locations .help .btn-ghost,
  #jb_body.page-locations .expert .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Phone polish (template ≤600) ---------- */
@media (max-width: 600px) {
  /* Title spacing under fixed header */
  #jb_body.page-locations .locations-page {
    padding-top: 40px;
  }

  #jb_body.page-locations .locations-page__header.loc-head,
  #jb_body.page-locations .locations-page__header {
    padding-top: 0;
  }

  #jb_body.page-locations .loc-modal-body {
    padding: 20px 22px 24px;
  }

  #jb_body.page-locations .loc-modal-body h3 {
    font-size: 20px;
    line-height: 26px;
  }

  #jb_body.page-locations .loc-modal-row {
    grid-template-columns: 90px 1fr;
    gap: 14px;
  }

  #jb_body.page-locations .loc-modal-row dt {
    overflow-wrap: anywhere;
  }

  /* Long uppercase email tokens in footer */
  #jb_body.page-locations .foot-col p {
    font-size: 14px;
    line-height: 18px;
  }

  #jb_body.page-locations .foot-col p a {
    font-size: inherit;
  }
}

/* ---------- Narrow phones (template ≤560) ---------- */
@media (max-width: 560px) {
  #jb_body.page-locations .loc-filter {
    gap: 16px 20px;
  }

  #jb_body.page-locations .loc-filter button {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #jb_body.page-locations .reveal,
  #jb_body.page-locations .loc-modal-panel {
    transition: none;
    transform: none;
  }

  #jb_body.page-locations .reveal {
    opacity: 1;
  }
}
