/* ============================================================
   СтомаКазань — общие стили
   ============================================================ */

/* ---------- Дизайн-токены ---------- */
:root {
  --blue: #4990c4;       /* основной цвет (с stomatologia-kazan.ru) */
  --blue-600: #3a7cae;   /* темнее — hover/градиент */
  --blue-700: #2f6890;   /* ещё темнее — текст/акценты */
  --ink: #1b2a4a;        /* тёмно-синий заголовок */
  --text: #374151;
  --muted: #6b7280;
  --bg: #f4f9fc;         /* фон страницы */
  --surface: #ffffff;
  --tint: #e6f1f9;       /* светло-голубая подложка */
  --tint-2: #f0f7fc;
  --star: #f2c94c;
  --border: #e6eef6;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 6px 24px rgba(27, 42, 74, 0.06);
  --shadow-hover: 0 14px 34px rgba(27, 42, 74, 0.12);
  --container: 1180px;
  --header-h: 72px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Сброс ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1,
h2,
h3 {
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex: none;
}

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  
  color: var(--ink);
}
.logo__content {
  display: flex;
  flex-direction: column;
}
.logo__title {
  font-weight: 800;
    font-size: 14px;
}
.logo__desc {
  font-size: 11px;
  line-height: 1.05;
}

.logo__badge {
  width: 38px;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue), var(--blue-600));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(73, 144, 196, 0.4);
}

.logo__badge .icon {
  width: 22px;
  height: 22px;
}

/* основная навигация */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--tint);
  color: var(--blue-600);
}

.nav a.is-active {
  background: var(--tint);
  color: var(--blue-600);
}

/* поиск в шапке */
.header-search {
  position: relative;
  margin-left: auto;
  min-width: 230px;
}

.header-search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.header-search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 0 16px 0 42px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.header-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(73, 144, 196, 0.15);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s,
    border-color 0.16s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-600));
  color: #fff;
  box-shadow: 0 8px 20px rgba(73, 144, 196, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(73, 144, 196, 0.45);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--blue);
  color: var(--blue-600);
}

.btn--sm {
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

/* мягкая кнопка для карточек («Подробнее») */
.btn-soft {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--tint);
  color: var(--blue-700);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  transition: background 0.16s, color 0.16s;
}

.btn-soft:hover {
  background: var(--blue);
  color: #fff;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 64px 0 28px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.badge-city {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--tint);
  color: var(--blue-700);
  font-weight: 600;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

.badge-city .icon {
  width: 16px;
  height: 16px;
}

.hero__title {
  font-size: clamp(28px, 5.5vw, 40px);
  line-height: 1.04;
  font-weight: 800;
  margin: 22px 0 18px;
}

.hero__lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 0 30px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__stats {
  display: flex;
  gap: 44px;
  margin-top: 40px;
}

.stat__num {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue-600);
  line-height: 1;
}

.stat__label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.hero__media {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(27, 42, 74, 0.18);
  aspect-ratio: 4 / 3.4;
  background: linear-gradient(135deg, #d4ecfb, #eaf6fe);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Секции
   ============================================================ */
.section {
  padding: 56px 0;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section__title {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
}

.section__sub {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 17px;
}

.page-head {
  padding: 48px 0 8px;
}

/* ============================================================
   Сетка карточек клиник
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.clinic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}

.clinic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.clinic-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clinic-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.clinic-logo {
  width: 54px;
  height: 54px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(27, 42, 74, 0.16);
}

.clinic-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clinic-card__name {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tint);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
}

.rating-pill .icon {
  width: 15px;
  height: 15px;
  color: var(--star);
  fill: var(--star);
}

.stars {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
}

.stars__icons {
  display: inline-flex;
  gap: 2px;
}

.stars__icons .icon {
  width: 17px;
  height: 17px;
  color: var(--star);
  fill: var(--star);
}

.stars__icons .icon--empty {
  fill: none;
  color: #d6e2ee;
}

.stars__count {
  font-size: 14px;
  color: var(--muted);
}

.clinic-meta {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.clinic-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
  list-style: none;
}

.clinic-meta .icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.clinic-meta a {
  color: inherit;
  transition: color 0.16s;
  overflow-wrap: anywhere;
}

.clinic-meta a:hover {
  color: var(--blue-600);
}

.clinic-card__btn {
  margin-top: auto;
}

.center {
  text-align: center;
  margin-top: 40px;
}
#reviews .center {
  margin: 0 0 20px 0;
}
/* ============================================================
   Голосование
   ============================================================ */
.info-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tint);
  color: var(--blue-700);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  margin-bottom: 22px;
}

.info-note .icon {
  width: 18px;
  height: 18px;
}

.vote-search {
  position: relative;
  margin-bottom: 22px;
}

.vote-search .icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.vote-search input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 0 20px 0 50px;
  font-size: 16px;
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.vote-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(73, 144, 196, 0.15);
}

.vote-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vote-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}

.vote-rank {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  text-align: center;
}

.vote-main__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--tint);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--blue), var(--blue-600));
  transition: width 0.4s ease;
}

.vote-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vote-count {
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
}

.vote-count b {
  color: var(--ink);
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.16s, transform 0.16s;
}

.vote-btn:hover {
  background: var(--blue-600);
  transform: translateY(-1px);
}

.vote-btn:disabled {
  background: #c9dcec;
  cursor: default;
  transform: none;
}

.vote-btn .icon {
  width: 16px;
  height: 16px;
}

.no-results {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
}

/* ============================================================
   Акции
   ============================================================ */
.promo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.promo-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #cfe9fb, #eef7fe);
  overflow: hidden;
}

.promo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.promo-card__media:hover img {
  transform: scale(1.05);
}

.promo-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #f2554c, #e8443b);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 14px rgba(232, 68, 59, 0.4);
}

.promo-card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.promo-card__title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}

.promo-card__title a {
  color: var(--ink);
  transition: color 0.16s;
}

.promo-card__title a:hover {
  color: var(--blue-600);
}

.promo-card__desc {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}

.promo-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.promo-card__meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.promo-card__meta .icon {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.promo-card__btn {
  margin-top: auto;
}

/* ============================================================
   Блог
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}

.post-card__media {
  display: block;
  margin: -24px -24px 18px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(135deg, #cfe9fb, #eef7fe);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card__media:hover img {
  transform: scale(1.05);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.post-date .icon {
  width: 15px;
  height: 15px;
}

.post-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.post-card__excerpt {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px;
}

.post-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-600);
  font-weight: 600;
  font-size: 15px;
}

.post-link .icon {
  width: 17px;
  height: 17px;
  transition: transform 0.16s;
}

.post-card:hover .post-link .icon {
  transform: translateX(4px);
}

/* ============================================================
   Контакты
   ============================================================ */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.contacts-info h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 12px;
}

.contacts-info__lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 380px;
  margin: 0 0 28px;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.contact-line__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  flex: none;
}

.contact-line__label {
  font-size: 13px;
  color: var(--muted);
}

.contact-line__value {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 15px 18px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(73, 144, 196, 0.15);
}

.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  color: #18a558;
  font-weight: 600;
  font-size: 15px;
}

.form-success.is-visible {
  display: flex;
}

.form-success .icon {
  width: 18px;
  height: 18px;
}

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 40px;
}

.site-footer__inner {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer .logo {
  font-size: 18px;
}

.site-footer__copy {
  color: var(--muted);
  font-size: 14px;
}

.site-footer__disclaimer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  border-top: 1px solid var(--border);
  margin: 0;
  padding: 14px 0 18px;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1180px) and (min-width: 1024.98px) {
  .logo__title {
    font-size: 12px;
  }
  .logo__desc {
    display: none;
  }
  .site-header .nav a {
    font-size: 13px;
  }
}  
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero__media {
    order: -1;
    aspect-ratio: 16 / 10;
  }
  .cards-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav,
  .header-search {
    display: none;
  }
  .burger {
    display: inline-flex;
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 18px;
  }
  .site-footer__inner {
    padding: 28px 18px;
  }
    .logo__desc {
      max-width: 250px;
    }
  .hero {
    padding: 40px 0 16px;
  }
  .hero__stats {
    gap: 28px;
  }
  .cards-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .section__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .vote-row {
    grid-template-columns: 36px 1fr;
    gap: 12px 14px;
  }
  .vote-side {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .hero__actions .btn {
    flex: 1;
  }
}

/* мобильное меню (выезжающая панель) */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(27, 42, 74, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 84vw);
  background: var(--surface);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mobile-menu__close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.mobile-menu a {
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
  background: var(--tint);
  color: var(--blue-700);
}

.mobile-menu__search {
  margin-top: 14px;
  position: relative;
}

.mobile-menu__search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.mobile-menu__search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 16px 0 42px;
  font-size: 14px;
  outline: none;
}

/* ============================================================
   Страница клиники
   ============================================================ */
.clinic-hero {
  padding: 40px 0 8px;
}

.clinic-hero__grid {
  display: flex;
  gap: 28px;
  align-items: center;
}

.clinic-hero__logo {
  width: 124px;
  height: 124px;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 46px;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 34px rgba(27, 42, 74, 0.22);
}

.clinic-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.back-link:hover {
  color: var(--blue-600);
}

.clinic-hero__name {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
}

.clinic-hero__rating {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 14px;
  flex-wrap: wrap;
}

.clinic-hero__desc {
  color: var(--muted);
  font-size: 18px;
  max-width: 660px;
  margin: 0;
}

/* раскладка деталей */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  padding-top: 24px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.detail-main .panel + .panel {
  margin-top: 24px;
}

.panel__title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel__title .icon {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.reviews-count {
  color: var(--muted);
  font-weight: 600;
  font-size: 17px;
}

/* услуги */
.services {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.service-row:last-child {
  border-bottom: none;
}

.service-row__name {
  color: var(--text);
  font-size: 16px;
}

.service-row__price {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

/* сайдбар */
.side-card {
  position: sticky;
  top: 92px;
}

.side-card .contact-line {
  margin-bottom: 16px;
}

.side-card .contact-line__value a:hover {
  color: var(--blue-600);
}

/* отзывы */
.reviews {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.review {
  display: flex;
  gap: 14px;
}

.review__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.review__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.review__name {
  font-weight: 700;
  color: var(--ink);
}

.review__date {
  color: var(--muted);
  font-size: 13px;
}

.review__stars {
  display: inline-flex;
  gap: 2px;
  margin: 6px 0;
}

.review__stars .icon {
  width: 15px;
  height: 15px;
  color: var(--star);
}

.review__text {
  color: var(--text);
  font-size: 15px;
  margin: 2px 0 0;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.provider-badge--yandex {
  background: #ffe9e4;
  color: #e8341a;
}

.provider-badge--vk {
  background: #e4efff;
  color: #0a6cff;
}

/* блок авторизации */
.review-box {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.review-gate {
  border: 1px dashed #c9dcec;
  border-radius: 16px;
  padding: 26px 22px;
  text-align: center;
  background: var(--tint-2);
}

.review-gate h4 {
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 8px;
  font-weight: 800;
}

.review-gate p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
}

.oauth-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.oauth-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: filter 0.16s, transform 0.16s;
}

.oauth-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.oauth-btn--yandex {
  background: #fc3f1d;
}

.oauth-btn--vk {
  background: #0a6cff;
}

.oauth-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

/* форма отзыва */
.review-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
}

.review-user b {
  color: var(--ink);
}

.logout-link {
  margin-left: auto;
  color: var(--blue-600);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.logout-link:hover {
  text-decoration: underline;
}

.rating-input {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
}

.rating-input button {
  background: none;
  border: none;
  padding: 2px;
  line-height: 0;
}

.rating-input .icon {
  width: 30px;
  height: 30px;
  color: #d6e2ee;
  transition: color 0.12s, transform 0.12s;
}

.rating-input button:hover .icon {
  transform: scale(1.12);
}

.rating-input button.on .icon {
  color: var(--star);
}

.form-error {
  display: none;
  color: #e8443b;
  font-size: 14px;
  margin: 10px 0 0;
}

.form-error.is-visible {
  display: block;
}

/* модалка */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: rgba(27, 42, 74, 0.5);
  padding: 20px;
}

.modal.is-open {
  display: grid;
}

.modal__box {
  background: #fff;
  border-radius: 22px;
  padding: 30px;
  width: min(430px, 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.modal__provider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.modal__logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.modal__title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.modal__note {
  font-size: 13px;
  color: var(--muted);
}

.modal__text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.modal__cancel {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  margin-top: 6px;
}

.modal__cancel:hover {
  color: var(--ink);
}

/* ссылки внутри карточки клиники */
.clinic-card__name {
  transition: color 0.16s;
}

a.clinic-card__name:hover {
  color: var(--blue-600);
}

.clinic-logo-link {
  display: block;
  flex: none;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .side-card {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .hero__actions {
    flex-direction: column;
  }
  .hero__actions .btn {
    min-height: 52px;
  }
  .clinic-hero__grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .clinic-hero__logo {
    width: 92px;
    height: 92px;
    font-size: 34px;
    border-radius: 22px;
  }
}

/* ---------- Карточка голосования за клинику ---------- */
.clinic-vote__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.clinic-vote__rank {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--tint);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 14px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
}

.clinic-vote__rank .icon {
  width: 16px;
  height: 16px;
}

.clinic-vote .vote-count {
  font-size: 15px;
}

/* ============================================================
   Детальная страница: статья блога / акция
   ============================================================ */
.article {
  padding: 40px 0 8px;
}

.article-wrap {
  max-width: 800px;
}

.article__head {
  margin-bottom: 26px;
}

.article__date {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0 0;
}

.article__date .icon {
  width: 16px;
  height: 16px;
}

.article__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  margin: 12px 0 0;
}

.article__cover {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin: 0 0 28px;
  aspect-ratio: 16 / 8;
  background: linear-gradient(135deg, #cfe9fb, #eef7fe);
  box-shadow: var(--shadow);
}

.article__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article__cover .promo-badge {
  top: 18px;
  left: 18px;
  font-size: 17px;
  padding: 9px 16px;
}

.article__lead {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.article__body {
  font-size: 17px;
  color: var(--text);
  line-height: 1.7;
}

.article__body p {
  margin: 0 0 18px;
}

.article__body h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 32px 0 12px;
}

.article__body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.article__body li {
  margin-bottom: 9px;
}

/* CTA-блок акции */
.promo-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin: 8px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.promo-cta__info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-cta__info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
}

.promo-cta__info .icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

/* ============================================================
   Contact Form 7 — приведение к виду вёрстки
   ============================================================ */
.contact-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form .wpcf7-form p {
  margin: 0;
}

.contact-form .wpcf7-form > p:empty {
  display: none;
}

.contact-form .field {
  margin: 0;
}

.contact-form .wpcf7-form-control-wrap {
  display: block;
}

.contact-form input.btn,
.contact-form .wpcf7-submit {
  width: 100%;
  color: #fff;
  cursor: pointer;
}

.contact-form .wpcf7-form > p:has(.wpcf7-submit) {
  position: relative;
}

.contact-form .wpcf7-spinner {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

.contact-form .wpcf7-response-output {
  margin: 0!important;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
}

.contact-form .wpcf7-not-valid-tip {
  color: #e8443b;
  font-size: 13px;
  margin-top: 6px;
}

.contact-form .wpcf7-form.invalid .wpcf7-response-output,
.contact-form .wpcf7-form.unaccepted .wpcf7-response-output {
  border-color: #f3c0bc;
  background: #fdecea;
  color: #c0392b;
}

.contact-form .wpcf7-form.sent .wpcf7-response-output {
  border-color: #bfe6cf;
  background: #eafaf1;
  color: #18a558;
}

/* подсказка в форме отзыва (режим редактирования) */
.review-form__note {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--blue-700);
  background: var(--tint);
  border-radius: 12px;
  padding: 10px 14px;
}

/* «Показать ещё» в списке услуг */
.services[data-services-collapsed] .service-row--extra {
  display: none;
}

.services-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  background: var(--tint);
  color: var(--blue-700);
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.16s, color 0.16s;
}
#reviews .services-more {
  margin: 0;
}
.services-more:hover {
  background: var(--blue);
  color: #fff;
}

.services-more .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.services-more.is-open .icon {
  transform: rotate(180deg);
}

/* ---------- Рейтинг голосования: 2 колонки + крупное 1 место ---------- */
.vote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.vote-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* у 1 места добавляется колонка под логотип */
.vote-card--featured {
  grid-template-columns: auto auto 1fr auto;
}

.vote-card__rank {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
  min-width: 20px;
  justify-content: center;
}

.vote-card__rank .icon {
  width: 20px;
  height: 20px;
  color: var(--star);
}

.vote-card__logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.vote-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vote-card__body {
  min-width: 0;
}

.vote-card__name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
  transition: color 0.16s;
}

.vote-card__name:hover {
  color: var(--blue-600);
}

.vote-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0 9px;
  flex-wrap: wrap;
}

.vote-card__reviews {
  font-size: 13px;
  color: var(--muted);
}

.vote-card__stat .vote-count {
  font-size: 14px;
}

.vote-card__stat .progress {
  margin-top: 7px;
  height: 7px;
}

/* 1 место — на всю ширину, крупнее */
.vote-card--featured {
  grid-column: 1 / -1;
  padding: 24px;
  gap: 20px;
  background: linear-gradient(135deg, var(--tint), var(--surface));
  border-color: var(--blue);
}

.vote-card--featured .vote-card__rank {
  font-size: 24px;
}

.vote-card--featured .vote-card__rank .icon {
  width: 28px;
  height: 28px;
}

.vote-card--featured .vote-card__logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  font-size: 30px;
}

.vote-card--featured .vote-card__name {
  font-size: 24px;
}

.vote-card--featured .vote-btn {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

@media (max-width: 720px) {
  .vote-grid {
    grid-template-columns: 1fr;
  }
  .vote-card {
    grid-template-columns: auto 1fr auto;
    gap: 10px 12px;
  }
  .vote-card--featured {
    grid-template-columns: auto auto 1fr;
    padding: 18px;
  }
  .vote-card--featured .vote-btn {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* ---------- Пагинация ---------- */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.pagination ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination li {
  list-style: none;
  margin: 0;
}

.pagination a.page-numbers,
.pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.16s, color 0.16s, background 0.16s, box-shadow 0.16s;
}

.pagination a.page-numbers:hover {
  border-color: var(--blue);
  color: var(--blue-600);
}

.pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--blue), var(--blue-600));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(73, 144, 196, 0.35);
}

.pagination .page-numbers.dots {
  min-width: auto;
  border: none;
  background: none;
  color: var(--muted);
  padding: 0 4px;
}

.pagination .page-numbers .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .pagination a.page-numbers,
  .pagination span.page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 9px;
    font-size: 14px;
  }
}

/* поле ввода капчи */
.captcha-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 14px 18px;
  font-size: 18px;
  font-family: inherit;
  color: var(--text);
  text-align: center;
  outline: none;
  margin-bottom: 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.captcha-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(73, 144, 196, 0.15);
}

/* состояние «уже проголосовал» */
.btn.is-voted,
.btn:disabled {
  background: var(--tint);
  color: var(--blue-700);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.vote-btn.is-voted,
.vote-btn:disabled {
  background: var(--tint);
  color: var(--blue-700);
  cursor: default;
  pointer-events: none;
}
