/* common styles and components */
/* cards */
.card-dark-grey {
  background-color: #333333;
  color: var(--white);

  svg {
    stroke: var(--white);
  }
}

/* sections */
.team-slider {
  grid-column: 1/end;
  width: 100%;
  overflow: hidden;
}

.team-slider__btn-container {
  display: flex;
  justify-content: flex-end;
  gap: 1.25vw;
}

.team-slider__prev, .team-slider__next {
  svg, &:hover svg {
    transform: none;
  }
}

.team-slider__list {
  display: flex;
  align-items: flex-start;
  margin-top: 1.563vw;
}

.team-slider-list__item, .team-slider__card {
  width: 100%;
}

.team-slider__item {
  flex-shrink: 0;
}

.team-slider__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  &:last-child {
    margin-top: 28px;
  }
}

.team-slider__flip-card {
  perspective: 1000px;
  width: 100%;
}

.team-slider__flip-container {
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  position: relative;

  &.flipped {
    transform: rotateY(180deg);

    .team-slider__quote-btn {
      display: none;
    }
  }
}

.team-slider__img, .team-slider__quote-text {
  inset: 0;
  backface-visibility: hidden;
}

.team-slider__popup {
  display: none;
}

.team-slider__img {
  background: linear-gradient(180deg, #DDDEE0 0%, #E7E6EB 53.77%, #DADBDF 100%);
  border-radius: var(--card-radius-24);
  overflow: hidden;

  > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.team-slider__name {
  margin-top: .63vw;
}

.team-slider__status {
  margin-top: .21vw;
}

.team-slider__quote-btn {
  position: absolute;
  top: 1.667vw;
  left: 1.667vw;
}

.team-slider__quote-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
  color: var(--white);
  border-radius: var(--card-radius-24);
  display: flex;
  flex-direction: column;
  padding: 2.083vw;
  transform: rotateY(180deg);

  svg {
    width: 3.125vw;
    height: auto;
    margin-bottom: auto;
  }
}

@media (max-width: 1280px) {
  .team-slider {
    margin-top: 6.25vw;
  }

  .team-slider__btn-container {
    gap: 3.125vw;
  }

  .team-slider__list {
    margin-top: 3.125vw;
  }

  .team-slider__name {
    font-size: 2.08vw;
    margin-top: 1.3vw;
  }

  .team-slider__status {
    font-size: 1.82vw;
    margin-top: 2px;
  }

  .team-slider__quote-btn {
    top: 3.125vw;
    left: 3.125vw;
  }
}

@media (max-width: 767px) {
  .team-slider {
    display: flex;
    flex-direction: column;
  }

  .team-slider__btn-container {
    justify-content: center;
    gap: 6.4vw;
    order: 2;
    margin-top: 6.4vw;
  }

  .team-slider__list {
    margin-top: 0;
  }

  .team-slider__flip-container, .team-slider__img {
    transform-style: unset;
  }

  .team-slider__flip-card.popup-open .team-slider__quote-text {
    display: flex;
    opacity: 1;
  }

  .team-slider__quote-text {
    display: none;
  }

  .team-slider__popup {
    flex-direction: column;
    justify-content: center;
    gap: 9.867vw;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0 14.4vw;
    background: #000000E5;
    color: var(--white);
    padding: 0 14.4vw;
    opacity: 0;
    transition: opacity var(--normal);
    z-index: 1000;

    svg {
      width: 12.8vw;
    }

    &::before {
      content: "";
      position: absolute;
      top: 9.6vw;
      right: 9.6vw;
      width: 12.8vw;
      height: 12.8vw;
      border-radius: 50%;
      border: 1px solid var(--white);
      padding: 3.733vw;
      background: url("../assets/img/icons/close-white.svg") no-repeat center / 5.333vw auto;
    }

    &.open {
      display: flex;
      opacity: 1;
    }
  }

  .team-slider__name {
    font-size: 4.27vw;
    margin-top: 8px;
  }

  .team-slider__status {
    font-size: 2.9vw;
    margin-top: 4px;
  }

  .team-slider__quote-btn {
    top: 4.267vw;
    left: 4.267vw;
  }
}

.technologies a {
  display: inline-block;
  font: inherit;
  color: inherit;
}

.technologies__title {
  width: 33.907vw;
}

.technologies__content {
  display: flex;
  align-items: flex-start;
  gap: 1.563vw;
}

.technologies__card {
  flex-grow: 1;
  padding: 2.5vw;
  border-radius: var(--card-radius-32);
}

.technologies__list {
  margin-top: 1.563vw;
}

.technologies__list-item + .technologies__list-item {
  margin-top: .625vw;
}

@media (max-width: 1280px) {
  .technologies {
    padding-left: 24px;
  }

  .technologies__title {
    width: 100%;
  }

  .technologies__content {
    gap: 2.083vw;
    flex-direction: column;
    flex-wrap: wrap;
    max-height: 63.021vw;
  }

  .technologies__card {
    padding: 3.125vw;
    width: 29.818vw;
    flex-grow: 0;
  }

  .technologies__list {
    margin-top: 2.083vw;
  }

  .technologies__list-item + .technologies__list-item {
    margin-top: 1.042vw;
  }
}

@media (max-width: 767px) {
  .technologies {
    padding-left: 16px;
  }

  .technologies__content {
    gap: 4.267vw;
    max-height: 177.067vw;
  }

  .technologies__card {
    padding: 4.267vw;
    width: 47.668%;
  }

  .technologies__list-item + .technologies__list-item {
    margin-top: 2.133vw;
  }
}

.card-light-grey {
  background-color: #F6F6F6;
  color: var(--black);

  svg {
    stroke: var(--black);
  }
}

.achievements {
  padding: 5.365vw 1.25vw 5.365vw 15.156vw;
  display: flex;
  gap: 2.031vw;
}

.achievements__badge {
  flex-grow: 1;
  z-index: 2;

  svg {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 1280px) {
  .achievements {
    padding: 7.552vw 24px;
    gap: 1.913vw;
    border-radius: var(--section-radius);
    background-color: var(--black);
  }
}

@media (max-width: 767px) {
  .achievements {
    padding: 12.8vw 16px;
    gap: unset;
    row-gap: 4.267vw;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .achievements__badge {
    width: 28.701vw;
    flex-grow: 0;
  }
}

.testimonials, .testimonials__content {
  overflow: visible;
}

.testimonials__cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.667vw 1.667vw;
}

.testimonials__card {
  height: max-content;
  padding: 2.083vw 3.333vw;
  border-radius: var(--card-radius-32);
  transition: transform var(--normal);

  svg {
    width: 3.125vw;
    height: auto;
  }
}

.testimonials__card:hover {
  animation: pulse .8s ease-in-out;
}

.testimonials__quote, .testimonials__author {
  margin-top: 1.667vw;
}

.testimonials__author {
  display: flex;
  align-items: center;
  gap: .833vw
}

.testimonials__photo {
  flex-shrink: 0;
  width: 2.5vw;
  height: auto;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@media (min-width: 768px) {
  .testimonials__prev, .testimonials__next {
    display: none;
  }
}

@media (max-width: 1280px) {
  .testimonials__cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.083vw 2.083vw;
  }

  .testimonials__card {
    padding: 4.167vw;

    svg {
      width: 5.208vw;
    }
  }

  .testimonials__quote, .testimonials__author {
    margin-top: 3.125vw;
  }

  .testimonials__author {
    gap: 2.083vw
  }

  .testimonials__photo {
    width: 5.208vw;
  }
}

@media (max-width: 767px) {
  .testimonials {
    overflow: hidden;
    padding: 15.467vw 0;
  }

  .testimonials__title, .testimonials__content {
    padding: 0 16px;
  }

  .testimonials__cards-container {
    display: flex;
    gap: 0;
  }

  .testimonials__card {
    width: 100%;
    padding: 8vw 10.667vw;

    svg {
      width: 10.667vw;
    }
  }

  .testimonials__quote, .testimonials__author {
    margin-top: 4.267vw;
  }

  .testimonials__author {
    gap: 4.267vw
  }

  .testimonials__photo {
    width: 8.533vw;
  }

  .testimonials__btn-container {
    display: flex;
    justify-content: center;
    gap: 6.4vw;
    margin-top: 6.4vw;
  }
}

/* companies marquee banner */
.companies {
  padding: 8.333vw 0;
}

.companies__card {
  width: 13.333vw;
  height: 8.333vw;
  border-radius: var(--card-radius-24);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.875vw;
}

.companies__logo-img {
  width: 10.833vw;
  height: auto;
}

@media (max-width: 1280px) {
   .companies {
    padding: 6.25vw 0;
  }

  .companies__card {
    width: 31.25vw;
    height: 14.583vw;
    margin-right: 3.125vw;
  }

  .companies__logo-img {
    width: 27.083vw;
  }
}

@media (max-width: 767px) {
  .companies {
    padding: 17.067vw 0;
  }

  .companies__card {
    width: 38.667vw;
    height: 26.667vw;
    margin-right: 3.2vw;
  }

  .companies__logo-img {
    width: 30.133vw;
  }
}

.marquee {
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation-play-state: running;
  animation: marquee 20s linear infinite;
}

.marquee__item {
  flex-shrink: 0;
}

@keyframes marquee {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(-106.458vw, 0); /* Adjust based on total width of track */
  }
}

@media (max-width: 1280px) {
  @keyframes marquee {
    100% {
      transform: translate(-240.625vw, 0);
    }
  }
}

@media (max-width: 767px) {
  @keyframes marquee {
    100% {
      transform: translate(-300.533vw, 0);
    }
  }
}

.page__nav {
  grid-row: 3 / auto;
}

/* sections */
.preview {
  padding: 1.875vw 1.25vw 6.25vw 4.74vw;
}

.preview__subtitle {
  width: 41.771vw;
  margin-top: 1.25vw;
}

.preview__img {
  margin-top: 3.333vw;
  width: 100%;
  height: auto;
}

#our-story {
  overflow: visible;
}

.our-story__content {
  display: flex;
  align-items: center;
  gap: 6.979vw;
  margin-top: 3.333vw;
}

.our-story__img {
  width: 34.844vw;
}

.our-story__text {
  width: 27.865vw;
}

.testimonials__title, .our-journey__title, .map__title {
  width: 38.333vw;
}

.our-journey {
  margin-top: 8.333vw;
}

.our-journey__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3.333vw;
}

.our-journey__item {
  display: flex;
  align-items: flex-end;
  gap: 1.25vw;

  & + .our-journey__item {
    margin-top: 2.5vw;
  }
}

.our-journey__img {
  width: 41.771vw;
}

.our-journey__btn {
  width: 100%;
  margin-top: 3.333vw;
}

.our-clients, .team, .achievements, .map {
  margin-top: 4.167vw;
}

.our-clients {
  padding: 6.25vw 1.25vw 6.25vw 0;
  position: relative;

  &::before {
    content: "";
    width: calc(100% + 15.156vw);
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f6f6f6;
    border-radius: var(--section-radius);
  }
}

.our-clients__title, .our-clients__grid {
  position: relative;
  z-index: 2;
}

.our-clients__title {
  width: 34.844vw;
}

.our-clients__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 12.5vw);
  grid-gap: 1px;
  background-color: var(--grey-light);
  padding: 0;
  align-items: center;
  justify-content: center;
}

.our-clients__item {
  background-color: #F6F6F6;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.our-clients__img {
  width: 11.667vw;
}

.team__slider {
  margin-top: 3.333vw;
  padding-bottom: 4.167vw;
}

.team__benefits-title {
  width: 33.906vw;
}

.team__benefits-content {
  margin-top: 3.333vw;
}

.benefits {
  padding-right: 2.083vw;
}

.benefits__item {
  padding-top: 2.5vw;
  display: grid;
  grid-template-columns: auto calc(39.635vw - 27px); /* column width - marker width */
  align-items: start;
  column-gap: 13.542vw;

  &:not(:first-child) {
    border-top: 1px solid var(--black);
    margin-top: 2.5vw;
  }
}

.benefits__item-title {
  display: flex;
  align-items: center;
  gap: 1.563vw;

  svg {
    flex-shrink: 0;
    width: 3.333vw;
    height: auto;
  }
}

.benefits__list-item {
  list-style-type: disc;

  & + .benefits__list-item {
    margin-top: .833vw;
  }
}

.map__title-container {
  display: flex;
  gap: 3.49vw;
}

.map__subtitle {
  width: 38.281vw;
  margin-top: 2.5vw;
}

.map__img {
  width: 100%;
}

.photo-banner__img {
  margin-top: 4.167vw;
}

@media (max-width: 1280px) {
  .preview {
    padding: 4.688vw 24px 7.552vw;
  }

  .preview__subtitle {
    width: 100%;
    margin-top: 2.083vw;
  }

  .preview__img {
    margin-top: 6.25vw;
  }

  .our-story, .our-clients, .team, .map, .achievements {
    margin-top: 0;
  }

  .our-story__content {
    margin-top: 6.25vw;
    gap: 7.813vw;
  }

  .our-story__img {
    width: 39.063vw;
    flex-shrink: 0;
  }

  .our-story__text {
    width: auto;
  }

  .our-journey__title, .our-clients__title, .testimonials__title, .map__title {
    width: 100%;
  }

  .our-journey {
    margin-top: 15.104vw;
  }

  .our-journey__content {
    margin-top: 4.688vw;
  }

  .our-journey__item {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.042vw;

    & + .our-journey__item {
      margin-top: 3.125vw;
    }
  }

  .our-journey__img {
    width: 46.875vw;
  }

  .our-journey__btn {
    margin-top: 6.25vw;
  }

  .our-clients {
    padding: 7.552vw 24px;

    &:before {
      width: 100%;
    }
  }

  .our-clients__grid {
    grid-template-rows: repeat(2, 13.932vw);
  }

  .our-clients__img {
    width: 25vw;
  }

  .team__slider {
    margin-top: 6.25vw;
    padding-bottom: 7.552vw;
  }

  .benefits {
    margin-top: 7.552vw;
    padding-right: 0;
  }

  .benefits__item {
    padding-top: 3.125vw;
    display: flex;
    flex-direction: column;
    gap: 3.125vw;

    &:not(:first-child) {
      margin-top: 3.125vw;
    }
  }

  .benefits__item-title {
    gap: 3.906vw;

    svg {
      width: 6.25vw;
    }
  }

  .benefits__list {
    margin-left: 27px; /* marker width */
  }

  .benefits__list-item + .benefits__list-item {
    margin-top: 2.083vw;
  }

  .map__title-container {
    flex-direction: column;
    gap: 3.125vw;
  }

  .map__subtitle {
    width: 100%;
    margin-top: 0;
  }

  .photo-banner__img {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .preview {
    padding: 0 16px 12.8vw;
  }

  .preview__subtitle {
    margin-top: 4.267vw;
  }

  .preview__img {
    margin-top: 9.6vw;
  }

  .our-story__content {
    flex-direction: column;
    margin-top: 9.6vw;
    gap: 4.267vw;
    align-items: flex-end;
  }

  .our-story__img {
    width: 73.067vw;
  }

  .our-story__text {
    width: auto;
  }

  .our-journey__title, .our-clients__title, .testimonials__title, .map__title {
    width: 100%;
  }

  .our-journey {
    margin-top: 12.8vw;
  }

  .our-journey__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 9.6vw;
    margin-top: 9.6vw;
  }

  .our-journey__item {
    gap: 2.133vw;

    & + .our-journey__item {
      margin-top: 6.4vw;
    }
  }

  .our-journey__img {
    width: 100%;
  }

  .our-journey__btn {
    margin-top: 9.6vw;
  }

  .our-clients {
    padding: 12.8vw 16px;
  }

  .our-clients__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 21.333vw);
    margin-top: 4.267vw;
  }

  .our-clients__img {
    width: 37.333vw;
  }

  .team {
    padding-bottom: 6.4vw;
  }

  .team__slider {
    margin-top: 9.6vw;
    padding-bottom: 6.4vw;
  }

  .benefits {
    margin-top: 6.4vw;
  }

  .benefits__content {
    margin-top: 6.4vw;
  }

  .benefits__item {
    padding-top: 4.267vw;
    gap: 4.267vw;

    &:not(:first-child) {
      margin-top: 4.267vw;
    }
  }

  .benefits__item-title {
    gap: 2.133vw;

    svg {
      width: 12.8vw;
    }
  }

  .benefits__list-item + .benefits__list-item {
    margin-top: 2.133vw;
  }

  .technologies {
    padding-top: 6.4vw;
  }

  .map {
    padding-bottom: 6.4vw;
  }

  .map__title-container {
    gap: 6.4vw;
  }

  .testimonials {
    padding: 6.4vw 0 12.8vw;
  }
}
