/* ============================================================
   PORTFOLIO CARDS
   ============================================================ */

.portfolio-page-grid .portfolio-card .thumb {
  width: 100%;
  overflow: hidden;
}

/* ============================================================
   SPORTS ONLY — FIX
   ============================================================ */

.portfolio-page-grid .portfolio-card:first-child .thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.portfolio-page-grid .portfolio-card:first-child .thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/*
   The Videos card intentionally does NOT use a Sports image.
   It has its own visual treatment with a play symbol.
*/

.portfolio-page-grid .video-portfolio-card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255,255,255,0.10) 0,
      rgba(255,255,255,0.03) 18%,
      transparent 45%
    ),
    #33341F;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-page-grid .video-portfolio-card .video-card-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-page-grid .video-portfolio-card .video-card-lines {
  position: absolute;
  width: 65%;
  height: 65%;
  border: 1px solid rgba(255,255,255,0.14);
  transform: rotate(45deg);
}

.portfolio-page-grid .video-portfolio-card .video-card-lines::before,
.portfolio-page-grid .video-portfolio-card .video-card-lines::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(255,255,255,0.09);
}

.portfolio-page-grid .video-portfolio-card .play-button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
}

.portfolio-page-grid .video-portfolio-card .play-button::after {
  content: "";
  margin-left: 6px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid #ffffff;
}

.portfolio-page-grid .video-portfolio-card:hover .play-button {
  transform: scale(1.06);
  transition: transform 0.3s ease;
}

/* Moving preview on the Videos card: silent loop under the play button */
.portfolio-page-grid .video-portfolio-card .video-card-loop {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  pointer-events: none;
}

.portfolio-page-grid .video-portfolio-card .video-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20,21,12,.15) 0%, rgba(20,21,12,.45) 100%);
  pointer-events: none;
}

.portfolio-page-grid .video-portfolio-card .play-button {
  z-index: 2;
}

.portfolio-page-grid .video-portfolio-card .video-card-lines {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-page-grid .video-portfolio-card .video-card-loop {
    display: none;
  }
  .portfolio-page-grid .video-portfolio-card .video-card-lines {
    display: block;
  }
}


/* lone last card (10 categories in a 3-column grid): centre it */
@media (min-width: 901px) {
  .portfolio-page-grid > .portfolio-card:last-child:nth-child(3n+1) {
    grid-column: 2;
  }
}
