/* ========================================================================== */
/* 01. Токены дизайна и базовые переменные                                    */
/* ========================================================================== */
:root {
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 22px;
  --space-5: 28px;
  --space-6: 36px;
  --dur: 220ms;
  --dur-slider: 420ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-slider: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Светлая тема */
body.theme-light {
  --bg: #f4f6f8;
  --bg-soft: #ffffff;
  --text: #17202a;
  --muted: #6b7480;
  --border: #d8dee6;
  --accent: #0f766e;
  --danger: #dc2626;
  --shadow: 0 12px 34px rgba(19, 37, 56, 0.14);
  --overlay: rgba(12, 24, 38, 0.55);
}

/* Темная тема */
body.theme-dark {
  --bg: #10151d;
  --bg-soft: #18212d;
  --text: #f2f6fb;
  --muted: #9eb0c3;
  --border: #2d3947;
  --accent: #2dd4bf;
  --danger: #f87171;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.44);
  --overlay: rgba(3, 7, 12, 0.76);
}

/* ========================================================================== */
/* 02. Базовые сбросы и общая типографика                                     */
/* ========================================================================== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  min-height: 100vh;
  line-height: 1.45;
  background: radial-gradient(1200px 700px at 5% -10%, rgba(20, 184, 166, 0.14), transparent 65%),
    radial-gradient(900px 600px at 90% 5%, rgba(15, 118, 110, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  padding-bottom: 92px;
  overflow-x: hidden;
}

/* Блокировка фонового скролла при открытой модалке/сайдбаре */
body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
select,
a {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* ========================================================================== */
/* 03. Декоративный фон                                                       */
/* ========================================================================== */
.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

.bg-shape-1 {
  width: 280px;
  height: 280px;
  top: -80px;
  left: -60px;
  background: rgba(45, 212, 191, 0.28);
}

.bg-shape-2 {
  width: 320px;
  height: 320px;
  right: -110px;
  top: 130px;
  background: rgba(20, 184, 166, 0.2);
}

/* ========================================================================== */
/* 04. Общие контейнеры                                                       */
/* ========================================================================== */
.hero,
.main {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
}

#contacts-section {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
}

/* ========================================================================== */
/* 05. Главный экран (только название и подпись)                              */
/* ========================================================================== */
.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  align-items: center;
  padding: var(--space-6) 0;
}

.hero__inner {
  background: color-mix(in srgb, var(--bg-soft), transparent 8%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(20px, 5vw, 44px);
}

.hero__inner--simple {
  text-align: center;
}

.hero__title {
  font-size: clamp(36px, 9vw, 80px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  margin: var(--space-3) auto 0;
  color: var(--muted);
  max-width: 680px;
  font-size: clamp(15px, 3vw, 20px);
}

/* ========================================================================== */
/* 06. Раздел скидок и фильтр города                                           */
/* ========================================================================== */
.main {
  padding: var(--space-4) 0 var(--space-6);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.section-head__title {
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.city-wrap__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.city-select {
  width: 100%;
  min-width: 190px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  padding: 0 12px;
}

/* ========================================================================== */
/* 07. Категорийные блоки в списке скидок                                      */
/* ========================================================================== */
.category-block {
  background: color-mix(in srgb, var(--bg-soft), transparent 5%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(14px, 3vw, 24px);
  margin-bottom: var(--space-3);
}

.category-block__title {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

/* ========================================================================== */
/* 08. Сетка карточек скидок                                                   */
/* ========================================================================== */
.cards-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.discount-card {
  background: color-mix(in srgb, var(--bg-soft), transparent 6%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.discount-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.discount-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.discount-card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg), white 12%);
  position: relative;
}

.discount-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discount-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.discount-card__media.has-image .discount-card__placeholder {
  display: none;
}

.discount-card__content {
  padding: 14px;
}

.discount-card__content h4 {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.discount-card__content p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  padding: 32px;
  text-align: center;
}

/* ========================================================================== */
/* 09. Сайдбар категорий                                                       */
/* ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 27, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
  z-index: 120;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(330px, 88vw);
  background: color-mix(in srgb, var(--bg-soft), transparent 6%);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 130;
  transform: translateX(-100%);
  transition: transform var(--dur) var(--ease);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar__head h3 {
  font-size: 21px;
  font-weight: 800;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 22px;
  line-height: 1;
}

.sidebar__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar__menu {
  display: grid;
  gap: 8px;
}

.sidebar__item {
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 11px;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 700;
}

/* ========================================================================== */
/* 10. Нижняя навигация (всегда фиксирована внизу)                            */
/* ========================================================================== */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  height: 76px;
  background: color-mix(in srgb, var(--bg-soft), transparent 6%);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.bottom-nav__item {
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
}

.bottom-nav__item:hover {
  color: var(--text);
}

.bottom-nav__icon {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav__text {
  font-size: 11px;
  font-weight: 700;
}

/* ========================================================================== */
/* 11. Модальное окно скидки                                                   */
/* ========================================================================== */
.discount-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 8px;
}

.discount-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(7px);
}

.discount-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.discount-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.discount-modal__media {
  position: relative;
  overflow: hidden;
  background: #0d1722;
  flex: 0 0 min(34dvh, 320px);
  min-height: 220px;
}

.modal-slider {
  display: flex;
  height: 100%;
  transition: transform var(--dur-slider) var(--ease-slider);
  will-change: transform;
}

.slide-box {
  min-width: 100%;
  height: 100%;
}

.slide-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-box--placeholder {
  display: grid;
  place-items: center;
  color: #d0d7df;
  font-weight: 700;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  z-index: 3;
}

.slider-nav--left {
  left: 10px;
}

.slider-nav--right {
  right: 10px;
}

/* Важно: min-height:0 + overflow-y:auto дают рабочий скролл на телефоне */
.discount-modal__content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: clamp(14px, 4vw, 28px);
  display: grid;
  gap: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.discount-modal__content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.12;
}

/* Суть скидки уменьшена */
.modal-value {
  font-size: clamp(18px, 3.2vw, 28px);
  color: var(--danger);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.modal-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.modal-body section {
  background: color-mix(in srgb, var(--bg), var(--bg-soft) 72%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-body h4 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.modal-body p {
  font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-phone {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Кнопки в модалке: компактнее, но текст крупнее */
.modal-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 2px;
  width: 100%;
  min-width: 0;
}

.modal-link {
  min-height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-link--instagram {
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
}

.modal-link--website {
  background: linear-gradient(135deg, #0f172a, #1f2937);
}

.modal-link--booking {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

/* ========================================================================== */
/* 12. Раздел "О нас / Контакты"                                              */
/* ========================================================================== */
.py-10 {
  padding: var(--space-4) 0 var(--space-6);
}

.text-3xl {
  font-size: clamp(26px, 4.4vw, 40px);
}

.font-bold {
  font-weight: 800;
}

.font-semibold {
  font-weight: 700;
}

.mb-6 {
  margin-bottom: var(--space-4);
}

.mb-2 {
  margin-bottom: 10px;
}

.text-center {
  text-align: center;
}

.max-w-xl {
  max-width: 920px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.p-6 {
  padding: clamp(14px, 3.8vw, 24px);
}

.rounded-xl {
  border-radius: var(--radius-lg);
}

.shadow-xl {
  box-shadow: var(--shadow);
}

.transition-all,
.transition-opacity {
  transition: all var(--dur) var(--ease);
}

.card {
  background: color-mix(in srgb, var(--bg-soft), transparent 5%);
  border: 1px solid var(--border);
}

.footer-line {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.text-accent-purple,
.hover\:underline {
  color: var(--accent);
}

.hover\:underline:hover {
  text-decoration: underline;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.link-item {
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg), var(--bg-soft) 74%);
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.link-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.link-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.accordion-container {
  display: grid;
  gap: 10px;
}

.accordion-container details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg), var(--bg-soft) 72%);
  overflow: hidden;
}

.button1 {
  list-style: none;
  display: block;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.accordion-container details > summary::-webkit-details-marker {
  display: none;
}

.content-text {
  padding: 0 14px 14px;
  display: grid;
  gap: 8px;
}

.section-title {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
}

.subsection-title {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.erip-list,
.policy-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

/* ========================================================================== */
/* 13. Адаптивные правила                                                      */
/* ========================================================================== */
@media (min-width: 620px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .discount-modal {
    padding: 20px;
  }

  .discount-modal__dialog {
    display: grid;
    grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr);
    width: min(1080px, calc(100vw - 40px));
    height: min(82vh, 760px);
    max-height: min(82vh, 760px);
  }

  .discount-modal__media {
    height: 100%;
    flex: none;
  }

  .discount-modal__content {
    min-height: 0;
  }
}

@media (min-width: 1220px) {
  .cards-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .city-select {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .hero,
  .main,
  #contacts-section {
    width: calc(100% - 18px);
  }

  .hero__inner {
    padding: 18px;
  }

  .discount-modal__dialog {
    border-radius: 16px;
  }

  .social-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
