/* =========================================================
   СТРАНИЦА УСЛУГИ — мастер-шаблон №1 (первые 6 услуг)
   ========================================================= */

/* ---- HERO страницы услуги: на весь экран любого устройства ---- */
.service-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  background: #333;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

/* Слайдер с эффектом Ken Burns (плавный зум + cross-fade), как на главной */
.service-hero__slider {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.service-hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  animation: service-hero-slide 30s infinite;
  will-change: opacity, transform;
}
.service-hero__slide:nth-child(1) { animation-delay:  0s; }
.service-hero__slide:nth-child(2) { animation-delay:  6s; }
.service-hero__slide:nth-child(3) { animation-delay: 12s; }
.service-hero__slide:nth-child(4) { animation-delay: 18s; }
.service-hero__slide:nth-child(5) { animation-delay: 24s; }

@keyframes service-hero-slide {
  0%   { opacity: 0; transform: scale(1.04); }
  4%   { opacity: 1; }
  20%  { opacity: 1; transform: scale(1.16); }
  24%  { opacity: 0; transform: scale(1.18); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .service-hero__slide { animation: none; opacity: 1; }
  .service-hero__slide:not(:first-child) { display: none; }
}

.service-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(0, 0, 0, 0.5);
}

/* Хлебные крошки — отдельной строкой, прижаты к верху (под фиксированной шапкой) */
.service-hero__top {
  padding-top: 150px;
}
.service-hero .breadcrumbs {
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.service-hero .breadcrumbs a       { color: rgba(255,255,255,0.7); }
.service-hero .breadcrumbs a:hover { color: #fff; }
.service-hero .breadcrumbs__current{ color: #fff; }

/* Нижний контейнер (с заголовком) — прижимается к нижнему краю первого экрана.
   margin-top: auto работает потому что .container — прямой flex-ребёнок .service-hero. */
.service-hero > .container:last-child {
  margin-top: auto;
  padding-bottom: 130px;
}

/* Заголовок и подзаголовок — внизу первого экрана */
.service-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1005px;
}
.service-hero__title {
  font-weight: 200;
  font-size: 64px;
  line-height: 1;
  color: #fff;
}
.service-hero__lead {
  font-weight: 300;
  font-size: 20px;
  max-width: 450px;
  color: rgba(255,255,255,.95);
}

/* ---- Лид-параграф (теперь внутри .with-sticky__main, рядом с плашкой) ---- */
.service-lead {
  padding: 80px 0 20px;
  position: relative;
}
.service-lead__text {
  font-weight: 300;
  font-size: 20px;
  color: var(--c-text);
  max-width: 935px;
}

/* ---- Section heading (общий для блоков внутри страницы услуги) ---- */
.service-section { padding: 60px 0; }
.service-section__title {
  font-size: 32px;
  line-height: 1;
  color: var(--c-heading);
  margin-bottom: 40px;
}
.service-section__title--white { color: #fff; }
.service-section__lead {
  font-weight: 300;
  font-size: 20px;
  color: var(--c-text);
  max-width: 720px;
  margin: -20px 0 40px;
}

/* ---- Sticky-карточка «Вы выбрали» (плавающая, в верхнем правом углу) ---- */
.tariff-sticky {
  position: sticky;
  top: 110px;
  margin-top: 80px;          /* отступ сверху как у лид-параграфа — стартуют в одной линии */
  margin-left: auto;
  width: 399px;
  max-width: 100%;
  background: var(--c-red);
  color: #fff;
  border-radius: 12px;
  padding: 28px 32px 32px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.16);
  z-index: 30;
  transition: opacity 0.3s ease, transform 0.3s ease;
  align-self: start;          /* не растягивается по высоте грид-ячейки */
}
.tariff-sticky__eyebrow {
  font-size: 32px;
  font-weight: 400;
  text-align: center;
  line-height: 1;
  margin-bottom: 22px;
}
.tariff-sticky__name {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
}
.tariff-sticky__price {
  font-size: 36px;
  text-align: center;
  margin-bottom: 16px;
}
.tariff-sticky__desc {
  font-size: 18px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 22px;
  color: rgba(255,255,255,0.95);
  line-height: 1.3;
}
.tariff-sticky__cta {
  display: block;
  background: #fff;
  color: #151515;
  text-align: center;
  font-size: 18px;
  padding: 18px;
  border-radius: 20px;
  text-decoration: none;
  transition: transform .25s var(--ease-out, ease), box-shadow .25s ease;
}
.tariff-sticky__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}

/* Когда плашка скрыта (после блока "Пример меню") */
.tariff-sticky.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

/* ---- Двухколоночная сетка для блоков с sticky aside ---- */
.with-sticky {
  display: grid;
  grid-template-columns: 1fr 399px;
  gap: 56px;
  align-items: start;
}
.with-sticky__main { min-width: 0; }   /* предотвращает overflow от grid-children */

/* ---- ОСОБЕННОСТИ УСЛУГ — 2×2 с разделителями ---- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #d9d3cb;
  border-bottom: 1px solid #d9d3cb;
}
.features-grid__cell {
  padding: 30px 24px 30px 0;
  border-right: 1px solid #d9d3cb;
}
.features-grid__cell:nth-child(2n) { border-right: 0; padding-right: 0; padding-left: 24px; }
.features-grid__cell:nth-child(n+3) { border-top: 1px solid #d9d3cb; padding-top: 30px; }
.features-grid__cell p {
  font-weight: 300;
  font-size: 20px;
  color: var(--c-text);
  max-width: 260px;
}

/* ---- ЭЛЕМЕНТЫ ФОРМАТА — bullet list ---- */
.format-list {
  list-style: disc;
  margin-left: 30px;
  font-weight: 300;
  font-size: 20px;
  color: var(--c-heading);
}
.format-list li { margin-bottom: 12px; line-height: 1.5; }

/* ---- ТАРИФНЫЕ ПЛАНЫ — 3 карточки ---- */
.tariffs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tariff-card {
  background: #ece3e3;
  color: #502a2b;
  border-radius: 12px;
  padding: 26px 24px 28px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out, ease), box-shadow 0.35s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 0;
  text-align: left;
  font-family: inherit;
}
.tariff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.12);
}
.tariff-card__name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.tariff-card__price {
  font-size: 36px;
  margin-bottom: 18px;
}
.tariff-card__desc {
  font-size: 16px;
  margin-bottom: 22px;
  line-height: 1.4;
}
.tariff-card__list {
  list-style: disc;
  margin-left: 20px;
  font-size: 16px;
  font-weight: 300;
}
.tariff-card__list li { margin-bottom: 6px; line-height: 1.5; }

/* Активный (выбранный) тариф — красный */
.tariff-card.is-active {
  background: var(--c-red);
  color: #fff;
}
.tariff-card.is-active .tariff-card__list,
.tariff-card.is-active .tariff-card__desc { color: #fff; }

/* ---- ПРИМЕР МЕНЮ — сетка 4×2 ---- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}
.menu-card { display: flex; flex-direction: column; gap: 14px; }
.menu-card__img {
  height: 234px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.menu-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out, ease);
}
.menu-card:hover .menu-card__img img { transform: scale(1.05); }
.menu-card__cat {
  background: #ece3e3;
  color: var(--c-text);
  font-size: 16px;
  border-radius: 12px;
  padding: 7px 16px;
  text-align: center;
  align-self: center;
  min-width: 200px;
}
.menu-card__title {
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  color: var(--c-heading);
}

/* ---- "НАШИ РАБОТЫ" — красная полоса во всю ширину, без скруглений ---- */
.works {
  background: var(--c-red);
  border-radius: 0;
  padding: 80px 0 90px;
  margin: 80px 0 0;
  width: 100%;
}
.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.works__item {
  height: 234px;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.works__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out, ease);
}
.works__item:hover img { transform: scale(1.06); }

/* ---- "ДРУГИЕ УСЛУГИ" — мини-сетка 4 карточек ---- */
.other-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ========== АДАПТАЦИЯ ========== */
@media (max-width: 1199.98px) {
  .service-hero__title { font-size: 52px; }
  .with-sticky { grid-template-columns: 1fr 340px; gap: 32px; }
  .tariff-sticky { width: 340px; padding: 24px; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .other-services { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991.98px) {
  .service-hero { min-height: 100vh; min-height: 100dvh; }
  .service-hero__top   { padding-top: 120px; }
  .service-hero > .container:last-child { padding-bottom: 80px; }
  .service-hero__title { font-size: 42px; }

  /* На планшетах sticky-плашка превращается в обычный блок поверх контента */
  .with-sticky { grid-template-columns: 1fr; gap: 24px; }
  .tariff-sticky {
    position: static;
    width: 100%;
    margin: 0 0 24px;
  }

  .features-grid { grid-template-columns: 1fr; }
  .features-grid__cell { border-right: 0 !important; padding: 24px 0 !important; }
  .features-grid__cell:nth-child(n+2) { border-top: 1px solid #d9d3cb; }

  .tariffs { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .works { padding: 40px 24px 50px; }
  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .other-services { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
  .service-hero__title { font-size: 32px; }
  .service-hero__lead  { font-size: 17px; }
  .service-section__title { font-size: 26px; }
  .menu-grid { grid-template-columns: 1fr; }
  .works__grid { grid-template-columns: 1fr; }
  .other-services { grid-template-columns: 1fr; }
  .tariff-sticky__eyebrow { font-size: 24px; }
  .tariff-sticky__price { font-size: 28px; }
}
