/* ============================================
   The Holiday Tourism - ANIMATIONS CSS
   Beautiful animations for enhanced UX
============================================ */

:root {
    --animation-duration-fast: 0.2s;
    --animation-duration-normal: 0.3s;
    --animation-duration-slow: 0.5s;
    --animation-duration-slower: 0.8s;
    --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --animation-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --animation-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

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

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

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

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   ANIMATION UTILITY CLASSES
============================================ */

/* Fade Animations */
.animate-fade-in {
    animation: fadeIn var(--animation-duration-normal) var(--animation-timing) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--animation-duration-slow) var(--animation-timing) forwards;
}

.animate-fade-in-down {
    animation: fadeInDown var(--animation-duration-slow) var(--animation-timing) forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft var(--animation-duration-slow) var(--animation-timing) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight var(--animation-duration-slow) var(--animation-timing) forwards;
}

/* Slide Animations */
.animate-slide-in-up {
    animation: slideInUp var(--animation-duration-slow) var(--animation-timing) forwards;
}

.animate-slide-in-down {
    animation: slideInDown var(--animation-duration-slow) var(--animation-timing) forwards;
}

/* Scale Animations */
.animate-scale-in {
    animation: scaleIn var(--animation-duration-normal) var(--animation-timing) forwards;
}

.animate-scale-in-bounce {
    animation: scaleInBounce var(--animation-duration-slower) var(--animation-bounce) forwards;
}

/* Rotate Animations */
.animate-rotate-in {
    animation: rotateIn var(--animation-duration-slow) var(--animation-timing) forwards;
}

/* Continuous Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================
   ANIMATION DELAYS
============================================ */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ============================================
   HOVER ANIMATIONS
============================================ */

.hover-lift {
    /* No lift animations */
}

.hover-lift:hover {
    /* No hover lift animations */
}

.hover-scale {
    /* No scale animations */
}

.hover-scale:hover {
    /* No hover scale animations */
}

.hover-rotate {
    transition: transform var(--animation-duration-normal) var(--animation-timing);
}

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

.hover-glow {
    transition: box-shadow var(--animation-duration-normal) var(--animation-timing);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(249, 122, 0, 0.4);
}

.hover-slide-right {
    position: relative;
    overflow: hidden;
}

.hover-slide-right::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 var(--animation-duration-slow) var(--animation-timing);
}

.hover-slide-right:hover::before {
    left: 100%;
}

/* ============================================
   BUTTON ANIMATIONS
============================================ */

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.btn-animated::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 var(--animation-duration-slow) var(--animation-timing);
}

.btn-animated:hover::before {
    left: 100%;
}

.btn-bounce {
    transition: transform var(--animation-duration-fast) var(--animation-bounce);
}

.btn-bounce:hover {
    transform: scale(1.1);
}

.btn-bounce:active {
    transform: scale(0.95);
}

/* ============================================
   CARD ANIMATIONS
============================================ */

.card-animated {
    /* No animations - clean and simple */
}

.card-animated:hover {
    /* No hover animations */
}

.card-animated .card-img-top {
    /* No image animations */
}

.card-animated:hover .card-img-top {
    /* No hover image animations */
}

/* ============================================
   FORM ANIMATIONS
============================================ */

.form-floating-animation {
    position: relative;
}

.form-floating-animation input,
.form-floating-animation select,
.form-floating-animation textarea {
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.form-floating-animation input:focus,
.form-floating-animation select:focus,
.form-floating-animation textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 122, 0, 0.2);
}

.form-floating-animation label {
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.input-glow {
    transition: box-shadow var(--animation-duration-normal) var(--animation-timing);
}

.input-glow:focus {
    box-shadow: 0 0 0 0.2rem rgba(249, 122, 0, 0.25);
}

/* ============================================
   LOADING ANIMATIONS
============================================ */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

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

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   PAGE TRANSITION ANIMATIONS
============================================ */

.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--animation-duration-slow) var(--animation-timing),
                transform var(--animation-duration-slow) var(--animation-timing);
}

/* ============================================
   SCROLL ANIMATIONS
============================================ */

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-duration-slow) var(--animation-timing);
}

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

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all var(--animation-duration-slow) var(--animation-timing);
}

.scroll-animate-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all var(--animation-duration-slow) var(--animation-timing);
}

.scroll-animate-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--animation-duration-slow) var(--animation-timing);
}

.scroll-animate-scale.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   HERO SECTION ANIMATIONS
============================================ */

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration-slower) var(--animation-timing) 0.2s forwards;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration-slower) var(--animation-timing) 0.4s forwards;
}

.hero-cta {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration-slower) var(--animation-timing) 0.6s forwards;
}

.hero-image {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn var(--animation-duration-slower) var(--animation-timing) 0.8s forwards;
}

/* ============================================
   NAVIGATION ANIMATIONS
============================================ */

.navbar {
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.navbar.scrolled {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.nav-link {
    position: relative;
    transition: color var(--animation-duration-normal) var(--animation-timing);
}

/* .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all var(--animation-duration-normal) var(--animation-timing);
} */

.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* ============================================
   TOUR CARD ANIMATIONS
============================================ */

.tour-card {
    /* No animations - clean and simple */
}

.tour-card:hover {
    /* No hover animations at all */
}

/* ============================================
   PRICE ANIMATION
============================================ */

.price-update {
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.price-update.updating {
    transform: scale(1.1);
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* ============================================
   FORM ANIMATIONS
============================================ */

.form-group {
    position: relative;
}

.form-control,
.form-select {
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.form-control:focus,
.form-select:focus {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(249, 122, 0, 0.15);
}

.form-control.is-valid {
    animation: successPulse 0.6s ease-in-out;
}

.form-control.is-invalid {
    animation: shake 0.5s ease-in-out;
}

@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
}

/* ============================================
   NOTIFICATION ANIMATIONS
============================================ */

.notification {
    animation: slideInDown var(--animation-duration-normal) var(--animation-timing);
}

.notification.hiding {
    animation: slideInUp var(--animation-duration-normal) var(--animation-timing) reverse;
}

/* ============================================
   ICON ANIMATIONS
============================================ */

.icon-bounce {
    transition: transform var(--animation-duration-fast) var(--animation-bounce);
}

.icon-bounce:hover {
    transform: scale(1.2);
}

.icon-rotate {
    transition: transform var(--animation-duration-normal) var(--animation-timing);
}

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

.icon-wiggle {
    transition: transform var(--animation-duration-fast) var(--animation-timing);
}

.icon-wiggle:hover {
    animation: shake 0.5s ease-in-out;
}

/* ============================================
   SEARCH ANIMATIONS
============================================ */

.search-form {
    transition: all var(--animation-duration-normal) var(--animation-timing);
}

.search-form:focus-within {
    transform: scale(1.05);
}

.search-form input {
    transition: width var(--animation-duration-normal) var(--animation-timing);
}

.search-form:focus-within input {
    width: 200px !important;
}

/* ============================================
   LOADING STATES
============================================ */

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: loading 0.8s linear infinite;
}

/* ============================================
   STAGGER ANIMATIONS
============================================ */

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp var(--animation-duration-slow) var(--animation-timing) 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; }

/* ============================================
   SPECIAL EFFECTS
============================================ */

.floating-elements {
    position: relative;
}

.floating-elements::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 4s ease-in-out infinite;
    animation-delay: -2s;
}

.floating-elements::after {
    content: '';
    position: absolute;
    top: 60%;
    right: 15%;
    width: 15px;
    height: 15px;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   TEXT ANIMATIONS
============================================ */

.text-gradient-animate {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

/* ============================================
   RESPONSIVE ANIMATIONS
============================================ */

@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;
    }
}

@media (max-width: 768px) {
    /* All hover animations already removed globally */
    .hover-lift:hover {
        transform: none;
    }
    
    .card-animated:hover {
        transform: none;
    }
    
    .tour-card:hover .card-img-top {
        transform: none;
    }
}

/* ============================================
   INITIALIZATION CLASSES
============================================ */

.animate-on-load {
    opacity: 0;
    transform: translateY(20px);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-duration-slow) var(--animation-timing);
}

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

/* ============================================
   PERFORMANCE OPTIMIZATIONS
============================================ */

.will-animate {
    will-change: transform, opacity, box-shadow;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}
