.branch-directory article { display: flex; flex-direction: column; }
.branch-directory article > div { flex: 1; }
.branch-directory .directory-photo, .branch-directory .directory-photo img,
#contacts a.branch-photo { display: block; }
.directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: auto; }
.directory-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.directory-photo:focus-visible, #contacts a.branch-photo:focus-visible { outline: 3px solid #17612c; outline-offset: -3px; }
.home-branch h2 a, #contacts .branch-detail-link { color: inherit; text-underline-offset: 3px; }
#contacts .branch-detail-link { color: #17612c; font-weight: 700; text-decoration: underline; }
.home-branch-address { display: grid; min-width: 0; }
.home-branch-address > span { grid-area: 1 / 1; }
.home-branch-address > [aria-hidden="true"] { visibility: hidden; }

.branch-locator-ready .section-heading {
  margin-bottom: 32px;
}

.branch-locator-ready .section-heading h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1.1;
}

.branch-locator-ready .section-heading > p {
  margin: 12px 0 0;
  color: #657069;
  font-size: 20px;
}

.branch-locator-ready .branch-filter[hidden],
.branch-selector[hidden],
.branch-locator-ready .branch-card[hidden] {
  display: none !important;
}

.branch-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}

.branch-selector button {
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid #a7c4ad;
  border-radius: 8px;
  background: #fff;
  color: #101814;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.branch-selector button:hover {
  background: #edf6ef;
}

.branch-selector button[aria-pressed="true"] {
  border-color: #17612c;
  background: #17612c;
  color: #fff;
}

.branch-selector button:focus-visible {
  outline: 3px solid #eab900;
  outline-offset: 3px;
}

.branch-locator-ready .branch-grid {
  display: block;
}

.branch-locator-ready .branch-card {
  display: grid;
  grid-template-columns: 1.1fr .85fr 1fr;
  gap: 32px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.branch-locator-ready .branch-photo {
  height: 430px;
  border-radius: 8px;
}

.branch-locator-ready .branch-photo img,
.branch-locator-ready .branch-card:hover .branch-photo img {
  object-position: center;
  transform: none;
}

.branch-locator-ready .branch-photo img.branch-photo-sign {
  object-position: center top;
}

.branch-locator-ready .branch-card[data-branch="kominterna"] .branch-photo {
  height: auto;
  aspect-ratio: 804 / 1090;
}

.branch-locator-ready .branch-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
}

.branch-locator-ready .branch-body span {
  font-size: 14px;
}

.branch-locator-ready .branch-body h3 {
  font-size: 32px;
  line-height: 1.12;
}

.branch-locator-ready .branch-body h3 a {
  color: inherit;
  text-decoration: none;
}

.branch-locator-ready .branch-phone {
  color: #17612c;
  font-size: 22px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.branch-locator-ready .branch-route {
  align-self: stretch;
  min-height: 56px;
  justify-content: center;
  white-space: normal;
  text-align: center;
}

.branch-locator-ready .branch-map-link {
  padding-left: 26px;
  background: url('../assets/lucide-map-pin.svg') left center / 19px 19px no-repeat;
  font-size: 17px;
}

.branch-locator-ready .branch-card iframe,
.branch-locator-ready .branch-map-shell,
.branch-locator-ready .branch-map-shell iframe.branch-map-2gis {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .branch-locator-ready .branch-card {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .branch-locator-ready .branch-card > iframe,
  .branch-locator-ready .branch-map-shell {
    grid-column: 1 / -1;
    height: 300px;
  }

  .branch-locator-ready .branch-map-shell iframe.branch-map-2gis {
    height: 300px;
  }
}

@media (max-width: 600px) {
  .branch-locator-ready .section-heading h2 {
    font-size: 32px;
  }

  .branch-locator-ready .section-heading > p {
    font-size: 17px;
  }

  .branch-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 28px;
  }

  .branch-selector button {
    min-height: 58px;
    font-size: 14px;
  }

  .branch-locator-ready .branch-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .branch-locator-ready .branch-photo {
    height: 300px;
  }

  .branch-locator-ready .branch-body h3 {
    font-size: 27px;
  }

  .branch-locator-ready .branch-card > iframe,
  .branch-locator-ready .branch-map-shell,
  .branch-locator-ready .branch-map-shell iframe.branch-map-2gis {
    height: 250px;
  }
}
