/**
 * Fun Factor Area - Amazing Animated Background
 * Modern, dynamic, professional design with particles and effects
 */

.fun-factor-area {
  background:
    linear-gradient(135deg, rgba(79, 172, 254, 0.9) 0%, rgba(0, 242, 254, 0.85) 100%),
    url("../img/gallery/sports_01.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 61px 0 53px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Animated gradient overlay */
.fun-factor-area:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(102, 126, 234, 0.4) 0%,
    rgba(118, 75, 162, 0.3) 25%,
    rgba(240, 147, 251, 0.3) 50%,
    rgba(79, 172, 254, 0.4) 75%,
    rgba(0, 242, 254, 0.4) 100%
  );
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  z-index: -1;
}

/* Dark overlay for text readability */
.fun-factor-area:after {
  background: rgba(0, 0, 0, 0.35) none repeat scroll 0 0;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

/* Animated particles container */
.fun-factor-area .container {
  position: relative;
  z-index: 10;
}

/* Floating particles animation */
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(5deg); }
  66% { transform: translateY(-10px) rotate(-5deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Add glow effect to icons */
.fun-factor-area .fun-factor-icon {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float 6s ease-in-out infinite;
}

.fun-factor-area .single-fun-factor:nth-child(1) .fun-factor-icon {
  animation-delay: 0s;
}

.fun-factor-area .single-fun-factor:nth-child(2) .fun-factor-icon {
  animation-delay: 0.5s;
}

.fun-factor-area .single-fun-factor:nth-child(3) .fun-factor-icon {
  animation-delay: 1s;
}

.fun-factor-area .single-fun-factor:nth-child(4) .fun-factor-icon {
  animation-delay: 1.5s;
}

.fun-factor-area .fun-factor-icon i {
  font-size: 45px;
  color: #ffffff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* Hover effects */
.fun-factor-area .single-fun-factor:hover .fun-factor-icon {
  transform: scale(1.15) translateY(-10px);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 255, 255, 0.2);
}

.fun-factor-area .single-fun-factor:hover .fun-factor-icon i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

/* Enhanced text styling */
.fun-factor-area .single-fun-factor h2 {
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3);
  font-weight: 700;
  letter-spacing: 1px;
}

.fun-factor-area .single-fun-factor span {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .fun-factor-area {
    background-attachment: scroll;
  }

  .fun-factor-area .fun-factor-icon {
    width: 80px;
    height: 80px;
  }

  .fun-factor-area .fun-factor-icon i {
    font-size: 35px;
  }
}

@media (max-width: 767px) {
  .fun-factor-area .fun-factor-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 15px;
  }

  .fun-factor-area .fun-factor-icon i {
    font-size: 30px;
  }

  .fun-factor-area .single-fun-factor h2 {
    font-size: 40px;
  }

  .fun-factor-area .single-fun-factor span {
    font-size: 13px;
  }
}
