/* portfolio page */
.portfolio-section {
  margin-top: var(--vspace-3);
}
.portfolio-section h3 {
  font-size: 12px;
  letter-spacing: 2px;
}
.portfolio-section * {
  z-index: 50;
}

.clients-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  /* padding: 20px; */
}

.portfolio-item {
  flex: 1 1 calc(25% - 20px); /* 4 items per row on large screens */
  max-width: calc(25% - 20px);
  text-align: center;

  /* testing */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-item a.external_link {
  width: 100%;
}

.portfolio-item img,
.portfolio-item iframe {
  width: 100%;
  max-width: 300px;
  height: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
  margin: 0;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

/* .portfolio-item img:hover {
  transform: scale(1.05);
} */

.portfolio-title {
  font-size: 18px;
  margin: 0;
}

.portfolio-video-title {
  margin-top: -32px;
}

.portfolio-video-wrapper {
  position: relative;
  width: 100%;
  height: 91%;
  border-radius: 8px;
  flex: 1 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden !important;
  width: 280px;
  height: 533px;
}

.portfolio-video-wrapper iframe,
.portfolio-video-wrapper video {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border: 0;
  object-fit: cover;
}

/* Responsive: 2 items per row on smaller screens */
@media (max-width: 768px) {
  .portfolio-item {
    flex: 1 1 calc(50% - 20px) !important; /* 2 items per row on tablets/mobile */
    max-width: calc(50% - 20px) !important;
  }

  .portfolio-video-wrapper {
    height: 89%;
  }
}

/* Center last row if it has 1 or 2 items */

/* #first_client_section {
  border: 1px solid red;
}
#second_client_section {
  border: 1px solid green;
}
#other_clients_section {
  border: 1px solid yellow;
} */

.client-logo {
  height: 60px;
  display: block;
  margin-bottom: 0px;
}

.flex-col {
  flex-direction: column;
}

/* clean youtube preview */
.ytp-impression-link,
.player-controls-top,
.yt-spec-touch-feedback-shape__fill {
  display: none !important;
}

/* testing new  */
.portfolio-item {
  flex: 1 1 calc(25% - 20px); /* 4 items per row on large screens */
  max-width: calc(25% - 20px);
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-media-wrapper {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 16; /* same for image and video */
  border-radius: 8px;
  overflow: hidden;
  position: relative;

  height: auto;
}

.portfolio-media-wrapper img,
.portfolio-media-wrapper iframe,
.portfolio-media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  transition: transform 0.3s ease-in-out;
  border-radius: 8px;
  position: absolute;
  top: 0;
  left: 0;
}

/*  */

.video-poster {
  cursor: pointer;
}
