/* Acrofitness Custom Animations - Added animations for images, icons, SVGs, headings, sections and buttons */

/* SVG Icon Animations */
.xb-item--icon img, 
.xb-about-list img,
.xb-item--list img {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
    will-change: transform;
}

.xb-item--icon:hover img, 
.xb-about-list li:hover img,
.xb-item--list li:hover img {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 3px rgba(255, 77, 36, 0.5));
    animation: iconVibrateEffect 0.5s ease;
}

@keyframes iconVibrateEffect {
    0%, 100% { transform: scale(1.2) rotate(10deg); }
    25% { transform: scale(1.25) rotate(15deg); }
    50% { transform: scale(1.15) rotate(5deg); }
    75% { transform: scale(1.22) rotate(12deg); }
}

/* Feature SVG Animation */
.xb-feature:hover .xb-item--icon img {
    animation: svgPulse 1.5s infinite alternate;
}

.xb-feature {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.xb-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.xb-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 77, 36, 0.05) 0%, rgba(255, 77, 36, 0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
}

.xb-feature:hover::before {
    opacity: 1;
    animation: pulseGradient 2s infinite;
}

@keyframes pulseGradient {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes svgPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 1px rgba(255, 77, 36, 0.2));
    }
    100% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px rgba(255, 77, 36, 0.6));
    }
}

/* Heading Animations */
.title {
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff4d24;
    transition: width 0.5s ease;
}

.sec-title:hover .title::after {
    width: 100%;
    animation: underlineGlow 1.5s infinite;
}

@keyframes underlineGlow {
    0%, 100% { box-shadow: 0 0 3px rgba(255, 77, 36, 0.3); }
    50% { box-shadow: 0 0 8px rgba(255, 77, 36, 0.6); }
}

/* Subtle letter animation for headings */
.xb-item--title:hover {
    animation: letterSpacing 0.8s forwards;
}

.title:hover {
    animation: textShadowPulse 2s infinite alternate;
}

@keyframes textShadowPulse {
    0% { text-shadow: 0 0 0 rgba(255, 77, 36, 0); }
    100% { text-shadow: 0 0 5px rgba(255, 77, 36, 0.3); }
}

@keyframes letterSpacing {
    0% { letter-spacing: normal; }
    50% { letter-spacing: 1px; }
    100% { letter-spacing: normal; }
}

/* Button Animations */
.xb-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

.xb-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: width 0.6s ease, height 0.6s ease;
}

.xb-btn:hover::before {
    width: 200%;
    height: 200%;
}

.xb-btn::after {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    width: 0;
    height: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    transform: rotate(25deg);
    transition: all 0.5s ease;
}

.xb-btn:hover::after {
    width: 120%;
    height: 150%;
    animation: buttonShine 1s forwards;
}

@keyframes buttonShine {
    0% { left: -100%; opacity: 0.5; }
    100% { left: 100%; opacity: 0; }
}

.xb-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
}

.xb-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Star Icon Animation */
.fas.fa-star, 
.fas.fa-star-half-alt {
    transition: transform 0.3s ease, color 0.3s ease;
    will-change: transform;
}

.xb-rating:hover .fas.fa-star,
.xb-rating:hover .fas.fa-star-half-alt {
    animation: starTwinkle 1.5s infinite;
    transform-origin: center;
}

.xb-rating:hover {
    animation: ratingJiggle 3s ease infinite;
}

@keyframes ratingJiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(0.5deg); }
    75% { transform: rotate(-0.5deg); }
}

@keyframes starTwinkle {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* Individual star delay to create wave effect */
.xb-rating li:nth-child(1) .fas {
    animation-delay: 0s;
}
.xb-rating li:nth-child(2) .fas {
    animation-delay: 0.15s;
}
.xb-rating li:nth-child(3) .fas {
    animation-delay: 0.3s;
}
.xb-rating li:nth-child(4) .fas {
    animation-delay: 0.45s;
}
.xb-rating li:nth-child(5) .fas {
    animation-delay: 0.6s;
}

/* 3D hover effect for ratings */
.xb-rating {
    perspective: 500px;
}

.xb-rating:hover li {
    animation: starWave 2s ease infinite;
}

@keyframes starWave {
    0%, 100% { transform: translateZ(0px); }
    50% { transform: translateZ(10px); }
}

.xb-rating li:nth-child(1) { animation-delay: 0s; }
.xb-rating li:nth-child(2) { animation-delay: 0.15s; }
.xb-rating li:nth-child(3) { animation-delay: 0.3s; }
.xb-rating li:nth-child(4) { animation-delay: 0.45s; }
.xb-rating li:nth-child(5) { animation-delay: 0.6s; }

/* Right arrow link animation */
.xb-right-link {
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xb-right-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #ff4d24;
    transition: width 0.3s ease;
}

.xb-right-link:hover::after {
    width: 100%;
}

.xb-right-link:hover svg {
    animation: arrowBounce 0.7s infinite alternate;
}

.xb-right-link:hover {
    transform: translateX(3px);
}

@keyframes arrowBounce {
    0% { transform: translateX(0); }
    100% { transform: translateX(8px); }
}

/* Instagram Images Hover Effect */
.xb-instagram .xb-item--img img {
    transition: all 0.7s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform, filter;
}

.xb-instagram:hover .xb-item--img img {
    transform: scale(1.08) rotate(2deg);
    filter: saturate(1.3) brightness(0.9);
    animation: imageColorShift 3s ease infinite;
}

@keyframes imageColorShift {
    0%, 100% { filter: saturate(1.3) brightness(0.9); }
    50% { filter: saturate(1.4) brightness(0.95) contrast(1.05); }
}

.xb-instagram {
    position: relative;
    overflow: hidden;
}

.xb-instagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xb-instagram:hover::before {
    animation: instagramShine 1.5s infinite;
    opacity: 1;
}

@keyframes instagramShine {
    0% { left: -100%; }
    100% { left: 150%; }
}

.xb-instagram .xb-item--holder {
    opacity: 0;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(0px);
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    will-change: opacity, transform, backdrop-filter;
}

.xb-instagram:hover .xb-item--holder {
    opacity: 1;
    backdrop-filter: blur(2px);
    transform: translateY(0);
    animation: fadeInScale 0.5s forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Instagram Icon Animation */
.xb-instagram .xb-item--icon {
    transition: all 0.3s ease;
    will-change: transform;
}

.xb-instagram:hover .xb-item--icon {
    animation: pulseAndRotate 1s infinite alternate;
}

@keyframes pulseAndRotate {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}

.instagram-title i {
    transition: transform 0.3s ease;
}

.instagram-title:hover i {
    animation: instaIconSpin 1s ease infinite;
}

@keyframes instaIconSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Form Field Animation */
.xb-item--field {
    position: relative;
    overflow: hidden;
}

.xb-item--field::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff4d24;
    transition: width 0.5s ease;
}

.xb-item--field:focus-within::after {
    width: 100%;
    animation: formLineGlow 1.5s ease infinite;
}

@keyframes formLineGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 77, 36, 0.3); }
    50% { box-shadow: 0 0 10px rgba(255, 77, 36, 0.5); }
}

.xb-item--field span {
    transition: transform 0.3s ease;
}

.xb-item--field:focus-within span {
    animation: formIconPulse 1s infinite alternate;
}

@keyframes formIconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.xb-item--field input:focus,
.xb-item--field textarea:focus {
    animation: fieldPulse 0.5s forwards;
}

@keyframes fieldPulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

/* FAQ Accordion Animation */
.accordion.block {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.accordion.block:hover {
    transform: translateX(5px);
    box-shadow: -3px 3px 10px rgba(0, 0, 0, 0.05);
}

.accordion.block .acc-btn {
    position: relative;
    overflow: hidden;
}

.accordion.block .acc-btn::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 77, 36, 0) 0%, rgba(255, 77, 36, 0.05) 50%, rgba(255, 77, 36, 0) 100%);
    transition: all 0.5s ease;
}

.accordion.block:hover .acc-btn::after {
    left: 100%;
    animation: faqSweep 1s forwards;
}

@keyframes faqSweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 3D tilt effect on product images */
.about-img-inner {
    transition: transform 0.3s ease;
    perspective: 1000px;
    transform-style: preserve-3d;
    will-change: transform;
}

.about-img-inner:hover {
    animation: subtle3DTilt 5s infinite alternate;
}

.about-img-inner img {
    transition: transform 0.5s ease, filter 0.5s ease;
}

.about-img-inner:hover img {
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    animation: imageFloat 3s ease infinite;
}

@keyframes imageFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes subtle3DTilt {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(3deg) rotateX(1deg); }
    50% { transform: rotateY(0deg) rotateX(2deg); }
    75% { transform: rotateY(-3deg) rotateX(1deg); }
    100% { transform: rotateY(0deg) rotateX(0deg); }
}

/* Checkbox animation */
.xb-about-list li, 
.xb-item--list li {
    transition: transform 0.3s ease, background 0.3s ease;
    position: relative;
    will-change: transform;
}

.xb-about-list li:hover,
.xb-item--list li:hover {
    transform: translateX(5px);
    background: radial-gradient(circle at left center, rgba(255, 77, 36, 0.05) 0%, rgba(255, 77, 36, 0) 70%);
}

.xb-about-list li::before,
.xb-item--list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 1px;
    background-color: rgba(255, 77, 36, 0.3);
    transition: width 0.3s ease;
    transform: translateY(-50%);
    opacity: 0;
}

.xb-about-list li:hover::before,
.xb-item--list li:hover::before {
    width: 10px;
    opacity: 1;
}

/* Navbar hover animation */
.xb-main-menu ul > li > a {
    position: relative;
    overflow: hidden;
}

.xb-main-menu ul > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ff4d24;
    transition: width 0.3s ease, left 0.3s ease;
    z-index: 1;
}

.xb-main-menu ul > li > a:hover::before {
    width: 100%;
    left: 0;
}

.xb-main-menu ul > li > a span {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.xb-main-menu ul > li > a:hover span {
    animation: menuTextPulse 0.5s ease;
}

@keyframes menuTextPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Floating animation for shapes */
.shape img {
    animation: float 8s ease-in-out infinite;
    will-change: transform;
}

.shape.shape--1 img {
    animation-delay: 0s;
}

.shape.shape--2 img {
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.shape {
    position: relative;
}

.shape::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 5px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.5;
    border-radius: 50%;
    animation: shadowShrinkGrow 8s ease-in-out infinite;
}

@keyframes shadowShrinkGrow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(0.8); opacity: 0.3; }
}

/* Mobile menu icon animation */
.xb-action-bar__menu-btn:hover span::before,
.xb-action-bar__menu-btn:hover span::after,
.xb-action-bar__menu-btn:hover span {
    animation: menuBounce 0.6s;
}

@keyframes menuBounce {
    0%, 100% { width: 100%; }
    50% { width: 70%; }
}

/* Price tag animation */
.xb-item--price, .about-cta h3 {
    position: relative;
    display: inline-block;
    will-change: transform, text-shadow;
}

.xb-item--price:hover, .about-cta h3:hover {
    animation: numberPulse 0.8s forwards;
}

.xb-item--price::before, 
.about-cta h3::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: rgba(255, 77, 36, 0.3);
    transition: width 0.3s ease;
}

.xb-item--price:hover::before, 
.about-cta h3:hover::before {
    width: 100%;
}

@keyframes numberPulse {
    0% { transform: scale(1); text-shadow: 0 0 0 rgba(0,0,0,0); }
    50% { transform: scale(1.05); text-shadow: 0 0 10px rgba(255,77,36,0.3); }
    100% { transform: scale(1); text-shadow: 0 0 0 rgba(0,0,0,0); }
}

/* Social item animation */
.social-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.social-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 77, 36, 0), rgba(255, 77, 36, 0.1), rgba(255, 77, 36, 0));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.social-item:hover::before {
    transform: translateX(100%);
}

.social-item:hover {
    letter-spacing: 1px;
    transform: translateY(-2px);
}

/* Logo Animations */
.header-logo {
    position: relative;
    z-index: 10;
    perspective: 800px;
}

.header-logo a {
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
}

.header-logo a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 77, 36, 0.5), transparent);
    transform: scaleX(0);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
    transform-origin: center;
}

.header-logo:hover a::before {
    transform: scaleX(1);
    opacity: 1;
}

.header-logo img {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
    filter: drop-shadow(0 0 0 rgba(255, 77, 36, 0));
    will-change: transform, filter;
}

.header-logo:hover img {
    animation: logoGlow 2s infinite alternate;
    transform: translateZ(20px);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 3px rgba(255, 77, 36, 0.3));
        transform: translateZ(20px) scale(1);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 77, 36, 0.6));
        transform: translateZ(40px) scale(1.05);
    }
    100% {
        filter: drop-shadow(0 0 3px rgba(255, 77, 36, 0.3));
        transform: translateZ(20px) scale(1);
    }
}

.header-logo::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at center, rgba(255, 77, 36, 0.1) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
    transform: scale(0.8);
}

.header-logo:hover::after {
    opacity: 1;
    animation: logoRadialPulse 2s infinite;
}

@keyframes logoRadialPulse {
    0%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8;
    }
}

/* Logo pulse interaction on click */
.header-logo a:active img {
    animation: logoPulseClick 0.5s ease forwards;
}

@keyframes logoPulseClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Mobile logo animations */
.header-logo.d-lg-none {
    overflow: visible;
}

.header-logo.d-lg-none a {
    overflow: visible;
}

.header-logo.d-lg-none a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 77, 36, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: -1;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.header-logo.d-lg-none:hover a::after {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 1;
    animation: mobileLogoRipple 1.5s infinite;
}

@keyframes mobileLogoRipple {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.xb-logo-mobile img {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.xb-logo-mobile:hover img {
    animation: mobileLogoSpin 3s ease-in-out infinite;
}

@keyframes mobileLogoSpin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* Logo interactions based on scroll */
.is-sticky .header-logo img {
    transition: all 0.5s ease;
}

.is-sticky .header-logo:hover img {
    animation: stickyLogoReveal 0.8s ease forwards;
}

@keyframes stickyLogoReveal {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(180deg) scale(1.1); }
    100% { transform: rotateX(360deg); }
}

/* Sidebar logo animation */
.sidebar-logo a {
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.sidebar-logo a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg) translate(-100%, -100%);
    animation: sidebarLogoShine 5s ease-in-out infinite;
}

@keyframes sidebarLogoShine {
    0% { transform: rotate(45deg) translate(-100%, -100%); }
    50% { transform: rotate(45deg) translate(100%, 100%); }
    100% { transform: rotate(45deg) translate(-100%, -100%); }
}

.sidebar-logo:hover img {
    animation: sidebarLogoPulse 2s infinite alternate;
}

@keyframes sidebarLogoPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.05); filter: brightness(1.2); }
} 