/* Specialized Transport Services - Global Include */

.service-feature-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vw, 4rem);
}

#services .section-bg-image,
#services .section-bg-overlay {
  display: none;
}

#services.section-with-bg {
  overflow: visible;
}

#services h2 {
  text-align: center !important;
  font-size: 2.2rem;
  margin-bottom: 3rem;
  font-family: "Audiowide", sans-serif;
  width: 100%;
  display: block;
}

.service-feature {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1rem, 2vw, 2rem) 0;
}

.service-feature:nth-child(even) {
  flex-direction: row-reverse;
  text-align: right;
}

.service-feature:nth-child(even) .service-text {
  align-items: flex-end;
}

.service-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.service-text h3 {
  font-size: clamp(1.4rem, 2.1vw, 1.7rem);
  color: var(--text-light);
}

.service-text p {
  color: var(--muted);
  font-size: 1rem;
}

.service-image {
  width: 100%;
  flex: 0 0 clamp(240px, 32vw, 360px);
  height: clamp(220px, 26vw, 320px);
  position: relative;
  border-radius: 1.5rem;
  display: flex;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.service-image::before,
.service-image::after {
  display: none;
}

.service-image-frame {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
  position: relative;
  isolation: isolate;
  z-index: 1;
  box-shadow:
    0 0 25px rgba(255, 215, 128, 0.35),
    inset 0 0 20px rgba(255, 235, 195, 0.2);
  animation: floater 12s ease-in-out infinite;
}

.service-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background-image:
    linear-gradient(
      90deg,
      #fdf7dc,
      #f1d78a,
      #ddb45a,
      #c89338,
      #b97c28,
      #c89338,
      #ddb45a,
      #f1d78a,
      #fdf7dc
    ),
    linear-gradient(
      120deg,
      transparent 0%,
      transparent 45%,
      rgba(255, 255, 255, 0.65) 50%,
      transparent 55%,
      transparent 100%
    );
  background-size: 300% 300%, 200% 200%;
  background-position: 0% 50%, -50% 50%;
  animation: borderTravel 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.service-image img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
  object-fit: cover;
}

.service-feature:nth-child(even) .service-image-frame {
  animation-delay: 6s;
  animation-direction: alternate-reverse;
}

@keyframes floater {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Scroll animation support */
.scroll-fade {
  --scroll-x: 0;
  --scroll-y: 1.5rem;
  opacity: 0;
  transform: translate3d(var(--scroll-x), var(--scroll-y), 0);
  transition: opacity 1.35s cubic-bezier(0.19, 1, 0.22, 1), transform 1.35s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform;
}

.scroll-fade[data-scroll="left"] {
  --scroll-x: -40vw;
  --scroll-y: 0;
}

.scroll-fade[data-scroll="right"] {
  --scroll-x: 40vw;
  --scroll-y: 0;
}

.scroll-fade.scroll-slow {
  transition: opacity 1.9s cubic-bezier(0.19, 1, 0.22, 1),
              transform 1.9s cubic-bezier(0.19, 1, 0.22, 1);
}

.scroll-fade.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Responsive breakpoints */
@media (max-width: 900px) {
  .service-feature {
    flex-direction: column;
    text-align: left;
  }

  .service-feature:nth-child(even) {
    flex-direction: column;
    text-align: right;
  }

  .service-feature:nth-child(even) .service-text {
    align-items: flex-end;
  }

  .service-image {
    width: 100%;
    flex: 1 1 auto;
  }
}

@media (max-width: 600px) {
  .service-feature {
    gap: 1.25rem;
  }

  #services h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-fade {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .service-image-frame {
    animation: none !important;
  }
}
