/* Примеры работ и карусель. */
.works-block,
.works-overview {
  margin: 38px 0 10px;
}

.works-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.works-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.03em;
}

.works-lead {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.works-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.works-carousel {
  position: relative;
  max-width: 640px;
  margin: 20px auto 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 10px;
}

.works-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 14px;
  outline-offset: 3px;
}

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

.work-slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #ede8df;
  scroll-snap-align: start;
  aspect-ratio: 16 / 10;
}

.work-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-slide--overview {
  aspect-ratio: 16 / 9;
}

.work-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

.work-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.work-title {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.work-caption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.works-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(23, 23, 23, 0.12);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.works-nav:hover {
  background: var(--accent);
  transform: scale(1.04);
}

.works-nav:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.works-nav svg {
  width: 18px;
  height: 18px;
}

.works-nav--prev {
  left: 18px;
}

.works-nav--next {
  right: 18px;
}

.works-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 2px;
}

.works-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: #d8d2c8;
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.works-dot.is-active {
  width: 20px;
  border-radius: 999px;
  background: var(--text);
}

@media (max-width: 720px) {
  .works-head {
    display: block;
  }

  .works-count {
    display: inline-block;
    margin-top: 6px;
  }

  .works-nav {
    width: 34px;
    height: 34px;
    margin-top: -17px;
  }

  .works-nav--prev {
    left: 12px;
  }

  .works-nav--next {
    right: 12px;
  }

  .work-slide {
    aspect-ratio: 4 / 3;
  }
}
