.plans {
  border-radius: 40px 40px 0px 0px;
  background: -webkit-gradient(linear, left top, left bottom, color-stop(48.25%, #EAF0FF), to(#FFF));
  background: linear-gradient(180deg, #EAF0FF 48.25%, #FFF 100%);
  padding: 89px 0 49px;
}

.plans .title {
  font-family: "Unbounded";
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: #181717;
  margin-bottom: 24px;
  text-align: center;
}

.plans .description {
  font-size: 16px;
  line-height: 1.5;
  color: #575757;
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
}

@media (max-width: 767px) {
  .plans {
    padding-top: 73px;
  }
  
  .plans .title {
    font-size: 32px;
    margin-bottom: 16px;
    padding: 0 20px;
  }
  
  .plans .description {
    font-size: 14px;
    margin-bottom: 32px;
    padding: 0 20px;
  }
}

.plans .pricing {
  position: relative;
  margin-bottom: 40px;
}
.plans .pricing .text {
  max-width: 100%;
  margin-bottom: 40px;
}
.plans .selectors-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.plans .pricing .name {
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 28px;
}
.plans .pricing .name.cpu {
  background-image: url("../img/CPU.svg");
  background-size: 22px 22px;
  background-position: left -2px center;
}
.plans .pricing .name.ram {
  background-image: url("../img/RAM.svg");
  background-size: 18px 18px;
}
.plans .pricing .name.disk {
  background-image: url("../img/Disk.svg");
  background-size: 18px 18px;
}
.plans .pricing .block {
  -webkit-box-flex: 1;
      -ms-flex: 1 0;
          flex: 1 0;
  border-radius: 34px;
  background: #FFF;
  padding: 38px 37px 47px;
  color: #181717;
}
@media (max-width: 991px) {
  .plans .pricing .block {
    padding: 30px;
  }
}
@media (max-width: 767px) {
  .plans .pricing .block {
    padding: 38px 20px 44px !important;
  }
  .plans .pricing .block .title {
    padding: 0 40px 0 17px;
  }
}
.plans .pricing .block.cplan {
  max-width: 23.75%;
}
@media (max-width: 991px) {
  .plans .pricing .block.cplan {
    max-width: 38%;
  }
}
@media (max-width: 767px) {
  .plans .pricing .block.cplan {
    max-width: 100%;
    min-width: 100%;
  }
  .plans .pricing .block.cplan .title {
    margin-bottom: 26px;
  }
}
.plans .pricing .block .data {
  font-size: 14px;
  color: #48494C;
  margin-top: 12px;
}
.plans .pricing .block.resources {
  padding-bottom: 27px;
}
@media (max-width: 991px) {
  .plans .pricing .block.resources {
    max-width: 62%;
  }
}
@media (max-width: 767px) {
  .plans .pricing .block.resources {
    max-width: 100%;
    min-width: 100%;
  }
}
.plans .pricing .block.resources .title {
  margin-bottom: 27px;
}
@media (max-width: 767px) {
  .plans .pricing .block.resources .title {
    margin-bottom: 32px;
  }
}
.plans .pricing .block.resources .blocks {
  gap: 36px;
}
@media (max-width: 767px) {
  .plans .pricing .block.resources .blocks {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 31px;
  }
}
.plans .pricing .block.resources .blocks + .block-wrap {
  margin-top: 28px;
}
@media (max-width: 767px) {
  .plans .pricing .block.resources .blocks + .block-wrap {
    margin-top: 31px;
  }
}
.plans .pricing .block.resources .blocks .block-wrap {
  -webkit-box-flex: 1;
      -ms-flex: 1 0;
          flex: 1 0;
}
.plans .pricing .block.resources .scores {
  margin-bottom: 9px;
  width: 100%;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
}
@media (max-width: 767px) {
  .plans .pricing .block.resources .scores {
    margin-bottom: 8px;
  }
}
.plans .pricing .block.resources .scores .name,
.plans .pricing .block.resources .scores .score {
  font-weight: 700;
  font-size: 14px;
}
.plans .pricing .block.resources .i-wrap input {
  width: 100%;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: transparent;
  outline: none;
  margin: 0;
}
.plans .pricing .block.resources .i-wrap input::-webkit-slider-runnable-track {
  position: relative;
  height: 3px;
  outline: none;
  background-color: #C6E5FC;
  border-radius: 6px;
}
.plans .pricing .block.resources .i-wrap input::-moz-range-track {
  position: relative;
  height: 3px;
  outline: none;
  background-color: #C6E5FC;
  border-radius: 6px;
}
.plans .pricing .block.resources .i-wrap input::-webkit-slider-thumb {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  -webkit-appearance: none;
          appearance: none;
  outline: none;
  position: relative;
  background-color: #5061FF;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  top: 50%;
  translate: 0 -50%;
}
.plans .pricing .block.resources .i-wrap input::-moz-range-thumb {
  box-sizing: border-box;
  -moz-appearance: none;
       appearance: none;
  position: relative;
  background-color: purple;
  border: 2px solid white;
  border-radius: 8px;
  width: 24px;
  height: 24px;
  top: 50%;
  translate: 0 -50%;
}
.plans .pricing .block .title {
  font-family: "Unbounded";
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.44px;
  margin-bottom: 23px;
}
.plans .pricing .block .scores {
  margin-bottom: 21px;
}
.plans .pricing .block .total {
  margin: 31px 0 0;
  border-bottom: 1px solid #E1E1E1;
  padding-bottom: 7px;
}
@media (max-width: 767px) {
  .plans .pricing .block .total {
    margin-top: 36px;
  }
}
.plans .pricing .block .total .name,
.plans .pricing .block .total .score {
  font-weight: 700;
  text-transform: unset;
  padding-left: 0;
}
.plans .name {
  font-weight: 500;
}
.plans .dotted {
  -webkit-box-flex: 1;
      -ms-flex: 1 0;
          flex: 1 0;
  border-bottom: 1px dotted #A0A0A0;
  margin: 0 14px 0 11px;
}
.plans .score {
  text-align: right;
  font-size: 16px;
  font-weight: 500;
}
.plans .currency {
  margin-top: 70px;
  border-radius: 12px;
  background: #FFF;
  max-width: -webkit-max-content;
  max-width: -moz-max-content;
  max-width: max-content;
  margin-left: auto;
  padding: 4px;
}
@media (max-width: 767px) {
  .plans .currency {
    display: none;
  }
}
.plans .currency button {
  color: #181717;
  font-family: "TT Norms Pro";
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  border-radius: 8px;
  -webkit-transition: all 0.3s linear;
  transition: all 0.3s linear;
  padding: 5px 9px;
}
.plans .currency button.active {
  background: #EBF1FF;
  font-weight: 500;
}

.plans-b {
  margin-top: -10px;
  padding: 27px;
  border-radius: 34px;
  display: flex;
  overflow-x: auto;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  user-select: none;
  background: #FFF;
}

.plans-b .block {
  flex: 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  color: #181717;
  padding: 32px 20px 56px;
  min-width: 200px;
  position: relative;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Первый блок */
.plans-b .block:first-child {
  border-top-left-radius: 34px;
  border-bottom-left-radius: 34px;
}

/* Последний блок */
.plans-b .block:last-child {
  border-top-right-radius: 34px;
  border-bottom-right-radius: 34px;
}

/* Разделители между блоками */
.plans-b .block:not(:last-child):not(.best)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-181px);
  width: 1px;
  height: 362px;
  background: #E4E4E4;
}

/* Мобильные стили */
@media (max-width: 767px) {
  .plans-b {
    flex-wrap: wrap;
    margin-top: 49px;
    overflow-x: visible;
  }

  .plans-b .block {
    
  }

  .plans-b .block:first-child {
    border-radius: 34px 34px 0 0;
  }

  .plans-b .block:last-child {
    border-radius: 0 0 34px 34px;
  }

  .plans-b .block:not(:last-child):not(.best)::after {
    width: 240px;
    height: 1px;
    left: 50%;
    top: unset;
    right: unset;
    bottom: 0;
    transform: translateX(-50%);
  }
}

.plans-b .block:not(:last-child):not(.best) {
  position: relative;
}
.plans-b .block.best {
  -webkit-box-shadow: 0px 6px 30px 0px rgba(11, 55, 96, 0.1);
          box-shadow: 0px 6px 30px 0px rgba(11, 55, 96, 0.1);
  border-radius: 34px;
  background: #FFF;
  padding-top: 59px;
  margin-top: -27px;
  margin-left: -1px;
  position: relative;
  z-index: 9;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 767px) {
  .plans-b .block.best {
    margin: -1px -11px 0;
  }
}
.plans-b .block.best:hover {
  transform: scale(1.03);
  box-shadow: 0px 8px 40px rgba(11, 55, 96, 0.15);
  transition-duration: 0.3s;
}
.plans-b .block.best .filled {
  background: #5061FF;
  color: #ffffff;
  border-color: #5061FF;
}
.plans-b .block.best::after {
  content: attr(data-text);
  color: #FFF;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  position: absolute;
  top: 25px;
  right: 0;
  -webkit-transform: rotate(45deg);
      -ms-transform: rotate(45deg);
          transform: rotate(45deg);
}

.plans-b .block .num {
  text-align: center;
  font-family: "Unbounded";
  font-size: 20px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.44px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.plans-b .block .num .tariff-title {
  display: inline-block;
  font-size: clamp(12px, 2vw, 20px);
  font-weight: inherit;
  text-align: center;
  word-break: break-word;
  white-space: normal;
  line-height: 1.1;
  min-width: 0;
  vertical-align: middle;
  max-width: 90%;
}

.plans-b .block .sum {
  font-size: 48px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: -0.96px;
  margin-top: 19px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.05s;
}
.plans-b .block .sum sup {
  color: #575757;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.44px;
  margin-bottom: -4px;
  vertical-align: 11px;
}
.plans-b .block .filled {
  min-width: 140px;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
.plans-b .block .filled.out-of-stock {
    background-color: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
    border: 1px solid #d1d5db;
}

.plans-b .block .filled.out-of-stock:hover {
    background-color: #e5e7eb;
    color: #6b7280;
    transform: none;
}

.plans-b .block .scores {
  margin-top: 26px;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  max-width: 176px;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.2s;
}
@media (max-width: 767px) {
  .plans-b .block .scores {
    margin-top: 22px;
  }
}
.plans-b .block .scores + .scores {
  margin-top: 0;
}
.plans-b .block .flags {
  margin-top: 12px;
  gap: 40px;
}
@media (max-width: 767px) {
  .plans-b .block .flags {
    margin-top: 16px;
  }
}

.plans-b.grabbing {
  cursor: grabbing;
}

.server-type-selector,
.location-selector,
.tariff-selector {
  display: flex;
  gap: 1px;
  background: transparent;
  padding: 0;
  justify-content: center;
  position: relative;
  opacity: 1;
  max-height: 100px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.server-type-selector button,
.location-selector button,
.tariff-selector button {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  min-height: 32px;
  border-radius: 0;
}

.server-type-selector button:hover,
.location-selector button:hover,
.tariff-selector button:hover {
  color: #181717;
}

.server-type-selector button.active,
.location-selector button.active,
.tariff-selector button.active {
  color: #181717;
  font-weight: 600;
}

.server-type-selector button.active::before,
.location-selector button.active::before,
.tariff-selector button.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background-color: #181717;
  transition: all 0.3s ease;
}

.server-type-selector button:hover::after,
.location-selector button:hover::after,
.tariff-selector button:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background-color: #181717;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.location-selector button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-selector img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .server-type-selector button,
  .location-selector button,
  .tariff-selector button {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 30px;
  }

  .server-type-selector button.active::before,
  .location-selector button.active::before,
  .tariff-selector button.active::before {
  }
}

@media (max-width: 991px) {
  .plans .pricing {
    grid-template-columns: 1fr;
  }
  
  .plans .selectors-wrapper {
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
  }
}

.plans-b .block.changing {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.plans-b .block .num,
.plans-b .block .sum,
.plans-b .block .scores,
.plans-b .block .flags,
.plans-b .block .filled {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plans-b .block.changing .num,
.plans-b .block.changing .sum,
.plans-b .block.changing .scores,
.plans-b .block.changing .flags,
.plans-b .block.changing .filled {
  opacity: 0;
  transform: translateY(10px);
}

/* Задержки для каскадной анимации */
.plans-b .block .num { transition-delay: 0.05s; }
.plans-b .block .sum { transition-delay: 0.1s; }
.plans-b .block .filled { transition-delay: 0.15s; }
.plans-b .block .scores:nth-of-type(1) { transition-delay: 0.2s; }
.plans-b .block .scores:nth-of-type(2) { transition-delay: 0.25s; }
.plans-b .block .scores:nth-of-type(3) { transition-delay: 0.3s; }
.plans-b .block .scores:nth-of-type(4) { transition-delay: 0.35s; }
.plans-b .block .flags { transition-delay: 0.4s; }

/* Сброс задержек при исчезновении */
.plans-b .block.changing .num,
.plans-b .block.changing .sum,
.plans-b .block.changing .scores,
.plans-b .block.changing .flags,
.plans-b .block.changing .filled {
  transition-delay: 0s;
}

.no-tariffs {
  width: 100%;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: #FFF;
  border-radius: 34px;
}

.no-tariffs-message {
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
  color: #666;
  max-width: 400px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tariff-selector[style*="display: none"] {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
}

.selectors-wrapper .tariff-selector[style*="display: none"] + * {
  margin-top: -16px; /* Компенсируем gap при скрытом селекторе */
}

.plans-b .block .setup-fee {
    font-size: 14px;
    color: #666;
    margin: -10px 0 15px;
    text-align: center;
}

.plans-b .block .setup-fee[style*="color: #ff4444"] {
    font-weight: 500;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.tariff-selector button.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #9ca3af;
}

.flags.flex {
    align-items: center;
    gap: 8px;
}

.info-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.info-icon:hover svg path {
    fill: #5061FF;
}

@media (max-width: 767px) {
    .info-icon {
        width: 14px;
        height: 14px;
    }
    .flags.flex {
        gap: 6px;
    }
}

/* Стили для модального окна */
.promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.promo-modal-content {
    background: #FFF;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.promo-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E4E4E4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.promo-modal-header h3 {
    font-family: "Unbounded";
    font-size: 20px;
    font-weight: 600;
    color: #181717;
    margin: 0;
}

.promo-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.promo-modal-close:hover {
    background: #f3f4f6;
    color: #181717;
}

.promo-modal-body {
    padding: 24px;
}

.promo-modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.promo-modal-body li {
    padding: 12px 0;
    color: #575757;
    font-size: 16px;
    line-height: 1.5;
    border-bottom: 1px solid #E4E4E4;
}

.promo-modal-body li:last-child {
    border-bottom: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .plans-b .block .num {
        font-size: 18px;
    }
    .plans-b .block .num .tariff-title {
        font-size: clamp(12px, 3vw, 18px);
    }
}
