/* WORK CAROUSEL (home page) */

.work-carousel {
  margin-top: clamp(5rem, 9vw, 8rem);
  width: 100%;
}

.work-carousel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.work-carousel-kicker {
  font-size: clamp(0.8rem, 0.95vw, 0.95rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.6rem;
}

.work-carousel-heading h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--green);
}

.work-carousel-all {
  font-size: clamp(0.9rem, 1vw, 1rem);
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}

.work-carousel-all:hover {
  text-decoration: underline;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.carousel-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: clamp(1rem, 2.2vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.25rem 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.carousel-item {
  /* Grow/shrink so the five squares always span the full track width;
     only fall back to horizontal scrolling once they hit min-width. */
  flex: 1 1 0%;
  min-width: 150px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.carousel-item-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
  background-color: var(--placeholder);
}

.carousel-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-item:hover .carousel-item-image img {
  transform: scale(1.06);
}

.carousel-item-title {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
}

.carousel-arrow {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.carousel-arrow:hover {
  background: var(--green);
  color: #fff;
}

.carousel-arrow:active {
  transform: scale(0.94);
}

@media (max-width: 900px) {
  .work-carousel {
    margin-top: 3.5rem;
  }

  .work-carousel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .carousel-item {
    /* Exactly one square visible at a time on mobile. */
    flex: 1 1 100%;
    min-width: 100%;
  }

  .carousel-arrow {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
  }

  .carousel-item-title {
    font-size: 0.72rem;
  }
}
