.geo-card-gallery {
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #102744;
}

.geo-gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.geo-gallery-track::-webkit-scrollbar { display: none; }

.geo-gallery-track img {
  display: block;
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.geo-gallery-controls, .geo-card-gallery .geo-gallery-caption {
  position: absolute;
  inset: auto 6px 6px;
  margin: 0;
  color: #fff;
}

.geo-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .16s ease, transform .16s ease;
}

.geo-gallery-controls[hidden] { display: none; }

.geo-card-gallery:has(.geo-gallery-controls button:focus-visible) .geo-gallery-controls {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .geo-card-gallery:hover .geo-gallery-controls { opacity: 1; transform: none; }
  .geo-card-gallery:hover .geo-gallery-controls button { pointer-events: auto; }
}

.geo-gallery-controls button, .geo-gallery-controls .geo-gallery-count {
  color: #fff;
  letter-spacing: normal;
  text-transform: none;
}

.geo-gallery-controls button {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 600 20px/1 Inter, sans-serif;
  cursor: pointer;
  pointer-events: none;
}

.geo-gallery-controls button::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid #e6f3ff6e;
  border-radius: 8px;
  background: #091a3199;
}

.geo-gallery-controls button:hover::before { background: #143355c7; }
.geo-gallery-controls button:focus-visible { outline: 2px solid #ffda52; outline-offset: -5px; border-radius: 11px; }
.geo-gallery-controls .geo-gallery-count {
  padding: 3px 7px;
  border: 1px solid #e6f3ff55;
  border-radius: 7px;
  background: #091a3199;
  font: 600 11px/1.2 Inter, sans-serif;
}

.geo-card-gallery .geo-gallery-caption {
  right: auto;
  padding: 4px 8px;
  border: 1px solid #a9c9ea80;
  border-radius: 8px;
  background: #091a31ee;
  font: 600 12px/1.4 Inter, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .geo-gallery-controls { transition: none; }
}

.geo-point:has(.geo-card-gallery) {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  padding: 10px;
  gap: 0;
}
.geo-point:has(.geo-card-gallery)::before { display: none; }
.geo-point:has(.geo-card-gallery) .geo-point-body { display: flex; flex-direction: column; padding: 14px 8px 7px; }
.geo-point:has(.geo-card-gallery) .geo-point-maps { padding-block: 12px 0; margin-top: auto; }
/* Shared primary action for every location card. */
.geo-city .geo-point .geo-point-detail,
.geo-list .geo-point .geo-point-detail,
.geo-section .geo-point .geo-point-detail,
.geo-scatter-list .geo-point .geo-point-detail,
.geo-city .geo-localized-body > .geo-localized-detail,
.geo-scatter-list .geo-localized-body > .geo-localized-detail,
.ct-dept > .geo-localized-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin: 12px 0 0;
  padding: 8px 12px;
  border: 1px solid #a9c9ea45;
  border-radius: 10px;
  background-color: #0e2746;
  color: #ffe16b;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1.25;
  text-decoration: none;
}
.geo-point .geo-point-detail::before, .geo-point .geo-point-detail::after,
.geo-city .geo-localized-detail::before, .geo-city .geo-localized-detail::after { content: none; }
.geo-point .geo-point-detail > span[aria-hidden="true"], .geo-localized-detail > span[aria-hidden="true"] { color: #ffe16b; font-size: 16px; }
.geo-point .geo-point-detail:hover, .geo-city .geo-localized-body > .geo-localized-detail:hover,
.geo-scatter-list .geo-localized-body > .geo-localized-detail:hover, .ct-dept > .geo-localized-detail:hover {
  border-color: #ffe16b;
  color: #fff;
}
.geo-point .geo-point-detail:focus-visible, .geo-localized-detail:focus-visible {
  outline: 2px solid #ffe16b;
  outline-offset: 2px;
}
.geo-city li:has(> .geo-card-gallery) { margin-bottom: 12px; }
.geo-scatter-list li > .geo-card-gallery, .ct-dept > .geo-card-gallery { margin-bottom: 8px; }

.geo-google-load, .geo-google-message, .geo-google-credit {
  position: absolute;
  z-index: 1;
  inset: 8px auto auto 8px;
  max-width: calc(100% - 16px);
  padding: 6px 9px;
  border: 1px solid #a9c9ea80;
  border-radius: 8px;
  background: #091a31f5;
  color: #fff;
  font: 400 13px/1.4 Inter, sans-serif;
}
.geo-google-load { min-height: 44px; cursor: pointer; }
.geo-google-load:focus-visible, .geo-google-credit a:focus-visible { outline: 2px solid #ffda52; outline-offset: 2px; }
.geo-google-message { top: 58px; margin: 0; }
.geo-google-message:empty { display: none; }
.geo-google-credit a { color: #fff; text-decoration: underline; margin-left: 7px; }
.geo-google-credit [translate="no"] { white-space: nowrap; }

.geo-list .geo-point-video, .ct-dept .geo-point-video, .geo-list .geo-point-media-link {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 40px;
  margin: 2px 0 0;
  padding: 4px 10px;
  color: #cde9ff;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.geo-list :is(.geo-point-video, .geo-point-media-link)::before, .geo-list :is(.geo-point-video, .geo-point-media-link)::after { content: none; }

.geo-point-rating {
  display: block;
  width: 150px;
  max-width: 100%;
  height: 50px;
  margin: 7px 0 0;
  border: 0;
  border-radius: 9px;
}

.geo-point-reviews {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 8px;
  min-width: 0;
  min-height: 50px;
}
.geo-point-reviews .geo-point-rating { flex: 0 1 150px; margin: 0; }
.geo-point-review-label { color: #b5cde5; font-size: 13px; line-height: 1.4; }
.geo-point-review-meta { display: grid; justify-items: end; min-width: 0; }
.geo-point-review-status {
  padding: 0 6px;
  color: #b5cde5;
  font-size: 11px;
  line-height: 1.25;
  text-align: right;
}
.geo-point-reviews .geo-point-review-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0 6px;
  border-radius: 8px;
  color: #dfedfc;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
}
.geo-point-reviews .geo-point-review-link::before,
.geo-point-reviews .geo-point-review-link::after { content: none; }
.geo-point-reviews .geo-point-review-link span { color: #ffda52; }
.geo-point-reviews .geo-point-review-link:hover { background: #32628b45; color: #fff; }
.geo-point-reviews .geo-point-review-link:focus-visible { outline: 2px solid #ffda52; outline-offset: -2px; }

/* Keep the 2GIS score below the live Yandex badge when both are present. */
.geo-point-reviews:has(.geo-point-rating):has(.geo-point-source-rating) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 4px;
}
.geo-point-reviews .geo-point-source-rating {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 10px;
  margin: 0 auto 0 0;
  border: 1px solid #a9c9ea45;
  border-radius: 9px;
  background: #0e2746;
  color: #dfedfc;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.geo-point-reviews:has(.geo-point-source-rating) .geo-point-rating { max-width: 100%; }
.geo-point-source-rating strong span { color: #ffda52; }
.geo-point-reviews .geo-point-source-rating::before,
.geo-point-reviews .geo-point-source-rating::after { content: none; }
.geo-point-reviews .geo-point-source-rating:hover { background: #173959; }
.geo-point-reviews .geo-point-source-rating:focus-visible { outline: 2px solid #ffda52; outline-offset: 2px; }

:where(li, .ct-dept):has(> .geo-card-gallery):has(.geo-point-detail, .geo-localized-detail) {
  cursor: pointer;
}

.geo-point:has(.geo-card-gallery) .geo-point-maps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.geo-point .geo-point-maps .geo-map-link {
  min-height: 42px;
  padding-inline: 5px;
  text-align: center;
  white-space: normal;
}
.geo-point-body > .geo-point-reviews { margin-top: 8px; }


a:where([data-provider="yandex"], :is(.geo-city, .geo-scatter-list) li > [href^="https://yandex.ru/maps/"]) {
  --provider-icon: url("/geizer-cities/assets/map-icons/yandex.png");
}
a:where([data-provider="2gis"], .geo-point-source-rating) {
  --provider-icon: url("/geizer-cities/assets/map-icons/2gis.png");
}
a:where([data-provider="google"], .ct-dept > [href*="google.com/maps"], .ct-dept > [href*="maps.app.goo.gl"]) {
  --provider-icon: url("/geizer-cities/assets/map-icons/google.png");
}
.geo-point .geo-point-maps .geo-map-link[data-provider]::before,
.loc-page .loc-map-links a[data-provider]::before,
.geo-point-reviews .geo-point-source-rating::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 4px;
  background: var(--provider-icon) center / contain no-repeat;
}
.loc-page .loc-map-links a[data-provider] { gap: 8px; }

:is(.geo-city, .geo-scatter-list) li > a[href^="https://yandex.ru/maps/"],
.ct-dept > a:is([href*="google.com/maps"], [href*="maps.app.goo.gl"]) {
  padding-inline-start: 22px;
  background-image: var(--provider-icon);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 15px;
}

.geo-location-summary {
  margin: 8px 0 0;
  color: #bbd5ec;
  font-size: 12px;
  line-height: 1.45;
}
.loc-service-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px 24px;
}
.loc-service-groups h3 { margin: 4px 0 8px; font-size: 15px; }
.loc-service-groups ul { padding-inline-start: 18px; margin: 0; }
.loc-service-groups li + li { margin-top: 5px; }
.loc-services .loc-service-source { margin-top: 14px; font-size: 12px; }

@media (max-width: 420px) {
  .geo-point .geo-point-maps .geo-map-link[data-provider] { gap: 4px; }
  .geo-point .geo-point-maps .geo-map-link[data-provider] > span[aria-hidden] { display: none; }
}


.ct-map-pin { margin-top: 10px; }
.ct-map-pin summary {
  padding-block: 8px;
  color: #cfe7fa;
  cursor: pointer;
}
.ct-map-pin iframe {
  display: block;
  width: 100%;
  height: 210px;
  border: 0;
  border-radius: 10px;
  background: #0e2746;
}

.geo-localized-point .geo-localized-address {
  display: block;
  min-height: 0;
  margin: 6px 0 0;
  padding: 0;
  font: 700 clamp(16px, 1.6vw, 19px)/1.28 var(--f-display);
  letter-spacing: -.012em;
  text-decoration: none;
  color: #fff;
  overflow-wrap: anywhere;
}
.geo-localized-point .geo-localized-body > a::before,
.geo-localized-point .geo-localized-body > a::after { content: none; }
.geo-localized-point .geo-localized-region {
  margin-top: 5px;
  color: #abc5de;
  font: 400 12px/1.4 var(--f-text);
  letter-spacing: normal;
  text-transform: none;
}
.geo-localized-point .geo-localized-city { margin-bottom: 5px; color: #b6cdeb; font-size: 13px; }
.geo-localized-point .geo-point-maps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 74px), 1fr)); }
