/* ===== Single layout (flex, без fr) ===== */
.sanatorium-single .grid {
  display: flex;
  gap: 24px;
}
.sanatorium-single .content {
  flex: 1 1 auto;   /* тянется */
  min-width: 0;     /* чтобы текст не разъезжал */
}
.sanatorium-single .sidebar {
  flex: 0 0 320px;  /* фиксированная колонка в 320px */
  width: 320px;
}

/* ===== Hero / header ===== */
.sanatorium-hero h1 {
  margin: 8px 0 6px;
  font-size: 28px;
  line-height: 1.2;
}
.sanatorium-hero p { color: #374151; }

/* ===== Featured image ===== */
.featured { margin: 12px 0 16px; }
.featured img { width: 100%; height: auto; border-radius: 10px; }

/* ===== Sidebar cards ===== */
.sidebar .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.sidebar .card h3 { margin: 0 0 10px; font-size: 18px; }
.sidebar .card ul { margin: 0; padding-left: 18px; }

/* ===== Buttons (fallback) ===== */
.button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  text-decoration: none;
  line-height: 1;
}
.button:hover { background: #f9fafb; }
.button-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}
.button-primary:hover { background: #1d4ed8; }

/* ===== Archive: filters (flex, пиксели) ===== */
.sanatorium-archive .filters,
.sanatorium-archive .cards,
.sanatorium-archive .pagination { margin-top: 16px; }

.filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}
.filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.filters label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #374151;
  flex: 0 0 180px;   /* каждая «ячейка» ~180px */
}
.filters select,
.filters input[type="number"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
}
.filters-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex: 0 0 100%;   /* на новую строку */
}

/* Мета-строка под заголовком */
/*.sanatorium-card .card-meta-row{
  display:flex; flex-wrap:wrap; gap:6px 8px; margin:6px 0 8px;
  color:#6b7280; font-size:13px;
}*/
/*.sanatorium-card .meta-chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border:1px solid #e5e7eb; border-radius:999px;
  background:#fff; color:#374151; text-decoration:none;
}*/
/*.sanatorium-card .meta-chip--sea{ border-color:#bae6fd; background:#e0f2fe; }*/
/* Цена */
/*.sanatorium-card .card-price{ margin:6px 0 10px; font-size:14px; color:#111827; }
.sanatorium-card .card-price strong{ font-weight:700; }*/
/* Бейджи (удобства/питание/флаги) */
/*.sanatorium-card .card-badges{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 10px;
}
.sanatorium-card .badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border:1px solid #e5e7eb; border-radius:999px;
  background:#fff; color:#374151; text-decoration:none; font-size:13px;
  transition:background .15s, border-color .15s;
}
.sanatorium-card .badge:hover{ border-color:#cbd5e1; background:#f9fafb; }
.sanatorium-card .badge--treat{ border-color:#dbeafe; background:#eff6ff; }
.sanatorium-card .badge--meal{ border-color:#fce7f3; background:#fdf2f8; }
.sanatorium-card .badge--cheap{ border-color:#dcfce7; background:#f0fdf4; }
.sanatorium-card .badge--premium{ border-color:#fde68a; background:#fffbeb; }
.sanatorium-card .badge--muted{ opacity:.85; }*/
.sanatorium-card .thumb {
  display: block;
  width: 100%;
  height: 225px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb; /* тонкая линия, отделяет фото */
  overflow: hidden;
}
.sanatorium-card .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .3s ease; /* плавность */
}
.sanatorium-card:hover .thumb img {
  transform: scale(1.05); /* лёгкий zoom */
}
/* Кнопки */
.sanatorium-card .card-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
/* Описание */
.sanatorium-card .card-excerpt{
  font-size:14px; line-height:1.4; color:#4b5563;
  margin:4px 0 8px; overflow:hidden;
}
.sanatorium-card .card-title { line-height:1.25; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  margin-right: 6px;
}

.price-rating { margin-top: 6px; color: #111827; font-size: 14px; }
.price-rating .rating { color: #6b7280; }

/* ===== Article content ===== */
.entry { color: #1f2937; }
.entry h2, .entry h3 { margin-top: 1.2em; }
.entry p { margin: .6em 0; }

/* ===== Map section ===== */
.map h2 { margin: 16px 0 10px; }
.map iframe { border-radius: 12px; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 24px;
}
.pagination a, .pagination span {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #111827;
}
.pagination .current {
  background: #2563eb; color: #fff; border-color: #2563eb;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .sanatorium-card { flex: 0 0 48%; }   /* ~2 карточки в ряд */
}
@media (max-width: 800px) {
  .sanatorium-single .grid { flex-direction: column; }
  .sanatorium-single .sidebar { flex: 0 0 auto; width: auto; }
  .sanatorium-card { flex: 0 0 100%; }  /* по одной карточке */
  .filters label { flex: 0 0 48%; }
}
@media (max-width: 520px) {
  .filters label { flex: 0 0 100%; }
}

/* ===== Lightbox ===== */
.sg-no-scroll { overflow: hidden; }

#sg-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
#sg-lightbox.is-open { display: flex; }
#sg-lightbox.loading .sg-img { opacity: 0; }

#sg-lightbox .sg-figure {
  margin: 0; max-width: 92vw; max-height: 86vh;
  display: grid; grid-template-rows: 1fr auto; gap: 10px;
}
#sg-lightbox .sg-img {
  max-width: 92vw; max-height: 80vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: opacity .2s ease;
}
#sg-lightbox .sg-cap {
  text-align: center; color: #e5e7eb; font-size: 14px;
}

#sg-lightbox .sg-btn {
  position: absolute;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(17,24,39,.5);
  color: #fff; font-size: 22px; line-height: 40px; text-align: center;
  cursor: pointer; user-select: none;
  padding-bottom: 10px;
}
#sg-lightbox .sg-btn:hover { background: rgba(17,24,39,.7); }

#sg-lightbox .sg-close { top: 16px; right: 16px; font-size: 26px; }
#sg-lightbox .sg-prev { left: 16px; }
#sg-lightbox .sg-next { right: 16px; }

#sg-lightbox .sg-count {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: 13px; padding: 4px 8px;
  background: rgba(31,41,55,.5);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
}

/* ==== СЕТКА КАРТОЧЕК ==== */
/* Оберни цикл карточек контейнером .cards-grid (ниже дам вставку) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top:20px;
}

/* Базовая стилизация карточек; если в теме уже есть .card — добавим только безопасные вещи */
.cards-grid .card {
  height: 100%;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* Картинка вверху карточки как cover (зависи от твоей разметки) */
.cards-grid .card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Контент карточки */
.cards-grid .card .card__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Мета-строка */
.cards-grid .card .card__meta {
  color: #6b7280;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* h1 стили */
.page-hero {
  margin: 0 0 18px;
  padding: 8px 0 12px;
  border-bottom: 1px solid #eef0f4;
}

.page-hero__title{
  margin: 0;
  line-height: 1.25;
  font-size: clamp(22px, 3.1vw, 34px);
  /*background: linear-gradient(90deg, #0ea5e9, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;*/
  color: #0f172a; /* fallback, если не поддерживается background-clip */
}

.page-hero__meta{
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-hero__meta .chip{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 13px;
  background: #fff;
}

.page-hero__meta .chip--muted{
  color: #64748b;
  background: #f8fafc;
  border-color: #eef2f7;
}

.related-sanatoriums { margin-top: 24px; }
.related-sanatoriums .section-title {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.2vw, 24px);
}



.single-sanatorium .sanatorium-aspects{
  margin:18px 0 22px; display:grid; grid-template-columns:1fr; gap:14px;
}
.single-sanatorium .aspects-title{ margin:0 0 8px; font-size:clamp(16px,2.2vw,20px); }
.single-sanatorium .aspects-note{ margin:0 0 8px; color:#475569; font-size:13px; }
.single-sanatorium .aspects-list{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.single-sanatorium .aspects-list a,
.single-sanatorium .aspects-list span{
  display:inline-flex; align-items:center; padding:4px 10px; border:1px solid #e5e7eb;
  border-radius:9999px; font-size:13px; background:#fff; color:#0f172a; text-decoration:none;
}
.single-sanatorium .aspects-list a:hover{ background:#f8fafc; }
@media (min-width:768px){ .single-sanatorium .sanatorium-aspects{ grid-template-columns:1fr 1fr; } }

/* ===== Общие переменные и база ===== */
.single-sanatorium{
  --san-radius: 14px;
  --san-border: 1px solid #e5e7eb;
  --san-bg: #fff;
  --san-muted: #64748b;
  --san-ink: #0f172a;
  --san-accent: #2563eb;
  --san-gap: 14px;
}
.single-sanatorium .san-card{
  background: var(--san-bg);
  border: var(--san-border);
  border-radius: var(--san-radius);
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  margin: 16px 0;
}

/* ===== 1) Шапка: локация/цена + рейтинг ===== */
.single-sanatorium .sanatorium-header h1{
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.18;
}
.single-sanatorium .sanatorium-header__meta{
  margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  color: var(--san-muted); font-size: 14px;
}
.single-sanatorium .sanatorium-header .rating{
  margin: 6px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
  font-size: 14px; color: var(--san-ink);
}
.single-sanatorium .rating .rating-badge{
  display:inline-block; background:#fef3c7; color:#92400e;
  padding:2px 8px; border-radius:8px; font-weight:600;
}

/* ===== 2) Бронирование ===== */
.single-sanatorium .san-book .book-head{
  display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; margin-bottom:8px;
}
.single-sanatorium .san-book .price{
  font-size: 18px; font-weight: 700;
}
.single-sanatorium .san-book .note{
  color: var(--san-muted); font-size: 13px;
}
.single-sanatorium .san-book .aff-buttons{
  margin-top: 10px;
}
.single-sanatorium .san-book .aff-buttons .button{
  border-radius: 10px; height: 42px; line-height: 42px; padding: 0 16px;
}

/* ===== 3) Контакты ===== */
.single-sanatorium .san-contacts .san-list{
  list-style:none; margin:0; padding:0; display:grid; gap:8px;
}
.single-sanatorium .san-contacts .san-list li{
  display:grid; grid-template-columns: 120px 1fr; gap:10px;
  padding: 8px 0; border-bottom: 1px dashed #e5e7eb;
}
.single-sanatorium .san-contacts .san-list li:last-child{ border-bottom:none; }
.single-sanatorium .san-contacts .label{ color: var(--san-muted); }
.single-sanatorium .san-contacts .value a{ text-decoration:none; }
.single-sanatorium .san-contacts .value a:hover{ text-decoration:underline; }

/* ===== 4) Профили лечения + Удобства (чипсы) ===== */
.single-sanatorium .sanatorium-aspects{
  padding: 16px 18px; /* san-card уже дал фон/рамку */
}
.single-sanatorium .aspects-title{
  margin: 0 0 8px; font-size: clamp(16px,2.2vw,20px);
}
.single-sanatorium .aspects-note{
  margin: 0 0 8px; color: var(--san-muted); font-size: 13px;
}
.single-sanatorium .aspects-list{
  list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px;
}
.single-sanatorium .aspects-list li{ display:inline-flex; }
.single-sanatorium .aspects-list a,
.single-sanatorium .aspects-list span{
  display:inline-flex; align-items:center;
  padding:4px 10px; border:1px solid #e5e7eb; border-radius:9999px;
  font-size:13px; background:#fff; color:var(--san-ink); text-decoration:none;
}
.single-sanatorium .aspects-list a:hover{ background:#f8fafc; }

/* ===== 5) Документы ===== */
.single-sanatorium .san-docs .san-list{
  list-style:none; margin:0; padding:0; display:grid; gap:8px;
}
.single-sanatorium .san-docs .san-list li{
  position:relative; padding-left:15px; margin-top:10px; font-size:12px;
}
.single-sanatorium .san-docs .san-list li::before{
  content:"✔"; position:absolute; left:0; top:0; color:#10b981; line-height:1.2;
}

/* ===== Заголовки секций ===== */
.single-sanatorium .san-card .section-title{
  margin: 0 0 10px; font-size: clamp(16px,2.2vw,20px);
}

/* ===== Мобильные мелочи ===== */
@media (max-width: 767.98px){
  .single-sanatorium .san-contacts .san-list li{
    grid-template-columns: 1fr; gap:4px;
  }
}

/* Карусель-лента */
.san-gallery{position:relative;margin:16px 0}
.san-gallery-track{
  display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;padding-bottom:8px
}
.san-gallery-item{
  flex:0 0 auto;scroll-snap-align:center;border-radius:12px;overflow:hidden;
  width:min(880px, 100%); /* крупный первый кадр на десктопе */
}
.san-gallery-img{display:block;width:100%;height:auto}

/* Навигация (стрелки) */
.san-gallery-nav{
  position:absolute;top:50%;transform:translateY(-50%);
  border:1px solid #e5e7eb;background:#fff;border-radius:999px;
  width:36px;height:36px;line-height:22px;text-align:center;font-size:22px;
  cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.08);
  padding-bottom:5px;
}
.san-gallery-prev{left:6px}
.san-gallery-next{right:6px}
.san-gallery-track.drag{cursor:grabbing}

/* Адаптив: делаем кадр поуже на больших экранах и full-width на мобиле */
@media (min-width: 1024px){
  .san-gallery-item{width: 60%;}
}
@media (max-width: 768px){
  .san-gallery-item{width: 100%;}
}

/* читабельная ширина текста */
.san-intro{max-width:70ch;margin:8px 0 18px;font-size:16px;line-height:1.6;color:#374151}
.san-intro p{margin:0 0 10px}

/* галерея визуально компактнее: одинаковое соотношение сторон */
.san-gallery-item{aspect-ratio:16/9}
.san-gallery-img{height:100%;object-fit:cover}

/* Смотрите также */ 
.san-seealso .seealso-list{margin:0;padding-left:18px}
.san-seealso .seealso-list li{margin:6px 0}

.san-summary{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 8px}
.san-summary .chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;
  font-size:13px;color:#111827;background:#fff;text-decoration:none
}
.san-summary .chip:hover{background:#f9fafb}
.san-summary .chip-ic{font-size:14px;line-height:1}
.san-summary .chip--cheap{ border-color:#dcfce7; background:#f0fdf4; }
.san-summary .chip--premium{ border-color:#fde68a; background:#fffbeb; }
.san-summary .chip--cheap:hover{background:#f0fdf4;}
.san-summary .chip--premium:hover{background:#fffbeb;}

.podborki-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  margin-top:20px;
}
@media (max-width:1024px){ .podborki-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:640px){ .podborki-grid{grid-template-columns:1fr;} }

.podborka-card{display:flex;flex-direction:column;border:1px solid #eee;border-radius:12px;overflow:hidden;background:#fff}
.podborka-card .thumb img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.podborka-card .body{padding:14px}
.podborka-card .title{margin:0 0 8px;font-size:1.05rem;line-height:1.3}
.podborka-card .excerpt{margin:0 0 10px;color:#555}
.podborka-badges{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.podborka-badges .badge{background:#f5f5f7;border:1px solid #eee;border-radius:999px;padding:4px 8px;font-size:.82rem}
.podborka-card .meta{margin-top:auto;font-size:.8rem;color:#777}

.cards-grid .is-hidden {
  display: none;
}
.san-more-btn {
  margin: 16px auto 0;
  display: block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #d0d0d0;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
}
.san-more-btn {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 24px auto 0;
}

.collection-summary {
  margin: 16px 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f0f4ff;
  font-size: 14px;
}

.collection-summary__main strong {
  font-weight: 700;
}

/* Обёртка всей секции рейтинга */
.rating-page .rating-list {
  /*max-width: 980px;           /* чтобы на широких экранах всё не растягивалось до бесконечности */
  margin: 24px auto 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Карточка одного места */
.rating-page .rating-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f7f7;
  align-items: flex-start;
}

/* Номер места (1 место, 2 место ...) */
.rating-page .rating-card__place {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
}

.rating-page .rating-card__place small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #888;
}

/* Убираем лишние внешние отступы у вложенной карточки санатория */
.rating-page .rating-card article {
  margin: 0;
}

/* Делаем карточку санатория двухколоночной: слева фото, справа текст */
.rating-page .rating-card article {
  display: flex;
  gap: 16px;
}

/* Блок с картинкой (класс .thumb — такой же, как в подборках) */
.rating-page .rating-card article .thumb {
  flex: 0 0 230px;          /* фиксированная ширина изображения */
  max-width: 230px;
}

/* Само изображение */
.rating-page .rating-card article .thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

/* Текстовая часть карточки */
.rating-page .rating-card article .body {
  flex: 1;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .rating-page .rating-card {
    grid-template-columns: 1fr;
  }

  .rating-page .rating-card article {
    flex-direction: column;
  }

  .rating-page .rating-card article .thumb {
    flex: 0 0 auto;
    max-width: 100%;
  }
}

.rating-more-link {
  margin-top: 12px;
  font-size: 14px;
}

.rating-more-link a {
  text-decoration: underline;
}

.rating-city-link {
  margin: 8px 0 18px;
  font-size: 14px;
  color: #555;
}

.rating-city-link a {
  text-decoration: underline;
}


/* ЧИПСЫ (как раньше) */
:root{
  --chip-bg:#f4f6f8;
  --chip-fg:#1f2937;
  --chip-border:rgba(0,0,0,.08);

  --chip-sea-bg:#e6f3ff;
  --chip-sea-fg:#0b63b0;

  --chip-own-bg:#fff4e5;
  --chip-own-fg:#9a5b00;
}

/* Небольшие плашки в meta-строке */
.meta-chip{
  display:inline-flex;
  align-items:center;
  gap:.35em;
  padding:.25rem .6rem;
  border:1px solid var(--chip-border);
  border-radius:999px;
  background:var(--chip-bg);
  color:var(--chip-fg);
  font-size:.875rem;
  line-height:1.1;
  white-space:nowrap;
  user-select:none;
}

/* Чип "у парка" / "в парке" */
.meta-chip--park {
  background: rgba(56, 142, 60, 0.08);   /* мягкий зелёный фон */
  border-color: rgba(56, 142, 60, 0.35);
  color: #2e7d32;
}

/* Чип "у питьевой галереи" / бювета */
.meta-chip--gallery {
  background: rgba(3, 155, 229, 0.08);   /* мягкий голубой фон */
  border-color: rgba(3, 155, 229, 0.35);
  color: #0277bd;
}

.meta-chip--sea{
  background:var(--chip-sea-bg);
  color:var(--chip-sea-fg);
  border-color:rgba(11,99,176,.2);
}

.meta-chip--own{
  background:var(--chip-own-bg);
  color:var(--chip-own-fg);
  border-color:rgba(154,91,0,.2);
}

/* БЕЙДЖИ (вторая линия) — span ИЛИ button */
.badge{
  display:inline-flex;
  align-items:center;
  gap:.35em;
  padding:.25rem .55rem;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.08);
  background:#f8fafc;
  color:#111827;
  font-size:.8125rem;
  line-height:1.1;
  white-space:nowrap;
  user-select:none;

  /* чтобы button выглядел как span */
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  border-style:solid;         /* убедимся, что border не пропал */
  margin:0;
  text-align:left;
  font-family:inherit;
}

/* только для кликабельных (button.js-chip) */
.badge.js-chip{
  cursor:pointer;
}

.badge.js-chip:focus-visible{
  outline:2px solid rgba(37,99,235,.8);
  outline-offset:2px;
}

/* модификаторы бейджей */
.badge--pool{
  background:#eef7ff;
  color:#0b63b0;
  border-color:rgba(11,99,176,.2);
}

.badge--meal{
  background:#fff3e8;
  color:#9a5b00;
  border-color:rgba(154,91,0,.2);
}

.badge--treat{
  background:#eefaf0;
  color:#1b7c2c;
  border-color:rgba(27,124,44,.18);
}

.badge--cheap{
  background:#eefbf4;
  color:#0b7a3e;
  border-color:rgba(11,122,62,.18);
}

.badge--premium{
  background:#fff0f0;
  color:#b91c1c;
  border-color:rgba(185,28,28,.18);
}

/* Контейнеры */
.card-badges{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem .45rem;
  margin-top:.4rem;
}

.card-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem .45rem;
  margin:.35rem 0 .25rem;
}

.card-price{
  margin:.3rem 0 .2rem;
  font-size:.95rem;
}

/* Тёмная тема (по желанию) */
@media (prefers-color-scheme: dark){
  :root{
    --chip-bg:#1f2937;
    --chip-fg:#e5e7eb;
    --chip-border:rgba(255,255,255,.1);

    --chip-sea-bg:#0b3c66;
    --chip-sea-fg:#d7ecff;

    --chip-own-bg:#3a2a13;
    --chip-own-fg:#ffe3b5;
  }

  .badge{
    background:#111827;
    color:#e5e7eb;
    border-color:rgba(255,255,255,.08);
  }
}

/* Мобилка: можно подрезать подписи у бассейна, если захочешь */
@media (max-width: 420px){
  .badge--pool{
    white-space:nowrap;
  }
  /* при желании можно скрыть слово "бассейн" через ::after/::before */
}

/* Ограничиваем «гирлянду» бейджей: показываем только первые 5 */
.card-badges .badge:nth-child(n+6){
  display:none;
}



/* все кликабельные чипсы/бейджи */
.js-chip{
  cursor: pointer;
}

/* Контейнер заголовка + "Сбросить фильтры" */
.page-header{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto; /* h1 растягивается, ссылка вправо */
  column-gap: 1rem;
  align-items: flex-end;
  margin-bottom: 0.5rem; /* меньше общий отступ снизу */
}

/* Сам заголовок */
.page-title{
  margin: 0 0 0.25rem;   /* маленький отступ снизу */
  font-size: 28px;
  line-height: 1.2;
}

/* "Сбросить фильтры" справа */
.filters-reset-link{
  justify-self: end;     /* всегда прижимаем вправо */
  align-self: flex-end;
  font-size: .85rem;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 1px dashed rgba(107,114,128,.6);
  padding-bottom: 1px;
  white-space: nowrap;   /* не даём разбиваться на 2 строки */
}
.filters-reset-link:hover{
  color:#111827;
  border-bottom-color:transparent;
}

/* На очень узких экранах можно позволить ссылке уйти под H1, если хочешь */
@media (max-width: 480px){
  .page-header{
    grid-template-columns: 1fr;
    row-gap: .35rem;
  }
  .filters-reset-link{
    justify-self: flex-start; /* или center, как больше нравится */
  }
}

/***
/// Блок формы на страница санатория
/***
/* Общий блок формы */
/* Более заметный блок формы */
.san-lead-form {
  position: relative;
  margin: 32px 0 40px;
  padding: 24px 20px 22px;
  border-radius: 16px;
  background: #ffffff; /* белый, чтобы выделяться на фоне контента */
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

/* Цветная полоска сверху для акцента */
.san-lead-form::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f97316, #fb923c, #facc15);
}

/* Заголовок/текст */
.san-lead-form h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: #1f2933;
}

.san-lead-form > p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5568;
}

/* Сетка формы */
.san-lead-form__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 20px;
}

/* Лейблы и поля */
.san-lead-form label {
  display: block;
  font-size: 13px;
  color: #2d3748;
}

.san-lead-form label input,
.san-lead-form label select,
.san-lead-form label textarea {
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.san-lead-form label textarea {
  resize: vertical;
  min-height: 80px;
}

/* Фокус */
.san-lead-form label input:focus,
.san-lead-form label select:focus,
.san-lead-form label textarea:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 1px rgba(49, 130, 206, 0.25);
  background-color: #f8fbff;
}

/* Чекбокс и примечание – на всю ширину */
.san-lead-form .consent,
.san-lead-note {
  grid-column: 1 / -1;
}

/* ВЫРОВНЯТЬ чекбокс слева от текста */
.san-lead-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #4a5568;
}

.san-lead-form .consent input[type="checkbox"] {
  width:auto;
  display: inline-block;
  margin: 0 6px 0 0;
  vertical-align: middle;
}

/* small-note */
.san-lead-note {
  font-size: 12px;
  opacity: .8;
}

/* Кнопка – чуть ярче, более “CTA” */
.san-lead-form button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: flex-start;
  padding: 11px 26px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #3182ce;
  color: #ffffff;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(49, 130, 206, 0.35);
}

.san-lead-form button[type="submit"]:hover {
  background: #2b6cb0;
  box-shadow: 0 8px 20px rgba(49, 130, 206, 0.45);
}

.san-lead-form button[type="submit"]:active {
  transform: translateY(1px);
}

/* Мобилка */
@media (max-width: 680px) {
  .san-lead-form {
    padding: 20px 16px 18px;
    margin: 24px 0 32px;
  }

  .san-lead-form h2 {
    font-size: 18px;
  }
}

.js-phone {
  font-size: 14px;
  white-space: nowrap;
}

.js-phone .js-phone-show {
  margin-left: 0px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: #3182ce;
  cursor: pointer;
  text-decoration: underline;
}

.js-phone .js-phone-show:hover {
  color: #2459a8;
}

/** Чипсы для /sanatorii **/ 
.ins-chip--label-link{ font-weight:700; }

.ins-chips-block{ margin: 10px 0 0; }

.chips-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:8px 0;
  border-top:1px solid rgba(0,0,0,.08);
}

.chips-row:first-child{ border-top:0; }

.ins-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:999px;
  text-decoration:none;
  line-height:1.2;
}

.ins-chip:hover{ background:rgba(0,0,0,.04); }

.ins-chip--label{
  font-weight:700;
  background:rgba(0,0,0,.04);
  pointer-events:none; /* чтобы не был кликабельным */
}