
.project-image {
  position: relative;
  flex: 0 0 40%;
  overflow: hidden;
  height: 250px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-image {
    height: 250px; /* Slightly smaller height on tablets */
  }
}

@media (max-width: 480px) {
  .project-image {
    height: 200px; /* Even smaller height on mobile phones */
  }
}

/* Carousel navigation buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.3s ease;
}

.carousel-nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.carousel-nav span {
  font-size: 24px;
}

/* Carousel indicators */
.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: white;
}

/* Modal styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

#modal-img {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: zoom 0.3s ease;
  object-fit: contain;
}

@keyframes zoom {
  from {transform: translate(-50%, -50%) scale(0.1)}
  to {transform: translate(-50%, -50%) scale(1)}
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1002;
}

.modal-close:hover,
.modal-close:focus {
  color: #bbb;
  text-decoration: none;
}

/* Modal navigation buttons */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: background-color 0.3s ease;
}

.modal-nav:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.prev-modal-btn {
  left: 20px;
}

.next-modal-btn {
  right: 20px;
}

.modal-nav span {
  font-size: 30px;
}

/* Make cursor a pointer for images */
.project-image img {
  cursor: pointer;
}

/* Image hover effect */
.project-image img:hover {
  opacity: 0.9;
}

/* Media queries for responsive modal */
@media only screen and (max-width: 700px) {
  .modal-nav {
    width: 40px;
    height: 40px;
  }
  
  .modal-nav span {
    font-size: 24px;
  }
  
  .modal-close {
    font-size: 30px;
    top: 10px;
    right: 15px;
  }
}