/* Animazioni personalizzate */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

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

@keyframes shine {
  0% { background-position: -100%; }
  100% { background-position: 100%; }
}

/* Stili animati */
.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease infinite;
}

.animate-rotate {
  animation: rotate 8s linear infinite;
}

.animate-fade-in {
  animation: fadeInUp 1s ease forwards;
}

.animate-delay-1 {
  animation-delay: 0.2s;
}

.animate-delay-2 {
  animation-delay: 0.4s;
}

.animate-delay-3 {
  animation-delay: 0.6s;
}

.animate-delay-4 {
  animation-delay: 0.8s;
}

.animate-delay-5 {
  animation-delay: 1s;
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect:after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 1.5s infinite;
}

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

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

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

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

.hover-shake:hover {
  animation: shake 0.5s ease infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.text-gradient {
  background: linear-gradient(45deg, #8ecae6, #219ebc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.border-animate {
  position: relative;
}

.border-animate:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  background: linear-gradient(45deg, #8ecae6, #219ebc) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: borderPulse 3s linear infinite;
}

@keyframes borderPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

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

.gallery-container {
  padding: 30px 0;
}

.gallery-item {
  position: relative;
  margin-bottom: 30px;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover {
  transform: translateY(-10px) rotate(1deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover img {
  transform: scale(1.1) rotate(0.5deg);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  padding: 15px;
  transform: translateY(100%);
  transition: transform 0.5s ease, opacity 0.3s ease;
  opacity: 0;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

/* Animazioni per i bottoni */
.main-button a {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.main-button a:after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: all 0.6s ease;
}

.main-button:hover a {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(142, 202, 230, 0.302);
}

.main-button:hover a:after {
  left: 100%;
}

/* Animazione logo */
.logo {
  transition: all 0.3s ease;
  display: inline-block;
}

.logo:hover {
  transform: scale(1.1) rotate(-5deg);
  text-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Animazione menu */
.nav li {
  position: relative;
}

.nav li:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #8ecae6;
  transition: all 0.3s ease;
}

.nav li:hover:after {
  width: 100%;
  left: 0;
}

/* Animazione sezioni */
.section-heading h2 {
  position: relative;
  display: inline-block;
}

.section-heading h2:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #8ecae6, #219ebc);
  transition: all 1s ease;
}

.section-heading.in-view h2:after {
  width: 100%;
}

/* Animazione icone servizi */
.feature-item .left-icon img {
  transition: all 0.5s ease;
}

.feature-item:hover .left-icon img {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 5px 10px rgba(142, 202, 230, 0.302));
}

/* Animazione team */
.trainer-item {
  transition: all 0.5s ease;
}

.trainer-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.trainer-item .image-thumb img {
  transition: all 0.5s ease;
}

.trainer-item:hover .image-thumb img {
  transform: scale(1.05);
}

/* Animazione form */
.form-floating input, .form-floating textarea {
  transition: all 0.3s ease;
}

.form-floating input:focus, .form-floating textarea:focus {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Animazione social icons */
.social-icons li {
  transition: all 0.3s ease;
}

.social-icons li:hover {
  transform: translateY(-5px) scale(1.2);
}

/* Animazione footer */
footer {
  position: relative;
  overflow: hidden;
}

footer:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #8ecae6, #219ebc);
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}