.references {
  background-color: var(--color-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.references__viewport {
  width: 100%;
  overflow: hidden;
  padding: var(--spacing-4xl) 0;
}

.references__track {
  transition: transform 1000ms ease;
  position: relative;
}

.references__card {
  background-color: rgba(61, 207, 182, 0.35);
  min-width: 300px;
  min-height: 300px;
  flex: 0 0 clamp(250px, 50%, 550px);
  border: 2px solid var(--color-primary);
  border-radius: var(--br-25);
  padding: clamp(var(--spacing-xs), 2.5vw, var(--spacing-lg)) clamp(var(--spacing-xs), 2.5vw, var(--spacing-md));
  display: flex;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  transition: transform 1000ms ease;
  left: 50%;
  top: 50%;
}

.left {
  transform: translate(-50%, -50%) translateX(-100%) scale(0.8);
  opacity: 0.5;
  z-index: 1;
}

.center {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  z-index: 2;
}

.right {
  transform: translate(-50%, -50%) translateX(100%) scale(0.8);
  opacity: 0.5;
  z-index: 1;
}

.references__card.center::after {
  content: "";
  display: block;
  position: absolute;
  width: clamp(60px, 5.5vw, 70px);
  height: clamp(60px, 5.5vw, 70px);
  background: url("../../assets/icons/quotes.svg");
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  top: -4%;
  left: -1%;
}

.references > h2 {
  font-family: var(--fira);
  font-size: clamp(var(--fs-lg), 6.5vw, var(--fs-xl));
  font-weight: 700;
  color: var(--color-primary);
  margin: var(--spacing-lg) 0 var(--spacing-3xl) 0;
  text-align: center;
  width: 100%;
}

.references__text {
  font-family: var(--karla);
  font-size: clamp(var(--fs-xxs), 3vw, var(--fs-md));
  padding-bottom: var(--spacing-xl);
}

.references__author {
  font-family: var(--karla);
  font-size: clamp(var(--fs-xxs), 3vw, var(--fs-sm));
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.references__author::before {
  content: "";
  background-color: var(--color-text);
  display: inline-block;
  flex: 1;
  height: 1px;
  min-width: 25%;
  vertical-align: middle;
  margin-right: var(--spacing-sm);
}

.dot {
  height: 8px;
  width: 8px;
  background-color: whitesmoke;
  border-radius: 50%;
  transition: all 125ms ease;
}

.dot--active {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

.references__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: var(--spacing-2xl) 0;
}

.arrowButton {
  position: relative;
  width: 15px;
  height: 15px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.arrowButton__icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition:
    transform 125ms ease-in-out,
    opacity 125ms ease-in-out;
}

.arrowButton__icon--default {
  opacity: 1;
  transform: scale(1) translateX(0);
}

.arrowButton__icon--hover {
  opacity: 0;
  transform: scale(1) translateX(0);
}

.arrowButton--previous:hover .arrowButton__icon--default {
  opacity: 0;
}

.arrowButton--previous:hover .arrowButton__icon--hover {
  opacity: 1;
  transform: scale(1.1) translateX(-5px);
}

.arrowButton--next:hover .arrowButton__icon--default {
  opacity: 0;
}

.arrowButton--next:hover .arrowButton__icon--hover {
  opacity: 1;
  transform: scale(1.1) translateX(5px);
}

.references__selected-index {
  display: flex;
  justify-content: space-around;
  width: 100px;
}

.references__actions > img {
  margin: 0 var(--spacing-sm);
}

@media (max-width: 768px) {
  .references {
    padding: var(--spacing-xl) var(--spacing-xs) var(--spacing-2xl) var(--spacing-xs);
  }

  .references__content {
    gap: 0;
  }
}

@media (max-width: 400px) {
  .references > h2 {
    max-width: 21ch;
    text-align: center;
    align-self: center;
  }
}
