/* ==============================
   Brisbane Cleaning Services - Animations
   ============================== */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Slide Up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  opacity: 0;
}

.slide-up.active {
  animation: slideUp 0.6s ease forwards;
}

/* Slide In Left Animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-left {
  opacity: 0;
}

.slide-left.active {
  animation: slideInLeft 0.6s ease forwards;
}

/* Slide In Right Animation */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-right {
  opacity: 0;
}

.slide-right.active {
  animation: slideInRight 0.6s ease forwards;
}

/* Scale Up Animation */
@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-up {
  opacity: 0;
}

.scale-up.active {
  animation: scaleUp 0.6s ease forwards;
}

/* Staggered Animations */
.stagger-item {
  opacity: 0;
}

.stagger-item.active {
  animation: slideUp 0.6s ease forwards;
}

.stagger-item:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
  animation-delay: 0.2s;
}

.stagger-item:nth-child(4) {
  animation-delay: 0.3s;
}

.stagger-item:nth-child(5) {
  animation-delay: 0.4s;
}

.stagger-item:nth-child(6) {
  animation-delay: 0.5s;
}

/* Button Hover Animation */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

/* Pulse Animation for CTAs */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
  }
}

.btn-accent.pulse {
  animation: pulse 2s infinite;
}

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

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spinner 0.6s linear infinite;
  margin-right: 10px;
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: all 0.5s ease;
}

.loading.loaded {
  opacity: 0;
  visibility: hidden;
}

/* Counter Animation */
.counter {
  transition: all 0.3s ease;
}

/* Loader dots */
.loading-dots:after {
  content: '.';
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% {
    color: rgba(0,0,0,0);
    text-shadow: 0.25em 0 0 rgba(0,0,0,0), 0.5em 0 0 rgba(0,0,0,0);
  }
  40% {
    color: var(--dark-color);
    text-shadow: 0.25em 0 0 rgba(0,0,0,0), 0.5em 0 0 rgba(0,0,0,0);
  }
  60% {
    text-shadow: 0.25em 0 0 var(--dark-color), 0.5em 0 0 rgba(0,0,0,0);
  }
  80%, 100% {
    text-shadow: 0.25em 0 0 var(--dark-color), 0.5em 0 0 var(--dark-color);
  }
}

/* Parallax Scroll */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
} 