.project-detail-wrapper {
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
  color: #fff;
}

.project-detail-wrapper h1 {
  font-family: 'Inter', serif;
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.project-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 30px;
}

.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
}

.image-gallery img {
  width: 280px;
  height: 150px;
  object-fit: contain;
  background-color: rgba(15, 15, 15, 0.9);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.back-button a {
  color: white;
  text-decoration: none;
 
}
.back-button {
  display: inline-block;
  background-color: rgba(20, 20, 20, 0.8);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
 
}

.back-button:hover {
  background-color: #333;
  transform: translateY(-2px);
}
.image-slider {
  position: relative;
  width: 100%;       
  max-width: 900px; 
  margin: 40px auto;
  overflow: hidden;
  border-radius: 12px;
 
  /* Standardized aspect ratio container */
  height: 600px; /* Optimized height for image quality */
  background-color: #212121;
  /* Hardware acceleration for smooth rendering */
  will-change: transform;
  transform: translateZ(0);
}

.project-description-wrapper {
  background-color: rgba(20, 20, 20, 0.8);
  padding: 20px;
  border-radius: 12px;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
}


.slider-track {
  display: flex;
  transition: transform 0.5s ease, opacity 0.3s ease;
  height: 100%;
}

.slide {
  min-width: 100%;
  box-sizing: border-box;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #212121;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  /* Instagram-like behavior - show full image */
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 12px;
  transition: opacity 0.3s ease;
  /* High-quality image rendering for lossless scaling */
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: smooth;
  /* Prevent pixelation during scaling */
  -ms-interpolation-mode: bicubic;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Loading animation styles */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.slider-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #212121;
  z-index: 2;
  border-radius: 12px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  color: #ccc;
  font-size: 1rem;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade in animation for loaded images */
.slide-image[data-loaded="true"] {
  opacity: 1;
}

.slide-image[data-loaded="false"] {
  opacity: 0;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: rgba(23, 21, 21, 0.6);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

.slider-btn:hover {
  background-color: rgba(23, 21, 21, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .image-slider {
    height: 400px; /* Better mobile height for image quality */
    margin: 20px auto;
  }
  
  .project-detail-wrapper {
    padding: 20px;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }
  
  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .slide img {
    /* Ensure mobile images are properly contained */
    max-width: 95%;
    max-height: 95%;
  }
}

@media (max-width: 480px) {
  .image-slider {
    height: 350px; /* Better small screen height for image quality */
  }
  
  .slider-btn.prev { left: 5px; }
  .slider-btn.next { right: 5px; }

  .slide img {
    /* Ensure small screen images are properly contained */
    max-width: 90%;
    max-height: 90%;
  }
}

/* Enhanced Instagram-like styling for portrait images */
@media (orientation: portrait) {
  .slide img {
    max-height: 100%;
    width: auto;
  }
}

/* Enhanced Instagram-like styling for landscape images */
@media (orientation: landscape) {
  .slide img {
    max-width: 100%;
    height: auto;
  }
}

/* Additional styling for very wide images */
.slide img[style*="aspect-ratio"] {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* Smooth loading transition */
.slide img {
  transition: opacity 0.4s ease-in-out, transform 0.2s ease;
}

.slide img:hover {
  transform: scale(1.01);
}

/* Dark background gradient for better image visibility */
.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
 
  pointer-events: none;
  z-index: 1;
}

.slide img {
  position: relative;
  z-index: 2;
}
