/* Animations CSS */

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Slide In */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.6s ease forwards;
}

/* Scale In */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Rotate In */
@keyframes rotateIn {
  from {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

.rotate-in {
  animation: rotateIn 0.6s ease forwards;
}

/* Bounce */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

.bounce {
  animation: bounce 1s ease infinite;
}

/* Pulse */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 1.5s ease infinite;
}

/* Shake */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.8s ease;
}

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

.float {
  animation: float 3s ease infinite;
}

/* Slide Up On Scroll */
.slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade In On Scroll */
.fade-in-scroll {
  opacity: 0;
  transition: all 0.6s ease;
}

.fade-in-scroll.visible {
  opacity: 1;
}

/* Scale In On Scroll */
.scale-in-scroll {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
}

.scale-in-scroll.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger Children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }

/* Hover Animations */
.hover-grow {
  transition: transform 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Loading Animations */
@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spinner 1s linear infinite;
}

/* Progress Bar */
@keyframes progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.progress-bar {
  height: 4px;
  background: var(--primary-color);
  animation: progress 2s ease forwards;
}

/* Text Reveal */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: textReveal 1s ease forwards;
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Navbar Animation */
.navbar {
    transition: transform 0.3s ease-out, background-color 0.3s ease-out;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Hamburger Animation */
.hamburger {
    position: relative;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Button Hover Animation */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
}

.btn:hover::after {
    width: 100%;
    right: auto;
    left: 0;
}

/* Card Hover Animation */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Image Hover Effect */
.img-hover {
    overflow: hidden;
}

.img-hover img {
    transition: transform 0.3s ease;
}

.img-hover:hover img {
    transform: scale(1.05);
}

/* Service Icon Animation */
.service-icon {
    transition: transform 0.3s ease;
}

.card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
}

/* Mobile Menu Animation */
.nav-menu {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .nav-menu {
        transform: translateY(-100%);
        opacity: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero Section Animations */
.hero-content h1 {
    animation: slideInDown 1s ease-out;
}

.hero-content p {
    animation: slideInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-content .btn {
    animation: fadeIn 1s ease-out 0.6s forwards;
    opacity: 0;
}

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

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

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