.b-cases {
  display: grid;
  margin-bottom: var(--mb-block);
  padding: 40px 0;
  align-items: end;
  grid-template-areas: "lead more" "title more" "cards cards";
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases {
    padding: 0;
    align-items: start;
    grid-template-areas: "lead" "title" "cards" "more";
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}
@media (max-width: 767px) {
  .b-cases {
    padding: 16px 0;
    align-items: start;
    grid-template-areas: "lead" "title" "more" "cards";
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}
.b-cases .b-lead {
  grid-area: lead;
}
.b-cases .b-lead .lead__text {
  color: #000;
  font-size: 16px;
  line-height: 1.2;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .b-lead .lead__text {
    color: #171513;
  }
}
@media (max-width: 767px) {
  .b-cases .b-lead .lead__text {
    color: #171513;
    font-size: 12px;
  }
}
.b-cases .cases__title {
  max-width: 528px;
  margin: 24px 0 0;
  grid-area: title;
  color: #000;
  font-size: 36px;
  line-height: 1;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__title {
    max-width: none;
    margin-top: 8px;
    color: #171513;
    font-size: 48px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__title {
    max-width: none;
    margin-top: 6px;
    font-size: 24px;
  }
}
.b-cases .cases__more {
  display: inline-flex;
  width: 180px;
  height: 40px;
  padding: 0 9px;
  border-radius: 8px;
  background: #171513;
  justify-content: space-between;
  align-items: center;
  place-self: end end;
  grid-area: more;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__more {
    width: 353px;
    margin-top: 40px;
    place-self: start start;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__more {
    width: 145px;
    height: 44px;
    margin-top: 24px;
    place-self: start start;
  }
}
.b-cases .cases__more-icon {
  display: flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.b-cases .cases__more-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.b-cases .cases__cards {
  display: grid;
  margin-top: 64px;
  gap: 33px;
  grid-area: cards;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1299px) {
  .b-cases .cases__cards {
    margin-top: 40px;
    margin-right: calc(var(--content-pad) * -1);
    margin-left: calc(var(--content-pad) * -1);
    padding-right: var(--content-pad);
    padding-left: var(--content-pad);
    gap: 20px;
    grid-template-columns: none;
    grid-auto-columns: 320px;
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-padding-inline: var(--content-pad);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__cards {
    margin-top: 24px;
    gap: 12px;
    grid-auto-columns: 280px;
  }
}
.b-cases .cases__card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 468px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: #dfdfdf;
  flex-direction: column;
  overflow: hidden;
  transition: background-color 0.45s ease, border-color 0.45s ease;
}
@media (max-width: 1299px) {
  .b-cases .cases__card {
    min-height: 440px;
    cursor: pointer;
    scroll-snap-align: start;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__card {
    min-height: 343px;
    border-radius: 16px;
  }
}
@media (min-width: 1300px) {
  .b-cases .cases__card:hover {
    border-color: #aaa;
    background-color: #fff;
  }
  .b-cases .cases__card:hover .cases__media {
    bottom: calc(100% - 172px);
  }
}
@media (min-width: 1300px) and (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__card:hover .cases__media {
    bottom: calc(100% - 150px);
  }
}
@media (min-width: 1300px) and (max-width: 767px) {
  .b-cases .cases__card:hover .cases__media {
    bottom: calc(100% - 130px);
  }
}
@media (min-width: 1300px) {
  .b-cases .cases__card:hover .cases__shade,
  .b-cases .cases__card:hover .cases__go,
  .b-cases .cases__card:hover .cases__name {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .b-cases .cases__card:hover .cases__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
@media (max-width: 1299px) {
  .b-cases .cases__card--open {
    border-color: #aaa;
    background-color: #fff;
  }
  .b-cases .cases__card--open .cases__media {
    bottom: calc(100% - 172px);
  }
}
@media (max-width: 1299px) and (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__card--open .cases__media {
    bottom: calc(100% - 150px);
  }
}
@media (max-width: 1299px) and (max-width: 767px) {
  .b-cases .cases__card--open .cases__media {
    bottom: calc(100% - 130px);
  }
}
@media (max-width: 1299px) {
  .b-cases .cases__card--open .cases__shade,
  .b-cases .cases__card--open .cases__go,
  .b-cases .cases__card--open .cases__name {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .b-cases .cases__card--open .cases__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.b-cases .cases__media {
  position: absolute;
  z-index: 1;
  inset: 0;
  transition: bottom 0.45s ease;
}
.b-cases .cases__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.b-cases .cases__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.3) 13%,
      rgba(255, 255, 255, 0) 53%);
  opacity: 1;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
@media (max-width: 1299px) {
  .b-cases .cases__shade {
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 8%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.6) 100%);
  }
}
.b-cases .cases__chip {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  display: flex;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 45px;
  background: rgba(255, 255, 255, 0.2);
  align-items: center;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  backdrop-filter: blur(6.6px);
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__chip {
    top: 20px;
    left: 20px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__chip {
    top: 16px;
    left: 16px;
    height: 24px;
    padding: 4px 6px;
    border-radius: 200px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    backdrop-filter: blur(5px);
  }
}
.b-cases .cases__go {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  display: flex;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #171513;
  justify-content: center;
  align-items: center;
  color: #fff;
  opacity: 1;
  cursor: pointer;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__go {
    top: 20px;
    right: 20px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__go {
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 12px;
  }
}
.b-cases .cases__go svg {
  display: block;
  width: 17px;
  height: 16px;
}
@media (max-width: 767px) {
  .b-cases .cases__go svg {
    width: 13px;
    height: 12px;
  }
}
.b-cases .cases__name {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  left: 24px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  opacity: 1;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__name {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__name {
    right: 16px;
    bottom: 16px;
    left: 16px;
    font-size: 18px;
  }
}
.b-cases .cases__panel {
  position: absolute;
  z-index: 0;
  inset: 172px 0 0;
  display: flex;
  padding: 24px;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__panel {
    top: 150px;
    padding: 16px 20px 20px;
    gap: 7px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__panel {
    top: 130px;
    padding: 16px;
    gap: 12px;
  }
}
.b-cases .cases__route {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #000;
  font-size: 16px;
  line-height: 1.2;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__route {
    margin-bottom: 9px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__route {
    font-size: 12px;
  }
}
.b-cases .cases__dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ed6300;
  flex-shrink: 0;
}
.b-cases .cases__text {
  display: -webkit-box;
  overflow: hidden;
  color: #000;
  font-size: 24px;
  line-height: 1;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__text {
    font-size: 18px;
    line-height: 1.28;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__text {
    font-size: 14px;
    line-height: 1.28;
  }
}
.b-cases .cases__foot {
  display: flex;
  margin-top: auto;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
@media (max-width: 1299px) {
  .b-cases .cases__foot {
    align-items: center;
  }
}
.b-cases .cases__date {
  color: #000;
  font-size: 16px;
  line-height: 1.2;
}
@media (max-width: 767px) {
  .b-cases .cases__date {
    color: #171513;
    font-size: 10px;
  }
}
.b-cases .cases__link {
  display: inline-flex;
  width: 200px;
  height: 40px;
  padding: 0 9px;
  border-radius: 8px;
  background: #171513;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases .cases__link {
    width: 145px;
  }
}
@media (max-width: 767px) {
  .b-cases .cases__link {
    width: 145px;
    height: 24px;
    padding: 0 4px;
    border-radius: 6px;
    font-size: 12px;
  }
}
.b-cases .cases__link-icon {
  display: flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .b-cases .cases__link-icon {
    width: 7px;
    height: 6px;
  }
}
.b-cases .cases__link-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
@media (max-width: 767px) {
  .b-cases .cases__link-icon svg {
    width: 7px;
    height: 6px;
  }
}
.b-cases--embed {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 32px 0;
}
.b-cases--embed .cases__cards {
  width: 100%;
  margin-top: 0;
}
@media (max-width: 1299px) {
  .b-cases--embed .cases__cards {
    display: flex;
    margin-right: 0;
    margin-left: 0;
    padding: 0;
    flex-wrap: wrap;
    overflow: visible;
  }
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases--embed .cases__cards {
    gap: 40px 20px;
  }
}
@media (max-width: 767px) {
  .b-cases--embed .cases__cards {
    flex-direction: column;
    gap: 32px;
  }
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases--embed .cases__card {
    width: calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
    min-height: 384px;
    flex: 1 1 calc((100% - 20px) / 2);
    scroll-snap-align: none;
  }
}
@media (max-width: 767px) {
  .b-cases--embed .cases__card {
    width: 100%;
    max-width: none;
    min-height: 297px;
    flex: 1 1 auto;
    scroll-snap-align: none;
  }
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases--embed .cases__chip {
    font-size: 16px;
    line-height: 1.375;
  }
}
@media (max-width: 767px) {
  .b-cases--embed .cases__name {
    font-size: 20px;
  }
}
@media (max-width: 1299px) {
  .b-cases--embed .cases__foot {
    align-items: flex-end;
  }
}
@media (min-width: 768px) and (max-width: 1299px) {
  .b-cases--embed .cases__date {
    color: #171513;
    font-size: 14px;
  }
}
.b-cases--embed .cases__nav {
  width: 100%;
}
