.cases-tags {
  padding-top: 20px;
  margin-top: 11.5rem;
}

.cases-tags__list {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cases-tags__item {
  position: relative;
  flex-shrink: 0;
}

.cases-tags__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #474949;
  border-radius: 8px;
  background: transparent;
  color: #f4f4f4;
  font-family: inherit;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
}

.cases-tags__link:hover {
  border-color: #f8f1df;
  color: #f8f1df;
}

.cases-tags__item.is-active > .cases-tags__link,
.cases-tags__item.is-open > .cases-tags__link {
  background: #323434;
  border-color: #f8f1df;
  color: #f8f1df;
}

.cases-tags__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 211px;
  border-radius: 8px;
  overflow: hidden;
  display: none;
  z-index: 30;
}

.cases-tags__item.is-open .cases-tags__dropdown {
  display: block;
}

@media (hover: hover) {
  .cases-tags__item--parent::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
  }

  .cases-tags__item--parent:hover .cases-tags__dropdown {
    display: block;
  }

  .cases-tags__item--parent:hover > .cases-tags__link {
    background: #323434;
    border-color: #f8f1df;
    color: #f8f1df;
  }
}

.cases-tags__dropdown-item {
  display: block;
  padding: 12px 16px;
  background: #323434;
  color: #f8f1df;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cases-tags__dropdown-item + .cases-tags__dropdown-item {
  border-top: 1px solid #474949;
}

.cases-tags__dropdown-item:hover,
.cases-tags__dropdown-item.is-active {
  background: #474949;
}
.case-page-main {
  margin-top: 2.5rem;
}
.cases-list__title {
  margin: 0 0 48px;
  font-size: 48px;
  line-height: 58px;
  font-weight: 600;
  color: #f8f1df;
}

.cases-list__items {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.cases-list__empty {
  color: #f4f4f4;
}

.case-card {
  display: flex;
  align-items: stretch;
  gap: 24px;
  border-bottom: 1px solid #323434;
  padding-bottom: 40px;
}

.case-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 580px;
  flex-shrink: 0;
}

.case-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.case-card__title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
}

.case-card__num {
  color: #f8f1df;
}

.case-card__title {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: #f4f4f4;
  padding-bottom: 24px;
}

.case-card__subtitle {
  font-size: 16px;
  line-height: 24px;
    margin-bottom: 10px;
  color: rgba(248, 241, 223, 0.5);
}

.case-card__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.case-card__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
}

.case-card__field-label {
  color: rgba(255, 255, 255, 0.5);
}

.case-card__field-value {
  color: #f4f4f4;
}

.case-card__field-value b,
.case-card__field-value strong {
  font-weight: 700;
}

.case-card__btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 56px;
  padding: 0 68px 0 32px;
  background: #474949;
  border-radius: 12px;
  color: #f8f1df;
  font-size: 16px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.case-card__btn:hover {
  background: #5a5c5c;
}

.case-card__btn-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #1e2020;
  border-radius: 8px;
}

.case-card__img {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
}

.case-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card__img--mobile {
  display: none;
}

.cases-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.cases-pagination__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  background: #323434;
  border-radius: 12px;
  color: #f8f1df;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

a.cases-pagination__item:hover {
  background: #474949;
}

.cases-pagination__item.current {
  background: #474949;
  color: #f8f1df;
}

.cases-pagination__item.is-disabled {
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.cases-pagination__item.dots {
  pointer-events: none;
}

.case-detail .block-main {
  padding-bottom: 2rem;
}

.case-detail__title {
  margin: 0 0 48px;
  font-size: 48px;
  line-height: 58px;
  font-weight: 600;
  color: #f8f1df;
}

.case-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 24px;
  padding: 1rem;
  background: var(--color-card-bg, #323434);
  border-radius: 1.5rem;
}

.case-detail__tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6875rem 1.25rem;
  border: solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: rgba(248, 241, 223, 0.05);
  color: var(--color-primary, #f8f1df);
  font-size: 0.875rem;
  line-height: 0.875rem;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.case-detail__tag:hover {
  border-color: rgba(248, 241, 223, 0.4);
  background: rgba(248, 241, 223, 0.1);
}

.case-detail__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid #323434;
  padding-bottom: 48px;
}

.case-detail__intro {
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.case-detail__intro .case-detail__text--intro {
  flex: 1 1 0;
  min-width: 0;
}

.case-detail__subtitle {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 32px;
  font-weight: 500;
  color: #f8f1df;
}

.case-detail__text {
  width: 100%;
  font-size: 16px;
  line-height: 24px;
  color: #f4f4f4;
}

.case-detail__text p {
  margin: 0 0 16px;
}

.case-detail__text p:last-child {
  margin-bottom: 0;
}

.case-detail__text b,
.case-detail__text strong {
  font-weight: 700;
}

.case-detail__text a {
  color: #f8f1df;
  text-decoration: underline;
}

.case-detail blockquote {
  position: relative;
  display: block;
  margin: 16px 0;
  padding: 16px 16px 16px 52px;
  border: 1px solid #f8f1df;
  border-radius: 8px;
  color: #f8f1df;
  font-size: 16px;
  line-height: 24px;
}

.case-detail blockquote::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 16px;
  width: 20px;
  height: 18px;
  background: url("../img/cases-new/quote-icon.png") no-repeat center / contain;
}

.case-detail blockquote p {
  margin: 0 0 16px;
  color: #f8f1df;
}

.case-detail blockquote p:last-child {
  margin-bottom: 0;
}

.case-detail__slider-wrap {
  display: flex;
  gap: 16px;
  flex: 1 1 0;
  min-width: 0;
  height: 520px;
}

.case-detail__slider {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
}

.case-detail__slide-img {
  display: block;
  width: 100%;
  height: 100%;
}

.case-detail__slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-detail__slider-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 99px;
  height: 100%;
  padding: 8px;
  background: #323434;
  border-radius: 32px;
  flex-shrink: 0;
}

.case-detail__slider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  border: none;
  background: #474949;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.case-detail__slider-btn:hover {
  background: #5a5c5c;
}

.case-detail__slider-btn--next {
  border-radius: 24px 24px 8px 8px;
}

.case-detail__slider-btn--prev {
  border-radius: 8px 8px 24px 24px;
}

.case-detail__slider-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 61px;
  height: 32px;
  background: #323434;
  border-radius: 8px;
  color: #f8f1df;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  z-index: 2;
}

.case-detail__features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
}

.case-detail__feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid #323434;
  padding-bottom: 24px;
}

.case-detail__feature-title {
  font-size: 26px;
  line-height: 32px;
  font-weight: 500;
  color: #f8f1df;
}

.case-detail__feature-text {
  font-size: 16px;
  line-height: 24px;
  color: #f4f4f4;
}

.case-form {
  margin-top: 24px;
  margin-bottom: 10rem;
  @media (width<768px) {
    margin-bottom: 3rem;
  }
}

.case-form__container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px;
  background: #323434;
  border-radius: 8px;
  overflow: hidden;
}

.case-form__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 671px;
  width: 100%;
}

.case-form__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.case-form__title {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
  color: #f8f1df;
}

.case-form__line {
  width: 100%;
  height: 1px;
  border-radius: 2px;
  background: linear-gradient(to left, #f8f1df, rgba(248, 241, 223, 0));
}

.case-form__description {
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.5);
}

.case-form__wrapper {
  max-width: 671px;
  width: 100%;
}

.case-form__form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.case-form__row {
  display: flex;
  gap: 15px;
  width: 100%;
}

.case-form__row .input {
  flex: 1 1 0;
  min-width: 0;
}

.case-form .input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.case-form .input-label {
  font-size: 14px;
  line-height: 18px;
  color: #f4f4f4;
}

.case-form .input input {
  width: 100%;
  height: 56px;
  padding: 0 32px;
  background: #474949;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #f4f4f4;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  outline: none;
  transition: border-color 0.3s ease;
}

.case-form .input input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.case-form .input input:focus {
  border-color: #f8f1df;
}

.case-form .input-error {
  display: none;
  font-size: 14px;
  line-height: 18px;
  color: #e05c5c;
}

.case-form .input.error .input-error {
  display: block;
}

.case-form .input.error input {
  border-color: #e05c5c;
}

.case-form__btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 56px;
  padding: 0 68px 0 32px;
  background: #f8f1df;
  border: none;
  border-radius: 12px;
  color: #1e2020;
  font-family: inherit;
  font-size: 16px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.case-form__btn:hover {
  background: #fffbef;
}

.case-form__btn-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #1e2020;
  border-radius: 8px;
}

.case-form__privacy {
  max-width: 367px;
  font-size: 14px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.case-form__success {
  font-size: 16px;
  line-height: 24px;
  color: #f8f1df;
}

.case-form__success.hidden {
  display: none;
}

.case-form__img {
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  width: 494px;
  height: calc(100% - 32px);
  max-height: 494px;
  border-radius: 8px;
  overflow: hidden;
}

.case-form__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1400px) {
  .case-form__img {
    width: 400px;
  }

  .case-form__info,
  .case-form__wrapper {
    max-width: calc(100% - 440px);
  }
}

@media (max-width: 1200px) {
  .case-card__info {
    width: 50%;
  }

  .case-detail__intro {
    flex-direction: column;
  }

  .case-detail__slider-wrap {
    width: 100%;
    height: 420px;
  }
}

@media (max-width: 1024px) {
  .case-form__img {
    display: none;
  }

  .case-form__info,
  .case-form__wrapper {
    max-width: 100%;
  }
}

@media (max-width: 992px) {
  .cases-tags__list {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cases-tags__list::-webkit-scrollbar {
    display: none;
  }

  .case-card {
    flex-direction: column;
  }

  .case-card__info {
    width: 100%;
  }

  .case-card__img--desktop {
    display: none;
  }

  .case-card__img--mobile {
    display: block;
    position: relative;
    width: 100%;
    height: 280px;
    flex: none;
  }
}

@media (max-width: 768px) {
  .cases-list__title {
    margin-bottom: 40px;
    font-size: 24px;
    line-height: 36px;
    font-weight: 500;
  }

  .cases-list__items {
    gap: 20px;
  }

  .case-card__title-row {
    align-items: flex-start;
    font-size: 22px;
    line-height: 26px;
  }

  .case-card__img--mobile {
    height: 180px;
  }

  .cases-pagination__item {
    font-size: 14px;
    line-height: 18px;
  }

  .cases-pagination__item--prev,
  .cases-pagination__item--next {
    flex: 1 1 0;
  }

  .case-detail__title {
    margin-bottom: 40px;
    font-size: 24px;
    line-height: 36px;
    font-weight: 500;
  }

  .case-detail__content {
    padding-bottom: 40px;
  }

  .case-detail__subtitle {
    font-size: 22px;
    line-height: 26px;
  }

  .case-detail__slider-wrap {
    height: 320px;
    gap: 8px;
  }

  .case-detail__slider {
    border-radius: 16px;
  }

  .case-detail__slider-panel {
    width: 64px;
    padding: 4px;
    border-radius: 16px;
    gap: 4px;
  }

  .case-detail__slider-btn--next {
    border-radius: 14px 14px 6px 6px;
  }

  .case-detail__slider-btn--prev {
    border-radius: 6px 6px 14px 14px;
  }

  .case-detail__features {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-detail__feature-title {
    font-size: 22px;
    line-height: 26px;
  }

  .case-form__container {
    padding: 20px;
  }

  .case-form__title {
    font-size: 24px;
    line-height: 36px;
  }

  .case-form__row {
    flex-direction: column;
  }

  .case-form .input input {
    padding: 0 16px;
  }
}