/* st-stages.css — блок «Этапы ремонта и отделки квартир» на главной (только стили; разметка, тексты и скрипт вкладок не меняются).
   Разметка: .stages-repair > .stages-repair-controls (стрелки) + .stages-repair-new-list-switches-cover > …-wrapper > .switch[data-rep-stage]
             + .stages-repair-new-list-content-wrapper > .content[data-rep-content].active > .img.bg-lazy + .text (.holder-scroll-wrap, .order)
   Открытие/закрытие панелей и прокрутку вкладок делает скрипт шаблона: display у неактивных панелей, overflow/transform у cover/wrapper вкладок не переопределяются.
   Подключать после adaptiv.css. */
#content .stages-repair{
  --sr-ink:#2D3440;--sr-mut:#4A5260;--sr-line:#E3E3E3;--sr-or:#FD8900;--sr-cream:#FFF7EC;
  box-sizing:border-box;background:#fff;border:1px solid var(--sr-line);border-radius:18px;box-shadow:none;
}

/* ---------- вкладки-этапы ---------- */
#content .stages-repair .stages-repair-new-list-switch{
  position:relative;display:inline-flex!important;align-items:center;gap:10px;flex:0 0 auto;box-sizing:border-box;
  margin:0 8px 0 0!important;padding:9px 16px 9px 10px!important;white-space:nowrap;cursor:pointer;
  background:#fff!important;border:1px solid var(--sr-line)!important;border-radius:999px!important;box-shadow:none!important;
  font-size:15px!important;line-height:1.2!important;font-weight:600!important;color:var(--sr-ink)!important;
  transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}
/* номер этапа берётся из data-rep-stage */
#content .stages-repair .stages-repair-new-list-switch::before{
  content:attr(data-rep-stage)!important;position:static!important;display:inline-flex!important;align-items:center;justify-content:center;
  flex:none;width:26px!important;height:26px!important;margin:0!important;border-radius:50%!important;
  background:#F3F4F6!important;color:var(--sr-ink)!important;font-size:13px!important;line-height:1!important;font-weight:800!important;
  transform:none!important;border:0!important;
}
#content .stages-repair .stages-repair-new-list-switch::after{content:none!important;display:none!important}
#content .stages-repair .stages-repair-new-list-switch.active{background:var(--sr-cream)!important;border-color:var(--sr-or)!important}
#content .stages-repair .stages-repair-new-list-switch.active::before{background:linear-gradient(135deg,#FE5248,#FD8507)!important;color:#fff!important}
@media (hover:hover){
  #content .stages-repair .stages-repair-new-list-switch:hover{border-color:var(--sr-or)!important}
}

/* остатки шаблона: серая линия под вкладками и большой зазор до панели */
#content .stages-repair .stages-repair-new-list-switches-cover,
#content .stages-repair .stages-repair-new-list-switches-wrapper{border:0!important;box-shadow:none!important;background-image:none!important}
#content .stages-repair .stages-repair-new-list-switches-cover{padding-bottom:4px!important;margin-bottom:0!important}
#content .stages-repair .stages-repair-new-list-content-wrapper{margin-top:20px!important;padding-top:0!important}
#content .stages-repair .stages-repair-new-list-content{margin-top:0!important}

/* скроллбар ленты вкладок (1px серая полоска) скрыт; прокрутка стрелками и скриптом продолжает работать */
#content .stages-repair .stages-repair-new-list-switches-wrapper,
#content .stages-repair .stages-repair-new-list-switches-cover{scrollbar-width:none;-ms-overflow-style:none}
#content .stages-repair .stages-repair-new-list-switches-wrapper::-webkit-scrollbar,
#content .stages-repair .stages-repair-new-list-switches-cover::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;-webkit-appearance:none}
#content .stages-repair .stages-repair-new-list-switches-wrapper::-webkit-scrollbar-thumb{background:transparent!important;box-shadow:none!important}
/* отступ снизу у обёртки вкладок (margin:0 0 20px в шаблоне) складывался с отступом панели */
#content .stages-repair .stages-repair-new-list-switches-wrapper{margin:0!important}

/* ---------- стрелки ---------- */
#content .stages-repair .stages-repair-control{transition:background-color .2s ease,color .2s ease,border-color .2s ease}
@media (hover:hover){
  #content .stages-repair .stages-repair-control:not(:disabled):hover{background:var(--sr-or)!important;color:#fff!important}
}
#content .stages-repair .stages-repair-control:focus-visible{outline:3px solid var(--sr-ink);outline-offset:2px}

/* ---------- панель этапа ---------- */
#content .stages-repair .stages-repair-new-list-content.active{
  display:grid!important;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:28px;align-items:stretch;
}
#content .stages-repair .stages-repair-new-list-content-img{
  width:auto!important;max-width:none!important;float:none!important;margin:0!important;
  align-self:stretch;aspect-ratio:auto;min-height:340px!important;height:auto!important;border-radius:14px!important;overflow:hidden;
  background-size:cover!important;background-position:80% 50%!important;background-repeat:no-repeat!important;
}
#content .stages-repair .stages-repair-new-list-content-text{
  display:flex!important;flex-direction:column;gap:18px;min-width:0;width:auto!important;height:auto!important;margin:0!important;padding:0!important;
}
/* текст этапа читается целиком, без внутренней прокрутки и обрезки */
#content .stages-repair .holder-scroll-wrap,
#content .stages-repair .holder-scroll-cover{height:auto!important;max-height:none!important;overflow:visible!important}
#content .stages-repair .holder-scroll-cover{padding-right:0!important}
#content .stages-repair .stages-repair-new-list-content-text p{
  margin:0 0 12px!important;font-size:16px!important;line-height:1.65!important;font-weight:400!important;color:var(--sr-mut)!important;
}
#content .stages-repair .stages-repair-new-list-content-text p:last-child{margin-bottom:0!important}
#content .stages-repair .stages-repair-new-list-content-text a{color:var(--sr-ink);text-decoration:underline;text-decoration-color:var(--sr-or);text-underline-offset:3px}

/* ---------- блок цены и кнопка ---------- */
#content .stages-repair .stages-repair-new-list-content-order{
  box-sizing:border-box;margin:auto 0 0!important;padding:18px 20px 20px!important;
  background:var(--sr-cream)!important;border:1px solid #F0DEC6!important;border-radius:14px!important;box-shadow:none!important;
}
#content .stages-repair .stages-repair-new-list-content-order-info{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0 0 14px!important}
#content .stages-repair .stages-repair-new-list-content-order-info p{margin:0!important;padding:0!important}
#content .stages-repair p.stages-repair-new-list-content-order-info-explane{font-size:14px!important;line-height:1.3!important;font-weight:600!important;color:var(--sr-mut)!important}
#content .stages-repair p.stages-repair-new-list-content-order-info-price{white-space:nowrap;font-size:22px!important;line-height:1.2!important;font-weight:800!important;color:var(--sr-ink)!important}
#content .stages-repair .stages-repair-new-list-content-order-btn{
  display:block!important;box-sizing:border-box;width:100%!important;padding:14px 20px!important;text-align:center;text-decoration:none!important;
  background:linear-gradient(135deg,#FE5248,#FD8507)!important;color:#fff!important;border:0!important;border-radius:12px!important;
  font-size:17px!important;line-height:1.2!important;font-weight:800!important;box-shadow:0 8px 18px rgba(254,82,72,.22)!important;
  transition:transform .2s ease,box-shadow .2s ease;
}
@media (hover:hover){
  #content .stages-repair .stages-repair-new-list-content-order-btn:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(254,82,72,.3)!important}
}
#content .stages-repair .stages-repair-new-list-content-order-btn:focus-visible{outline:3px solid var(--sr-ink);outline-offset:2px}

/* ---------- адаптив ---------- */
@media (max-width:900px){
  #content .stages-repair .stages-repair-new-list-content.active{grid-template-columns:1fr;gap:18px}
  #content .stages-repair .stages-repair-new-list-content-img{align-self:stretch;aspect-ratio:5/3;min-height:0!important}
}
@media (max-width:560px){
  #content .stages-repair{border-radius:14px}
  #content .stages-repair .stages-repair-new-list-switch{padding:8px 14px 8px 8px!important;font-size:14px!important;gap:8px}
  #content .stages-repair .stages-repair-new-list-switch::before{width:24px!important;height:24px!important;font-size:12px!important}
  #content .stages-repair .stages-repair-new-list-content-text p{font-size:15px!important}
  #content .stages-repair .stages-repair-new-list-content-order{padding:16px!important}
  #content .stages-repair p.stages-repair-new-list-content-order-info-price{font-size:20px!important}
}

/* v5: стрелки на мобильном — в строке вкладок справа, а не поверх текста */
@media (max-width:900px){
  #content .stages-repair .stages-repair-controls{position:absolute!important;top:5px!important;right:14px!important;left:auto!important;bottom:auto!important;width:auto!important;height:56px!important;display:flex!important;align-items:center;gap:8px!important;margin:0!important;transform:none!important;z-index:3;pointer-events:none}
  #content .stages-repair .stages-repair-control{position:static!important;pointer-events:auto;width:36px!important;height:36px!important;min-width:0!important;margin:0!important;padding:0!important;transform:none!important;border-radius:50%!important;border:1px solid var(--sr-line)!important;background:#fff!important;color:var(--sr-ink)!important;box-shadow:0 2px 8px rgba(45,52,64,.12)!important;display:flex!important;align-items:center;justify-content:center;font-size:20px;line-height:1}
  #content .stages-repair .stages-repair-control svg{width:14px!important;height:14px!important}
  #content .stages-repair .stages-repair-new-list-switches-cover{margin-right:88px!important}
}
@media (prefers-reduced-motion:reduce){#content .stages-repair *{transition:none!important}}
