/* Project Popup Modal Styles */
.project-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.project-popup-container {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.project-popup-overlay.active .project-popup-container {
  transform: scale(1);
}

.project-popup-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.project-popup-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--heading-color);
}

.project-popup-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--heading-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.project-popup-close:hover {
  background: var(--assistant-color);
}

.project-popup-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.project-popup-image-container {
  flex: 1;
  background: var(--assistant-color);
  overflow: auto !important;
  padding: 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.project-popup-image {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  height: auto;
  /* Ensure tall images can be scrolled */
  min-height: 100%;
}

.project-popup-image:hover {
  transform: scale(1.01);
  transition: transform 0.3s ease;
}

/* Prevent body scrolling when popup is open */
body.popup-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Responsive styles */
@media (max-width: 991px) {
  .project-popup-content {
    flex-direction: column;
  }
  
  .project-popup-image-container {
    min-height: 50vh;
  }
  
  .project-popup-title {
    font-size: 20px;
  }
}

@media (max-width: 575px) {
  .project-popup-container {
    width: 95%;
  }
  
  .project-popup-header {
    padding: 15px;
  }
  
  .project-popup-title {
    font-size: 18px;
  }
  
  .project-popup-close {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
}