/*!
 * HostWebo Theme - Animations
 * @package HostWebo
 * @version 1.0.0
 */

/* ===================================
   KEYFRAME ANIMATIONS
   =================================== */

/* Logo Rotation */
@keyframes slow-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Gradient Flow for Price Cards */
@keyframes gradient-flow {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

/* Testimonials Scroll Up */
@keyframes scroll-up {
	from {
		transform: translateY(0);
	}
	to {
		transform: translateY(-50%);
	}
}

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

/* Fade In Up */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fade In Down */
@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fade In Left */
@keyframes fadeInLeft {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Fade In Right */
@keyframes fadeInRight {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Scale In */
@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Slide Down */
@keyframes slideDown {
	from {
		max-height: 0;
		opacity: 0;
	}
	to {
		max-height: 500px;
		opacity: 1;
	}
}

/* Slide Up */
@keyframes slideUp {
	from {
		max-height: 500px;
		opacity: 1;
	}
	to {
		max-height: 0;
		opacity: 0;
	}
}

/* Pulse */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Bounce */
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-10px);
	}
	60% {
		transform: translateY(-5px);
	}
}

/* Shake */
@keyframes shake {
	0%, 100% {
		transform: translateX(0);
	}
	10%, 30%, 50%, 70%, 90% {
		transform: translateX(-5px);
	}
	20%, 40%, 60%, 80% {
		transform: translateX(5px);
	}
}

/* Glow */
@keyframes glow {
	0%, 100% {
		box-shadow: 0 0 20px rgba(81, 67, 217, 0.3);
	}
	50% {
		box-shadow: 0 0 40px rgba(81, 67, 217, 0.6);
	}
}

/* Gradient Animation */
@keyframes gradient-x {
	0%, 100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

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

/* Float */
@keyframes float {
	0%, 100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-10px);
	}
}

/* ===================================
   ANIMATION UTILITY CLASSES
   =================================== */

.animate-slow-spin {
	animation: slow-spin 10s linear infinite;
}

.animate-gradient-flow {
	animation: gradient-flow 4s ease infinite;
}

.animate-scroll-up-slow {
	animation: scroll-up 80s linear infinite;
}

.animate-scroll-up-medium {
	animation: scroll-up 60s linear infinite;
}

.animate-scroll-up-fast {
	animation: scroll-up 40s linear infinite;
}

.animate-fade-in {
	animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
	animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-down {
	animation: fadeInDown 0.6s ease-out forwards;
}

.animate-fade-in-left {
	animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
	animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
	animation: scaleIn 0.5s ease-out forwards;
}

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

.animate-bounce {
	animation: bounce 1s ease-in-out infinite;
}

.animate-glow {
	animation: glow 2s ease-in-out infinite;
}

.animate-float {
	animation: float 3s ease-in-out infinite;
}

/* ===================================
   TRANSITION UTILITIES
   =================================== */

.transition-all {
	transition: all 0.3s ease;
}

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

.transition-opacity {
	transition: opacity 0.3s ease;
}

.transition-colors {
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ===================================
   HOVER EFFECTS
   =================================== */

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

.hover-lift:hover {
	transform: translateY(-4px);
}

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

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

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

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

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

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

.hover-glow {
	transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
	box-shadow: 0 0 30px rgba(81, 67, 217, 0.5);
}

/* ===================================
   LOADING STATES
   =================================== */

.skeleton {
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.spinner {
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: #5143D9;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spinner 0.8s linear infinite;
}

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

/* ===================================
   PAGE TRANSITIONS
   =================================== */

.page-fade-in {
	animation: fadeIn 0.3s ease-out;
}

.page-slide-up {
	animation: fadeInUp 0.4s ease-out;
}

/* ===================================
   STAGGER ANIMATIONS
   =================================== */

.stagger-item {
	opacity: 0;
	animation: fadeInUp 0.6s ease-out forwards;
}

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

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

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

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

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

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

.stagger-item:nth-child(7) {
	animation-delay: 0.7s;
}

.stagger-item:nth-child(8) {
	animation-delay: 0.8s;
}

.stagger-item:nth-child(9) {
	animation-delay: 0.9s;
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.scroll-reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.scroll-reveal-left {
	opacity: 0;
	transform: translateX(-20px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-left.revealed {
	opacity: 1;
	transform: translateX(0);
}

.scroll-reveal-right {
	opacity: 0;
	transform: translateX(20px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-right.revealed {
	opacity: 1;
	transform: translateX(0);
}

.scroll-reveal-scale {
	opacity: 0;
	transform: scale(0.9);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-scale.revealed {
	opacity: 1;
	transform: scale(1);
}

/* ===================================
   MOBILE MENU ANIMATIONS
   =================================== */

.mobile-menu-enter {
	animation: slideDown 0.3s ease-out forwards;
}

.mobile-menu-exit {
	animation: slideUp 0.3s ease-out forwards;
}

/* ===================================
   PAUSE ON HOVER
   =================================== */

.pause-on-hover:hover {
	animation-play-state: paused !important;
}

/* ===================================
   REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* Will-change per elementi animati */
.will-change-transform {
	will-change: transform;
}

.will-change-opacity {
	will-change: opacity;
}

.will-change-auto {
	will-change: auto;
}

/* GPU Acceleration */
.gpu-accelerated {
	transform: translateZ(0);
	backface-visibility: hidden;
	perspective: 1000px;
}
