.branches-overview {
  padding-block: 56px 100px;
}

.branches-overview__heading {
  margin: 0 0 40px;
  text-align: center;
}

.branches-overview__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.branch-overview-link {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.75;
  overflow: hidden;
  border-radius: 4px;
  isolation: isolate;
  background: #132913;
  color: #fff;
  text-decoration: none;
}

.branch-overview-link::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: rgb(0 0 0 / 42%);
  transition: background 180ms ease;
}

.branch-overview-link img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

.branch-overview-link__title {
  max-width: 100%;
  padding: 24px;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.branch-overview-link:hover::after {
  background: rgb(0 0 0 / 30%);
}

.branch-overview-link:hover img {
  transform: scale(1.025);
}

.branch-overview-link:focus-visible {
  outline: 3px solid #21f01a;
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  .branches-overview__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wsb-branches-page .footer__signup { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 600px) {
  .branches-overview { padding-block: 36px 64px; }
  .branches-overview__heading { margin-bottom: 28px; }
  .branches-overview__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .branch-overview-link__title { font-size: 22px; padding: 20px; }
  .wsb-branches-page .site-header__inner,
  .wsb-branches-page .site-header.is-condensed .site-header__inner {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    padding-inline: 12px;
  }
  .wsb-branches-page .header-actions { min-width: 0; }
  .wsb-branches-page .header-actions .arrow-button { min-width: 0; white-space: normal; }
  .wsb-branches-page .header-actions .arrow-button__label {
    padding-inline: 10px;
    text-align: center;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .branch-overview-link img, .branch-overview-link::after { transition: none; }
}
