/* 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.25cqi;
}

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

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

.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 {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
  }
}

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

.team-slider__popup {
  display: none;
}

.team-slider__img {
  position: relative;
  transform: translateZ(1px);
  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: .63cqi;
}

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

.team-slider__quote-btn {
  cursor: pointer;
  position: absolute;
  top: 1.667cqi;
  left: 1.667cqi;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: opacity .2s, visibility .2s;
}

.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.083cqi;
  transform: rotateY(180deg) translateZ(1px);

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

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

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

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

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

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

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

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

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

  .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.867cqi;
    position: fixed;
    top: 0;
    left: 0;
    width: 100cqi;
    height: 100vh;
    padding: 0 14.4cqi;
    background: #000000E5;
    color: var(--white);
    padding: 0 14.4cqi;
    opacity: 0;
    transition: opacity var(--normal);
    z-index: 1000;

    svg {
      width: 12.8cqi;
    }

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

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

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

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

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

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

.technologies__title {
  width: 33.907cqi;
}

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

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

.technologies__list {
  margin-top: 1.563cqi;
}

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

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

  .technologies__title {
    width: 100%;
  }

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

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

  .technologies__list {
    margin-top: 2.083cqi;
  }

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

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

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

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

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

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

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

.achievements {
  padding: 5.365cqi 1.25cqi 5.365cqi 15.156cqi;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.achievements__badge {
  width: 12.24cqi;
  z-index: 2;

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

@media (hover: hover) {
  .achievements__badge:hover {
    animation: pulse .8s ease-in-out;
  }
}

.badge-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .833cqi;
  aspect-ratio: 234/261;
  color: var(--white);

  * {
    z-index: 2;
  }

  img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }
}

.badge-link--grey .badge-link__contrast-text {
  color: var(--green);
}

.badge-link:hover {
  .badge-link__underline {
    animation: underline-slide 0.8s ease-in-out forwards;
  }
}

.badge-link__underline {
  display: inline;
  background-repeat: repeat-x;
  background-size: 200% 1px;
  background-position: 0 100%;
  background-image: linear-gradient(
    to right,
    var(--white) 0%, var(--white) 50%,
    rgba(0,0,0,0) 50%, rgba(0,0,0,0) 100%
  );
}

@media (max-width: 1280px) {
  .achievements {
    padding: 7.552cqi 24px;
  }

  .achievements__badge {
    width: 14.063cqi;
  }

  .badge-link span {
    display: none;
  }
}

@media (max-width: 767px) {
  .achievements {
    padding: 12.8cqi 16px;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 4.267cqi;
  }

  .achievements__badge {
    width: 27.733cqi;
  }
}

.testimonials, .testimonials__content {
  overflow: visible;
}

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

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

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

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

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

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

.testimonials__photo {
  flex-shrink: 0;
  width: 2.5cqi;
  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.083cqi 2.083cqi;
  }

  .testimonials__card {
    padding: 4.167cqi;

    svg {
      width: 5.208cqi;
    }
  }

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

  .testimonials__author {
    gap: 2.083cqi
  }

  .testimonials__photo {
    width: 5.208cqi;
  }
}

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

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

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

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

    svg {
      width: 10.667cqi;
    }
  }

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

  .testimonials__author {
    gap: 4.267cqi
  }

  .testimonials__photo {
    width: 8.533cqi;
  }

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

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

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

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

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

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

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

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

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

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

.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(-50%, 0);
  }
}

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

/* sections */
@media (min-width: 1281px) {
  .companies, .form-feedback, .footer {
    margin-top: 4.167cqi;
  }

  .benefits__title {
    max-width: 33.906cqi;
  }
}

.preview {
  padding: 1.875cqi 1.25cqi 4.167cqi 4.74cqi;
}

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

.preview__img {
  margin-top: 4.167cqi;
  width: 100%;
  height: auto;
}

#our-story {
  overflow: visible;
}

.our-story__content {
  display: flex;
  align-items: center;
  gap: 6.979cqi;
}

.our-story__img {
  width: 34.844cqi;
}

.our-story__text {
  width: 27.865cqi;
}

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

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

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

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

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

.our-journey__img {
  width: 41.771cqi;
}

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

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

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

  &::before {
    content: "";
    width: calc(100% + 15.156cqi);
    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.844cqi;
}

.our-clients__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 12.5cqi);
  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.667cqi;
}

.team__slider {
  margin-top: 2.5cqi;
  padding-bottom: 4.167cqi;
}

.team__benefits-title {
  width: 33.906cqi;
}

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

.benefits {
  padding-right: 2.083cqi;
}

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

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

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

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

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

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

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

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

.map__img {
  width: 100%;
}

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

@media (max-width: 1280px) {
  .preview {
    padding: 3.776cqi 3.125cqi 7.552cqi;
  }

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

  .preview__img {
    margin-top: 6.25cqi;
  }

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

  .our-story__content {
    gap: 7.813cqi;
  }

  .our-story__img {
    width: 39.063cqi;
    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.104cqi;
  }

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

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

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

  .our-journey__img {
    width: 46.875cqi;
  }

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

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

    &:before {
      width: 100%;
    }
  }

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

  .our-clients__img {
    width: 25cqi;
  }

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

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

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

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

  .benefits__item-title {
    gap: 3.906cqi;

    svg {
      width: 6.25cqi;
    }
  }

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

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

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

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

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

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

  .preview__subtitle {
    margin-top: 4.267cqi;
  }

  .preview__img {
    margin-top: 9.6cqi;
  }

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

  .our-story__img {
    width: 73.067cqi;
  }

  .our-story__text {
    width: auto;
  }

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

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

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

  .our-journey__item {
    gap: 2.133cqi;

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

  .our-journey__img {
    width: 100%;
  }

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

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

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

  .our-clients__img {
    width: 37.333cqi;
  }

  .team {
    padding-bottom: 6.4cqi;
  }

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

  .benefits {
    margin-top: 6.4cqi;
  }

  .benefits__content {
    margin-top: 6.4cqi;
  }

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

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

  .benefits__item-title {
    gap: 2.133cqi;

    svg {
      width: 12.8cqi;
    }
  }

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

  .technologies {
    padding-top: 6.4cqi;
  }

  .map {
    padding-bottom: 6.4cqi;
  }

  .map__title-container {
    gap: 6.4cqi;
  }

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