/* Enhanced Animation Styles */

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.animated-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 15s infinite alternate ease-in-out;
  will-change: transform;
}

.animated-bg-shape:nth-child(1) {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  background-color: var(--primary-color);
  animation-delay: 0s;
}

.animated-bg-shape:nth-child(2) {
  width: 300px;
  height: 300px;
  top: 50%;
  right: -50px;
  background-color: var(--secondary-color);
  animation-delay: -2s;
}

.animated-bg-shape:nth-child(3) {
  width: 350px;
  height: 350px;
  bottom: -100px;
  left: 30%;
  background-color: var(--accent-color-1);
  animation-delay: -4s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, 30px) scale(1.1);
  }
  100% {
    transform: translate(-30px, 50px) scale(0.9);
  }
}

/* Enhanced Page Transitions */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition-overlay.active {
  transform: translateY(0);
}

.page-transition-overlay.fade-out {
  transform: translateY(-100%);
}

/* Enhanced Hover Effects */
.enhanced-hover {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.enhanced-hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.enhanced-hover:hover::before {
  left: 100%;
  transition: 0.7s;
}

/* Glowing Button Effect */
.btn-glow {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-glow::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, transparent, transparent, var(--primary-color));
  animation: rotate 4s linear infinite;
  z-index: -1;
}

.btn-glow::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--bg-color);
  border-radius: calc(var(--border-radius) - 3px);
  z-index: -1;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Animated Cards */
.animated-card {
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.animated-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 60%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.animated-card:hover::before {
  transform: translateX(100%);
}

.animated-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animated Text Reveal */
.reveal-text {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.reveal-text span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.reveal-text.revealed span {
  transform: translateY(0);
  opacity: 1;
}

/* Staggered animation for reveal-text spans */
.reveal-text span:nth-child(1) {
  transition-delay: 0.1s;
}
.reveal-text span:nth-child(2) {
  transition-delay: 0.15s;
}
.reveal-text span:nth-child(3) {
  transition-delay: 0.2s;
}
.reveal-text span:nth-child(4) {
  transition-delay: 0.25s;
}
.reveal-text span:nth-child(5) {
  transition-delay: 0.3s;
}
.reveal-text span:nth-child(6) {
  transition-delay: 0.35s;
}
.reveal-text span:nth-child(7) {
  transition-delay: 0.4s;
}
.reveal-text span:nth-child(8) {
  transition-delay: 0.45s;
}
.reveal-text span:nth-child(9) {
  transition-delay: 0.5s;
}
.reveal-text span:nth-child(10) {
  transition-delay: 0.55s;
}

/* Animated Section Backgrounds */
.section-animated-bg {
  position: relative;
  overflow: hidden;
}

.section-animated-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(var(--secondary-rgb), 0.1) 0%, transparent 50%);
  animation: section-bg-animate 15s ease infinite alternate;
  z-index: -1;
}

@keyframes section-bg-animate {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

/* Enhanced Scroll Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.fade-in-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.fade-in-right.animated {
  opacity: 1;
  transform: translateX(0);
}

.zoom-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

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

/* Staggered animations for grid items */
.stagger-grid > *:nth-child(1) {
  transition-delay: 0.1s;
}
.stagger-grid > *:nth-child(2) {
  transition-delay: 0.2s;
}
.stagger-grid > *:nth-child(3) {
  transition-delay: 0.3s;
}
.stagger-grid > *:nth-child(4) {
  transition-delay: 0.4s;
}
.stagger-grid > *:nth-child(5) {
  transition-delay: 0.5s;
}
.stagger-grid > *:nth-child(6) {
  transition-delay: 0.6s;
}
.stagger-grid > *:nth-child(7) {
  transition-delay: 0.7s;
}
.stagger-grid > *:nth-child(8) {
  transition-delay: 0.8s;
}
.stagger-grid > *:nth-child(9) {
  transition-delay: 0.9s;
}
.stagger-grid > *:nth-child(10) {
  transition-delay: 1s;
}

/* Enhanced Cursor Effects */
.cursor-effect {
  position: fixed;
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 9999;
  will-change: transform;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
}

.cursor-circle {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

/* Disable custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot,
  .cursor-circle,
  .cursor-effect,
  .cursor-outer,
  .cursor-inner {
    display: none !important;
  }
}

/* Responsive animations */
@media screen and (max-width: 768px) {
  .animated-bg-shape {
    filter: blur(40px);
    animation: float 20s infinite alternate ease-in-out;
  }

  .animated-bg-shape:nth-child(1) {
    width: 250px;
    height: 250px;
  }

  .animated-bg-shape:nth-child(2) {
    width: 200px;
    height: 200px;
  }

  .animated-bg-shape:nth-child(3) {
    width: 220px;
    height: 220px;
  }
}
