* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

.projects-section {
  background: #f3f3f3;
  padding: 70px 20px;
}

.projects-container {
  max-width: 1300px;
  margin: auto;
}

.projects-container h2 {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #111;
}

.subtitle {
  text-align: center;
  font-size: 1.1rem;
  max-width: 900px;
  margin: 0 auto 50px;
  line-height: 1.6;
  color: #555;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
}

.project-card {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 8px;
}

.slides {
  width: 100%;
  position: relative;
}

.slides img,
.slides video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: none;
  border-radius: 8px;
}

.slides img.active,
.slides video.active {
  display: block;
  animation: fade 0.6s ease-in-out;
}

@keyframes fade {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.prev:hover,
.next:hover {
  background: rgba(0, 0, 0, 0.9);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.project-title {
  margin-top: 12px;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* Large tablet */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet */
@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-container h2 {
    font-size: 2.4rem;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .projects-section {
    padding: 50px 15px;
  }

  .projects-container h2 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 35px;
  }

  .slides img,
  .slides video {
    height: 240px;
  }

  .prev,
  .next {
    padding: 8px 12px;
    font-size: 16px;
  }

  .project-title {
    font-size: 0.9rem;
    padding: 12px;
  }
}

/* Image Popup */
.image-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 20px;
}

.image-popup img {
  max-width: 95%;
  max-height: 90%;
  border-radius: 10px;
  animation: zoomIn 0.3s ease;
}

.close-popup {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 45px;
  cursor: pointer;
  font-weight: bold;
}

.slides img {
  cursor: pointer;
}

@keyframes zoomIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
