/* ===============================================
   Beautiful Visual Effects for Services Section
   =============================================== */

/* Service Card Enhanced Hover Effects */
.feature_item {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(145deg, #ffffff 0%, #fafbff 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Subtle Gradient Border on Hover */
.feature_item::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, #4f46e5, #6366f1, #4f46e5);
  border-radius: 17px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.feature_item:hover::before {
  opacity: 0.15;
}

/* Icon Container Enhancement */
.service-icon {
  position: relative;
  display: inline-block;
}

.service-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: -1;
}

.feature_item:hover .service-icon::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Icon Subtle Float Animation */
@keyframes subtleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.feature_item:hover .service-icon img {
  animation: subtleFloat 2s ease-in-out infinite;
}

/* Service Content Enhancement */
.service-content {
  position: relative;
}

/* Title Underline Effect */
.service-content h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  transition: width 0.3s ease;
}

.feature_item:hover .service-content h4::after {
  width: 40px;
}

/* Text Reveal Effect - Subtle */
.service-content p {
  overflow: hidden;
  position: relative;
}

/* Service Number Enhanced Animation */
.feature_item::after {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.feature_item:hover::after {
  transform: scale(1) rotate(10deg);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Ripple Effect on Click - Minimal */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.08);
  transform: scale(0);
  animation: subtleRipple 0.6s linear;
  pointer-events: none;
}

@keyframes subtleRipple {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* Card Shadow Enhancement */
.feature_item {
  box-shadow: 
    0 2px 15px rgba(0, 0, 0, 0.06),
    0 1px 6px rgba(0, 0, 0, 0.04);
}

.feature_item:hover {
  box-shadow: 
    0 15px 35px rgba(79, 70, 229, 0.12),
    0 5px 20px rgba(0, 0, 0, 0.08),
    0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Service Category Accent Colors */
.service-category-mobile .service-icon::before {
  background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
}

.service-category-web .service-icon::before {
  background: radial-gradient(circle, rgba(231, 76, 60, 0.1) 0%, transparent 70%);
}

.service-category-marketing .service-icon::before {
  background: radial-gradient(circle, rgba(243, 156, 18, 0.1) 0%, transparent 70%);
}

.service-category-consulting .service-icon::before {
  background: radial-gradient(circle, rgba(155, 89, 182, 0.1) 0%, transparent 70%);
}

.service-category-content .service-icon::before {
  background: radial-gradient(circle, rgba(26, 188, 156, 0.1) 0%, transparent 70%);
}

.service-category-support .service-icon::before {
  background: radial-gradient(circle, rgba(52, 73, 94, 0.1) 0%, transparent 70%);
}

/* Enhanced Mobile Interactions - Fixed for Medium Screens */
@media (max-width: 1199px) and (min-width: 992px) {
  .feature_item:active {
    transform: scale(0.98);
  }
  
  .feature_item:hover {
    transform: translateY(-4px);
  }
  
  .service-icon::before {
    width: 60px;
    height: 60px;
  }
  
  .service-content h4::after {
    width: 25px;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .feature_item:active {
    transform: scale(0.98);
  }
  
  .feature_item:hover {
    transform: translateY(-3px);
  }
  
  .service-icon::before {
    width: 55px;
    height: 55px;
  }
  
  .service-content h4::after {
    width: 20px;
  }
}

@media (max-width: 767px) {
  .feature_item:active {
    transform: scale(0.98);
  }
  
  .feature_item:hover {
    transform: translateY(-2px);
  }
  
  .service-icon::before {
    width: 50px;
    height: 50px;
  }
}

/* Loading Animation */
@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature_item.animate-on-scroll {
  animation: cardSlideIn 0.6s ease-out both;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .feature_item,
  .service-icon img,
  .feature_item::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .feature_item {
    border: 2px solid #000;
    background: #fff;
  }
  
  .service-content h4 {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  .features_area {
    background: #fff !important;
  }
}

/* Print Optimization */
@media print {
  .feature_item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .service-icon::before,
  .feature_item::before,
  .feature_item::after {
    display: none;
  }
}