.vfx-portfolio {
  max-width: 900px;
  margin: auto;
  padding: 60px 20px;
  color: #111111;
  font-family: system-ui, sans-serif;
}

/* HEADINGS */
.vfx-portfolio h1 {
  text-align: center;
  font-size: 3rem;
}

.vfx-portfolio h2 {
  text-align: center;
  margin-bottom: 30px;
}

.vfx-portfolio .section {
  margin-top: 80px;
}

/* VIDEO (Showreel) */
.vfx-portfolio .video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: none;
}

/* BREAKDOWN VIDEO */
.vfx-portfolio .breakdown-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

/* Caption under breakdown */
.vfx-portfolio .video-caption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  letter-spacing: 0.3px;
}

/* =========================
   SLIDER CONTAINER
   ========================= */
.vfx-portfolio .img-compare {
  --slider-x: 50%; /* JS will override on load */
  position: relative;
  width: 100%;
  height: 680px; /* bigger so images aren’t cropped */
  margin-bottom: 50px;
  overflow: hidden;
  border-radius: 18px;
  background: #f8f8f8;
}

/* IMAGES */
.vfx-portfolio .img-compare img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* keeps full image visible */
  user-select: none;
  pointer-events: none;
}

/* TOP IMAGE (revealed by slider) */
.vfx-portfolio .img-compare img:last-child {
  clip-path: inset(0 0 0 var(--slider-x));
}

/* =========================
   DRAG HANDLE
   ========================= */
.vfx-portfolio .slider-handle {
  position: absolute;
  top: 0;
  left: var(--slider-x);
  width: 4px;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
  cursor: col-resize;
  z-index: 10;
}

/* Knob (grab indicator) */
.vfx-portfolio .slider-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.vfx-portfolio .img-compare {
  touch-action: pan-y; /* allows vertical scroll while enabling horizontal drag */
}



/* =========================
   HOUDINI GRID / VIDEOS
   ========================= */
.vfx-portfolio .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.vfx-portfolio .houdini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vfx-portfolio .houdini-video {
  width: 100%;
  aspect-ratio: 16 / 9; 
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 8px;
}

.vfx-portfolio .houdini-caption {
  font-size: 0.9rem;
  color: #333;
  text-align: center;
  font-style: italic;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  .vfx-portfolio .img-compare {
    height: 500px;
  }
  .vfx-portfolio .houdini-video {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .vfx-portfolio .img-compare {
    height: 350px;
  }
  .vfx-portfolio .houdini-video {
    height: 140px;
  }
}
