/* ==========================================================================
   gallery.css - Masonry gallery, video frames, card overlays
   Dooze Clip Generator
   ========================================================================== */

/* 3-Column Masonry Gallery (Preserves Aspect Ratio with Zero Voids) */
.card-wrap {
  width: 100%;
  max-width: 1040px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.masonry-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.job-card {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card, 18px);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out;
}

.job-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 199, 250, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.video-frame {
  width: 100%;
  position: relative;
  background-color: #161719;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Aspect ratios matching video specification */
.video-frame.r-16-9 {
  aspect-ratio: 16 / 9;
}

.video-frame.r-9-16 {
  aspect-ratio: 9 / 16;
}

.video-frame.r-1-1 {
  aspect-ratio: 1 / 1;
}

.job-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  outline: none;
  pointer-events: none;
}

.overlay-play-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(12, 13, 15, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  pointer-events: none;
}

.overlay-play-center svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  margin-left: 2px;
}

.job-card:hover .overlay-play-center {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-overlay-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  transform: translateY(4px);
  pointer-events: none;
  z-index: 2;
}

.job-card:hover .card-overlay-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-download-icon {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background-color: rgba(12, 13, 15, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
  text-decoration: none;
}

.btn-download-icon:hover {
  background-color: rgba(168, 199, 250, 0.2);
  transform: scale(1.06);
}

.btn-download-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
