/* Modern Animations CSS for Klean Template */

/* Base smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* AOS Initial State */
[data-aos] {
  opacity: 0 !important;
  transition-property: opacity, transform !important;
}

[data-aos].aos-animate {
  opacity: 1 !important;
}

/* Card Hover Effects */
.card {
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.4s ease !important;
  will-change: transform;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Button Hover Effects */
.btn-klean, .btn-klean-outline, .btn-outline-primary {
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-klean:before, .btn-klean-outline:before, .btn-outline-primary: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;
  z-index: -1;
}

.btn-klean:hover:before, .btn-klean-outline:hover:before, .btn-outline-primary:hover:before {
  left: 100%;
}

.btn-klean:hover, .btn-klean-outline:hover, .btn-outline-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

/* Icon Wrapper Effects */
.icon-wrapper {
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  display: inline-block;
}

.icon-wrapper:hover {
  transform: scale(1.15) rotate(5deg);
}

.icon {
  transition: all 0.3s ease;
}

.icon-wrapper:hover .icon {
  animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Brand Logo Hover */
.col-auto img[height="40"] {
  transition: all 0.3s ease;
  filter: grayscale(0.2);
  opacity: 0.8;
}

.col-auto img[height="40"]:hover {
  transform: translateY(-5px) scale(1.1);
  filter: grayscale(0);
  opacity: 1;
}

/* Social Icons */
.list-social-icon {
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.list-social-icon:hover {
  transform: translateY(-5px) scale(1.2);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Input Fields */
.input-box, .form-control {
  transition: all 0.3s ease, box-shadow 0.2s ease;
}

.input-box:focus, .form-control:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.2);
  border-color: #9b4dff !important;
  outline: none;
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #5e2ced, #9b4dff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(94, 44, 237, 0.3);
  border: none;
  color: white;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 25px rgba(94, 44, 237, 0.4);
}

/* Pulse Animation for CTA */
@keyframes softPulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 44, 237, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(94, 44, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 44, 237, 0); }
}

.btn-glow {
  animation: softPulse 2s infinite;
}

/* Page Fade In */
body {
  animation: fadeInPage 0.8s ease-out;
}

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

/* Team Wrapper Effect */
.wrapper {
  transition: all 0.4s ease;
  display: inline-block;
}

.wrapper:hover {
  transform: translateY(-8px);
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #9b4dff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  transform: translate(-50%, -50%);
}

.cursor-follower {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(155, 77, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease, border-color 0.2s ease;
  transform: translate(-50%, -50%);
}

.cursor-hover {
  transform: translate(-50%, -50%) scale(2.5) !important;
  background: linear-gradient(135deg, #ff6b6b, #ff8e53) !important;
}

.follower-hover {
  transform: translate(-50%, -50%) scale(0.5) !important;
  border-color: #ff6b6b !important;
  border-width: 3px !important;
}

/* Hide default cursor on interactive elements */
a, button, .btn, .card, .nav-link, .icon-wrapper, .list-social-icon, input, textarea {
  cursor: none;
}

@media (max-width: 768px) {
  .custom-cursor, .cursor-follower {
    display: none;
  }
  body {
    cursor: auto;
  }
  a, button, .btn, .card, .nav-link, .icon-wrapper, .list-social-icon, input, textarea {
    cursor: pointer;
  }
}

/* Navbar Link Animation */
.navbar-nav .nav-link {
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #5e2ced, #9b4dff);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover:after {
  width: 100%;
}

/* Image Zoom on Hover */
.card img, .team-card-1, .team-card-2, .team-card-3, .team-card-4 {
  transition: transform 0.5s ease;
}

.card:hover img, .wrapper:hover img {
  transform: scale(1.05);
}

/* Star Hover Effect */
.bi-star-fill {
  transition: transform 0.2s ease;
}

.bi-star-fill:hover {
  transform: scale(1.2);
}

/* Project Card Hover */
.project-card-bg {
  transition: transform 0.4s ease;
}

.project-card-bg:hover {
  transform: translateY(-5px);
}

/* Service Card Specific */
.card-bg {
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* Testimonial Card Hover */
.testimonial-card-bg {
  transition: transform 0.4s ease;
}

.testimonial-card-bg:hover {
  transform: scale(1.02);
}

/* Badge Gradient */
.badge.bg-gradient-primary {
  background: linear-gradient(135deg, #5e2ced, #9b4dff);
}

/* Page Header Styles for Inner Pages */
.page-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
}

.page-header .breadcrumb {
  background: transparent;
  padding: 0;
}

.page-header .breadcrumb-item a {
  color: #5e2ced;
  text-decoration: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .card:hover {
    transform: translateY(-5px) scale(1.01);
  }
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
  .page-header {
    padding: 100px 0 40px;
  }
  .page-header h1 {
    font-size: 2rem;
  }
}