/* SERVICES SECTION */
.services-section {
  margin: 80px auto;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.215, 0.610, 0.355, 1);
  max-width: 1400px;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.services-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.services-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.services-title {
  font-size: 42px;
  color: var(--text-dark);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.services-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  /* background: var(--primary-color); */
  border-radius: 2px;
}

.services-subtitle {
  font-size: 18px;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

/* Services Container with Cards */
.services-container {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  width: 100%;
}

.services-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.215, 0.610, 0.355, 1);
  will-change: transform;
  width: 100%;
  align-items: stretch;
}

/* Service Card */
.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 50px 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: auto;
  position: relative;
  overflow: hidden;
}

/* Add subtle gradient border effect */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: rgba(246, 164, 0, 0.15);
}

.service-icon {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(246, 164, 0, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  margin-left: auto;
  margin-right: auto;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(246, 164, 0, 0.15);
}

.service-card h3 {
  font-size: 26px;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.3;
  text-align: center;
  font-weight: 700;
}

.service-description {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 25px;
  text-align: center;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  margin-top: 20px;
  padding: 0;
}

.service-features li {
  padding: 12px 0;
  color: var(--text-medium);
  font-size: 15px;
  position: relative;
  padding-left: 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.service-features li:last-child {
  border-bottom: none;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 16px;
  width: 24px;
  height: 24px;
  background: rgba(246, 164, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation Controls */
.services-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 60px;
}

.nav-btn {
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.08);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-dark);
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.nav-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(246, 164, 0, 0.3);
}

.nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.dots-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(246, 164, 0, 0.1);
}

.dot:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

/* Centering and professional spacing */
.services-track {
  padding: 20px 0 40px;
}

.service-card {
  margin: 0 15px;
}

/* Prevent re-animation of cards */
.service-card.visible {
  animation: none !important; /* Remove any animation on already visible cards */
}

.services-card-animate.card-animated {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Optional: Add a fade-in animation that only plays once */
@keyframes fadeInOnce {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.services-card-animate.visible:not(.card-animated) {
  animation: fadeInOnce 0.6s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
}

/* Remove staggered animation delays on already animated cards */
.services-card-animate.card-animated:nth-child(1),
.services-card-animate.card-animated:nth-child(2),
.services-card-animate.card-animated:nth-child(3),
.services-card-animate.card-animated:nth-child(4),
.services-card-animate.card-animated:nth-child(5) {
  transition-delay: 0s !important;
}
/* RESPONSIVE DESIGN - Professional centering */

/* For mobile (1 card per view) */
@media (max-width: 767px) {
  .services-section {
    margin: 60px auto;
    padding: 0 15px;
    max-width: 100%;
  }
  
  .services-container {
    padding: 0;
    overflow: hidden;
  }
  
  .services-track {
    padding: 10px 0 30px;
  }
  
  .service-card {
    flex: 0 0 calc(100% - 40px) !important;
    max-width: calc(100% - 40px) !important;
    margin: 0 20px;
    padding: 40px 30px;
  }
  
  .services-header {
    padding: 0;
    margin-bottom: 40px;
  }
  
  .services-title {
    font-size: 36px;
    margin-bottom: 15px;
  }
  
  .services-title::after {
    width: 60px;
  }
  
  .services-subtitle {
    font-size: 16px;
    padding: 0 10px;
  }
  
  .service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
  }
  
  .service-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
  }
  
  .service-description {
    font-size: 15px;
  }
  
  .service-features li {
    font-size: 14px;
    padding: 10px 0;
    padding-left: 28px;
  }
  
  .services-nav {
    margin-top: 40px;
    gap: 20px;
  }
  
  .nav-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
}

/* For tablets (2 cards per view) */
@media (min-width: 768px) and (max-width: 1023px) {
  .services-section {
    margin: 80px auto;
    padding: 0 20px;
    max-width: 100%;
  }
  
  .service-card {
    flex: 0 0 calc(50% - 40px) !important;
    max-width: calc(50% - 40px) !important;
    margin: 0 20px;
    padding: 45px 35px;
  }
  
  .services-track {
    padding: 20px 0 40px;
  }
  
  .services-header {
    max-width: 90%;
  }
  
  .services-title {
    font-size: 40px;
  }
  
  .service-icon {
    font-size: 44px;
    width: 75px;
    height: 75px;
  }
  
  .service-card h3 {
    font-size: 24px;
  }
}

/* For small desktops (3 cards per view) */
@media (min-width: 1024px) {
  .services-section {
    margin: 100px auto;
    padding: 0 40px;
  }
  
  .service-card {
    flex: 0 0 calc(33.333% - 40px) !important;
    max-width: calc(33.333% - 40px) !important;
    margin: 0 20px;
    padding: 50px 40px;
  }
  
  .services-track {
    padding: 20px 0 50px;
  }
}

/* For extra large screens */
@media (min-width: 1400px) {
  .services-section {
    max-width: 1400px;
  }
  
  .service-card {
    flex: 0 0 calc(33.333% - 60px) !important;
    max-width: calc(33.333% - 60px) !important;
    margin: 0 30px;
    padding: 55px 45px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .services-section {
    margin: 40px auto;
    padding: 0 10px;
  }
  
  .services-title {
    font-size: 32px;
  }
  
  .service-card {
    flex: 0 0 calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
    margin: 0 15px;
    padding: 35px 25px;
  }
  
  .service-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
  }
  
  .service-card h3 {
    font-size: 22px;
  }
  
  .service-features li {
    font-size: 13px;
    padding-left: 24px;
  }
  
  .nav-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* Prevent horizontal scroll on all devices */
.services-section,
.services-container,
.services-track,
.service-card {
  max-width: 100%;
}

/* Ensure proper track width calculation */
.services-track {
  display: flex;
  flex-wrap: nowrap;
}

/* Center the active card group */
.services-container {
  position: relative;
}

/* Professional card hover effects */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(246, 164, 0, 0.02) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.service-card:hover::after {
  opacity: 1;
}

/* Add subtle card numbering or indicator */
.service-card {
  counter-increment: service-card;
}

.service-card h3 {
  position: relative;
}

.service-card h3::before {
  content: counter(service-card, decimal-leading-zero);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  opacity: 0.6;
  letter-spacing: 1px;
}

/* Professional loading state */
.service-card.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}