/**
 * Who we work with (niches) — Figma desktop 1920.
 * 890×940 green panel + image panel, niche list, glass Read More.
 */

.home-v2 .v2-section--niches,
.v2-section--niches {
  padding-block: clamp(48px, 6.25vw, 120px);
}

@media (min-width: 1024px) {
  .is-lang-uk .v2-niches__heading {
    max-width: min(40.625vw, 780px);
  }
}

.v2-niches__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 1.042vw, 20px);
}

@media (min-width: 1024px) {
  .v2-niches__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: calc(100vw * 20 / 1920);
  }

  .v2-niches__panel {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vw * 940 / 1920);
    border-radius: calc(100vw * 20 / 1920);
  }

  .v2-niches__visual {
    height: auto;
    min-height: calc(100vw * 940 / 1920);
    border-radius: calc(100vw * 20 / 1920);
  }

  .v2-niches__panel-inner {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0;
    padding: calc(100vw * 30 / 1920);
  }

  .v2-niches__intro {
    gap: calc(100vw * 28 / 1920);
    flex-shrink: 0;
    align-self: start;
  }

  .v2-niches__descriptor {
    gap: calc(100vw * 15 / 1920);
    font-size: calc(100vw * 20 / 1920);
  }

  .v2-niches__descriptor-dot {
    width: calc(100vw * 10 / 1920);
    height: calc(100vw * 10 / 1920);
  }

  .v2-niches__heading {
    max-width: calc(100vw * 490 / 1920);
    font-size: calc(100vw * 90 / 1920);
    line-height: 1;
  }

  .v2-niches__lead {
    max-width: calc(100vw * 479 / 1920);
    font-size: calc(100vw * 18 / 1920);
    line-height: 1.22;
  }

  .v2-niches__list {
    align-self: end;
    flex-shrink: 0;
    width: 100%;
  }

  .v2-niches__item {
    grid-template-columns: calc(100vw * 40 / 1920) 1fr;
    column-gap: calc(100vw * 90 / 1920);
    padding-block: calc(100vw * 24 / 1920);
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
  }

  .v2-niches__item:first-child {
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
  }

  .v2-niches__arrow {
    width: calc(100vw * 40 / 1920);
    height: calc(100vw * 40 / 1920);
  }

  .v2-niches__arrow-icon,
  .v2-niches__arrow img {
    width: calc(100vw * 20 / 1920);
    height: calc(100vw * 20 / 1920);
  }

  .v2-niches__label {
    font-size: calc(100vw * 32 / 1920);
    line-height: 1.2;
  }

  .v2-niches__visual-inner {
    padding: calc(100vw * 30 / 1920);
  }

  .v2-niches__visual-text {
    max-width: calc(100vw * 335 / 1920);
    font-size: calc(100vw * 18 / 1920);
  }

  .v2-niches__read-more {
    max-width: calc(100vw * 830 / 1920);
    height: calc(100vw * 80 / 1920);
    font-size: calc(100vw * 20 / 1920);
  }
}

/* 890×940 @1920 */
.v2-niches__panel,
.v2-niches__visual {
  min-height: clamp(400px, 48.958vw, 940px);
  border-radius: clamp(12px, 1.042vw, 20px);
  overflow: hidden;
}

.v2-niches__panel {
  background: linear-gradient(180deg, #64db69 0%, #5cce61 100%);
  display: flex;
  flex-direction: column;
}

.v2-niches__panel-inner {
  display: grid;
  grid-template-rows: auto 1fr;
  flex: 1;
}

.v2-niches__intro {
  display: flex;
  flex-direction: column;
  gap: calc(100vw * 20 / 1920);
}

.v2-niches__descriptor {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0;
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.4);
}

.v2-niches__descriptor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

.v2-niches__heading {
  margin: 0;
  max-width: min(25.52vw, 490px);
  font-size: clamp(36px, 4.688vw, 90px);
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
}

.v2-niches__lead {
  margin: 0;
  max-width: min(24.95vw, 479px);
  font-size: clamp(14px, 0.938vw, 18px);
  font-weight: 400;
  line-height: 1.22;
  color: #ffffff;
}

.v2-niches__heading-line,
.v2-niches__lead-line {
  display: inline;
}

.v2-niches__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-self: end;
  width: 100%;
}

.v2-niches__item {
  display: grid;
  grid-template-columns: clamp(36px, 2.083vw, 40px) 1fr;
  column-gap: clamp(16px, 4.688vw, 90px);
  align-items: center;
  padding-block: clamp(16px, 1.25vw, 24px);
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.v2-niches__item:first-child {
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
}

.v2-niches__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(36px, 2.083vw, 40px);
  height: clamp(36px, 2.083vw, 40px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.5s ease;
}

.v2-niches__arrow-icon {
  display: block;
  width: clamp(11px, 0.677vw, 13px);
  height: clamp(11px, 0.677vw, 13px);
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.v2-niches__arrow-icon--active {
  opacity: 0;
  transform: scale(0.85);
}

.v2-niches__item.is-active .v2-niches__arrow-icon--idle {
  opacity: 0;
  transform: scale(0.85);
}

.v2-niches__item.is-active .v2-niches__arrow-icon--active {
  opacity: 1;
  transform: scale(1);
}

.v2-niches__arrow img {
  display: block;
  width: clamp(11px, 0.677vw, 13px);
  height: clamp(11px, 0.677vw, 13px);
}

.v2-niches__label {
  font-size: clamp(22px, 1.667vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.5s ease;
}

.v2-niches__item.is-active .v2-niches__arrow {
  background: #ffffff;
}

.v2-niches__item.is-active .v2-niches__label {
  color: #ffffff;
}

.v2-niches__visual {
  position: relative;
  overflow: hidden;
}

.v2-niches__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.v2-niches__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.v2-niches__slide-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    var(--v2-niches-slide-bg);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  transform: none;
  will-change: opacity;
}

.v2-niches__slide-bg--desktop {
  display: none;
}

@media (min-width: 1024px) {
  .v2-niches__slide-bg--mobile {
    display: none;
  }

  .v2-niches__slide-bg--desktop {
    display: block;
  }
}

.v2-niches__visual-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: inherit;
  padding: clamp(20px, 1.563vw, 30px);
}

.v2-niches__visual-text {
  margin: 0;
  max-width: min(17.45vw, 335px);
  font-size: clamp(14px, 0.938vw, 18px);
  font-weight: 400;
  line-height: 1.22;
  color: #ffffff;
  will-change: opacity;
}

.v2-niches__visual-text-line {
  display: block;
}

.v2-niches__read-more {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(43.23vw, 830px);
  height: clamp(56px, 4.167vw, 80px);
  margin-top: auto;
  border-radius: 130px;
  background: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.5s ease, color 0.5s ease;
  will-change: opacity;
}

.v2-niches__read-more:hover,
.v2-niches__read-more:focus-visible {
  background: #ffffff;
  color: #202020;
}

@media (min-width: 1024px) {
  .home-v2 .v2-section--niches,
  .v2-section--niches {
    --v2-niches-section-pad: calc(100vw * 70 / 1920);
    display: flex;
    align-items: center;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding-block: var(--v2-niches-section-pad);
  }

  .v2-niches__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: calc(100vw * 20 / 1920);
    height: calc(100vw * 940 / 1920);
    max-height: calc(100vh - var(--v2-niches-section-pad) - var(--v2-niches-section-pad));
    max-height: calc(100svh - var(--v2-niches-section-pad) - var(--v2-niches-section-pad));
  }

  .v2-niches__panel,
  .v2-niches__visual {
    height: 100%;
    min-height: 0;
    border-radius: calc(100vw * 20 / 1920);
  }

  .v2-niches__panel-inner {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0;
    padding: calc(100vw * 30 / 1920);
  }

  .v2-niches__intro {
    gap: calc(100vw * 20 / 1920);
    flex-shrink: 0;
    align-self: start;
  }

  .v2-niches__descriptor {
    gap: calc(100vw * 15 / 1920);
    font-size: calc(100vw * 20 / 1920);
  }

  .v2-niches__descriptor-dot {
    width: calc(100vw * 10 / 1920);
    height: calc(100vw * 10 / 1920);
  }

  .v2-niches__heading {
    max-width: calc(100vw * 490 / 1920);
    font-size: calc(100vw * 90 / 1920);
    line-height: 1;
  }

  .v2-niches__lead {
    max-width: calc(100vw * 479 / 1920);
    font-size: calc(100vw * 18 / 1920);
    line-height: calc(100vw * 22 / 1920);
  }

  .v2-niches__list {
    align-self: end;
    flex-shrink: 0;
    width: 100%;
  }

  .v2-niches__item {
    grid-template-columns: calc(100vw * 40 / 1920) minmax(0, 1fr);
    column-gap: calc(100vw * 90 / 1920);
    padding-block: calc(100vw * 24 / 1920);
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
  }

  .v2-niches__item:last-child {
    padding-bottom: 0;
  }

  .v2-niches__arrow {
    width: calc(100vw * 40 / 1920);
    height: calc(100vw * 40 / 1920);
  }

  .v2-niches__arrow-icon,
  .v2-niches__arrow img {
    width: calc(100vw * 20 / 1920);
    height: calc(100vw * 20 / 1920);
  }

  .v2-niches__label {
    font-size: calc(100vw * 32 / 1920);
    line-height: 1.2;
  }

  .v2-niches__visual-inner {
    min-height: 0;
    padding: calc(100vw * 30 / 1920);
  }

  .v2-niches__visual-text {
    width: calc(100vw * 335 / 1920);
    max-width: none;
    font-size: calc(100vw * 18 / 1920);
    line-height: calc(100vw * 22 / 1920);
  }

  .v2-niches__visual-text-line {
    white-space: nowrap;
  }

  .is-lang-uk .v2-niches__visual-text-line {
    display: inline;
    white-space: normal;
  }

  .v2-niches__read-more {
    max-width: calc(100vw * 830 / 1920);
    height: calc(100vw * 80 / 1920);
    font-size: calc(100vw * 20 / 1920);
  }
}

@media (max-width: 1023px) {
  .home-v2 .v2-section--niches,
  .v2-section--niches {
    padding-top: var(--v2-section-gap);
    padding-bottom: 0;
  }

  .v2-niches__grid {
    gap: calc(100vw * 20 / 390);
  }

  .v2-niches__panel,
  .v2-niches__visual {
    width: 100%;
    min-height: 0;
    border-radius: calc(100vw * 20 / 390);
  }

  .v2-niches__panel {
    height: auto;
    min-height: calc(100vw * 477 / 390);
  }

  .v2-niches__visual {
    height: calc(100vw * 320 / 390);
    min-height: calc(100vw * 320 / 390);
  }

  .v2-niches__panel {
    display: flex;
    flex-direction: column;
  }

  .v2-niches__panel-inner {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    row-gap: calc(100vw * 40 / 390);
    column-gap: 0;
    padding: calc(100vw * 20 / 390);
  }

  .v2-niches__list {
    align-self: end;
    width: 100%;
  }

  .v2-niches__item:first-child {
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
  }

  .v2-niches__intro {
    gap: calc(100vw * 15 / 390);
  }

  .v2-niches__descriptor {
    gap: calc(100vw * 10 / 390);
    font-size: calc(100vw * 12 / 390);
  }

  .v2-niches__descriptor-dot {
    width: calc(100vw * 6 / 390);
    height: calc(100vw * 6 / 390);
  }

  .v2-niches__heading {
    max-width: none;
    font-size: calc(100vw * 36 / 390);
    line-height: 1;
  }

  .is-lang-uk .v2-section--niches:not(.v2-section--services-audience) .v2-niches__heading {
    font-size: calc(100vw * 28 / 390);
    line-height: 1.04;
  }

  .is-lang-uk .v2-section--niches:not(.v2-section--services-audience) .v2-niches__heading-line {
    white-space: nowrap;
  }

  .v2-niches__heading-line,
  .v2-niches__lead-line {
    display: block;
  }

  .v2-niches__lead {
    max-width: none;
    font-size: calc(100vw * 14 / 390);
    line-height: 1.22;
  }

  .v2-niches__item {
    grid-template-columns: calc(100vw * 24 / 390) minmax(0, 1fr);
    column-gap: calc(100vw * 10 / 390);
    padding-block: calc(100vw * 16 / 390);
  }

  .v2-niches__item:last-child {
    padding-bottom: 0;
  }

  .v2-niches__arrow {
    width: calc(100vw * 24 / 390);
    height: calc(100vw * 24 / 390);
  }

  .v2-niches__arrow img {
    width: calc(100vw * 9 / 390);
    height: calc(100vw * 9 / 390);
  }

  .v2-niches__label {
    font-size: calc(100vw * 16 / 390);
    font-weight: 500;
    line-height: 1.2;
  }

  .v2-niches__visual-inner {
    padding: calc(100vw * 20 / 390);
  }

  .v2-niches__visual-text {
    max-width: none;
    font-size: calc(100vw * 14 / 390);
    line-height: 1.22;
  }

  .is-lang-uk .v2-niches__visual-text-line {
    display: inline;
  }

  .v2-niches__read-more {
    align-self: center;
    width: calc(100vw * 310 / 390);
    max-width: none;
    height: calc(100vw * 60 / 390);
    font-size: calc(100vw * 16 / 390);
  }
}
