/* 
 * Animations CSS for Wardiah Contracting Company
 * Contains animations, effects, and loading screen styles
 */

/* Logo Glow Animation */
@keyframes logo-glow {
  0% { text-shadow: 0 0 5px rgba(248, 161, 0, 0.1), 0 0 10px rgba(248, 161, 0, 0); }
  50% { text-shadow: 0 0 10px rgba(248, 161, 0, 0.3), 0 0 20px rgba(248, 161, 0, 0.2); }
  100% { text-shadow: 0 0 5px rgba(248, 161, 0, 0.1), 0 0 10px rgba(248, 161, 0, 0); }
}

.logo-wardiah {
  animation: logo-glow 3s infinite ease-in-out;
}

.logo-contracts {
  animation: logo-glow 3s infinite ease-in-out 0.5s;
}

/* Loading Animation */
.loading-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(248, 161, 0, 0.2);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 2000;
  width: 0;
  transition: width 0.1s;
}

/* Back to Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

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

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Mobile Menu Backdrop */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Number counters animation */
.counter-anim {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s, transform 1s;
}

.counter-anim.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Shape decorations */
.shape-decoration {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.shape-1 {
  top: 10%;
  right: 5%;
  width: 300px;
  height: 300px;
  background: linear-gradient(45deg, var(--secondary-color), transparent);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morphShape 15s ease-in-out infinite;
}

.shape-2 {
  bottom: 10%;
  left: 5%;
  width: 200px;
  height: 200px;
  background: linear-gradient(-45deg, var(--secondary-color), transparent);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morphShape 15s ease-in-out infinite reverse;
}

@keyframes morphShape {
  0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
  100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Section dividers */
.section-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background-color: inherit;
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
  z-index: 2;
}

.section-divider-flip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background-color: inherit;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
  z-index: 2;
}

/* Fade animations for AOS */
[data-aos="custom-fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition-property: transform, opacity;
}

[data-aos="custom-fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="custom-fade-right"] {
  opacity: 0;
  transform: translateX(-30px);
  transition-property: transform, opacity;
}

[data-aos="custom-fade-right"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

[data-aos="custom-fade-left"] {
  opacity: 0;
  transform: translateX(30px);
  transition-property: transform, opacity;
}

[data-aos="custom-fade-left"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

/* Particle Canvas Background */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

/* Footer particles */
.footer-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.2;
}