/* About — 4 cards in a row on desktop; one card per screen on mobile. */

.qm-frame.qm-about {
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.qm-about .qm-faq__head {
  width: min(100%, 42rem);
  flex-shrink: 0;
  position: static;
  z-index: 0;
}

.qm-about-track {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding: 10px 14px 16px;
  box-sizing: border-box;
  outline: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.qm-about-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.qm-about-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 22px 18px;
  border: 1px solid var(--qm-line);
  border-radius: var(--qm-radius);
  background: rgba(2, 6, 14, 0.55);
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform-origin: 50% 50%;
  -webkit-transform-origin: 50% 50%;
  transform: perspective(1100px) scale(0.98) rotateY(0deg);
  -webkit-transform: perspective(1100px) scale(0.98) rotateY(0deg);
  transition:
    transform 1.15s ease-in-out,
    border-color 0.9s ease,
    background 0.9s ease;
  -webkit-transition:
    -webkit-transform 1.15s ease-in-out,
    border-color 0.9s ease,
    background 0.9s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.qm-about-card.is-left {
  transform: perspective(1100px) scale(0.98) rotateY(3deg);
  -webkit-transform: perspective(1100px) scale(0.98) rotateY(3deg);
}

.qm-about-card.is-right {
  transform: perspective(1100px) scale(0.98) rotateY(-3deg);
  -webkit-transform: perspective(1100px) scale(0.98) rotateY(-3deg);
}

.qm-about-card.is-active {
  border-color: var(--qm-cyan-soft);
  background: linear-gradient(
    180deg,
    rgba(58, 82, 122, 0.42) 0%,
    rgba(6, 11, 24, 0.94) 100%
  );
  transform: perspective(1100px) scale(1.02) rotateY(0deg);
  -webkit-transform: perspective(1100px) scale(1.02) rotateY(0deg);
  z-index: 1;
}

.qm-about-card.is-turning {
  z-index: 2;
  transform: perspective(1100px) scale(1.02) rotateY(2deg);
  -webkit-transform: perspective(1100px) scale(1.02) rotateY(2deg);
}

.qm-about-card__title {
  margin: 0 0 18px;
  color: var(--qm-text);
  font-family: var(--qm-font-head);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.qm-about-card__text {
  margin: 0;
  color: var(--qm-muted);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  flex: 1;
}

@media (max-width: 767px) {
  .qm-frame.qm-about {
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .qm-about-track {
    flex: 0 0 auto;
    min-height: 0;
    align-items: center;
    gap: 28px;
    padding: 12px 18px 16px;
    overflow: visible;
    touch-action: pan-y;
  }

  .qm-about-card {
    flex: 0 0 auto;
    width: 86%;
    max-width: 22rem;
    min-width: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 18px 16px;
    transform: perspective(1100px) scale(1) rotateY(0deg);
    -webkit-transform: perspective(1100px) scale(1) rotateY(0deg);
    transition:
      transform 2s ease-in-out,
      border-color 1.5s ease,
      background 1.5s ease;
    -webkit-transition:
      -webkit-transform 2s ease-in-out,
      border-color 1.5s ease,
      background 1.5s ease;
  }

  .qm-about-card.is-left,
  .qm-about-card.is-right {
    transform: perspective(1100px) scale(1) rotateY(0deg);
    -webkit-transform: perspective(1100px) scale(1) rotateY(0deg);
  }

  .qm-about-card.is-active {
    transform: perspective(1100px) scale(1) rotateY(0deg);
    -webkit-transform: perspective(1100px) scale(1) rotateY(0deg);
  }

  .qm-about-card.is-turning {
    animation: none;
    -webkit-animation: none;
    transform: perspective(1100px) scale(1) rotateY(2deg);
    -webkit-transform: perspective(1100px) scale(1) rotateY(2deg);
  }

  .qm-about-card__title {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .qm-about-card__text {
    font-size: 15px;
    line-height: 1.52;
  }
}

@media (min-width: 768px) {
  .qm-frame.qm-about {
    overflow-x: clip;
    overflow-y: hidden;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .qm-about .qm-faq__head {
    flex-shrink: 0;
    padding-bottom: 4px;
  }

  .qm-about-track {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    padding: 20px 16px 24px;
    overflow: hidden;
  }

  .qm-about-card {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 0;
    height: auto;
    max-height: calc(100% / 1.08);
    padding: 16px 14px 22px;
    transform-origin: 50% 0%;
    -webkit-transform-origin: 50% 0%;
  }

  .qm-about-card__title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .qm-about-card__text {
    font-size: 16px;
    line-height: 1.5;
    min-height: 0;
  }
}

@media (min-width: 1024px) {
  .qm-frame.qm-about {
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .qm-about-track {
    padding-bottom: 28px;
  }

  .qm-about-card {
    min-height: 0;
    max-height: calc(100% / 1.08);
    padding: 16px 16px 22px;
  }

  .qm-about-card__title {
    font-size: 21px;
    margin-bottom: 20px;
  }

  .qm-about-card__text {
    font-size: 17px;
    line-height: 1.52;
  }
}

@media (hover: hover) and (pointer: fine) {
  .qm-about-card:hover:not(.is-turning) {
    border-color: var(--qm-cyan-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .qm-about-track {
    scroll-behavior: auto;
  }

  .qm-about-card {
    transition: none;
    -webkit-transition: none;
  }

  .qm-about-card.is-turning,
  .qm-about-card.is-turning:hover {
    transform: perspective(1100px) scale(1.02) rotateY(0deg);
    -webkit-transform: perspective(1100px) scale(1.02) rotateY(0deg);
  }

  .qm-about-card:hover {
    transform: perspective(1100px) scale(0.98) rotateY(0deg);
    -webkit-transform: perspective(1100px) scale(0.98) rotateY(0deg);
  }
}
