.projects-wrapper {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 2em;
  margin-bottom: 30px;
  color: #333;
  text-align: center;
  font-weight: bold;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

.project-item {
  width: 300px;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: zoom-in;
}

.thumbnail-wrapper::after {
  content: '\f00e';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.thumbnail-wrapper:hover::after {
  opacity: 1;
}

.project-thumbnail {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.project-item:hover .project-thumbnail {
  transform: scale(1.08);
}

.project-item h3 {
  margin: 10px 0;
  color: #333;
}

.project-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}

.project-links a {
  text-decoration: none;
  color: #333;
  transition: opacity 0.3s ease;
}

.project-links a:hover {
  opacity: 0.7;
}

.project-item p {
  color: #666;
  line-height: 1.6;
  margin-top: 10px;
  text-align: left;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .projects-wrapper {
    padding: 10px;
  }

  .section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  .project-item {
    width: 100%;
    max-width: 300px;
  }
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 50vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: default;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ccc;
}

/* Responsive adjustment for Lightbox on mobile */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 90vw;
    max-height: 70vh;
  }
}
