/* СТОИМОСТЬ РАБОТ */

.section.cost-modern,
.cost-modern {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: #fff;
  color: #111;
  padding: 60px 0 70px;
}

.cost-modern__inner {
  position: relative;
  z-index: 2;
}

/* ЗАГОЛОВОК */

.cost-modern__header {
  max-width: 1250px;
  margin: 0 auto 36px;
  text-align: center;
}

.cost-modern__title {
  margin: 0 0 10px;
  font-size: 44px;
  font-weight: 700;
  color: #111;
}

.cost-modern__subtitle {
  margin: 0;
  font-size: 28px;
  color: #333;
}

/* ВЬЮПОРТ + СТРЕЛКИ */

.cost-modern__viewport {
  position: relative;
  max-width: 1150px;   
  margin: 0 auto 32px; 
  padding: 0 80px;    
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}


.cost-modern__grid {
  position: relative;
  max-width: 1050px;
  width: 100%;
  min-height: 190px;
  margin: 0 auto;

  /* расстояние между левой и правой от центра */
  --card-shift: 550px;
}


/* центр */
.cost-card.is-center {
  opacity: 1;
  transform: translateX(var(--slide-x)) scale(1.02) translateY(0);
  filter: grayscale(0);
  pointer-events: auto;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* боковые */
.cost-card.is-left,
.cost-card.is-right {
  opacity: 0.85;
  transform: translateX(var(--slide-x)) scale(0.95) translateY(8px);
  pointer-events: auto;
}

/* БАЗОВАЯ КАРТОЧКА */
.cost-card {
  position: absolute;
  top: 0;
  left: 50%;

  width: min(520px, 100%);
  padding: 20px 22px 22px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  border: 1px solid rgba(0,0,0,0.05);

  display: flex;
  flex-direction: column;
  gap: 10px;

  opacity: 0;
  filter: grayscale(0.35);
  pointer-events: none;

  /* базовое положение */
  transform: translateX(-50%);
  transform-origin: center center;
  will-change: transform, opacity;

  transition:
    transform 0.45s ease,
    opacity 0.45s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease;
}

/* ЛЕВАЯ КАРТОЧКА */
.cost-card.is-left {
  opacity: 0.8;
  pointer-events: auto;

  transform:
    translateX(calc(-50% - var(--card-shift)))
}

/* ЦЕНТРАЛЬНАЯ КАРТОЧКА */
.cost-card.is-center {
  opacity: 1;
  pointer-events: auto;
  filter: grayscale(0);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);

  transform:
    translateX(-50%)
}

/* ПРАВАЯ КАРТОЧКА */
.cost-card.is-right {
  opacity: 0.8;
  pointer-events: auto;

  transform:
    translateX(calc(-50% + var(--card-shift)))

}

/* Остальные – спрятаны */
.cost-card.is-hidden {
  opacity: 0;
  pointer-events: none;


  transform:
    translateX(-50%)
}

/* содержимое плашек */

.cost-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #d5aa58;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);

  color: #111; 
}


.cost-card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #111;
}

.cost-card__text {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #555;
}

.cost-card__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 17px;
  color: #333;
}

.cost-card__list li + li {
  margin-top: 4px;
}

.cost-card__btn {
  margin-top: 16px;
  align-self: flex-start;
}

.button.button--ghost.cost-card__btn {
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid #d5aa58;
  background: #fffaf0;
  color: #5a430e;
  font-size: 15px;

  box-shadow: 0 4px 10px rgba(0,0,0,0.25);

  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
  .button.button--ghost.cost-card__btn:hover {
    background-color: #d5aa58;
    color: #151515;
    box-shadow: 0 10px 22px rgba(0,0,0,0.45);
  }
}

/* лёгкий клик только через тень */
.button.button--ghost.cost-card__btn:active {
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* фокус для таба */
.button.button--ghost.cost-card__btn:focus-visible {
  outline: 2px solid rgba(213,170,88,0.9);
  outline-offset: 2px;
}

/* стрелки */

.cost-modern__arrow {
  position: absolute;
  top: 95%;
  transform: translateY(-50%);   

  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.9);
  color: #444;
  display: inline-flex;
  display: flex;                
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);

  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}


/* левая и правая — только по X */
.cost-modern__arrow--prev {
  left: -300px;  
}

.cost-modern__arrow--next {
  right: -300px;
}

/* На узком вертикальном экране держим стрелки внутри вьюпорта. */
@media (min-width: 769px) and (max-width: 1180px) {
  .cost-modern__viewport {
    max-width: 100%;
    padding-inline: 72px;
  }

  .cost-modern__arrow {
    z-index: 20;
  }

  .cost-modern__arrow--prev {
    left: 14px;
  }

  .cost-modern__arrow--next {
    right: 14px;
  }
}

.cost-modern__arrow:hover {
  background: #f2e0b2;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transform: translateY(-52%);
}

/* Общие данные */

.cost-modern__rates {
  margin-top: 200px;
}

.cost-modern__rates-title {
  margin: 0 0 18px;
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  color: #222;
}

.cost-rates {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.cost-rate {
  padding: 14px 10px 16px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);

  /* анимация появления/исчезания */
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* при пустой подписи — делаем приглушённой */
.cost-rate.is-empty {
  opacity: 0.35;
}

/* при обновлении — уходим в ноль (поверх всего) */
.cost-rate.is-updating {
  opacity: 0;
}

/* по умолчанию без дергания */
.cost-modern:not(.is-ready) .cost-rate {
  transition: none !important;
  opacity: 1 !important;
}

.cost-rate__value {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.cost-rate__value span {
  font-size: 22px;
}

.cost-rate__label {
  margin: 0;
  font-size: 16px;
  color: #555;
}
