/* Animation Styles */

/* Global Animation Settings */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Load Animations */
@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);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Gallery Navigation Progress Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* SEDG Logo Animation */
@keyframes sedgPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
        color: var(--color-signature);
    }
    25% {
        opacity: 0.5;
        transform: scale(1.2);
        color: var(--color-accent);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        color: var(--color-signature);
        text-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
    }
    75% {
        opacity: 0.8;
        transform: scale(1.05);
        color: var(--color-accent);
    }
    100% {
        opacity: 0;
        transform: scale(1);
        color: var(--color-signature);
    }
}

/* Loading Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -15px, 0);
    }
    70% {
        transform: translate3d(0, -7px, 0);
    }
    90% {
        transform: translate3d(0, -3px, 0);
    }
}

/* Hover Animations */
@keyframes hoverGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 69, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 69, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 69, 0, 0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Page Transition Animations */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutToBottom {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes slideOutToTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Text Animations */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--color-signature);
    }
}

/* Image Animations */
@keyframes imageReveal {
    from {
        clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
    }
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes parallaxFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fadeOut {
    animation: fadeOut 0.3s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease forwards;
}

.animate-scaleOut {
    animation: scaleOut 0.3s ease forwards;
}

.animate-slideInFromBottom {
    animation: slideInFromBottom 0.8s ease forwards;
}

.animate-slideInFromTop {
    animation: slideInFromTop 0.8s ease forwards;
}

.animate-slideOutToBottom {
    animation: slideOutToBottom 0.5s ease forwards;
}

.animate-slideOutToTop {
    animation: slideOutToTop 0.5s ease forwards;
}

/* Hover Animation Classes */
.hover-glow:hover {
    animation: hoverGlow 0.6s ease;
}

.hover-bounce:hover {
    animation: bounce 0.8s ease;
}

.hover-shake:hover {
    animation: shake 0.5s ease;
}

/* Loading Animation Classes */
.loading-spin {
    animation: spin 1s linear infinite;
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scroll Animations */
@keyframes scrollIndicator {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    animation: scrollIndicator 2s ease-in-out infinite;
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Intersection Observer Animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left-on-scroll {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right-on-scroll {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Reduced Motion Support */
@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;
    }
    
    .animate-fadeInUp,
    .animate-fadeInDown,
    .animate-fadeInLeft,
    .animate-fadeInRight,
    .animate-scaleIn,
    .animate-slideInFromBottom,
    .animate-slideInFromTop {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .fade-in-on-scroll,
    .slide-in-left-on-scroll,
    .slide-in-right-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Performance Optimizations */
.will-animate {
    will-change: transform, opacity;
}

.will-animate.animation-complete {
    will-change: auto;
}
