/* Services Carousel Styles */
.services-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: hidden;
  /* Allow horizontal touch interaction for carousel swiping */
  touch-action: manipulation;
}

.services-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s ease-in-out;
  padding: 20px 0;
  cursor: default; /* Default cursor, JavaScript will set grab on desktop */
  user-select: none;
  /* Enable hardware acceleration for better performance */
  will-change: transform;
  /* Allow horizontal touch interaction for carousel swiping */
  touch-action: manipulation;
}

.services-carousel-track:active {
  cursor: grabbing;
}

.services-carousel .card {
  flex: 0 0 auto;
  width: 320px;
  min-height: 400px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-carousel .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.services-carousel .card-header {
  padding: 24px;
  text-align: center;
}

.services-carousel .card-content {
  padding: 0 24px 24px;
}

.services-carousel .card-title {
  font-size: 18px;
  font-weight: 600;
  color: #0c113e;
  margin: 16px 0 8px 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.services-carousel .card-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
  min-height: 80px;
  display: flex;
  align-items: center;
  text-align: center;
}

.services-carousel .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #deeded;
  margin: 0 auto 16px auto;
}

.services-carousel .icon-wrapper i {
  color: #39897d;
  font-size: 24px;
}

.services-carousel .feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.services-carousel .feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

.services-carousel .bullet {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #39897d;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Navigation Buttons */
.carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}

.carousel-btn {
  background: #39897d;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(57, 137, 125, 0.3);
}

.carousel-btn:hover {
  background: #2d6b61;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(57, 137, 125, 0.4);
}

.carousel-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.carousel-btn i {
  font-size: 18px;
}

/* Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: #39897d;
  transform: scale(1.2);
}

/* Responsive Design */

/* Desktop only: Enable drag cursor */
@media (min-width: 769px) {
  .services-carousel-track {
    cursor: grab;
  }
  
  .services-carousel-track:active {
    cursor: grabbing;
  }
}

/* Mobile: Remove drag cursor */
@media (max-width: 768px) {
  .services-carousel-track {
    cursor: default;
  }
}

/* Tablet landscape and smaller desktops (769px - 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  .services-carousel-container {
    max-width: 900px; /* Limit container width for better readability */
    padding: 0 32px; /* Comfortable side padding */
  }
  
  .services-carousel .card {
    width: 300px; /* Slightly smaller cards */
    min-height: 380px;
  }
  
  .services-carousel .card-title {
    font-size: 17px; /* Comfortable title size */
  }
  
  .services-carousel .card-description {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* Tablet and mobile (max-width: 640px) - Instagram-style swipe experience */
@media (max-width: 640px) {
  .services-carousel-container {
    padding: 0 20px;
    /* JavaScript will control overflow-x, scroll-snap-type, and scroll behavior */
    /* Show subtle scrollbar to indicate swipeable content */
    scrollbar-width: thin; /* Firefox - thin scrollbar */
    scrollbar-color: rgba(57, 137, 125, 0.3) transparent; /* Custom colors for Firefox */
  }
  
  /* Custom scrollbar for Webkit browsers (Safari, Chrome on mobile) */
  .services-carousel-container::-webkit-scrollbar {
    height: 4px; /* Thin horizontal scrollbar */
    display: block; /* Show scrollbar */
  }
  
  .services-carousel-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1); /* Light track */
    border-radius: 2px;
  }
  
  .services-carousel-container::-webkit-scrollbar-thumb {
    background: rgba(57, 137, 125, 0.6); /* Brand color thumb */
    border-radius: 2px;
    transition: background-color 0.3s ease;
  }
  
  .services-carousel-container::-webkit-scrollbar-thumb:hover {
    background: rgba(57, 137, 125, 0.8); /* Darker on hover */
  }
  
  /* Add scroll hint to the services section which doesn't scroll */
  #services {
    position: relative;
  }
  
  #services::after {
    content: '';
    position: absolute;
    bottom: 60px; /* Position above the section bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(57, 137, 125, 0.4), transparent);
    border-radius: 1px;
    opacity: 0.7;
    animation: scrollHint 3s infinite;
    z-index: 10; /* Ensure it stays above carousel content */
    pointer-events: none; /* Allow interactions to pass through */
  }
  
  /* Hide round dot indicators on mobile since we have scroll hint */
  .carousel-indicators {
    display: none;
  }
  
  @keyframes scrollHint {
    0%, 70%, 100% { opacity: 0.7; }
    35% { opacity: 0.3; }
  }
  
  .services-carousel-track {
    gap: 20px;
    padding: 20px 0;
    align-items: center;
    justify-content: flex-start;
    /* JavaScript will control transform behavior */
  }
  
  .services-carousel .card {
    width: calc(100vw - 80px); /* Full width minus container padding */
    min-width: 280px;
    max-width: 450px; /* Consistent with text widths */
    min-height: 380px;
    margin: 0; /* Remove auto margin for better control */
    flex-shrink: 0; /* Prevent cards from shrinking */
    scroll-snap-align: start; /* Snap alignment for smooth scrolling */
    margin-right: 20px; /* Extra spacing for scroll */
  }
  
  /* Re-enable pointer events for interactive elements within cards */
  .services-carousel .card * {
    pointer-events: auto;
  }
  
  .carousel-nav {
    gap: 16px;
    margin-top: 24px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-btn i {
    font-size: 16px;
  }
  
  /* Make indicators more prominent on mobile */
  .carousel-indicator {
    width: 12px;
    height: 12px;
  }
  
  /* Ensure indicators are properly spaced */
  .carousel-indicators {
    gap: 10px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .services-carousel-container {
    padding: 0 15px;
    /* JavaScript controls scrolling behavior */
  }
  
  .services-carousel-track {
    gap: 16px;
    padding: 20px 0;
    /* JavaScript controls transform behavior */
  }
  
  .services-carousel .card {
    width: calc(100vw - 50px); /* Adjust for smaller screens */
    min-width: 260px;
    max-width: 320px;
    min-height: 360px;
    /* Ensure cards don't interfere with touch events */
    pointer-events: none;
  }
  
  /* Re-enable pointer events for interactive elements within cards */
  .services-carousel .card * {
    pointer-events: auto;
  }
  
  .services-carousel .card-header {
    padding: 20px;
  }
  
  .services-carousel .card-content {
    padding: 0 20px 20px;
  }
}
