/* Premium Animations and Micro-interactions for Gen Z Travellers */

/* Keyframe Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(230, 180, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(230, 180, 0, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(230, 180, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(230, 180, 0, 0.8), 0 0 30px rgba(230, 180, 0, 0.6);
    }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(230, 180, 0, 0.3);
        box-shadow: 0 0 5px rgba(230, 180, 0, 0.3);
    }
    50% {
        border-color: rgba(230, 180, 0, 0.8);
        box-shadow: 0 0 20px rgba(230, 180, 0, 0.6);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.8s ease-out;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out;
}

.animate-gradient-shift {
    animation: gradientShift 3s ease infinite;
}

.animate-text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

.animate-border-glow {
    animation: borderGlow 2s ease-in-out infinite;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.animate-wave {
    animation: wave 1s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Staggered Animations */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(230, 180, 0, 0.4);
}

.hover-text-glow:hover {
    animation: textGlow 1s ease-in-out infinite;
}

.hover-border-glow:hover {
    animation: borderGlow 1s ease-in-out infinite;
}

/* Loading Animations */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(230, 180, 0, 0.1);
    border-left: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-pulse {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

/* Scroll-triggered Animations */
.scroll-trigger {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-trigger-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-trigger-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-trigger-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Parallax Effects */
.parallax {
    will-change: transform;
}

.parallax-slow {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-medium {
    transform: translateZ(0);
    will-change: transform;
}

.parallax-fast {
    transform: translateZ(0);
    will-change: transform;
}

/* 3D Transform Effects */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-3d:hover {
    transform: rotateX(10deg) rotateY(10deg);
}

/* Text Animations */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal:hover::after {
    transform: translateX(0);
}

/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-animate:hover::before {
    left: 100%;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Card Animations */
.card-hover-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-hover-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

.card-flip {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

/* Image Animations */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.3s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

.image-slide {
    overflow: hidden;
}

.image-slide img {
    transition: transform 0.3s ease;
}

.image-slide:hover img {
    transform: translateX(10px);
}

/* Form Animations */
.form-input-animate {
    transition: all 0.3s ease;
}

.form-input-animate:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 180, 0, 0.15);
}

.form-label-float {
    position: relative;
}

.form-label-float label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    color: var(--text-light);
}

.form-label-float input:focus + label,
.form-label-float input:not(:placeholder-shown) + label {
    top: 0;
    left: 12px;
    font-size: 12px;
    color: var(--accent);
    background: white;
    padding: 0 4px;
}

/* Notification Animations */
.notification-slide-in {
    animation: slideInFromRight 0.3s ease-out;
}

.notification-slide-out {
    animation: slideInFromRight 0.3s ease-out reverse;
}

/* Progress Bar Animation */
.progress-bar {
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--sky-blue));
    transition: width 0.3s ease;
}

.progress-bar.animate {
    animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
    to {
        width: 100%;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Responsive Animations */
@media (max-width: 768px) {
    .animate-float {
        animation-duration: 4s;
    }
    
    .hover-lift:hover {
        transform: translateY(-4px);
    }
    
    .hover-scale:hover {
        transform: scale(1.02);
    }
}

/* 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-float,
    .animate-pulse-glow,
    .animate-shimmer,
    .animate-gradient-shift,
    .animate-text-glow,
    .animate-border-glow,
    .animate-heartbeat,
    .animate-wave,
    .animate-spin {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hover-glow:hover {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    }
    
    .animate-text-glow {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .animate-float,
    .animate-pulse-glow,
    .animate-shimmer,
    .animate-gradient-shift,
    .animate-text-glow,
    .animate-border-glow,
    .animate-heartbeat,
    .animate-wave,
    .animate-spin,
    .hover-lift,
    .hover-scale,
    .hover-rotate,
    .hover-glow,
    .hover-text-glow,
    .hover-border-glow {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
} 