/*!
 * MedLab Locations Section. Mobile first, scoped to .mls so it does not touch the rest of the theme.
 * Change the look from the variables below.
 */

.mls {
  --ml-ink: #0B3D3D;        /* text */
  --ml-dark: #004854;       /* MedLab dark teal */
  --ml-lime: #C1C80B;       /* MedLab lime */
  --ml-lime-hover: #AEB509;
  --ml-tint: #F1F8F8;       /* section background */
  --ml-line: #D5E9E9;
  --ml-muted: #4B6B6B;

  box-sizing: border-box;
  padding: 48px 0 56px;
  background: var(--ml-tint);
  color: var(--ml-ink);
  font-family: inherit;
  line-height: 1.5;
}

.mls *,
.mls *::before,
.mls *::after {
  box-sizing: border-box;
}

.mls svg { display: block; }

.mls .mls__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "cards" "all" "trust";
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */

.mls .mls__head { grid-area: head; }

.mls .mls__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--ml-dark);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}



.mls .mls__title {
  margin: 0 0 8px;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: clamp(1.625rem, 4.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
  text-transform: none;
}

.mls .mls__sub {
  max-width: 34em;
  margin: 0;
  color: var(--ml-muted);
  font-size: 1rem;
}

.mls .mls__notice {
  grid-area: cards;
  margin: 0;
  padding: 14px 16px;
  border: 2px solid var(--ml-lime);
  border-radius: 12px;
  background: #fff;
}

/* ---------- The one main action ---------- */

.mls a.mls__all,
.mls a.mls__all:hover,
.mls a.mls__all:focus,
.mls a.mls__all:visited {
  color: var(--ml-ink);
  text-decoration: none;
}

.mls a.mls__all {
  grid-area: all;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--ml-lime);
  font-size: 1rem;
  font-weight: 600;
  transition: background-color .15s ease;
}

.mls a.mls__all:hover { background: var(--ml-lime-hover); }

.mls a.mls__all svg {
  width: 20px;
  height: 20px;
  transition: transform .15s ease;
}

.mls a.mls__all:hover svg { transform: translateX(3px); }

.mls a.mls__all:focus-visible,
.mls a.mls-card:focus-visible,
.mls .mls-trust a:focus-visible {
  outline: 3px solid var(--ml-dark);
  outline-offset: 3px;
}

/* ---------- Location cards ---------- */

.mls .mls__cards {
  grid-area: cards;
  display: flex;
  gap: 12px;
  margin: 0 -16px;
  padding: 4px 16px 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mls .mls__cards::-webkit-scrollbar { display: none; }

.mls .mls__cards > li {
  flex: 0 0 72%;
  max-width: 300px;
  margin: 0;
  padding: 0;
  list-style: none;
  scroll-snap-align: start;
}

.mls .mls__cards > li::before,
.mls .mls-trust > li::before { content: none; }

.mls a.mls-card,
.mls a.mls-card:hover,
.mls a.mls-card:focus,
.mls a.mls-card:visited {
  color: inherit;
  text-decoration: none;
}

.mls a.mls-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border-radius: 5px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.mls a.mls-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 72, 84, .12);
}

.mls .mls-card__photo {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--ml-line);
}

.mls .mls-card__photo img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

/* no homepage photo yet: the logo, whole, on a light background */
.mls .mls-card__photo.is-logo {
  background: #fff;
  border-bottom: 1px solid var(--ml-line);
}

.mls .mls-card__photo.is-logo img {
  padding: 16px 24px;
  object-fit: contain;
}

/* no photo and no logo */
.mls .mls-card__photo.is-empty {
  background: repeating-linear-gradient(135deg, #E2F1F1 0 12px, #D5E9E9 12px 24px);
}

.mls .mls-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
}

.mls .mls-card__town {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.mls .mls-card__site {
  display: block;
  margin-top: 2px;
  color: var(--ml-muted);
  font-size: .8125rem;
  line-height: 1.35;
}

.mls .mls-card__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ml-lime);
  color: var(--ml-ink);
  transition: transform .18s ease;
}

.mls .mls-card__go svg {
  width: 18px;
  height: 18px;
}

.mls a.mls-card:hover .mls-card__go { transform: translateX(3px); }

/* ---------- Quality and service band ---------- */

.mls .mls-trust {
  grid-area: trust;
  margin: 8px 0 0;
  padding: 6px;
  list-style: none;
  border-radius: 20px;
  background: var(--ml-dark);
  color: #fff;
}

.mls .mls-trust > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mls .mls-trust > li + li { border-top: 1px solid rgba(255, 255, 255, .16); }

.mls .mls-trust a.mls-trust__item,
.mls .mls-trust a.mls-trust__item:hover,
.mls .mls-trust a.mls-trust__item:focus,
.mls .mls-trust a.mls-trust__item:visited {
  color: #fff;
  text-decoration: none;
}

.mls .mls-trust .mls-trust__item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 14px;
  transition: background-color .15s ease;
}

.mls .mls-trust a.mls-trust__item:hover { background: rgba(255, 255, 255, .07); }

.mls .mls-trust__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--ml-lime);
}

.mls .mls-trust__icon svg {
  width: 22px;
  height: 22px;
}

.mls .mls-trust__text {
  display: block;
  min-width: 0;
}

.mls .mls-trust__title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.mls .mls-trust__line {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .85);
  font-size: .875rem;
  line-height: 1.35;
}

.mls .mls-trust__chev {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: rgba(255, 255, 255, .85);
}

/* ---------- Tablet ---------- */

@media (min-width: 640px) {
  .mls { padding: 64px 0 72px; }

  .mls .mls__inner {
    gap: 28px;
    padding: 0 24px;
  }

  .mls .mls__cards {
    gap: 16px;
    margin: 0 -24px;
    padding: 4px 24px 8px;
    scroll-padding: 0 24px;
  }

  .mls .mls__cards > li {
    flex: 0 0 calc((100% - 32px) / 3);
    max-width: none;
  }

  .mls a.mls__all { justify-self: start; }
}

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
  .mls .mls__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head all" "cards cards" "trust trust";
    align-items: end;
  }

  .mls a.mls__all { justify-self: end; }

  .mls .mls-trust {
    display: flex;
    padding: 8px;
  }

  .mls .mls-trust > li {
    flex: 1 1 0;
    min-width: 0;
  }

  .mls .mls-trust > li + li {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, .16);
  }

  .mls .mls-trust .mls-trust__item {
    min-height: 88px;
    padding: 16px 20px;
  }
}

@media (min-width: 1024px) {
  .mls .mls__cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 4px 0 8px;
    overflow: visible;
  }

  .mls .mls__cards > li { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mls a.mls-card,
  .mls .mls-card__go,
  .mls a.mls__all,
  .mls a.mls__all svg,
  .mls .mls-trust .mls-trust__item {
    transition: none;
  }

  .mls a.mls-card:hover { transform: none; }
}
