*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── SVG-иконки ── */
.icon-svg {
  display: inline-flex;
  width: 22px;
  height: 22px;
}

.icon-svg svg {
  width: 100%;
  height: 100%;
}

.icon-svg--sm {
  width: 16px;
  height: 16px;
}

.icon-svg--btn {
  width: 12px;
  height: 12px;
  margin-left: 8px;
}

.icon-svg--pill {
  width: 18px;
  height: 18px;
}

/* ── Плашки контактов ── */
.contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.contact-pill:hover {
  background: #e5e7eb;
}

.contact-pill--social {
  width: 40px;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 500;
}

.contact-pill--social .icon-svg--social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.contact-pill--social .icon-svg--social svg {
  width: 100%;
  height: 100%;
  display: block;
}

.header-contacts,
.footer-contacts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Шапка ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1rem;
}

.site-logo-img {
  width: 32px;
  height: 32px;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #E53935;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 1.1rem;
}

/* ── Hero ── */
.hero-section {
  padding: 80px 0 40px;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 3.625rem);
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 105%;
  letter-spacing: -0.04em;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 40px;
  line-height: 1.62;
  text-align: center;
}

.hero-grid {
  min-width: 0;
  height: 560px;
}

.hero-cell {
  min-width: 0;
  min-height: 0;
}

.hero-cell .info-card {
  height: 100%;
}

/* ── Инфо-карточки ── */
.info-card {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #F2F2F7;
  border-radius: 32px;
  padding: 24px;
  flex-flow: column;
  justify-content: center;
  text-align: center;
}

.info-card-body {
  line-height: 1.1875rem;
}

.info-card-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card-icon .icon-svg {
  width: 32px;
  height: 32px;
}

.hero-cell--rating .info-card-icon .icon-svg {
  width: 56px;
  height: 32px;
}

.info-card-title {
  font-weight: 500;
  margin-bottom: 8px;
}

.info-card-text:last-of-type {
  margin-bottom: 8px;
}

.info-card-link {
  color: #0088FF;
  display: inline-block;
}

.info-card-link:hover {
  text-decoration: underline;
}

.info-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.rating-star {
  color: #FFA000;
  display: inline-flex;
}

/* ── Галерея в сетке ── */
.scene-main-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border-radius: 32px;
  overflow: hidden;
}

.scene-main {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  cursor: pointer;
}

.hero-cell--sideTop,
.hero-cell--sideBottom {
  display: flex;
}

.scene-side-img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 32px;
  cursor: pointer;
}

.hero-cell--sideTop .scene-side-img {
  min-height: 120px;
}

.hero-cell--sideBottom .scene-side-img {
  min-height: 100px;
}

.scene-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 2;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}

.scene-arrow:hover {
  background: #fff;
}

.scene-prev {
  left: 12px;
}

.scene-next {
  right: 12px;
}

.scene-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.scene-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.scene-dot.active {
  background: #fff;
  transform: scale(1.15);
}

.gallery-empty {
  width: 100%;
  height: 100%;
  min-height: 360px;
  background: #f3f4f6;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
}

/* ── CTA-баннер ── */
.cta-section {
  padding: 0 0 40px;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border: 4px solid #A6CE39;
  border-radius: 32px;
  padding: 24px 32px;
  background: #fff;
}

.cta-text {
  font-size: 1.25rem;
  flex: 1;
  min-width: 200px;
}

.cta-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.cta-phone:hover {
  color: #0088FF;
}

.cta-phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-phone-icon .icon-svg {
  width: 24px;
  height: 24px;
}

.cta-phone-icon .icon-svg path {
  fill: #ED1651;
}

/* ── Программы ── */
.programs-section {
  padding: 48px 0 56px;
  background: #fff;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-align: center;
}

.section-subtitle {
  font-size: 1.25rem;
  line-height: 1.62;
  margin-bottom: 40px;
  text-align: center;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.p-card {
  background: #F2F2F7;
  border-radius: 32px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.p-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.p-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.p-card-icon .icon-svg {
  width: 40px;
  height: 40px;
}

.p-card-badge {
  line-height: 1.6;
  color: #1A1A1A;
  background: rgba(118, 118, 128, 0.12);
  border-radius: 16px;
  padding: 4px 12px;
  white-space: nowrap;
}

.p-card-title {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: 4px;
}

.p-card-prices span {
  display: block;
}

.p-card-description {
  margin-top: 8px;
}

.p-card-desc,
.p-card-description p {
  font-size: 0.875rem;
  color: #727272;
  line-height: 1.4;
}

/* ── Промо-баннер ── */
.promo-section {
  display: none;
  padding: 0 0 40px;
}

.promo-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #9878D0;
  border-radius: 32px;
  padding: 24px 32px;
  color: #fff;
}

.promo-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.promo-icon {
  flex-shrink: 0;
  width: 42px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.promo-content {
  flex: 1;
}

.promo-title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
  min-width: 200px;
}

.promo-subtitle {
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  min-width: 200px;
}

.promo-btn {
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-weight: 500;
  color: #fefeff;
  background: #5319B2;
  border: none;
  border-radius: 10px;
  padding: 8px 12px 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.promo-btn:hover {
  opacity: 0.92;
}

/* ── Подвал ── */
.site-footer {
  background: #fff;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-info {
  font-size: 0.875rem;
  color: rgba(60, 60, 67, 0.6);
  text-align: center;
  white-space: pre-line;
}

.footer-copy {
  font-size: 0.875rem;
  color: rgba(60, 60, 67, 0.6);
  text-align: center;
}

/* ── Лайтбокс ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  margin-top: 12px;
}

/* ── Кнопка «Вверх» ── */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1a2e;
  color: #fff;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 70;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  -webkit-tap-highlight-color: transparent;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: #334155;
}

/* ── Адаптивность (программы и прочее; hero-grid — из data.js) ── */
@media (max-width: 960px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scene-main-wrap {
    min-height: 280px;
  }

  .scene-main {
    min-height: 280px;
  }

  .hero-grid {
    height: 720px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .site-header {
    padding: 20px 16px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .hero-section,
  .cta-section,
  .programs-section,
  .promo-section {
    padding: 32px 0 32px;
  }


  .hero-section {
    padding-top: 48px;
  }

  .hero-subtitle,
  .section-subtitle {
    margin-bottom: 24px;
  }

  .hero-grid {
    height: 1000px;
  }

  .programs-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-phone {
    font-size: 1.25rem;
  }

  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .promo-btn {
    width: 100%;
    justify-content: center;
  }

  .scene-main-wrap {
    min-height: 220px;
  }

  .scene-main {
    min-height: 220px;
  }

  .contact-pill--phone span {
    font-size: 0.8rem;
  }

  .contact-pill--phone span:last-child {
    display: none;
  }
}