.testimonial--gradient-button {
  display: none;
  width: 100%;
}

.aptly-featured-work {
  overflow-x: hidden;
  padding: 2.5rem 0;
  background-color: var(--bg-body);
}

.aptly-featured-work--scroll-hidden {
  opacity: 0;
}

.aptly-featured-work--in-view {
  animation: aptly-featured-work-fade-in 0.8s forwards;
}

@keyframes aptly-featured-work-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aptly-featured-work__header {
  margin-bottom: 0.5rem;
  width: 100%;
}

.aptly-featured-work__heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 2rem;
}

.aptly-featured-work__heading-wrap {
  flex-shrink: 0;
}

.aptly-featured-work__view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-secondary);
  font-size: var(--font-base);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.aptly-featured-work__slider {
  display: flex;
  position: relative;
  gap: 20px;
}

.aptly-featured-work__main-card {
  position: relative;
  flex: 1.2;
  height: clamp(480px, 34vw, 800px);
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background-color: var(--color-body);
  display: flex;
  flex-direction: column;
}

.aptly-featured-work__main-card--changing .aptly-featured-work__slide-img,
.aptly-featured-work__main-card--changing .aptly-featured-work__card-content {
  opacity: 0;
}

.aptly-featured-work__image-wrap {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  border-radius: var(--radius-2xl);
}

.aptly-featured-work__slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.aptly-featured-work__gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-2xl);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

.aptly-featured-work__card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  min-height: 0;
  padding: 40px;
  transition: opacity 0.4s ease-in-out;
}

.aptly-featured-work__main-badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 20px;
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--color-pill-text);
  background-color: var(--color-pill-bg);
  border-radius: var(--radius-full);
}

/* Main description – uniform with join-us description and testimonial-quote */
.aptly-featured-work__main-description {
  max-width: 500px;
  margin-bottom: 24px;
  font-size: var(--font-base);
  line-height: 1.6;
  color: var(--color-inverse);
}

.aptly-featured-work__main-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--color-inverse);
  text-decoration: none;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.aptly-featured-work__main-link:hover {
  opacity: 0.9;
}

.aptly-featured-work__thumbnails {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 0;
}

.aptly-featured-work__thumbnail-item {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  cursor: pointer;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.aptly-featured-work__thumbnail-item img {
  border-radius: var(--radius-xl);
}

.aptly-featured-work__thumbnail-item:hover {
  opacity: 0.9;
}

@keyframes aptly-featured-work-thumb-conveyor-next {
  from {
    transform: translateX(calc(100% + 1rem));
  }
  to {
    transform: translateX(0);
  }
}

@keyframes aptly-featured-work-thumb-conveyor-prev {
  from {
    transform: translateX(calc(-100% - 1rem));
  }
  to {
    transform: translateX(0);
  }
}

@keyframes aptly-featured-work-thumb-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.aptly-featured-work__thumbnail-item--slide-next {
  animation: aptly-featured-work-thumb-conveyor-next 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.aptly-featured-work__thumbnail-item--slide-prev {
  animation: aptly-featured-work-thumb-conveyor-prev 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.aptly-featured-work__thumbnail-item--fade-in {
  animation: aptly-featured-work-thumb-fade-in 1.2s ease-in-out forwards;
}

.aptly-featured-work__thumbnail-badge {
  position: absolute;
  bottom: 15px;
  left: 15px;
  display: inline-block;
  padding: 6px 20px;
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--color-pill-text);
  background-color: var(--color-pill-bg);
  border-radius: var(--radius-full);
}

.aptly-featured-work__view-more-below {
  display: none;
  margin-top: 1.25rem;
}

.aptly-featured-work__nav-row {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  pointer-events: none;
  z-index: 10;
  transform: translateY(-50%);
}

.aptly-featured-work__nav-row .aptly-featured-work__view-more-below {
  display: none;
}

.aptly-featured-work__slider-arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  pointer-events: auto;
}

.aptly-featured-work__nav-arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: var(--bg-body);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 10;
  transform: translateY(-50%);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.aptly-featured-work__nav-arrow:hover {
  background: #f8f8f8;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.aptly-featured-work__nav-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.aptly-featured-work__nav-arrow--prev {
  left: -18px;
}

.aptly-featured-work__nav-arrow--next {
  right: -18px;
}

.aptly-featured-work__nav-arrow-icon--prev {
  transform: scaleX(-1);
}

@media (min-width: 1600px) {
  .aptly-featured-work {
    padding: 6rem 0;
  }
}

@media (max-width: 1024px) {
  .aptly-featured-work__slider {
    flex-direction: column;
  }

  .aptly-featured-work__thumbnails {
    height: 220px;
    width: 100%;
    gap: 14px;
  }
}

@media (max-width: 1024px) {
  .aptly-featured-work__slider-arrows {
    display: none;
  }

  .aptly-featured-work__nav-row {
    position: static;
    width: 100%;
    align-items: center;
    pointer-events: auto;
    transform: none;
  }

  .aptly-featured-work__nav-row .aptly-featured-work__view-more-below {
    display: inline-flex;
    margin-top: 0;
    gap: 10px;
    font-size: var(--font-base);
  }

  .aptly-featured-work__nav-row .aptly-featured-work__nav-arrow {
    position: static;
    transform: none;
  }

  .aptly-featured-work__nav-row .aptly-featured-work__nav-arrow:active {
    transform: scale(0.96);
  }

  .aptly-featured-work__nav-row .aptly-featured-work__nav-arrow--prev,
  .aptly-featured-work__nav-row .aptly-featured-work__nav-arrow--next {
    left: auto;
    right: auto;
  }

  .aptly-featured-work__slider-arrows {
    width: auto;
    gap: 10px;
  }

  .aptly-featured-work__view-more-below .btn__icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
  }

  .aptly-featured-work__card-content {
    padding: 28px 32px;
  }

  .aptly-featured-work__main-badge {
    padding: 6px 16px;
    margin-bottom: 14px;
    font-size: var(--font-sm);
  }

  .aptly-featured-work__thumbnail-badge {
    padding: 6px 16px;
    font-size: var(--font-xs);
  }

  .aptly-featured-work__main-description {
    max-width: 100%;
    margin-bottom: 18px;
  }

  .aptly-featured-work__main-card {
    min-height: 520px;
    height: clamp(520px, 52vh, 680px);
  }

  .aptly-featured-work__thumbnails,
  #aptly-fw-thumbnails {
    height: 160px !important;
    max-height: 160px !important;
    gap: 10px;
    padding: 6px 0;
  }

  .aptly-featured-work__thumbnail-item {
    max-height: 160px;
    min-height: 0;
  }

  .aptly-featured-work__thumbnail-badge {
    bottom: 8px;
    left: 10px;
    padding: 4px 10px;
    font-size: var(--font-xs);
  }

  .aptly-featured-work__card-content {
    padding: 32px 36px;
  }
}

@media (max-width: 768px) {
  .aptly-featured-work {
    padding: 1.5rem 0;
  }
  .aptly-featured-work__header .aptly-featured-work__heading-row .aptly-featured-work__view-more-btn {
    display: none;
  }
  .aptly-featured-work__main-card {
    flex: none;
    min-height: 400px;
    height: 400px;
  }

  .testimonial--gradient-button {
    display: block;
  }

  .aptly-featured-work__thumbnails {
    display: none;
  }

  .aptly-featured-work__nav-arrow {
    display: flex;
    width: 32px;
    height: 32px;
  }

  .aptly-featured-work__view-more-below {
    margin-top: 0;
    gap: 8px;
    font-size: var(--font-sm);
  }

  .aptly-featured-work__view-more-below .btn__icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: 6px;
  }

  .aptly-featured-work__view-more-below .btn__icon img,
  .aptly-featured-work__view-more-below .btn__icon svg {
    width: 14px;
    height: auto;
  }

  .aptly-featured-work__card-content {
    padding: 16px;
  }

  .aptly-featured-work__main-badge {
    padding: 6px 14px;
    margin-bottom: 12px;
    font-size: var(--font-xs);
  }

  .aptly-featured-work__thumbnail-badge {
    padding: 6px 14px;
    font-size: var(--font-xs);
  }

  .aptly-featured-work__main-description {
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .aptly-featured-work__main-link {
    gap: 8px;
    font-size: var(--font-sm);
  }

  .aptly-featured-work__btn-icon-box {
    width: 28px;
    height: 28px;
  }
}
