/* ===================================
   CUSTOM ANIMATIONS
   =================================== */

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

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

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

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hover Animations for Cards */
.pricing-card,
.fit-card,
.testimonial-card {
    transition: all 0.3s ease;
}

.pricing-card:hover,
.fit-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Button Hover Animation */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--color-almost-black);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary::before {
    background-color: var(--color-white);
}

/* Icon Animations */
.work-icon {
    transition: all 0.3s ease;
}

.work-icon img {
    transition: transform 0.3s ease;
}

.work-step:hover .work-icon img {
    transform: scale(1.1) rotate(5deg);
}

/* Nav Link Animation */
.nav-link {
    position: relative;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-almost-black);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Smooth Scroll Indicator */
@keyframes scrollDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

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

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

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Stagger Animation Classes */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* Page Load Animations */
.hero-content {
    animation: fadeIn 1s ease-out;
}

/* Testimonial Transition */
.testimonial-card {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Nav Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Fit Card Hover */
.fit-card {
    position: relative;
}

.fit-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--color-almost-black);
    opacity: 0;
    transform: scale(1.02);
    transition: all 0.3s ease;
    pointer-events: none;
}

.fit-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Check/X Icon Animation */
.check-icon,
.x-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.fit-list li:hover .check-icon,
.fit-list li:hover .x-icon {
    transform: scale(1.2);
}

/* Popular Badge Animation */
.popular-badge {
    animation: pulse 2s infinite;
}

/* Image Hover Effects */
.logo-placeholder {
    transition: all 0.3s ease;
}

.logo-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Smooth Entry Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Focus Visible States for Accessibility */
.btn:focus-visible,
.nav-link:focus-visible {
    outline: 3px solid var(--color-almost-black);
    outline-offset: 3px;
}

/* Mobile Menu Animation - Disabled to prevent double animation effect */
/*
@keyframes menuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-menu.active li {
    animation: menuSlideDown 0.3s ease-out forwards;
}

.nav-menu.active li:nth-child(1) {
    animation-delay: 0.05s;
}

.nav-menu.active li:nth-child(2) {
    animation-delay: 0.1s;
}

.nav-menu.active li:nth-child(3) {
    animation-delay: 0.15s;
}

.nav-menu.active li:nth-child(4) {
    animation-delay: 0.2s;
}

.nav-menu.active li:nth-child(5) {
    animation-delay: 0.25s;
}
*/

/* Price Number Animation on Hover */
.pricing-card:hover .price {
    animation: pulse 0.5s ease;
}

/* Responsive Animation Adjustments */
@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .work-step:hover .work-icon,
    .work-step:hover .work-icon img,
    .fit-list li:hover .check-icon,
    .fit-list li:hover .x-icon {
        transform: none !important;
    }
}
