/* TeDaCo 3D Effects & Advanced Animations */

/* 3D Service Cards */
.services .box {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
}

.services .box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.services .box:hover::before {
  left: 100%;
}

.services .box:hover {
  transform: rotateY(10deg) rotateX(5deg) translateZ(20px) scale(1.05);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(63, 205, 199, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 3D Icon Animation */
.services .box .icon {
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  transform-style: preserve-3d;
}

.services .box:hover .icon {
  transform: rotateY(360deg) scale(1.2);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(1deg); }
  50% { transform: translateY(-5px) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(-1deg); }
}

.services .box {
  animation: float 6s ease-in-out infinite;
}

.services .box:nth-child(2) { animation-delay: -1s; }
.services .box:nth-child(3) { animation-delay: -2s; }
.services .box:nth-child(4) { animation-delay: -3s; }
.services .box:nth-child(5) { animation-delay: -4s; }
.services .box:nth-child(6) { animation-delay: -5s; }

/* Parallax Scrolling Effects */
.parallax-element {
  transform: translateZ(0);
  will-change: transform;
}

.parallax-slow {
  transform: translate3d(0, var(--scroll-y, 0), 0);
}

.parallax-fast {
  transform: translate3d(0, calc(var(--scroll-y, 0) * 1.5), 0);
}

/* 3D Text Effects - Crystal Clear */
.text-3d {
  /* Remove blur-causing transforms and shadows */
  text-shadow: 0 2px 4px rgba(63, 205, 199, 0.3);
  transition: all 0.3s ease;
  /* Anti-aliasing for crisp text */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Prevent blur from transforms */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.text-3d:hover {
  transform: translateZ(0) scale(1.02);
  text-shadow: 0 4px 8px rgba(63, 205, 199, 0.4);
  color: #3fcdc7;
}

/* Morphing Shapes */
.morph-shape {
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, #3fcdc7, #e98e06);
  border-radius: 50%;
  transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

.morph-shape::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.morph-shape:hover {
  border-radius: 20%;
  transform: rotate(45deg) scale(1.2);
}

.morph-shape:hover::before {
  width: 100%;
  height: 100%;
}

/* Liquid Animation */
@keyframes liquid {
  0%, 100% {
    border-radius: 50% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  75% {
    border-radius: 40% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.liquid-shape {
  animation: liquid 4s ease-in-out infinite;
  background: linear-gradient(45deg, #3fcdc7, #e98e06, #ff689b);
  background-size: 300% 300%;
  animation: liquid 4s ease-in-out infinite, gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Interactive Particles */
.particle-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #3fcdc7;
  border-radius: 50%;
  opacity: 0;
  animation: particle-float 3s linear infinite;
}

@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0);
  }
  10% {
    opacity: 1;
    transform: translateY(80px) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateY(-80px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0);
  }
}

/* Glitch Effect */
.glitch {
  position: relative;
  color: #3fcdc7;
  font-weight: bold;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: #ff689b;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: #e98e06;
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 14%, 15%, 49%, 50%, 99%, 100% {
    transform: translate(0);
  }
  15%, 49% {
    transform: translate(-2px, 2px);
  }
}

@keyframes glitch-2 {
  0%, 20%, 21%, 62%, 63%, 99%, 100% {
    transform: translate(0);
  }
  21%, 62% {
    transform: translate(2px, -2px);
  }
}

/* Holographic Effect - Crystal Clear */
.holographic {
  background: linear-gradient(45deg,
    #3fcdc7 0%,
    #e98e06 25%,
    #ff689b 50%,
    #8660fe 75%,
    #3fcdc7 100%);
  background-size: 400% 400%;
  animation: holographic-shift 3s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Anti-aliasing for crisp text */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Prevent blur */
  transform: translateZ(0);
  backface-visibility: hidden;
}

@keyframes holographic-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Business Area Headers */
.business-area-header {
  text-align: center;
  margin: 3rem 0 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(63, 205, 199, 0.1), rgba(233, 142, 6, 0.1));
  border-radius: 15px;
  border: 1px solid rgba(63, 205, 199, 0.2);
  position: relative;
  overflow: hidden;
}

.business-area-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 1s ease;
}

.business-area-header:hover::before {
  left: 100%;
}

.business-area-header h3 {
  color: #3fcdc7;
  margin-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: bold;
}

.business-area-header h3 i {
  margin-right: 0.5rem;
  color: #e98e06;
}

.business-area-header p {
  color: #cccccc;
  font-size: 1.1rem;
  margin: 0;
}

/* Service Box Improvements */
.services .box {
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  /* Text sharpening */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.services .box:hover {
  transform: translateY(-10px) scale(1.03);
}

/* Sharp text for all service box content */
.services .box .title,
.services .box .description,
.services .box h4,
.services .box p {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Remove any blur-causing effects */
.services .box .title a {
  text-decoration: none;
  transition: color 0.3s ease;
}

.services .box .title a:hover {
  color: #3fcdc7;
}

/* Responsive 3D Effects */
@media (max-width: 768px) {
  .services .box:hover {
    transform: rotateY(5deg) rotateX(2deg) translateZ(10px) scale(1.02);
  }

  .text-3d {
    transform: perspective(300px) rotateX(10deg);
  }

  .morph-shape {
    width: 60px;
    height: 60px;
  }

  .business-area-header {
    margin: 2rem 0 1rem 0;
    padding: 1.5rem;
  }

  .business-area-header h3 {
    font-size: 1.5rem;
  }
}
