/* ==========================================================================
   Color Grading Interactive 3D Showcase & Cinematic Video Gallery
   Inspired by Reference Video (One SEO-optimized video can outperform 50 uploads):
   - Phase 1: 3D Motion Video Wall (Opens First on Card Click)
   - Phase 2: Complete Color Grading Grid View (6 Cinematic 16:9, 1 Vertical 9:16)
   - Phase 3: Fullscreen Cinematic Video Lightbox Player with Sound & Controls
   - Kinetic Tracing Laser Lines, Rotating SVG Badges & Pure Visual Media Cards
   ========================================================================== */

/* --------------------------------------------------------------------------
   Modal Backdrop & Base Viewport
   -------------------------------------------------------------------------- */
.cg-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999998;
  background: #050302;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  display: none !important;
  pointer-events: none !important;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  perspective: 1200px;
}

.cg-modal.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.cg-modal:not(.active) * {
  pointer-events: none !important;
}

/* Ambient Backdrops */
.cg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255, 153, 0, 0.16) 0%, rgba(5, 3, 2, 0.96) 75%), #040201;
  pointer-events: none;
  z-index: 1;
}

.cg-splash-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  animation: cgGlowFloat 14s ease-in-out infinite alternate;
}

.cg-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #FF9900 0%, rgba(255, 153, 0, 0) 70%);
  top: -120px;
  right: -100px;
}

.cg-glow-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #E65100 0%, rgba(230, 81, 0, 0) 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.cg-glow-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #00BCD4 0%, rgba(0, 188, 212, 0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.12;
}

@keyframes cgGlowFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
  100% { transform: translate(-25px, -30px) scale(0.95); }
}

/* --------------------------------------------------------------------------
   HUD Top Navigation Bar
   -------------------------------------------------------------------------- */
.cg-hud-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(8, 4, 3, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cg-hud-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cg-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 153, 0, 0.18);
  border: 1px solid rgba(255, 153, 0, 0.4);
  color: #FFA726;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cg-hud-title {
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: 0.5px;
}

.cg-hud-title .text-accent {
  color: #FF9900;
}

.cg-hud-count {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mode Switcher Tabs */
.cg-mode-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.cg-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cg-mode-btn:hover {
  color: #FFFFFF;
}

.cg-mode-btn.active {
  background: linear-gradient(135deg, #FFA726 0%, #E65100 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.45);
}

/* Close Button */
.cg-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cg-close-btn:hover {
  background: rgba(255, 153, 0, 0.28);
  border-color: #FF9900;
  color: #FFE082;
  transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   Modal Body View Modes (3D Motion Wall vs Grid View)
   -------------------------------------------------------------------------- */
.cg-modal-body {
  position: absolute;
  top: 73px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   PHASE 1: 3D MOTION VIDEO WALL (OPENS FIRST)
   Continuous Looping Columns Drifting in 3D Perspective Space
   -------------------------------------------------------------------------- */
.cg-3d-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
}

.cg-3d-plane {
  position: absolute;
  top: -45%;
  left: -20%;
  width: 140%;
  height: 190%;
  display: flex;
  justify-content: center;
  gap: 26px;
  transform: rotateX(16deg) rotateY(-18deg) rotateZ(6deg);
  transform-style: preserve-3d;
  pointer-events: auto;
}

.cg-3d-col {
  width: clamp(240px, 20vw, 340px);
  flex-shrink: 0;
  overflow: hidden;
  height: 100%;
}

.cg-3d-track {
  display: flex;
  flex-direction: column;
  gap: 24px;
  will-change: transform;
}

.cg-col-1 .cg-3d-track { animation: cgScrollTrack 26s linear infinite; }
.cg-col-2 .cg-3d-track { animation: cgScrollTrack 20s linear infinite; }
.cg-col-3 .cg-3d-track { animation: cgScrollTrack 24s linear infinite; }
.cg-col-4 .cg-3d-track { animation: cgScrollTrack 18s linear infinite; }
.cg-col-5 .cg-3d-track { animation: cgScrollTrack 22s linear infinite; }

@keyframes cgScrollTrack {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* 3D Video Card */
.cg-3d-card {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #090503;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.cg-3d-card.aspect-horiz {
  aspect-ratio: 16 / 9;
}

.cg-3d-card.aspect-vert {
  aspect-ratio: 9 / 16;
}

.cg-3d-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.cg-3d-card:hover {
  transform: translateZ(45px) scale(1.05);
  border-color: #FFA726;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 153, 0, 0.55);
  z-index: 50;
}

.cg-3d-card:hover video {
  transform: scale(1.06);
}

/* Tracing Neon Laser Border around 3D card */
.cg-3d-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: conic-gradient(from 0deg, transparent 0%, #FFA726 25%, #E65100 50%, transparent 75%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
  animation: cgLaserSpin 5s linear infinite;
  pointer-events: none;
}

.cg-3d-card:hover::before {
  opacity: 1;
}

@keyframes cgLaserSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Rotating Stamp Badge on Video Cards */
.cg-rotating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 60px;
  height: 60px;
  z-index: 5;
  pointer-events: none;
}

.cg-badge-svg {
  width: 100%;
  height: 100%;
  animation: cgBadgeSpin 18s linear infinite;
  transform-origin: center;
}

.cg-badge-svg text {
  fill: #FFA726;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cg-badge-center-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFA726;
  filter: drop-shadow(0 0 6px rgba(255, 167, 38, 0.8));
}

@keyframes cgBadgeSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Play Button Overlay with Pulsing Rings */
.cg-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  z-index: 4;
  transition: all 0.3s ease;
}

.cg-3d-card:hover .cg-play-overlay,
.cg-video-card:hover .cg-play-overlay {
  background: rgba(0, 0, 0, 0.45);
}

.cg-play-button-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cg-play-pulse-ring {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 153, 0, 0.35);
  animation: cgPulse 2.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

.cg-pulse-2 {
  animation-delay: 1.1s;
}

@keyframes cgPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.85); opacity: 0; }
}

.cg-play-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFA726 0%, #E65100 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(255, 153, 0, 0.6), 0 0 20px rgba(255, 167, 38, 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  z-index: 2;
}

.cg-3d-card:hover .cg-play-btn,
.cg-video-card:hover .cg-play-btn {
  transform: scale(1.12);
  box-shadow: 0 12px 30px rgba(255, 153, 0, 0.8), 0 0 30px rgba(255, 167, 38, 0.8);
}

.cg-play-btn svg {
  margin-left: 2px;
}

/* Sound Wave Bars */
.cg-soundwaves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
  z-index: 2;
}

.cg-wave-bar {
  width: 2.5px;
  height: 100%;
  background: #FFA726;
  border-radius: 2px;
  animation: cgWave 1.2s ease-in-out infinite alternate;
}

.cg-wave-bar:nth-child(1) { animation-delay: 0.1s; height: 40%; }
.cg-wave-bar:nth-child(2) { animation-delay: 0.3s; height: 80%; }
.cg-wave-bar:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.cg-wave-bar:nth-child(4) { animation-delay: 0.4s; height: 60%; }
.cg-wave-bar:nth-child(5) { animation-delay: 0.15s; height: 50%; }

@keyframes cgWave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Floating Interactive Pill Hint */
.cg-floating-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: rgba(14, 8, 4, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 153, 0, 0.6);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 153, 0, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: cgHintBounce 3s ease-in-out infinite;
}

.cg-floating-hint:hover {
  background: rgba(255, 153, 0, 0.95);
  color: #050302;
  border-color: #FFA726;
  transform: translateX(-50%) translateY(-4px) scale(1.03);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 153, 0, 0.7);
}

.cg-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFA726;
}

.cg-floating-hint:hover .cg-hint-icon {
  color: #050302;
}

@keyframes cgHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* --------------------------------------------------------------------------
   PHASE 2: COMPLETE COLOR GRADING GRID VIEW (ALL GRADES VISIBLE)
   -------------------------------------------------------------------------- */
.cg-grid-scene {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 30px 40px 100px;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
  scroll-behavior: smooth;
}

.cg-grid-scene::-webkit-scrollbar {
  width: 8px;
}

.cg-grid-scene::-webkit-scrollbar-track {
  background: rgba(5, 3, 2, 0.6);
}

.cg-grid-scene::-webkit-scrollbar-thumb {
  background: rgba(255, 153, 0, 0.45);
  border-radius: 4px;
}

.cg-grid-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* Grid Header */
.cg-grid-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 0 20px;
}

.cg-grid-headline {
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFA726 60%, #E65100 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cg-grid-subline {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 20px;
}

/* Filter Pills */
.cg-brand-filters {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.cg-filter-btn {
  padding: 8px 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cg-filter-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 153, 0, 0.5);
}

.cg-filter-btn.active {
  background: linear-gradient(135deg, #FFA726 0%, #E65100 100%);
  color: #FFFFFF;
  border-color: #FFA726;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.45);
}

/* Section Groups */
.cg-section-group {
  margin-bottom: 50px;
}

.cg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cg-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cg-section-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFA726;
  box-shadow: 0 0 10px #FFA726;
}

.cg-section-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: 0.3px;
}

.cg-section-pill {
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 153, 0, 0.15);
  border: 1px solid rgba(255, 153, 0, 0.35);
  color: #FFA726;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 3-Column Horizontal Grid (16:9 Widescreen) */
.cg-horizontal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Vertical Reel Grid (9:16 Social Reel) */
.cg-vertical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  gap: 24px;
  justify-content: center;
}

/* Video Card (Pure Visual Media Card - No text below video) */
.cg-video-card {
  position: relative;
  background: rgba(14, 8, 4, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cg-video-card:hover {
  transform: translateY(-8px);
  border-color: #FFA726;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 153, 0, 0.4);
}

.cg-card-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cg-horizontal-card .cg-card-media {
  aspect-ratio: 16 / 9;
}

.cg-vertical-card .cg-card-media {
  aspect-ratio: 9 / 16;
}

.cg-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cg-video-card:hover .cg-card-media video {
  transform: scale(1.05);
}

/* Hover Pill Overlay */
.cg-card-zoom-overlay {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  pointer-events: none;
}

.cg-video-card:hover .cg-card-zoom-overlay {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cg-grid-zoom-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #FFA726 0%, #E65100 100%);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 153, 0, 0.6);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   VIEW MODE TOGGLING RULES
   -------------------------------------------------------------------------- */
[data-view-mode="3d"] .cg-3d-scene {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: scale(1);
}

[data-view-mode="3d"] .cg-grid-scene {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(0.96);
}

[data-view-mode="grid"] .cg-3d-scene {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(1.06);
}

[data-view-mode="grid"] .cg-grid-scene {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: scale(1);
}

/* --------------------------------------------------------------------------
   PHASE 3: FULLSCREEN CINEMATIC VIDEO LIGHTBOX PLAYER
   -------------------------------------------------------------------------- */
.cg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(4, 2, 1, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 24px;
  overflow-y: auto;
}

.cg-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cg-lightbox-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  margin: auto;
  background: #000000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 153, 0, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
}

.cg-lightbox-container.is-vertical {
  max-width: 480px;
}

.cg-lightbox-header {
  padding: 16px 24px;
  background: rgba(14, 8, 4, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  flex-shrink: 0;
}

.cg-lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cg-lightbox-title {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.cg-lightbox-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #FFA726;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cg-lightbox-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.cg-lightbox-close:hover {
  background: #E65100;
  border-color: #E65100;
  color: #FFFFFF;
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 0 18px rgba(230, 81, 0, 0.6);
}

.cg-lightbox-player-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cg-lightbox-video {
  width: 100%;
  max-height: calc(90vh - 85px);
  object-fit: contain;
  display: block;
  outline: none;
}

/* Lightbox Nav Buttons */
.cg-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(14, 8, 4, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.25s ease;
}

.cg-lightbox-nav:hover {
  background: linear-gradient(135deg, #FFA726 0%, #E65100 100%);
  color: #FFFFFF;
  border-color: #FFA726;
  transform: translateY(-50%) scale(1.1);
}

.cg-lightbox-prev {
  left: 20px;
}

.cg-lightbox-next {
  right: 20px;
}

/* --------------------------------------------------------------------------
   HOMEPAGE COLOR GRADING PREVIEW (Matches Card 1 Frame & Curvy Corners)
   -------------------------------------------------------------------------- */
.project-preview-cg {
  position: relative;
  overflow: hidden;
  background: transparent !important;
}

.cg-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .cg-preview-video {
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .cg-horizontal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .cg-horizontal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cg-hud-header {
    padding: 14px 20px;
  }
  .cg-hud-brand {
    gap: 10px;
  }
  .cg-hud-title {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .cg-3d-col {
    width: 200px;
  }
  .cg-grid-scene {
    padding: 20px 16px 80px;
  }
  .cg-hud-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .cg-mode-switch {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}
