/* Project Gallery Styles */
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.project-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  background: #fff;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.project-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-cover-image {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-content {
  color: white;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.project-card:hover .project-content {
  transform: translateY(0);
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #f39c12;
}

.project-content p {
  font-size: 0.9rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.btn-view-gallery {
  background: linear-gradient(45deg, #f39c12, #e67e22);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view-gallery:hover {
  background: linear-gradient(45deg, #e67e22, #d35400);
  transform: translateY(-2px);
}

/* Lightbox Styles */
.project-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.project-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1200px;
  height: 90%;
  max-height: 800px;
  background: #1a1a1a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  flex: 1;
  min-height: 0;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-info {
  padding: 15px 20px;
  background: #1a1a1a;
  color: white;
  text-align: center;
  flex-shrink: 0;
}

.lightbox-info h3 {
  color: #f39c12;
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.lightbox-info p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: #2a2a2a;
  overflow-x: auto;
  justify-content: center;
  flex-shrink: 0;
  max-height: 100px;
}

.thumbnail {
  width: 70px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.active {
  border-color: #f39c12;
  transform: scale(1.1);
}

.thumbnail:hover {
  border-color: #e67e22;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .project-gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .project-content h3 {
    font-size: 1.3rem;
  }

  .lightbox-content {
    width: 95%;
    height: 95%;
    max-height: none;
  }

  .lightbox-image-container img {
    max-height: 50vh;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-thumbnails {
    padding: 10px;
    max-height: 80px;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

  .lightbox-info {
    padding: 10px 15px;
  }

  .lightbox-info h3 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .project-gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-overlay {
    padding: 20px;
  }

  .project-content h3 {
    font-size: 1.1rem;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .lightbox-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .lightbox-image-container img {
    max-height: 45vh;
  }

  .lightbox-thumbnails {
    max-height: 70px;
  }

  .thumbnail {
    width: 50px;
    height: 38px;
  }
}

/* Animation for smooth appearance */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.project-lightbox.active .lightbox-content {
  animation: fadeIn 0.3s ease;
}
