/* Showcase Page */
.showcase-page {
  padding: 80px 0;
}
.showcase-page .tagline {
  margin-bottom: 16px;
}
.showcase-page .section-title {
  margin-bottom: 12px;
}
.showcase-page .section-subtitle {
  margin-bottom: 48px;
}

/* Filter Controls */
.showcase-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 48px;
}
.showcase-filter-btn {
  background: transparent;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}
.showcase-filter-btn:hover,
.showcase-filter-btn.active {
  background: var(--color-white);
  color: var(--color-black);
}

/* Showcase Grid
   ------------------------------------------------------------------
   Flex, not grid, on purpose. With display:grid a partial final row is
   always packed to the LEFT, so a 29-item filter in a 3-up layout left
   two cards hanging beside dead space — which is exactly how the
   Entertainment & Media filter (29 items) always ended on
   genius-world + filmratings looking like oversized strays. Wrapping
   flex with justify-content:center centres the short final row, so
   every category ends evenly. Cards carry no data-reveal, so the
   switch does not disturb the reveal animations.

   grid-template-columns is reset to "none" because site.bundle.css
   still carries the old grid rule and is served immutable. */
.showcase-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  grid-template-columns: none;
}

/* Showcase Card */
.showcase-card {
  background: transparent;
  border: none;
  padding: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity 0.3s ease;
  /* 3 per row: 3 x basis + 2 x 24px gap = 100% */
  flex: 0 0 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
}
.showcase-card:hover {
  opacity: 0.85;
}

.showcase-card-preview {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 12px;
  background: #1a1a1a;
}
.showcase-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.showcase-card:hover .showcase-card-preview img {
  transform: scale(1.05);
}

.showcase-card-info {
  padding: 0;
}
.showcase-card-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.showcase-card-info p {
  color: var(--color-gray);
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 400;
}

.showcase-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
  text-decoration: none;
  transition: color 0.3s ease;
}
.showcase-card-link:hover {
  color: var(--color-gray);
}
.showcase-card-link svg {
  width: 12px;
  height: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .showcase-grid {
    grid-template-columns: none;
  }
  .showcase-card {
    /* 2 per row: 2 x basis + 1 x 24px gap = 100% */
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 768px) {
  .showcase-page {
    padding: 48px 0;
  }
  .showcase-grid {
    grid-template-columns: none;
    gap: 32px;
  }
  .showcase-card {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Filter rail — single scrollable row, full-bleed, no wrapping pile */
  .showcase-filters {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin: 0 -24px 36px;
    padding: 2px 44px 2px 24px;
    overflow-x: auto;
    overflow-y: hidden;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 40px), transparent 100%);
  }
  .showcase-filters::-webkit-scrollbar {
    display: none;
  }
  .showcase-filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    padding: 12px 18px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .showcase-filters {
    margin: 0 -16px 32px;
    padding: 2px 40px 2px 16px;
  }
  .showcase-filter-btn {
    padding: 12px 16px;
  }
}

/* Load More Button
   Sits OUTSIDE .showcase-grid in the markup. While it was a grid item it
   stretched to one third of the container and sat hard against the left
   edge (margin:auto does not centre a stretched grid item), which read
   as another oversized stray. Hugging its content plus auto margins
   centres it properly. */
.showcase-load-more {
  display: block;
  width: fit-content;
  margin: 48px auto 0;
  background: transparent;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  padding: 12px 32px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}
.showcase-load-more:hover {
  background: var(--color-white);
  color: var(--color-black);
}
.showcase-load-more.hidden {
  display: none;
}

/* Card visibility for Load More */
.showcase-card.card-hidden {
  display: none;
}

/* Screenshot cards use the same frame as the older preview cards.
   Both class names exist in the markup, so keep them in sync. */
.showcase-card-image,
.showcase-card-preview {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 12px;
  background: #1a1a1a;
}
.showcase-card-image img,
.showcase-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.showcase-card:hover .showcase-card-image img,
.showcase-card:hover .showcase-card-preview img {
  transform: scale(1.05);
}

/* Filter counts and result summary */
.showcase-filter-count {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
.showcase-results {
  margin: 0 auto 28px;
  color: var(--color-gray);
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.showcase-active-filter {
  margin: 0 0 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
