.aptly-fw-section-padding {
  padding: 2.5rem 0;
  background-color: white;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .aptly-fw-section-padding {
    padding: 1.5rem 0;
  }
}

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

.aptly-fw-sc-section-header {
  margin-bottom: 0.5rem;
  width: 100%;
}

.aptly-fw-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.4rem;
}

.aptly-fw-heading-wrap {
  flex-shrink: 0;
}

.aptly-fw-slider-flex-container {
  display: flex;
  position: relative;
  gap: 20px;
}

#aptly-fw-main-card {
  flex: 1.2;
  height: clamp(480px, 34vw, 800px);
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

#aptly-fw-image-container {
  position: absolute;
  inset: 0;
  transform-origin: center center;
}

.aptly-fw-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

#aptly-fw-main-card.aptly-fw-changing .aptly-fw-slide-img,
#aptly-fw-main-card.aptly-fw-changing .aptly-fw-card-content {
  opacity: 0;
}

.aptly-fw-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  z-index: 1;
}

.aptly-fw-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  transition: opacity 0.4s ease-in-out;
}

#aptly-fw-main-badge {
  background: white;
  padding: 8px 20px;
  border-radius: 6px;
  color: #111;
  font-weight: 500;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 20px;
}

#aptly-fw-main-description {
  color: white;
  font-size: 18px;
  line-height: 1.6;
  max-width: 500px;
  margin-bottom: 24px;
}

#aptly-fw-main-link {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

#aptly-fw-main-link:hover {
  opacity: 0.9;
}

#aptly-fw-thumbnails {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.aptly-fw-thumbnail-item {
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.aptly-fw-thumbnail-item:hover {
  opacity: 0.9;
}

/* Thumbnail conveyor sliding (like former our-service-featured-work) */
@keyframes aptly-fw-thumb-conveyor-next {
  from {
    transform: translateX(calc(100% + 1rem));
  }
  to {
    transform: translateX(0);
  }
}

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

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

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

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

.aptly-fw-thumb-slide-fade-in {
  animation: aptly-fw-thumb-fade-in 1.2s ease-in-out forwards;
}

.aptly-fw-view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #08bbd2;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
}

.aptly-fw-view-more-btn .aptly-fw-btn-icon-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex-shrink: 0;
}

.aptly-fw-view-more-below {
  display: none;
  margin-top: 1.25rem;
}

.aptly-fw-btn-icon-box,
.aptly-fw-icon-wrapper {
  width: 32px;
  height: 32px;
  border: 1px solid #08bbd2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.slider-arrow-icon-prev {
  transform: scaleX(-1);
}

#aptly-fw-slider-prev {
  left: -18px;
}

#aptly-fw-slider-next {
  right: -18px;
}

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

.aptly-fw-nav-row .aptly-fw-view-more-below {
  display: none;
}

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

.aptly-fw-nav-row .slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.aptly-fw-nav-row #aptly-fw-slider-prev {
  left: -18px;
}

.aptly-fw-nav-row #aptly-fw-slider-next {
  right: -18px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .aptly-fw-slider-flex-container {
    flex-direction: column;
  }

  #aptly-fw-thumbnails {
    height: 300px;
    width: 100%;
  }

  .aptly-fw-sc-section-header .aptly-fw-heading-row .aptly-fw-view-more-btn {
    display: none;
  }
  .aptly-fw-nav-row {
    position: static;
    width: 100%;
    transform: none;
    pointer-events: auto;
    align-items: center;
  }
  .aptly-fw-nav-row .aptly-fw-view-more-below {
    display: inline-flex;
    margin-top: 0;
    font-size: 15px;
    gap: 10px;
  }
  .aptly-fw-nav-row .slider-arrow {
    position: static;
    transform: none;
  }
  .aptly-fw-nav-row .slider-arrow:active {
    transform: scale(0.96);
  }
  .aptly-fw-nav-row #aptly-fw-slider-prev,
  .aptly-fw-nav-row #aptly-fw-slider-next {
    left: auto;
    right: auto;
  }
  .aptly-fw-slider-arrows-wrap {
    width: auto;
    gap: 10px;
  }
  .aptly-fw-view-more-below .aptly-fw-btn-icon-box {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
  }

  .aptly-fw-card-content {
    padding: 28px 32px;
  }

  #aptly-fw-main-badge {
    padding: 6px 16px;
    font-size: 13px;
    margin-bottom: 14px;
  }

  #aptly-fw-main-description {
    font-size: 16px;
    max-width: 100%;
    margin-bottom: 18px;
  }
}

@media (max-width: 768px) {
  #aptly-fw-main-card {
    flex: none;
    height: 400px !important;
    min-height: 400px;
  }

  #aptly-fw-thumbnails {
    display: none !important;
  }

  .slider-arrow {
    display: flex !important;
    width: 32px;
    height: 32px;
  }
  .aptly-fw-view-more-below {
    margin-top: 0;
    font-size: 14px;
    gap: 8px;
  }
  .aptly-fw-view-more-below .aptly-fw-btn-icon-box {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: 6px;
  }
  .aptly-fw-view-more-below .aptly-fw-btn-icon-box img {
    width: 14px;
    height: auto;
  }

  .aptly-fw-card-content {
    padding: 20px 24px;
  }

  #aptly-fw-main-badge {
    padding: 6px 14px;
    font-size: 12px;
    margin-bottom: 12px;
  }

  #aptly-fw-main-description {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  #aptly-fw-main-link {
    font-size: 14px;
    gap: 8px;
  }

  .aptly-fw-btn-icon-box,
  .aptly-fw-icon-wrapper {
    width: 28px;
    height: 28px;
  }
}

.aptly-fw-section-scroll-hidden {
  opacity: 0;
}

.aptly-fw-in-view {
  animation: aptly-fw-fadeIn 0.8s forwards;
}

@keyframes aptly-fw-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
