/* Place detail — page shell, theme tokens, strip stack (isolated). */

.place-detail-theme {
    --theme-from: #0d9488;
    --theme-to: #14b8a6;
    --theme-accent: #0f766e;
}

.place-detail-strip-stack a.catalog-back-above-hero {
    text-decoration: none;
}

#placeRvProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #2563eb);
    width: 0;
    z-index: 1000;
    transition: width 0.1s;
}

/* Place detail component — flat BEM, no parent dependency. */

/* ── Hero ── */
.place-rv-hero { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 1.5rem; }
.place-rv-hero img,
.place-rv-hero__img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.place-rv-hero__img {
    cursor: zoom-in;
}
.rv-no-hero--spaced {
    margin-bottom: 1.5rem;
}
.place-rv-badge--solid {
    background: #0d9488;
}
/* Колонка как у /places: catalog-page-inner; герой — на всю ширину белой карточки */
/* Ровно как у ряда баннеров: .catalog-page-inner (1340), не шире .rental-container 1400px */
.place-detail-page.rental-container.catalog-page-inner {
  max-width: 1340px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px var(--spacing-xl, 2rem) !important;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .place-detail-page.rental-container.catalog-page-inner {
    padding: 0 14px var(--spacing-lg, 1.5rem) !important;
  }
}
/* detail-page.css задаёт .rental-main-info padding — убираем, фото на весь блок по краям */
.place-detail-page .rental-main-info.place-detail-article-card {
  padding: 0 !important;
  margin-top: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}
@media (max-width: 768px) {
  .place-detail-page .rental-main-info.place-detail-article-card {
    padding: 0 !important;
    margin-bottom: 0 !important;
  }
}
.place-detail-page .place-rv-hero {
  margin: 0 !important;
  padding: 0 !important;
}
.place-detail-page .place-rv-hero img {
  margin: 0;
  padding: 0;
  vertical-align: top;
}
/* Как .news-detail-inner-pad в review-detail.css */
.place-detail-page .place-detail-inner-pad {
  padding: 1.15rem 16px 1.65rem;
  box-sizing: border-box;
  --article-bleed-x: 16px;
  --place-pad-x: 16px;
}
/* Не обрезать нижние футеры карточек «Полезное рядом» (overflow на article-card) */
.place-detail-page .place-detail-inner-pad .rv-nearby.catalog-page-body {
  margin-bottom: 0.15rem;
}
@media (max-width: 768px) {
  .place-detail-page .place-detail-inner-pad {
    padding: 1rem 0 1.25rem;
    --article-bleed-x: 0px;
    --place-pad-x: 0px;
  }
}
.place-detail-page .place-rv-hero-content {
  padding: 1.5rem 48px 1.2rem;
}
@media (max-width: 768px) {
  .place-detail-page .place-rv-hero-content {
    padding: 1.25rem 12px 1rem;
  }
}
/* ПК: герой вплотную к верху и бокам карточки; снизу без скругления */
@media (min-width: 769px) {
  .place-detail-page.catalog-page-inner { padding-top: 0; }
  .place-detail-page .place-rv-hero {
    margin-bottom: 0 !important;
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
  }
  .place-detail-page .place-rv-hero img {
    border-radius: 0;
  }
}
.place-rv-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%);
}
.place-rv-hero-content {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem 1.75rem 1.5rem;
}
.place-rv-hero-content h1 {
  color: #fff; font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800; margin: 0 0 0.4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.4); line-height: 1.2;
}
.place-rv-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(13,148,136,.85); color: #fff; font-size: 0.73rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 0.75rem;
}
.place-rv-meta {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  color: rgba(255,255,255,.85); font-size: 0.85rem;
}
.place-rv-meta svg { width: 14px; height: 14px; opacity: .7; }

/* Place detail component — flat BEM, no parent dependency. */

/* ── Stats: ширина карточек по содержимому, не равные узкие колонки сетки ── */
.place-rv-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}
.place-rv-stat {
  flex: 0 1 auto;
  max-width: 100%;
  box-sizing: border-box;
  background: #f8fafc; border-radius: 12px; padding: 0.75rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  min-width: 0;
}
.place-rv-stat-icon { font-size: 1.1rem; line-height: 1; }
.place-rv-stat-val {
  font-size: 0.95rem; font-weight: 700; color: #0f172a;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.place-rv-stat-lbl { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }

/* Place detail component — flat BEM, no parent dependency. */

/* ── Short desc / excerpt ── */
.place-rv-excerpt {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: #475569;
  margin-bottom: 1.65rem;
  padding: 1.1rem 1.35rem;
  border-left: 4px solid #0d9488;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.07), rgba(13, 148, 136, 0.02));
  border-radius: 0 12px 12px 0;
  font-style: italic;
}
.place-detail-page .place-rv-excerpt {
  padding: 1rem 1.2rem;
}

/* Place detail — borrows compass editorial style (magazine.css) but keeps own shell */



/* ── .rv-body padding = magazine.css (как в promo review) ── */
/* desktop: 40px 48px 32px из magazine.css — не перебиваем */



/* ── Chapter numbers — gradient text like compass (overrides place solid badge) ── */

.place-rv-wrap .rv-body h2 .ch-num {

  font-size: 2.2rem !important;

  font-weight: 900 !important;

  line-height: 1 !important;

  background: linear-gradient(135deg, #0d9488, #14b8a6) !important;

  -webkit-background-clip: text !important;

  -webkit-text-fill-color: transparent !important;

  background-clip: text !important;

  flex-shrink: 0 !important;

  font-family: Georgia, serif !important;

  width: auto !important;

  height: auto !important;

  min-width: auto !important;

  padding: 0 !important;

  margin: 0 !important;

  border-radius: 0 !important;

  box-shadow: none !important;

  vertical-align: baseline !important;

  transform: none !important;

  display: inline !important;

}



/* ── Divider — 80px wide like compass ── */

.place-rv-wrap .rv-body .rv-divider,

.place-rv-wrap .rv-body hr.rv-divider {

  width: 80px !important;

}



/* ── Images — heights + edge bleed как review-detail.css ── */
.place-rv-wrap .rv-body .rv-img-banner {
  height: 360px;
  border-radius: 0;
}

/* Desktop: одиночные фото в край белой карточки (inner-pad 16 + body 48) */
@media (min-width: 769px) {
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-banner,
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair img:first-child:last-child {
    width: calc(100% + 96px + 2 * var(--article-bleed-x, 16px));
    max-width: none;
    margin-left: calc(-48px - var(--article-bleed-x, 16px));
    margin-right: calc(-48px - var(--article-bleed-x, 16px));
    border-radius: 0;
    box-sizing: border-box;
  }
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img:only-child),
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img.places-u-hidden) {
    width: calc(100% + 96px + 2 * var(--article-bleed-x, 16px));
    max-width: none;
    margin-left: calc(-48px - var(--article-bleed-x, 16px));
    margin-right: calc(-48px - var(--article-bleed-x, 16px));
    border-radius: 0;
  }
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-strip {
    margin-left: calc(-48px - var(--article-bleed-x, 16px));
    margin-right: calc(-48px - var(--article-bleed-x, 16px));
    padding-left: calc(48px + var(--article-bleed-x, 16px));
    padding-right: calc(48px + var(--article-bleed-x, 16px));
    box-sizing: border-box;
  }
}



.place-rv-wrap .rv-body .rv-img-pair {

  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 10px;

  margin: 2em 0;

  clear: both;

}

.place-rv-wrap .rv-body .rv-img-pair img {

  display: block;

  width: 100%;

  height: 280px;

  object-fit: cover;

  border-radius: 12px;

  cursor: zoom-in;

  transition: transform .3s, box-shadow .3s;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

  margin: 0;

}

.place-rv-wrap .rv-body .rv-img-pair img:hover { transform: scale(1.01); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13); }

.place-rv-wrap .rv-body .rv-img-pair img:first-child:last-child {

  grid-column: 1 / -1;

  height: 320px;

}



/* Solo pair — desktop bleed задан выше в @media (min-width: 769px) */
.place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img:only-child) {
  display: block;
  gap: 0;
  border-radius: 0;
}

.place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img:only-child) img {
  width: 100%;
  height: 320px;
  border-radius: 0;
  box-shadow: none;
}

.place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img.places-u-hidden) {
  display: block;
  gap: 0;
  grid-template-columns: 1fr;
  border-radius: 0;
}

.place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img.places-u-hidden) > img:not(.places-u-hidden) {
  width: 100%;
  height: 320px;
  border-radius: 0;
  box-shadow: none;
}



/* ── Photo strip (bottom carousel) ── */

.place-rv-wrap .rv-body .rv-img-strip {

  clear: both;

  display: flex;

  gap: 10px;

  overflow-x: auto;

  margin: 2em 0 0;

  padding: 0 0 12px;

  scrollbar-width: thin;

  scrollbar-color: rgba(13, 148, 136, 0.25) transparent;

  background: transparent;

}

.place-rv-wrap .rv-body .rv-img-strip::-webkit-scrollbar { height: 4px; }

.place-rv-wrap .rv-body .rv-img-strip::-webkit-scrollbar-thumb { background: rgba(13, 148, 136, 0.25); border-radius: 2px; }

.place-rv-wrap .rv-body .rv-img-strip img {

  flex-shrink: 0;

  height: 200px;

  width: auto;

  max-width: 320px;

  object-fit: cover;

  border-radius: 12px;

  cursor: zoom-in;

  transition: transform .25s, box-shadow .25s;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

}

.place-rv-wrap .rv-body .rv-img-strip img:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); }



/* ── Short desc / excerpt ── */

.place-rv-excerpt {

  font-size: 1.0625rem;

  line-height: 1.72;

  color: #475569;

  margin-bottom: 1.65rem;

  padding: 1.1rem 1.35rem;

  border-left: 4px solid #0d9488;

  background: linear-gradient(90deg, rgba(13, 148, 136, 0.07), rgba(13, 148, 136, 0.02));

  border-radius: 0 12px 12px 0;

  font-style: italic;

}

.place-detail-page .place-rv-excerpt { padding: 1rem 1.2rem; }



/* ── Hero overrides for places (uses existing place-rv-hero classes) ── */

.place-rv-hero {

  height: 540px;

  overflow: hidden;

  background: #0f172a;

  position: relative;

}

.place-rv-hero img {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  transition: transform 8s ease;

  display: block;

}

.place-rv-hero:hover img { transform: scale(1.04); }

.place-rv-hero-overlay {

  position: absolute; inset: 0;

  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.3) 45%, rgba(0,0,0,.05) 100%);

}

.place-rv-hero-content {

  position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 48px;

}

.place-rv-hero-content h1 {

  font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.2;

  color: #fff; margin: 0 0 16px; font-weight: 800;

  text-shadow: 0 2px 16px rgba(0,0,0,.4);

  letter-spacing: -.5px;

}

.place-rv-hero .rv-badge {

  display: inline-flex; align-items: center; gap: 7px;

  background: linear-gradient(135deg, #0d9488, #14b8a6);

  color: #fff; padding: 5px 14px; border-radius: 999px;

  font-size: .78rem; font-weight: 700; letter-spacing: .4px;

  box-shadow: 0 4px 16px rgba(0,0,0,.3); margin-bottom: 14px;

}

.place-rv-hero .rv-hero-meta {

  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;

  color: rgba(255,255,255,.8); font-size: .88rem;

}

.place-rv-hero .rv-hero-meta .rv-reading-badge {

  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);

  padding: 4px 12px; border-radius: 999px; font-size: .8rem;

  border: 1px solid rgba(255,255,255,.2); color: #fff;

}



@media (max-width: 768px) {

  .place-rv-wrap .rv-body {
    font-size: 0.875rem !important;
    line-height: 1.72 !important;
    color: #374151 !important;
    letter-spacing: 0 !important;
    padding: 18px 14px 14px !important;
  }

  .place-detail-page .catalog-ad-mobile-dock--active {

    padding-left: 0 !important;

    padding-right: 0 !important;

    max-width: none !important;

    width: 100% !important;

  }

  .place-detail-page .place-detail-inner-pad .catalog-ad-mobile-dock--active {

    padding-left: 0 !important;

    padding-right: 0 !important;

    margin-left: calc(-1 * var(--place-pad-x, 16px)) !important;

    margin-right: calc(-1 * var(--place-pad-x, 16px)) !important;

    width: calc(100% + 2 * var(--place-pad-x, 16px)) !important;

    max-width: none !important;

  }

  /* Баннеры внутри #placeBody: та же ширина/пропорции, что у топ-дока (bleed из padding статьи) */
  .place-detail-page .rv-body > .catalog-ad-mobile-dock--active {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    width: calc(100% + 28px) !important;
    max-width: none !important;
    box-sizing: border-box;
  }

  .place-detail-page .rv-body > .catalog-ad-mobile-dock--active .ad-strip-card,
  .place-detail-page .place-detail-inner-pad > .catalog-ad-mobile-dock--active .ad-strip-card {
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--z-banner-ratio-w) / var(--z-banner-ratio-h) !important;
  }

  .place-detail-page .place-inarticle-ad .ad-strip-card {
    width: 100%;
    max-width: 100%;
    aspect-ratio: var(--z-banner-ratio-w) / var(--z-banner-ratio-h) !important;
  }

  .place-rv-wrap .rv-body .rv-img-banner,
  .place-rv-wrap .rv-body > p > img,
  .place-rv-wrap .rv-body > img {
    width: calc(100% + 28px) !important;
    max-width: none !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    border-radius: 0 !important;
    height: 242px;
  }

  .place-rv-wrap .rv-body .rv-img-pair {

    grid-template-columns: 1fr;

    gap: 14px;

    margin: 1em 0;

    border-radius: 0;

  }

  .place-rv-wrap .rv-body .rv-img-pair img {

    width: 100% !important;

    max-width: 100% !important;

    margin-left: 0 !important;

    margin-right: 0 !important;

    height: 240px;

    border-radius: 10px;

  }

  .place-rv-wrap .rv-body .rv-img-pair img:first-child:last-child {

    grid-column: 1 / -1;

    height: 240px;

  }

  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-banner,
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair img:first-child:last-child,
  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-pair:has(> img:only-child) {
    width: calc(100% + 28px) !important;
    max-width: none !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    border-radius: 0 !important;
    height: 242px;
  }

  .place-rv-wrap .rv-body .rv-img-strip {

    margin: 1.5em 0 0;

    padding: 0 0 10px;

    scrollbar-width: none;

  }

  .place-rv-wrap .rv-body .rv-img-strip::-webkit-scrollbar { display: none; }

  .place-rv-wrap .rv-body .rv-img-strip img { height: 150px; border-radius: 9px; }

  .place-rv-wrap .rv-body .rv-img-strip::after { content: ''; display: block; min-width: 7px; flex-shrink: 0; }

  .place-detail-page .place-detail-inner-pad .rv-body .rv-img-strip {

    margin-left: 0;

    margin-right: 0;

    padding-left: 0;

    padding-right: 0;

  }

  .place-rv-hero { height: auto; min-height: 300px; max-height: 380px; border-radius: 16px; overflow: hidden; }

  .place-rv-hero-content { padding: 14px 14px 16px; }

  .place-rv-hero-content h1 {

    font-size: 1.05rem; letter-spacing: -.2px; margin-bottom: 6px;

    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;

    -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3;

  }

  .place-rv-hero .rv-badge { font-size: .7rem; padding: 3px 10px; margin-bottom: 7px; }

  .place-rv-hero .rv-hero-meta { font-size: .75rem; gap: 6px; }

}


/* Place detail component — flat BEM, no parent dependency. */

/* ── Gallery grid (small) ── */
.place-rv-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem; margin-bottom: 1.5rem;
}
.place-rv-gallery img {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: 10px; cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}
.place-rv-gallery img:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(0,0,0,.2); }

/* Place detail component — flat BEM, no parent dependency. */

/* ── Lightbox ── */
.rv-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; }
.rv-lightbox.active { display: flex; }
.rv-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; object-fit: contain; }
.rv-lb-close { position: fixed; top: 1rem; right: 1.2rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; opacity: .7; }
.rv-lb-close:hover { opacity: 1; }
.rv-lb-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 2rem; cursor: pointer; padding: 1rem 1.2rem; border-radius: 8px; }
.rv-lb-prev { left: 1rem; }
.rv-lb-next { right: 1rem; }

body.rv-lightbox-open {
    overflow: hidden;
}


/* Place detail — share block (isolated). */

.rv-share--spaced {
    margin-top: 2rem;
}

/* Place CBT catalog CTA block — isolated component. */

.place-cbt-cta {
    margin: 1.5rem 0 1.75rem;
    padding: 1.15rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.place-cbt-cta__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.place-cbt-cta__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.place-cbt-cta__text {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
}

.place-cbt-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.place-card-cbt-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    pointer-events: none;
}

/* Place reviews block — isolated component. */

.place-reviews-block {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.place-reviews-block__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: #0f172a;
}

.place-reviews-block__avg {
    font-size: 0.88rem;
    color: #b45309;
    font-weight: 700;
    margin: 0 0 1rem;
}

.place-reviews-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.place-reviews-item {
    padding: 12px 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.place-reviews-item__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.85rem;
}

.place-reviews-item__stars {
    color: #f59e0b;
}

.place-reviews-item__text {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
    white-space: pre-wrap;
}

.place-reviews-empty {
    font-size: 0.85rem;
    color: #94a3b8;
}

.place-reviews-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0.5rem;
}

.place-reviews-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.place-reviews-form h3 {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.place-reviews-form select,
.place-reviews-form textarea {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

.place-reviews-form .btn,
.place-reviews-form button[type="submit"] {
    align-self: flex-start;
    margin-top: 0.25rem;
}

.place-reviews-form .z-star-rating {
    margin-top: 2px;
}

.place-reviews-note {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0.5rem 0 0;
}

.place-reviews-note--pending {
    color: #b45309;
}

.place-reviews-note--rejected {
    color: #dc2626;
}

/* «Полезное рядом» — 1:1 каталог: services-grid + hub-listing-grid + catalog-page-body */

/* Compass: блок вне .rv-body — сетка и карточки как на /catalog */
.news-compass-detail-page .news-detail-inner-pad .news-nearby-host {
  margin-left: -16px;
  margin-right: -16px;
  width: calc(100% + 32px);
  max-width: none;
  box-sizing: border-box;
}

.news-compass-detail-page .news-nearby-host .rv-nearby.catalog-page-body {
  margin: 2.5rem 0 0;
  padding: 2rem 16px 1.25rem;
  --rv-nearby-inset-x: 16px;
  width: 100%;
  max-width: 100%;
}

.news-compass-detail-page .news-nearby-host .rv-nearby-grid.services-grid.hub-listing-grid {
  width: 100%;
  max-width: 100%;
}

/* Защита svc-card от editorial link-стилей */
.rv-nearby .svc-card-link,
.rv-nearby .svc-card-cta {
  color: inherit;
  font-weight: inherit;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  text-decoration: none;
}

.rv-nearby {
  margin: 2.5rem 0 0;
  padding: 2rem 0 0.5rem;
  border-top: 1px solid var(--color-gray-light, #DCD9D6);
}

.rv-nearby.catalog-page-body {
  /* Как .services-body.catalog-page-body на /catalog */
  --rv-nearby-inset-x: 24px;
  padding: 2rem var(--rv-nearby-inset-x) 1.25rem;
  overflow: visible;
  box-sizing: border-box;
}

/* Футер карточки (CTA + стрелка) — как в каталоге, не схлопывается в hub-listing */
.rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card-wrapper {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
}

.rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card-link {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card-body {
  flex: 1 1 auto !important;
  padding: 10px 12px 8px !important;
}

.rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  min-height: auto !important;
  margin-top: auto !important;
  padding: 10px 18px 14px !important;
}

.rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card-cta {
  display: inline-flex !important;
  margin-left: auto !important;
}

.rv-nearby-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark, #1E293B);
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

/* Сетка/gap/размер карточек — hub-listing-grid.css (gap 18px, fill 90%) */
.rv-nearby.catalog-page-body .rv-nearby-grid.services-grid.hub-listing-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Place detail: bleed до краёв белой карточки, inset 24px = как services-body */
.place-detail-page .place-detail-inner-pad .rv-nearby.catalog-page-body {
  margin-left: -16px;
  margin-right: -16px;
  width: calc(100% + 32px);
  max-width: none;
}

/* Compass / place: catalog cards внутри колонки — без bleed-зоны за края текста */
.news-compass-detail-page .news-detail-inner-pad .rv-body .rv-nearby.catalog-page-body,
.rv-wrap .rv-body .rv-nearby.catalog-page-body {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
}

/* Сердечко — правый верхний угол фото (hub-inset + fav-inset, как каталог) */
@media (min-width: 769px) {
  .rv-nearby-grid.hub-listing-grid .svc-card-wrapper > .listing-favorite-btn--svc,
  .rv-nearby-grid.hub-listing-grid .svc-card-wrapper > a.listing-favorite-btn--svc {
    top: calc(var(--z-hub-card-inset, 0px) + var(--z-card-fav-inset-pc, 10px)) !important;
    right: calc(var(--z-hub-card-inset, 0px) + var(--z-card-fav-inset-pc, 10px)) !important;
    left: auto !important;
    z-index: 16 !important;
  }
}

@media (max-width: 768px) {
  .rv-nearby-grid.hub-listing-grid .svc-card-wrapper > .listing-favorite-btn--svc,
  .rv-nearby-grid.hub-listing-grid .svc-card-wrapper > a.listing-favorite-btn--svc {
    top: var(--z-card-fav-inset-mob, 8px) !important;
    right: var(--z-card-fav-inset-mob, 8px) !important;
  }
}

.svc-card-img .rv-nc-nophoto {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--z-gray-100, #f1f5f9), var(--z-border-light, #e2e8f0));
  box-sizing: border-box;
}

@keyframes rvShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.rv-nc-skel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--z-card-radius, 20px);
  box-sizing: border-box;
  border: var(--z-card-gap, 0px) solid #fff;
  box-shadow: var(--z-card-outer-ring);
  background: linear-gradient(90deg, #f8fafc 0%, #DCD9D6 50%, #f8fafc 100%);
  background-size: 200% 100%;
  animation: rvShimmer 1.4s infinite;
}

@media (max-width: 768px) {
  .news-compass-detail-page .news-detail-inner-pad .news-nearby-host {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }

  .news-compass-detail-page .news-nearby-host .rv-nearby.catalog-page-body {
    --rv-nearby-inset-x: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .rv-nearby.catalog-page-body {
    --rv-nearby-inset-x: 12px;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
  }

  .rv-nearby.catalog-page-body .rv-nearby-grid.hub-listing-grid .svc-card-footer {
    padding: 8px 14px 12px !important;
  }

  .place-detail-page .place-detail-inner-pad .rv-nearby.catalog-page-body {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }

  .news-compass-detail-page .news-detail-inner-pad .rv-body .rv-nearby.catalog-page-body,
  .rv-wrap .rv-body .rv-nearby.catalog-page-body {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  .rv-nearby { margin: 1.8rem 0 0; }
  .rv-nearby-title { font-size: 1rem; margin-bottom: .9rem; }
}

/* Legacy SSR (poi hub / places) — same compact size as trains Useful nearby */
.rv-nearby:not(.catalog-page-body) .rv-nearby-grid:not(.services-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .rv-nearby:not(.catalog-page-body) .rv-nearby-grid:not(.services-grid) {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.rv-nearby:not(.catalog-page-body) .rv-nearby-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--z-card-radius, 20px);
  background: var(--z-surface-white, #fff);
  border: none;
  overflow: hidden;
  text-decoration: none;
  box-sizing: border-box;
  position: relative;
  min-width: 0;
  box-shadow: var(--z-card-outer-ring);
  transition: transform 0.25s, box-shadow 0.25s;
}

.rv-nearby:not(.catalog-page-body) .rv-nearby-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--z-card-outer-ring-hover);
}

.rv-nearby:not(.catalog-page-body) .rv-nc-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-primary-subtle, #f1f5f9);
  position: relative;
  flex-shrink: 0;
  border-radius: 0 0 var(--z-card-photo-bottom-radius, var(--z-card-radius, 20px)) var(--z-card-photo-bottom-radius, var(--z-card-radius, 20px));
  isolation: isolate;
  line-height: 0;
  transform: translateZ(0);
}

.rv-nearby:not(.catalog-page-body) .rv-nc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 0 var(--z-card-photo-bottom-radius, var(--z-card-radius, 20px)) var(--z-card-photo-bottom-radius, var(--z-card-radius, 20px));
  box-sizing: border-box;
  transition: transform 0.5s ease;
  transform-origin: center center;
  -webkit-clip-path: var(--z-card-photo-clip, inset(0 round 0 0 20px 20px));
  clip-path: var(--z-card-photo-clip, inset(0 round 0 0 20px 20px));
}

.rv-nearby:not(.catalog-page-body) .rv-nearby-card:hover .rv-nc-photo img {
  transform: scale(1.07);
}

.rv-nearby:not(.catalog-page-body) .rv-nc-nophoto {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--z-teal-600, #0d9488), var(--z-blue-600, #2563eb));
  border-radius: 0 0 var(--z-card-photo-bottom-radius, var(--z-card-radius, 20px)) var(--z-card-photo-bottom-radius, var(--z-card-radius, 20px));
  box-sizing: border-box;
}

.rv-nearby:not(.catalog-page-body) .rv-nc-price {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  background: rgba(30, 41, 59, 0.92);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}

.rv-nearby:not(.catalog-page-body) .rv-nc-body {
  padding: 0.75rem 0.9rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  text-align: start;
}

.rv-nearby:not(.catalog-page-body) .rv-nc-cat {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-primary, #496275);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.25;
}

.rv-nearby:not(.catalog-page-body) .rv-nc-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--z-text-dark, #0f172a);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.rv-nearby:not(.catalog-page-body) .rv-nc-city {
  font-size: 0.72rem;
  color: var(--color-gray, #756F6B);
  line-height: 1.3;
}

.rv-nearby:not(.catalog-page-body) .rv-nc-cta {
  margin-top: auto;
  padding-top: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary, #496275);
  text-align: end;
  line-height: 1.2;
}

.rv-nearby:not(.catalog-page-body) .rv-nearby-card:hover .rv-nc-cta {
  color: var(--color-accent, #EE6D8A);
}

/* Compass: каталожные карточки — жёсткий сброс editorial link-стилей (.rv-body a[href*="/listings/"]) */
.rv-wrap .rv-nearby.catalog-page-body a.svc-card-link,
.rv-wrap .rv-nearby.catalog-page-body a.svc-card-cta,
.news-compass-detail-page .rv-nearby.catalog-page-body a.svc-card-link,
.news-compass-detail-page .rv-nearby.catalog-page-body a.svc-card-cta {
  background: none !important;
  border: none !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-weight: inherit !important;
  text-decoration: none !important;
  color: inherit !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-body {
  color: #202124 !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-title {
  color: #202124 !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-desc {
  color: #64748b !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-cta,
.rv-wrap .rv-nearby.catalog-page-body .svc-card-cta-text {
  color: #046868 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-weight: 600 !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-arrow {
  background: #e9f6f6 !important;
  color: var(--color-primary, #069494) !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-wrapper:hover .svc-card-cta,
.rv-wrap .rv-nearby.catalog-page-body .svc-card-wrapper:hover .svc-card-cta-text {
  color: #034f4f !important;
}

.rv-wrap .rv-nearby.catalog-page-body .svc-card-wrapper:hover .svc-card-arrow {
  background: var(--color-primary, #069494) !important;
  color: #fff !important;
}
