/* ===== Services Section ===== */
.services-section {
  text-align: left;
  padding: 4em 2em;
}

.services-section h1 {
  font-size: 2.5rem;
  color: black;
  margin-bottom: 1.5em;
  margin-left: 1em;
  font-family: 'Poppins', sans-serif;
}

/* ===== Services Video Carousel ===== */
.services-carousel {
  position: relative;
  width: 650px;
  margin: 0 auto;
  height: 340px;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.services-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.service-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  transform-origin: center center;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.7s cubic-bezier(.22, .61, .36, 1), opacity 0.45s;
  opacity: 0.6;
  overflow: hidden;
  background: #ddd;
  pointer-events: none;
}

.service-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.service-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.service-item.active {
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

/* ===== Buttons ===== */
.service-prev,
.service-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  padding: 12px 14px;
  z-index: 9999;
  transition: 0.3s;
}

.service-prev:hover,
.service-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

.service-prev {
  left: -50px;
}

.service-next {
  right: -50px;
}

/* ===== Services Dot Indicators ===== */
.services-dots {
  display: none;
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  gap: 8px;
  z-index: 20;
}
.services-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-width: 10px;
  min-height: 10px;
}
.services-dot.active {
  background-color: var(--theme-color, #1c604b);
}

/* Dark Mode Overrides */
body.dark .services-section h1 { color: var(--dm-text); }

/* ===== MOBILE: Mirror the working video carousel approach ===== */
@media (max-width: 767px) {
  .services-section {
    padding: 2em 1em;
  }
  .services-section h1 {
    font-size: 1.8rem;
    margin-left: 0;
    text-align: center;
  }
  .services-carousel {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    perspective: none;
    overflow: visible;
    border-radius: 12px;
    margin-bottom: 30px;
  }
  .services-track {
    transform-style: flat;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
  }
  .service-item {
    width: 100%;
    height: 100%;
    top: 0;        /* CRITICAL: Reset from 50% to 0 */
    left: 0;       /* CRITICAL: Reset from 50% to 0 */
    transform-origin: top left;
    transition: transform 0.3s ease-in-out, opacity 0.3s;
    border-radius: 0;
    box-shadow: none;
  }
  /* Show dot indicators on mobile */
  .services-dots {
    display: flex;
    bottom: -25px;
  }
  /* Reposition arrows inside the carousel */
  .service-prev, .service-next {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .service-prev { left: 10px; }
  .service-next { right: 10px; }
}