/* ============================================
   Feza Film - Animation Library
   ============================================ */

/* ============================================
   Keyframe Animations
   ============================================ */

/* Fade 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);
    }
}

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

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

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

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

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

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

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

/* Shimmer Animation for Loading States */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

/* Fade Out Animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Utility Animation Classes
   ============================================ */

/* Fade Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

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

/* Slide Classes */
.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}

/* Scale Classes */
.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

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

/* Bounce Class */
.animate-bounce {
    animation: bounce 2s infinite;
}

/* Rotate Class */
.animate-rotate {
    animation: rotate 1s linear infinite;
}

/* Shake Class */
.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Glow Class */
.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================
   Hover Effects
   ============================================ */

/* Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Scale Effect */
.hover-scale {
    transition: transform 0.3s ease;
}

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

/* Glow Effect */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
}

/* Brightness Effect */
.hover-brighten {
    transition: filter 0.3s ease;
}

.hover-brighten:hover {
    filter: brightness(1.2);
}

/* Rotate Effect */
.hover-rotate {
    transition: transform 0.3s ease;
}

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

/* Slide Right Effect */
.hover-slide-right {
    transition: transform 0.3s ease;
}

.hover-slide-right:hover {
    transform: translateX(10px);
}

/* Underline Effect */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold, #FFD700);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* ============================================
   Loading States
   ============================================ */

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-gold, #FFD700);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Skeleton Loader */
.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: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 2em;
    margin-bottom: 1em;
}

.skeleton-circle {
    border-radius: 50%;
}

/* Dots Loader */
.dots-loader {
    display: inline-flex;
    gap: 8px;
}

.dots-loader span {
    width: 8px;
    height: 8px;
    background: var(--primary-gold, #FFD700);
    border-radius: 50%;
    animation: dotsBounce 1.4s infinite ease-in-out both;
}

.dots-loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.dots-loader span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotsBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Entrance Animations with Delays
   ============================================ */

.animate-delay-1 {
    animation-delay: 0.1s;
}

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

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

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

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Page Transitions
   ============================================ */

.page-transition-enter {
    animation: fadeInUp 0.6s ease-out;
}

.page-transition-exit {
    animation: fadeOut 0.3s ease-out;
}

/* ============================================
   Special Effects
   ============================================ */

/* Parallax Effect (requires JS) */
.parallax {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Image Zoom on Hover */
.image-zoom-container {
    overflow: hidden;
    border-radius: 8px;
}

.image-zoom {
    transition: transform 0.5s ease;
}

.image-zoom-container:hover .image-zoom {
    transform: scale(1.15);
}

/* Gold Shine Effect */
@keyframes goldShine {
    0% {
        background-position: -100%;
    }
    100% {
        background-position: 200%;
    }
}

.gold-shine {
    background: linear-gradient(
        90deg,
        #FFD700 0%,
        #FFED4E 50%,
        #FFD700 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShine 3s linear infinite;
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-gold, #FFD700);
    white-space: nowrap;
    animation: typewriter 4s steps(40) 1s both, blink 0.75s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ============================================
   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-pulse,
    .animate-bounce,
    .animate-rotate {
        animation: none !important;
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* GPU Acceleration for Smooth Animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Disable animations when element is not visible */
@media (prefers-reduced-motion: no-preference) {
    .animate-on-scroll {
        animation-play-state: paused;
    }
    
    .animate-on-scroll.in-viewport {
        animation-play-state: running;
    }
}
