/* ===== POPUP OVERLAY STYLES ===== */

/* Popup Overlay - Full Screen */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000; /* Higher than navbar (1050) */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.popup-overlay.active {
  display: flex;
  opacity: 1;
}

/* Popup Content Container - FIXED SIZE */
.popup-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  height: 80vh;
  max-height: 700px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 40px;
  box-shadow:
    0 20px 60px rgba(0, 79, 255, 0.4),
    0 0 40px rgba(255, 30, 30, 0.3),
    inset 0 0 2px rgba(181, 53, 255, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.popup-overlay.active .popup-content {
  transform: scale(1);
}

/* Close Button - Custom CSS */
.close-btn-tailwind {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  z-index: 10;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.close-btn-tailwind:hover {
  background: rgba(239, 68, 68, 0.8);
  transform: rotate(90deg);
}

/* Slideshow Container - FIXED SIZE */
.slideshow-container {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.slideshow-container img.slide {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.slideshow-container img.slide.active {
  display: block;
  animation: fadeIn 0.5s ease;
  position: absolute;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Slide Controls - FIXED POSITION */
.slide-controls {
  margin-top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.slide-controls button {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  min-width: 50px;
}

.slide-controls button:hover {
  background: linear-gradient(90deg, #0066ff, #ff0066, #8000ff);
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.slide-controls button:active {
  transform: translateY(0);
}

/* Slide Counter */
.slide-counter {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 0 10px;
  min-width: 60px;
  text-align: center;
}

/* Project Title in Popup - FIXED POSITION */
.popup-content h3 {
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8rem;
  background: linear-gradient(90deg, #0066ff, #ff0066, #8000ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .popup-content {
    padding: 25px 15px;
    width: 95%;
    height: 70vh;
  }

  .slide-controls button {
    padding: 10px 18px;
    font-size: 16px;
  }

  .popup-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
}