/* tatarinn-sights — fonts inherit from the theme (Montserrat / Playfair Display). */
.tt-sights, .tt-single { --tt-accent: #a24924; --tt-ink: #333; --tt-muted: #777; --tt-line: #e6e1dc; --tt-bg: #faf8f6; }

/* ---- toolbar ---- */

.tt-sights__bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin: 0 0 20px; }
/* chips: one row at every width, scrolls sideways; ‹ › only on hover devices when it overflows */
.tt-sights__chipbar { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; min-width: 0; }
.tt-sights__chips { display: flex; flex-wrap: nowrap; gap: 8px; flex: 1 1 auto; min-width: 0; overflow-x: auto;
  scrollbar-width: none; scroll-behavior: smooth; padding: 2px 0; }
.tt-sights__chips::-webkit-scrollbar { display: none; }
.tt-sights__chipbar[data-prev] .tt-sights__chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.tt-sights__chipbar[data-next] .tt-sights__chips { -webkit-mask-image: linear-gradient(270deg, transparent, #000 28px); mask-image: linear-gradient(270deg, transparent, #000 28px); }
.tt-sights__chipbar[data-prev][data-next] .tt-sights__chips { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.tt-chipnav { flex: 0 0 32px; height: 32px; padding: 0; border: 1px solid var(--tt-line); border-radius: 50%; background: #fff;
  color: var(--tt-ink); font-size: 18px; line-height: 28px; cursor: pointer; }
.tt-chipnav:hover { border-color: var(--tt-accent); color: var(--tt-accent); }
.tt-chipnav[hidden] { display: none; }
@media (hover: none) { .tt-chipnav { display: none !important; } }
.tt-chip {
  --c: var(--tt-accent); flex: 0 0 auto; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--tt-line); border-radius: 999px;
  background: #fff; color: var(--tt-ink); font: inherit; font-size: 13px; line-height: 1.2; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.tt-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tt-chip[data-cat=""]::before { display: none; }
.tt-chip span { color: var(--tt-muted); font-size: 12px; }
.tt-chip:hover { border-color: var(--c); }
.tt-chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.tt-chip[aria-pressed="true"]::before { background: #fff; }
.tt-chip[aria-pressed="true"] span { color: rgba(255,255,255,.8); }
.tt-chip:focus-visible, .tt-sights button:focus-visible, .tt-sights a:focus-visible { outline: 2px solid var(--tt-accent); outline-offset: 2px; }

.tt-sights__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tt-sights__search, .tt-sights__sort {
  height: 38px; padding: 0 12px; border: 1px solid var(--tt-line); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; color: var(--tt-ink);
}
.tt-sights__search { width: 220px; max-width: 100%; }
.tt-sights__toggle { display: none; border: 1px solid var(--tt-line); border-radius: 6px; overflow: hidden; }
.tt-sights__toggle button { padding: 0 16px; height: 38px; border: 0; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.tt-sights__toggle button[aria-pressed="true"] { background: var(--tt-accent); color: #fff; }

/* ---- layout: list + sticky map ---- */
.tt-sights__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
.tt-sights__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tt-sights__empty { margin: 0; color: var(--tt-muted); }
.tt-sights__mapwrap { position: sticky; top: var(--tt-sticky-top, 84px); /* set by sights.js: theme header + TravelLine bar */ grid-column: 2; grid-row: 1 / span 2; }
.tt-sights__map { height: calc(100vh - 200px); /* fits under header + TravelLine bar; constant so the iframe never resizes */ min-height: 420px; max-height: 760px; border-radius: 10px; overflow: hidden; background: #eef0f2; }
.tt-sights__map { position: relative; }
.tt-sights__map iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Yandex balloon content (JS API mode): site fonts/colours, fixed photo box so the size never jumps */
.tt-sights__map .tt-bal__title { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 16px; line-height: 1.25;
  font-weight: 700; color: #333; text-decoration: none; }
.tt-sights__map .tt-bal__title:hover { color: #a24924; }
.tt-sights__map .tt-bal { font-family: Montserrat, Arial, sans-serif; font-size: 12px; color: #777; }
.tt-sights__map .tt-bal__img { display: block; width: 240px; height: 150px; max-width: none; object-fit: cover; margin: 6px 0 8px;
  border-radius: 6px; background: #eef0f2; }
.tt-sights__map .tt-bal__links { display: flex; gap: 14px; font-family: Montserrat, Arial, sans-serif; font-size: 12px; font-weight: 600; }
.tt-sights__map .tt-bal__links a { color: #a24924; text-decoration: none; }
.tt-sights__map .tt-bal__links a:hover { text-decoration: underline; }

/* keyless widget: a shield passes the mouse wheel to the page until the map is clicked */
.tt-sights__shield { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 18px; border: 0; background: transparent; cursor: pointer; font: inherit; }
.tt-sights__shield span { padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px;
  opacity: 0; transition: opacity .2s; }
.tt-sights__shield:hover span, .tt-sights__shield:focus-visible span { opacity: 1; }
.tt-sights__shield[hidden] { display: none; }

/* ---- cards ---- */
.tt-card {
  position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 12px; margin: 0;
  border: 1px solid var(--tt-line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.tt-card[hidden] { display: none; }
.tt-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
.tt-card.is-active { border-color: var(--tt-accent); box-shadow: 0 0 0 1px var(--tt-accent); }
.tt-card__media { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--tt-bg); }
.tt-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tt-card__ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, #fff); }
.tt-card__ph img { width: 32px !important; height: auto !important; object-fit: contain !important; }
.tt-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tt-card__title { margin: 0; font-size: 17px; line-height: 1.3; }
.tt-card__title a { color: var(--tt-ink); text-decoration: none; }
.tt-card__title a:hover { color: var(--tt-accent); }
.tt-card__text { margin: 0; font-size: 13px; line-height: 1.5; color: #555;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-card__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: auto; font-size: 12px; color: var(--tt-muted); }
.tt-card__show { padding: 0; border: 0; background: none; color: var(--tt-accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.tt-card__show::before { content: "⌖ "; }

.tt-badge { --c: var(--tt-accent); align-self: flex-start; display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000);
  font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }

/* ---- mobile: list / map toggle ---- */
@media (max-width: 991px) {
  .tt-sights__toggle { display: inline-flex; }
  .tt-sights__body { display: block; }
  .tt-sights__mapwrap { position: static; }
  .tt-sights[data-view="list"] .tt-sights__mapwrap { display: none; }
  .tt-sights[data-view="map"] .tt-sights__list, .tt-sights[data-view="map"] .tt-sights__empty { display: none; }
  .tt-sights__map { height: 65vh; min-height: 360px; }
}
@media (max-width: 600px) {
  .tt-sights__tools { width: 100%; }
  .tt-sights__search { flex: 1 1 100%; width: auto; }
  .tt-sights__chipbar { margin: 0 -16px; }
  .tt-sights__chips { padding: 2px 16px 4px; }
  .tt-card { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .tt-card__title { font-size: 15px; }
}

/* ---- single ---- */
.tt-single { padding-top: 28px; padding-bottom: 100px; color: var(--tt-ink); } /* 100px = the overview page's spacer before the footer ornament */
.tt-single__back { margin-bottom: 16px; font-size: 13px; }
.tt-single__back a { color: var(--tt-accent); text-decoration: none; }
.tt-single__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.tt-single__title { flex: 1 1 100%; margin: 4px 0 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
.tt-single__dist { flex: 1 1 100%; margin: 0; color: var(--tt-muted); font-size: 14px; }
.tt-single__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.tt-single__photo { margin: 0 0 20px; }
.tt-single__photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.tt-single__photo figcaption { margin-top: 6px; font-size: 11px; color: var(--tt-muted); }
.tt-single__photo figcaption a { color: inherit; }
.tt-single__content { font-size: 15px; line-height: 1.7; }
.tt-single__side { position: sticky; top: var(--tt-sticky-top, 84px); /* set by sights.js: theme header + TravelLine bar */ display: grid; gap: 16px; }
.tt-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 18px; border-radius: 10px; background: var(--tt-bg); font-size: 14px; }
.tt-facts dt { color: var(--tt-muted); }
.tt-facts dd { margin: 0; overflow-wrap: anywhere; }
.tt-facts a { color: var(--tt-accent); }
.tt-single__actions { display: grid; gap: 8px; }
.tt-btn { display: block; padding: 11px 16px; border: 1px solid var(--tt-accent); border-radius: 6px; color: var(--tt-accent);
  text-align: center; text-decoration: none; font-size: 14px; font-weight: 600; }
.tt-btn:hover { background: var(--tt-bg); color: var(--tt-accent); }
.tt-btn--primary { background: var(--tt-accent); color: #fff; }
.tt-btn--primary:hover { background: #8b3d1d; color: #fff; }
.tt-sights--single .tt-sights__mapwrap { position: static; }
.tt-sights--single .tt-sights__map { height: 300px; min-height: 0; }
.tt-single__near { margin-top: 48px; }
.tt-single__near h2 { margin: 0 0 16px; font-size: 24px; }
.tt-near { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tt-near__item a { display: grid; gap: 6px; color: var(--tt-ink); text-decoration: none; }
.tt-near__item img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 8px; }
.tt-near__item .tt-card__ph { aspect-ratio: 4 / 3; height: auto; border-radius: 8px; }
.tt-near__item .tt-card__ph img { aspect-ratio: auto; border-radius: 0; }
.tt-near__title { font-weight: 600; line-height: 1.3; }
.tt-near__item a:hover .tt-near__title { color: var(--tt-accent); }
.tt-near__dist { font-size: 12px; color: var(--tt-muted); }
@media (max-width: 991px) {
  .tt-single__grid { grid-template-columns: minmax(0, 1fr); }
  .tt-single__side { position: static; }
}
@media (max-width: 600px) { .tt-near { grid-template-columns: minmax(0, 1fr); } }
