/* ─── Title Section ─────────────────────────────────────── */
.proj-title-sect {
  position: relative;
  width: 100%;
  min-height: 40vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 8rem 2rem 0;
  box-sizing: border-box;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.back-btn:hover {
  color: white;
}

/* ─── Content Section ───────────────────────────────────── */
.proj-content-sect {
  position: relative;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  padding: 2rem 2rem 6rem;
  box-sizing: border-box;
}

/* ─── Main Content ──────────────────────────────────────── */
.project-main {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ─── Gallery ───────────────────────────────────────────── */
.project-gallery-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-gallery {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.project-gallery.dragging {
  cursor: grabbing;
}

.project-gallery::-webkit-scrollbar {
  display: none;
}

.project-thumb {
  height: 120px;
  width: 180px;
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: opacity 0.2s ease, border 0.2s ease;
}

.project-thumb:hover {
  opacity: 1;
}

.project-thumb.active {
  opacity: 1;
  border: 2px solid white;
}

.project-enlarged img {
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 1rem;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.3);
}

/* ─── Info ──────────────────────────────────────────────── */
.project-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-tools {
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  font-weight: 200;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.project-desc,
.project-challenges,
.project-results {
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  font-weight: 200;
  line-height: 1.75;
  margin: 0;
}

/* ─── Media + Links ─────────────────────────────────────── */
.project-media {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 1rem;
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  background: #000 center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  padding-left: 4px;
}

.video-wrapper:hover .video-play-btn {
  transform: scale(1.1);
  background: white;
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.project-links a {
  font-size: 0.75rem;
  padding: 0.4rem 0.875rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.3s ease;
}

.project-links a:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── Fullscreen Image Overlay ──────────────────────────── */
.img-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.img-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 1rem;
}

.overlay-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 100000;
}

.overlay-close:hover,
.overlay-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.overlay-prev { left: 2rem; }
.overlay-next { right: 2rem; }

/* ─── Mobile ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .proj-title-sect {
    padding: 7rem 1.5rem 3rem;
  }

  .proj-content-sect {
    padding: 2rem 1.25rem 4rem;
  }
}
