/* --- Этапы строительства (TopBuilding-style) --- */
.home-stages {
  background: linear-gradient(180deg, #f8f9fb 0%, #f3f4f7 50%, #f8f9fb 100%);
}

.home-stages__header {
  margin-bottom: clamp(24px, 3.5vw, 36px);
  text-align: center;
}

.home-stages__header .home-section-title {
  margin-left: auto;
  margin-right: auto;
}

.home-stages__header .home-section-lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 72ch;
}

.construction-steps__tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: clamp(20px, 3vw, 28px);
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  padding: 4px 4px 8px;
}

.construction-steps__tabs::-webkit-scrollbar {
  display: none;
}

.construction-steps__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 68px;
  padding: 8px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted, #6b7280);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.construction-steps__tab:hover,
.construction-steps__tab:focus-visible {
  color: var(--home-charcoal, #171717);
  transform: translateY(-2px);
  outline: none;
}

.construction-steps__tab.is-active {
  color: var(--home-yellow, #f4be00);
}

.construction-steps__tab-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted, #6b7280);
  transition:
    color 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

.construction-steps__tab-icon svg {
  display: block;
}

.construction-steps__tab.is-active .construction-steps__tab-icon {
  color: var(--home-yellow, #f4be00);
  background: transparent;
  box-shadow:
    0 0 14px rgba(244, 190, 0, 0.55),
    0 0 28px rgba(244, 190, 0, 0.28);
  filter: drop-shadow(0 0 5px rgba(244, 190, 0, 0.75));
}

.construction-steps__tab.is-active .construction-steps__tab-label {
  color: var(--home-yellow, #f4be00);
  font-weight: 800;
}

.construction-steps__tab-label {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.construction-steps__slider {
  position: relative;
  min-height: 380px;
  padding: 0 56px;
}

.construction-steps__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--home-charcoal, #171717);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 20, 28, 0.08);
  transition:
    opacity 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.construction-steps__arrow--prev {
  left: 0;
}

.construction-steps__arrow--next {
  right: 0;
}

.construction-steps__arrow:hover:not(:disabled),
.construction-steps__arrow:focus-visible:not(:disabled) {
  border-color: rgba(244, 190, 0, 0.65);
  background: linear-gradient(145deg, #fffef5 0%, #fff8dc 100%);
  box-shadow: 0 12px 32px rgba(244, 190, 0, 0.22);
  transform: translateY(-50%) scale(1.04);
  outline: none;
}

.construction-steps__arrow:disabled,
.construction-steps__arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.construction-steps__panels {
  position: relative;
  min-height: inherit;
}

.construction-steps__panel {
  display: none;
}

.construction-steps__panel.is-active {
  display: block;
  animation: construction-steps-fade-in 0.35s ease;
}

@keyframes construction-steps-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.construction-steps__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(18px, 2.5vw, 28px);
  align-items: stretch;
  padding: clamp(18px, 2.5vw, 28px);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  box-shadow: 0 22px 50px rgba(15, 20, 28, 0.1);
  overflow: hidden;
  isolation: isolate;
}

.construction-steps__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: url("../assets/images/main/workFlow/MainCard.webp") center / cover no-repeat;
  pointer-events: none;
}

.construction-steps__step-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--home-yellow, #f4be00);
  color: var(--home-charcoal, #171717);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(244, 190, 0, 0.28);
}

.construction-steps__media {
  position: relative;
  z-index: 2;
  min-height: 300px;
  border-radius: 14px;
  overflow: hidden;
  background: #e8eaee;
}

.construction-steps__image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.construction-steps__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 8px 4px 8px 0;
}

.construction-steps__title {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--home-charcoal, #171717);
}

.construction-steps__text {
  margin: 0;
}

.construction-steps__text p {
  margin: 0 0 12px;
  font-size: clamp(14px, 1.3vw, 15px);
  line-height: 1.55;
  font-weight: 600;
  color: var(--muted, #6b7280);
}

.construction-steps__text p:last-child {
  margin-bottom: 0;
}

.construction-steps__button {
  align-self: flex-start;
  margin-top: 8px;
}

@media (max-width: 960px) {
  .construction-steps__card {
    grid-template-columns: 1fr;
  }

  .construction-steps__media,
  .construction-steps__image {
    min-height: 240px;
  }

  .construction-steps__body {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .construction-steps__slider {
    min-height: 0;
    padding: 0 44px;
  }

  .construction-steps__arrow {
    width: 40px;
    height: 40px;
  }

  .construction-steps__tab {
    min-width: 58px;
    padding: 6px 8px;
  }

  .construction-steps__tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .construction-steps__tab-label {
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .construction-steps__tabs {
    justify-content: flex-start;
  }

  .construction-steps__slider {
    padding: 0;
  }

  .construction-steps__arrow {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .construction-steps__arrow--prev {
    left: 12px;
  }

  .construction-steps__arrow--next {
    right: 12px;
  }

  .construction-steps__arrow:hover:not(:disabled),
  .construction-steps__arrow:focus-visible:not(:disabled) {
    transform: scale(1.04);
  }

  .construction-steps__card {
    padding-bottom: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .construction-steps__panel.is-active {
    animation: none;
  }

  .construction-steps__tab,
  .construction-steps__arrow {
    transition: none;
  }
}
