.customer-videos-section {
  max-width: 1400px;
  margin: 0 auto 40px;
}

.customer-videos-section__title {
  margin: 0;
  padding: 10px 0;
  color: #353535;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.customer-videos-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.customer-videos-section__item {
  min-width: 0;
}

.customer-videos-section__trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
}

.customer-videos-section__trigger:disabled {
  cursor: default;
}

.customer-videos-section__preview {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #000;
}

.customer-videos-section__preview-video,
.customer-videos-section__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customer-videos-section__cover {
  position: absolute;
  inset: 0;
}

.customer-videos-section__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease;
}

.customer-videos-section__play img {
  display: block;
  width: 40%;
  height: 40%;
}

.customer-videos-section__trigger:hover .customer-videos-section__play,
.customer-videos-section__trigger:focus-visible .customer-videos-section__play {
  background: #256fff;
}

.customer-videos-section__trigger:focus-visible {
  outline: 2px solid #256fff;
  outline-offset: 3px;
  border-radius: 12px;
}

.customer-videos-section__item-title {
  margin: 10px 0 0;
  padding: 0 10px;
  color: #353535;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.customer-videos-section__modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.5);
}

.customer-videos-section__modal[hidden] {
  display: none;
}

.customer-videos-section__dialog {
  position: relative;
  width: min(900px, 80vw);
}

.customer-videos-section__modal-media,
.customer-videos-section__modal-video {
  display: block;
  width: 100%;
}

.customer-videos-section__modal-video {
  max-height: 80vh;
  border-radius: 24px;
  background: #000;
}

.customer-videos-section__close {
  position: absolute;
  top: -0px;
  right: -30px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.customer-videos-section__close::before,
.customer-videos-section__close::after {
  position: absolute;
  top: 15px;
  left: 3px;
  width: 26px;
  height: 2px;
  background: #fff;
  content: "";
}

.customer-videos-section__close::before {
  transform: rotate(45deg);
}

.customer-videos-section__close::after {
  transform: rotate(-45deg);
}

.customer-videos-section__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body.customer-video-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 839px) {
  .customer-videos-section {
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .customer-videos-section__title {
    font-size: 24px;
    line-height: 1.3;
  }

  .customer-videos-section__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .customer-videos-section__item {
    display: flex;
    align-items: center;
  }

  .customer-videos-section__item:nth-child(even) {
    flex-direction: row-reverse;
  }

  .customer-videos-section__item:nth-child(even) .customer-videos-section__item-title {
    text-align: right;
  }

  .customer-videos-section__trigger,
  .customer-videos-section__item-title {
    width: 50%;
  }

  .customer-videos-section__item-title {
    margin-top: 0;
    font-size: 12px;
  }

  .customer-videos-section__play {
    width: 36px;
    height: 36px;
  }

  .customer-videos-section__modal {
    padding: 10px;
  }

  .customer-videos-section__dialog {
    width: 100%;
  }

  .customer-videos-section__modal-video {
    border-radius: 12px;
  }

  .customer-videos-section__close {
    top: -36px;
    right: 0;
  }
}
