.page-frontend--service-page .site-main {
  margin-top: 90px;
}

@media (max-width: 1200px) {
  .page-frontend--service-page .site-main {
    margin-top: 60px;
  }
}

.service-image {
  display: block;
  width: 100vw;
  height: auto;
  aspect-ratio: 1440/330;
  object-fit: cover;
}

/* ===== Hero ===== */

.hero {
  padding-top: 52px;
  padding-bottom: 90px;
}

.hero__breadcrumbs {
  margin-bottom: 53px;
}

.hero__text {
  max-width: 1130px;
  margin: 35px 0 0 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}

@media (max-width: 1200px) {
  .service-image {
    aspect-ratio: 640/220;
  }
  
  .hero {
    padding-top: 25px;
  }
  
  .hero__breadcrumbs {
    margin-bottom: 25px;
  }
  
  .hero__text {
    margin: 25px 0 0 0;
    font-size: 14px;
  }
}

@media (max-width: 639px) {
  .service-image {
    aspect-ratio: 320/220;
  }
}

/* ===== Этапы работ ===== */

.stages {
  position: relative;
  padding: 90px 0;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

.stages::before {
  content: "";
  position: absolute;
  top: -0.5px;
  right: -1px;
  width: 183px;
  height: 153px;
  background-image: url('../img/corner-top-right.svg');
  background-position: bottom right;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 2;
}

.stages__list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--color-text-dark);
}

.stages__item {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 20px;
}

.stages__item:not(:last-child) {
  border-bottom: 2px solid rgba(36, 37, 39, 0.1);
}

.stages__item-num {
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.stages__item-text {
  font-size: 34px;
  font-weight: 400;
  line-height: 1.6;
}

.text-wrapping--mobile {
  display: none;
}

@media (max-width: 1000px) {
  .text-wrapping--mobile {
    display: inline;
  }

  .stages::before {
    background-image: url(../img/corner-small-t-r.svg);
    width: 67px;
    height: 67px;
    top: -0.5px;
    right: -1px;
  }

  .stages__list {
    margin-top: 25px;
  }

  .stages__item-text {
    font-size: 24px;
  }
}

@media (max-width: 639px) {
  .stages::before {
    right: -0.5px;
  }

  .stages__list {
    margin-top: 25px;
  }

  .stages__item-text {
    font-size: 20px;
  }
}

/* ===== Табы ===== */

.tabs-block {
  position: relative;
  display: flex;
  align-items: stretch;
  max-width: 100%;
  padding-bottom: 90px;
  overflow: hidden;
}
.tabs-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 45%;
  width: 951px;
  height: 440px;
  background-image: url(../img/service-tabs-bg.png);
  background-size: 100% 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.tabs-block__image {
  position: relative;
  width: 615px;
  height: auto;
  aspect-ratio: 615/742;
}
.tabs-block__image::before {
  content: "";
  position: absolute;
  bottom: -0.5px;
  right: -1px;
  width: 183px;
  height: 153px;
  background-image: url('../img/corner-bottom-right.svg');
  background-position: bottom right;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 2;
}

.tab-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tab-image.active {
  display: block;
}

.tabs-block__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tabs-block__tabs {
  height: 211px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px 0 95px;
  gap: 60px; 
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.tab-button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
  opacity: 0.5;
  padding: 0;
}

.tab-icon {
  width: 20px;
  height: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .tab-button:hover {
    cursor: pointer;
    opacity: 1;
  }
}

.tab-button.active {
  opacity: 1;
  font-size: 24px;
}

.tab-button.active .tab-icon {
  color: var(--color-primary);
  width: 22px;
  height: 22px;
}

.tabs-block__text {
  padding: 74px 95px 0 95px;
}

.section-title.tab-content__title {
  margin-bottom: 30px;
}

.tab-content__paragraph {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

.tab-content__paragraph:not(:last-child) {
  margin: 0 0 30px 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

@media (max-width: 1200px) {
  .tabs-block {
    flex-direction: column;
  }
  .tabs-block::before {
    top: 60%;
    left: 0;
    transform: translate(-50%, -50%);
  }
  
  .tabs-block__image {
    position: relative;
    width: 100%;
    aspect-ratio: auto;
    height: 360px;
  }
  .tabs-block__image::before {
    display: none;
  }

  .tab-image{
    width: 100%;
    aspect-ratio: auto;
    height: 100%;
    object-fit: cover; 
    object-position: 50% 20%;
  }

  .tabs-block__content {
    width: 100%;
  }
  
  .tabs-block__tabs {
    height: 120px;
    padding: 0 30px;
    justify-content: space-between;
    gap: 30px;
  }
  
  .tab-button {
    font-size: 20px;
  }
  
  .tab-icon {
    width: 18px;
    height: 18px;
  }

  .tab-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .tab-button.active .tab-icon {
    width: 18px;
    height: 18px;
  }
  
  .tabs-block__text {
    padding: 35px 30px 0 30px;
  }
  
  .section-title.tab-content__title {
    margin-bottom: 25px;
  }
  
  .tab-content__paragraph {
    font-size: 14px;
  }
  
  .tab-content__paragraph:not(:last-child) {
    margin: 0 0 25px 0;
  }
}

@media (max-width: 639px) {
  .tabs-block::before {
    top: 45%;
    left: -80px;
    transform: translate(-50%, -50%);
  }

  .tabs-block__image {
    width: 100%;
    height: 320px;
  }

  .tab-image {
    height: 320px;
  }

  .tabs-block__tabs {
    height: 85px;
    padding: 0 10px;

  }

  .tab-button {
    font-size: 14px;
    gap: 5px;
    flex-shrink: 0;
  }

  .tab-button.active {
    font-size: 16px;
    gap: 10px;
  }

  .tab-icon {
    width: 16px;
    height: 16px;
  }

  .tab-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .tab-button.active .tab-icon {
    width: 16px;
    height: 16px;
  }

  .tabs-block__text {
    padding: 35px 10px 0 10px;
  }
}

/* ===== другие услуги ===== */
.services {
  padding-bottom: 90px;
  overflow: hidden;
}

/* Обёртка swiper */
.services__slider {
  overflow: visible;
  height: 440px;
  padding-left: 40px;
  padding-right: 40px;
  max-width: 1440px;
  margin: 0 auto;
  margin-top: 19px;
}

.swiper-wrapper {
  position: relative;
  width: 100vw;
  height: fit-content;
  top: 0;
  left: 0;
}

/* Слайды */
.services__slider .swiper-slide {
  width: 670px;
  height: 440px;
  flex-shrink: 0;
}

/* Кнопки */
.services__slider-controls {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.services .swiper-button-next,
.services .swiper-button-prev {
  position: static;
  margin-top: 0;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
  width: 46px;
  height: 46px;
  padding: 0;
  flex-shrink: 0;
  background-color: rgba(173, 168, 168, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.services .swiper-button-prev::before {
  transform: rotate(180deg);
}

.services .swiper-button-next::after,
.services .swiper-button-prev::after {
  display: none;
}

.services .services__slider-btn svg {
  width: 10px;
  height: 10px;
}

.services__slider-btn--next svg {
  transform: rotate(180deg);
}

/* карточка */

.services__card {
  position: relative;
  width: calc(50% - 10px);
  width: 100%;
  height: 100%;
  text-decoration: none;
  display: block;
  overflow: hidden;
  border-radius: 5px;
}

.services__card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1;
}
.services__card-bg::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 2;
}

.services__card-bg--1 {
  background-image: 
    url('/img/grid.svg'),
    url('/img/main-services-1.jpg'); 
}

.services__card-bg--2 {
  background-image: 
    url('/img/grid.svg'),
    url('/img/main-services-2.jpg'); 
}

.services__card-bg--3 {
  background-image: 
    url('/img/grid.svg'),
    url('/img/main-services-3.jpg'); 
}

.services__card-bg--4 {
  background-image: 
    url('/img/grid.svg'),
    url('/img/main-services-4.jpg'); 
}

.services__card-bg--5 {
  background-image: 
    url('/img/grid.svg'),
    url('/img/main-services-5.jpg'); 
}

.services__card-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  right: 23px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  z-index: 3;
}

.services__card-text {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.services__card-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  flex-grow: 0;
  width: 46px;
  height: 46px;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.services__card:hover .services__card-icon {
  background-color: var(--color-primary);
}

@media (max-width: 1100px) {
  .services__slider {
    height: 220px;
    margin-top: 25px;
    padding-left: 30px;
    padding-right: 30px;
  }

  .services__slider .swiper-slide {
    width: 580px;
    height: 220px;
  }

  .services__card-content {
    bottom: 20px;
    left: 20px;
    right: 20px;
    align-items: center;
  }

  .services__card-text {
    font-size: 14px;
  }

  .services__card-icon {
    width: 26px;
    height: 26px;
  }

  .services__card-icon svg {
    width: 11px;
    height: 11px;
  }

  .services-card__corner {
    width: 50px;
    height: 50px;
  }

  .services__card-icon--top {
    width: 42px;
    height: 42px;
  }

  .services__card--all .services__card-content {
    gap: 10px;
  }

  .services__slider-controls {
    gap: 5px;
  }

  .services .swiper-button-next,
  .services .swiper-button-prev {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 639px) {
  .services__slider {
    padding: 0;
    margin: 31px 10px 0 10px;
  }

  .services__slider .swiper-slide {
    width: 100%;
    aspect-ratio: 300 / 220;
  }

  .services .swiper-button-next,
  .services .swiper-button-prev {
    width: 26px;
    height: 26px;
  }

  .services .swiper-button-next svg,
  .services .swiper-button-prev svg {
    width: 6px;
    height: 6px;
  }
}