:root {
  --speed: 50s;
}

/* ===========================================================
   LIGHTBOX MODAL
   =========================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  animation: zoomIn 0.4s ease-out;
  box-shadow: 0 0 50px rgba(150, 0, 255, 0.6);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* ===========================================================
   PORTFOLIO SECTION
   =========================================================== */
.portfolio-section {
  color: white;
  margin-top: 50px;
  margin-bottom: 250px;
}

.port-title {
  text-align: center;
  font-size: 50px;
  margin-bottom: 40px;
  color: hsl(273, 100%, 60%);
}

/* ===========================================================
   CONTAINER
   =========================================================== */
.port-container {
  width: 80%;
  margin: auto;
  position: relative;
  height: 900px;
}

/* ===========================================================
   ITEM RESET
   =========================================================== */
.item {
  position: relative;
  width: 100%;
}

/* ===========================================================
   VIDEO FRAME (CORE)
   =========================================================== */
.video-frame {
  position: absolute;
  width: 45%;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(150, 0, 255, 0.4);
}

/* ===========================================================
   VIDEO FIX (IMPORTANT)
   =========================================================== */
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

/* ===========================================================
   POSITIONS (DESKTOP)
   =========================================================== */
.item1 .video-frame { top: 0; left: 0; }
.item2 .video-frame { top: 150px; right: 0; }
.item3 .video-frame { top: 300px; left: 0; }
.item4 .video-frame { top: 450px; right: 0; }
.item5 .video-frame { top: 600px; left: 0; }
.item6 .video-frame { top: 750px; right: 0; }

/* ===========================================================
   RESPONSIVE (MOBILE)
   =========================================================== */
@media (max-width: 768px) {
  .port-container {
    height: auto;
  }

  .video-frame {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
  }

  .item1 .video-frame,
  .item2 .video-frame,
  .item3 .video-frame,
  .item4 .video-frame,
  .item5 .video-frame,
  .item6 .video-frame {
    top: auto;
    left: auto;
    right: auto;
  }
}
/* ===========================================================
   RESPONSIVE – MOBILE & TABLET
   =========================================================== */
@media (max-width: 1024px) {
  .port-container {
    height: auto !important;   /* FIX 2️⃣ */
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: start;        /* FIX 3️⃣ */
  }

  .video-frame {
    position: relative !important;
    width: 100%;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }
}

@media (max-width: 600px) {
  .port-container {
    grid-template-columns: 1fr;
  }

  .port-title {
    font-size: 32px;
  }

  .portfolio-section {
    margin-bottom: 120px;
  }
}

/* ===========================================================
   🔥 GLASS SLIDER (بدون تعديل)
   =========================================================== */
.glass-slider {
  width: 100%;
  margin: 40px auto;
  padding: 20px;
  overflow: hidden;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 25px rgba(140, 0, 255, 0.3);
}

.slider-track {
  display: flex;
  width: max-content;
  animation: slide var(--speed) linear infinite;
}

.slider-track img {
  width: 220px;
  margin: 0 20px;
  border-radius: 15px;
  transition: 0.3s;
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.25),
    0 8px 30px rgba(140, 0, 255, 0.35);
}

.slider-track img:hover {
  transform: scale(1.07);
}

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===========================================================
   🔥 STUDIOS GRID (بدون تعديل)
   =========================================================== */
.broken-grid-section {
  margin-top: 80px;
  text-align: center;
  color: white;
}

.studios-title {
  font-size: 52px;
  margin-bottom: 40px;
  font-weight: 800;
  color: hsl(273, 100%, 40%);
  -webkit-text-stroke: 0.3px black;
}

.broken-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-inline: 5%;
}

.items {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(140, 0, 255, 0.35);
}

.items img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s;
}

.items:hover img {
  transform: scale(1.08);
}

.items.tall {
  grid-row: span 2;
  height: 500px;
}

.items.wide {
  height: 240px;
}

/* ===========================================================
   🔥 IMAGE SEQUENCE APPEAR (بدون تعديل)
   =========================================================== */
#studiosSection img {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.8s ease;
}

#studiosSection img.show-seq {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
   MOBILE GRID FIX (بدون تعديل)
   =========================================================== */
@media (max-width: 600px) {
  .broken-grid {
    grid-template-columns: 1fr;
    margin-inline: 5%;
  }

  .items.tall { height: 400px; }
  .items.wide { height: 220px; }
}

/* ===========================================================
   TABLET GRID FIX (بدون تعديل)
   =========================================================== */
@media (min-width: 601px) and (max-width: 1024px) {
  .broken-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-inline: 8%;
  }

  .port-title {
    font-size: 40px;
  }
}