/* ========================================
   SCROLL ANIMATIONS - MANDRIL STYLE
   ======================================== */

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-3deg);
  }
  75% {
    transform: rotate(3deg);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Animation Classes */
.fade-in-up,
.fade-in,
.slide-in-left,
.slide-in-right,
.scale-in {
  opacity: 0;
}

.fade-in-up.animated {
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in.animated {
  animation: fadeIn 0.8s ease forwards;
}

.slide-in-left.animated {
  animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right.animated {
  animation: slideInRight 0.8s ease forwards;
}

.scale-in.animated {
  animation: scaleIn 0.8s ease forwards;
}

/* Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* ========================================
   HOVER EFFECTS - CARDS
   ======================================== */

/* Intro Items */
.intro-item {
  transition: all 0.4s ease;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(13, 74, 109, 0.1);
  background: #ffffff;
  position: relative;
  text-align: center;
  transform: translate3d(0, 0, 0);
  min-height: 280px;
}

.intro-item.animated {
  animation: none !important;
  transform: translate3d(0, 0, 0) !important;
}

.intro-item:hover {
  transform: translate3d(0, -10px, 0) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.intro-item i {
  font-size: 60px;
  line-height: 60px;
  transition: all 0.4s ease;
  margin-bottom: 20px;
  color: #c97234;
  display: block;
}

.intro-item:hover i {
  animation: pulse 1s ease infinite;
  transform: scale(1.1);
}

.intro-item h4 {
  margin-top: 0;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.intro-item:hover h4 {
  color: #c97234;
}

.intro-item p {
  line-height: 1.8;
  margin-bottom: 0;
}

/* Service Items */
.service-item {
  transition: all 0.4s ease;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(13, 74, 109, 0.1);
  background: #ffffff;
  position: relative;
  transform: translate3d(0, 0, 0);
}

.service-item.animated {
  animation: none !important;
  transform: translate3d(0, 0, 0) !important;
}

.service-item:hover {
  transform: translate3d(0, -10px, 0) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.service-item i {
  font-size: 50px;
  transition: all 0.4s ease;
  margin-bottom: 20px;
  color: #c97234;
  display: block;
  opacity: 0.4;
}

.service-item:hover i {
  opacity: 1;
  transform: scale(1.2) rotate(5deg);
}

.service-item h4 {
  margin-top: 0;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.service-item:hover h4 {
  color: #c97234;
}

.service-item p {
  line-height: 1.8;
  margin-bottom: 0;
}

/* Testimonial Items */
.testimonial-item {
  transition: all 0.4s ease;
  border-radius: 10px;
}

.testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* ========================================
   BUTTON EFFECTS
   ======================================== */

/* Button Lift and Shadow */
.btn-main,
.btn-small {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-main:hover,
.btn-small:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(201, 114, 52, 0.3);
}

/* Button Shine Effect */
.btn-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-main:hover::before {
  left: 100%;
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #c97234;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 5px 20px rgba(201, 114, 52, 0.4);
  will-change: opacity, transform;
}

#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: #d08345;
}

#scroll-to-top .icon {
  font-size: 20px;
}

/* Mobile */
@media (max-width: 768px) {
  #scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration */
.intro-item,
.service-item,
.testimonial-item,
.btn-main,
#scroll-to-top {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
