/* Disable all animations on mobile */
@media (max-width: 768px) {
    * {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
    
    .animate-pop,
    .animate-fade,
    .animate-slide {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
    }
}

/* Animation Keyframes */
@keyframes popUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(2px);
    }
    60% {
        opacity: 0.7;
        transform: translateY(8px) scale(0.98);
        filter: blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

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

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Animation Classes */
.animate-pop {
    opacity: 0;
    will-change: opacity, transform, filter;
    transform: translateY(30px) scale(0.95);
    filter: blur(2px);
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.animate-fade {
    opacity: 0;
    will-change: opacity, transform;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.animate-slide {
    opacity: 0;
    will-change: opacity, transform;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.animate-pop.animate-visible {
    animation: popUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fade.animate-visible {
    animation: fadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide.animate-visible:nth-child(odd) {
    animation: slideInLeft 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide.animate-visible:nth-child(even) {
    animation: slideInRight 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Typing cursor effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: #0066cc;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Hover animations */
.hover-grow {
    transition: transform 0.3s ease;
}

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

/* Loading animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% {
        content: '';
    }
    25% {
        content: '.';
    }
    50% {
        content: '..';
    }
    75% {
        content: '...';
    }
    100% {
        content: '';
    }
}

/* Floating animation for special elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for CTAs */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Smooth transitions for all animated elements */
.animate-pop,
.animate-fade,
.animate-slide {
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: opacity, transform, filter;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Staggered animations for lists */
ul.staggered-list li,
ol.staggered-list li {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

ul.staggered-list li:nth-child(1),
ol.staggered-list li:nth-child(1) {
    animation-delay: 0.1s;
}

ul.staggered-list li:nth-child(2),
ol.staggered-list li:nth-child(2) {
    animation-delay: 0.2s;
}

ul.staggered-list li:nth-child(3),
ol.staggered-list li:nth-child(3) {
    animation-delay: 0.3s;
}

ul.staggered-list li:nth-child(4),
ol.staggered-list li:nth-child(4) {
    animation-delay: 0.4s;
}

ul.staggered-list li:nth-child(5),
ol.staggered-list li:nth-child(5) {
    animation-delay: 0.5s;
}

/* Gallery hover effects */
.gallery-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Product card animations */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Competition card animations */
.competition-card {
    transition: all 0.3s ease;
}

.competition-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Hero section special effects */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Smooth reveal for sections */
section {
    position: relative;
}

/* Navigation link hover effects */
nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0066cc;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Button hover effects */
button, .button, input[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button::before, .button::before, input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

button:hover::before, .button:hover::before, input[type="submit"]:hover::before {
    width: 300px;
    height: 300px;
}

/* Image zoom on hover */
img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}

/* Text selection animation */
::selection {
    background-color: rgba(0, 102, 204, 0.3);
    color: #000;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    /* Reduce initial opacity hiding on mobile */
    .animate-pop,
    .animate-fade,
    .animate-slide {
        opacity: 0.3; /* Not fully hidden on mobile */
    }
    
    /* Faster animations on mobile */
    .animate-pop.animate-visible {
        animation-duration: 0.4s !important;
    }
    
    .animate-fade.animate-visible {
        animation-duration: 0.5s !important;
    }
    
    .animate-slide.animate-visible {
        animation-duration: 0.4s !important;
    }
    
    /* Simpler animations on mobile */
    @keyframes popUp {
        from {
            opacity: 0.3;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Disable complex animations on very small screens */
    @media (max-width: 480px) {
        .animate-pop,
        .animate-fade,
        .animate-slide {
            opacity: 1 !important;
            transform: none !important;
        }
        
        .animate-visible {
            animation: none !important;
        }
    }
}

/* Ensure critical navigation is always visible */
nav, header, .navigation {
    opacity: 1 !important;
    transform: none !important;
}

/* Prevent animation on critical UI elements */
.navbar, .navbar *, .navigation * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}