/* Projects page: single horizontal carousel of frameless project items. */

.carousel {
  position: relative;
  margin: 1.5rem 0 1rem;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.project {
  flex: 0 0 calc((100% - 3rem) / 3);
  scroll-snap-align: start;
  min-width: 0;
}

@media (max-width: 991px) {
  .project {
    flex-basis: calc((100% - 1.5rem) / 2);
  }
}

@media (max-width: 575px) {
  .project {
    flex-basis: 85%;
  }
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #f4f5f6;
}

.project-image.contain {
  object-fit: contain;
  padding: 0.5rem;
}

.project-category {
  display: block;
  margin-top: 0.8rem;
  color: #8a8a8a;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-title {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.project-description {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-link {
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Arrows sit on the image band, just outside the track on wide screens */
.carousel-arrow {
  position: absolute;
  top: 25%;
  transform: translateY(-50%);
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #404040;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.carousel-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.carousel-prev {
  left: -1.1rem;
}

.carousel-next {
  right: -1.1rem;
}

@media (max-width: 575px) {
  .carousel-arrow {
    display: none;
  }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dots button {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
}

.carousel-dots button[aria-current="true"] {
  background: #404040;
}
