/* PORTFOLIO SLIDER ONLY */

/* Wrapper */
.portfolio-slider-wrapper {
  position: relative;
  width: 100%;
  margin-top: 30px;
  padding: 0px 0;
  overflow: hidden;
}

/* Slider track */
.portfolio-slider {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 40px 4px;
  scroll-snap-type: x mandatory;
  perspective: 1400px;
}

.portfolio-slider::-webkit-scrollbar {
  display: none;
}

/* Slider cards */
.portfolio-item {
  flex: 0 0 calc(20% - 20px);
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  position: relative;
  transition: transform .4s ease, filter .4s ease;
  transform: translateZ(0) scale(1);
  scroll-snap-align: center;
}

.portfolio-item:hover {
  transform: translateZ(40px) rotateY(6deg);
  filter: drop-shadow(0 20px 40px rgba(0,180,255,0.35));
}

/* Scaling states */
.portfolio-item.small {
  transform: scale(0.72);
  filter: brightness(0.6) blur(1px);
}

.portfolio-item.medium {
  transform: scale(0.88);
  filter: brightness(0.8);
}

.portfolio-item.center {
  transform: scale(1.22);
  z-index: 10;
  filter: brightness(1.1);
}

/* Video */
.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s ease;
}

.portfolio-item.center video {
  transform: scale(1.07);
}

/* Meta */
.portfolio-item .meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 0 10px black;
}

/* META BADGE */
.portfolio-item .meta {
  position: absolute;
  left: 10px;
  bottom: 10px;

  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;

  color: #fff;

  background: linear-gradient(
    135deg,
    rgba(0,0,0,.65),
    rgba(0,0,0,.35)
  );

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);

  opacity: .85;
  transition: .3s ease;
}


/* Arrow buttons */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 10px 16px;
  font-size: 24px;
  border-radius: 14px;
  cursor: pointer;
  z-index: 20;
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: .25s ease;
}

.portfolio-slider-wrapper:hover .slide-btn {
  opacity: 1;
}

.slide-btn.left { left: -6px; }
.slide-btn.right { right: -6px; }

/* Responsive */
@media (max-width:900px) {
  .portfolio-item { flex: 0 0 calc(33.33% - 20px); }
}

@media (max-width:600px) {
  .portfolio-item { flex: 0 0 calc(50% - 20px); }
  .slide-btn { display:none; }
}


.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  z-index: 9999;
}

.video-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-content {
  transform: scale(.8);
  animation: popIn .35s ease forwards;
  max-width: 90%;
  max-height: 90%;
  border-radius: 16px;
  overflow: hidden;
}

@keyframes popIn {
  0% { transform: scale(.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

#modalVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

video:fullscreen {
  object-fit: contain !important;
  background: black;
}

video:-webkit-full-screen {
  object-fit: contain !important;
  background: black;
}


/* click should not be blocked */
.portfolio-item {
  cursor: pointer;
}

/* meta should not steal clicks */
.portfolio-item .meta {
  pointer-events: none;
}

/* tiny tap feedback */
.portfolio-item video {
  transition: transform .18s ease;
  backface-visibility: hidden;
  will-change: transform;
}

/* fullscreen ratio */
video:fullscreen,
video:-webkit-full-screen {
  object-fit: contain !important;
  background: black;
}

/* 🔥 CENTER CARD = NO BLUR, NO SOFTNESS */
.portfolio-item.center,
.portfolio-item.center * {
  filter: none !important;
}

/* extra safety: video rendering sharp */
.portfolio-item.center video {
  filter: none !important;
  transform: scale(1.07) translateZ(0);
  backface-visibility: hidden;
}

/* meta text crystal clear */
.portfolio-item.center .meta {
  filter: none !important;
  backdrop-filter: blur(6px); 
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
