.portfolio-banner {
  position: relative;
  height: calc(100vh - var(--portfolio-banner-offset, 0px));
  height: calc(100svh - var(--portfolio-banner-offset, 0px));
  min-height: 680px;
  background: #0e0f11;
  color: #ffffff;
  overflow: hidden;
}

.portfolio-banner__carousel,
.portfolio-banner__carousel .owl-stage-outer,
.portfolio-banner__carousel .owl-stage,
.portfolio-banner__carousel .owl-item,
.portfolio-banner__slide {
  height: 100%;
  min-height: 680px;
}

.portfolio-banner__slide {
  position: relative;
  overflow: hidden;
}

.portfolio-banner__bg {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.04);
  transition: transform 7s ease;
  pointer-events: none;
}

.portfolio-banner__bg--mobile {
  display: none;
}

.portfolio-banner .owl-item.active .portfolio-banner__bg {
  transform: scale(1);
}

.portfolio-banner__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 11, 0.78) 0%, rgba(8, 9, 11, 0.42) 52%, rgba(8, 9, 11, 0.12) 100%),
    linear-gradient(0deg, rgba(8, 9, 11, 0.72) 0%, rgba(8, 9, 11, 0) 58%);
  pointer-events: none;
}

.portfolio-banner__content {
  position: absolute;
  left: 7%;
  bottom: 210px;
  z-index: 2;
  width: min(700px, 58%);
}

.portfolio-banner__content > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.portfolio-banner .owl-item.active .portfolio-banner__content > * {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-banner .owl-item.active .portfolio-banner__content > *:nth-child(2) {
  transition-delay: 90ms;
}

.portfolio-banner .owl-item.active .portfolio-banner__content > *:nth-child(3) {
  transition-delay: 170ms;
}

.portfolio-banner__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, transform 250ms ease;
}

.portfolio-banner__arrow:hover,
.portfolio-banner__arrow:focus {
  background: #ffffff;
  border-color: #ffffff;
  color: #111214;
  transform: translateY(-2px);
}

.portfolio-banner__arrow svg {
  width: 19px;
  height: 19px;
}

.portfolio-banner__meta {
  display: block;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-banner__title {
  margin: 0;
  color: #ffffff;
  font-family: var(--insuba-font, "Rubik", sans-serif);
  font-size: clamp(34px, 4.6vw, 76px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.portfolio-banner__title a {
  color: inherit;
  text-decoration: none;
}

.portfolio-banner__title a:hover,
.portfolio-banner__title a:focus {
  color: #ffffff;
}

.portfolio-banner__counter {
  position: absolute;
  right: 5%;
  bottom: 190px;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.portfolio-banner__counter-current {
  color: #ffffff;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.portfolio-banner__thumbs {
  position: absolute;
  right: 5%;
  bottom: 38px;
  z-index: 3;
  display: flex;
  gap: 14px;
  max-width: 58%;
  padding: 4px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.portfolio-banner__thumbs::-webkit-scrollbar {
  display: none;
}

.portfolio-banner__thumb {
  flex: 0 0 180px;
  width: 180px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: #ffffff;
  text-align: left;
  opacity: 0.62;
  cursor: pointer;
  transition: opacity 250ms ease, border-color 250ms ease, transform 250ms ease;
}

.portfolio-banner__thumb:hover,
.portfolio-banner__thumb:focus,
.portfolio-banner__thumb.is-active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-4px);
}

.portfolio-banner__thumb img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.portfolio-banner__thumb-placeholder {
  display: block;
  width: 100%;
  height: 100px;
  background: rgba(255, 255, 255, 0.08);
}

.portfolio-banner__thumb-label {
  display: block;
  padding: 9px 11px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-banner__nav {
  position: absolute;
  left: 7%;
  bottom: 42px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.portfolio-banner__nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

.portfolio-banner__nav button:hover,
.portfolio-banner__nav button:focus {
  background: #ffffff;
  border-color: #ffffff;
  color: #111214;
}

.portfolio-banner .owl-dots,
.portfolio-banner .owl-nav {
  display: none !important;
}

@media (max-width: 1399px) {
  .portfolio-banner__content {
    width: min(640px, 62%);
  }

  .portfolio-banner__thumb {
    flex-basis: 160px;
    width: 160px;
  }

  .portfolio-banner__thumb img,
  .portfolio-banner__thumb-placeholder {
    height: 90px;
  }
}

@media (max-width: 1199px) {
  .portfolio-banner__content {
    left: 5%;
    bottom: 190px;
    width: 66%;
  }

  .portfolio-banner__counter {
    right: 4%;
    bottom: 174px;
  }

  .portfolio-banner__thumbs {
    right: 4%;
    max-width: 54%;
    gap: 10px;
  }

  .portfolio-banner__thumb {
    flex-basis: 140px;
    width: 140px;
  }

  .portfolio-banner__thumb img,
  .portfolio-banner__thumb-placeholder {
    height: 80px;
  }

  .portfolio-banner__thumb-label {
    padding: 9px 10px;
    font-size: 11px;
  }

  .portfolio-banner__nav {
    left: 5%;
    bottom: 34px;
  }
}

@media (max-width: 991px) {
  .portfolio-banner,
  .portfolio-banner__carousel,
  .portfolio-banner__carousel .owl-stage-outer,
  .portfolio-banner__carousel .owl-stage,
  .portfolio-banner__carousel .owl-item,
  .portfolio-banner__slide {
    min-height: 620px;
  }

  .portfolio-banner__slide.has-mobile-bg .portfolio-banner__bg--desktop {
    display: none;
  }

  .portfolio-banner__slide.has-mobile-bg .portfolio-banner__bg--mobile {
    display: block;
  }

  .portfolio-banner__content {
    left: 24px;
    right: 24px;
    bottom: 152px;
    width: auto;
  }

  .portfolio-banner__title {
    font-size: clamp(30px, 7.2vw, 48px);
  }

  .portfolio-banner__counter {
    right: 24px;
    bottom: 124px;
  }

  .portfolio-banner__counter-current {
    font-size: 30px;
  }

  .portfolio-banner__thumbs {
    display: none;
  }

  .portfolio-banner__nav {
    left: 24px;
    bottom: 30px;
  }

  .portfolio-banner__arrow {
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
  }
}

@media (max-width: 575px) {
  .portfolio-banner__meta {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .portfolio-banner__title {
    font-size: clamp(28px, 7.8vw, 40px);
  }

  .portfolio-banner__content {
    bottom: 142px;
  }

  .portfolio-banner__counter {
    bottom: 116px;
  }

  .portfolio-banner__nav {
    bottom: 24px;
  }
}

@media (min-width: 1581px) {
  .portfolio-banner__content,
  .portfolio-banner__nav {
    left: var(--portfolio-banner-left, 7%);
  }

  .portfolio-banner__thumbs,
  .portfolio-banner__counter {
    right: var(--portfolio-banner-right, 5%);
  }
}
