/* ===== ANIMATIONS & TRANSITIONS ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Parallax effect for hero background */
.landing-hero {
    position: relative;
    overflow: hidden;
    will-change: transform;
    transition: transform 0.1s linear;
}

.landing-hero .hero-content {
    will-change: transform, opacity;
}

/* Hero content entrance animation */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    opacity: 0;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.7s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.9s;
}

.hero-actions {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.1s;
}

.hero-stats {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.3s;
}

/* Section title animations */
.section-title {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    border-radius: 2px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title.visible::after {
    transform: translateX(-50%) scaleX(1);
}

/* Text content section animations */
.text-content-section .content-container {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-content-section.visible .content-container {
    opacity: 1;
    transform: translateY(0);
}

.text-block p {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-content-section.visible .text-block p:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.text-content-section.visible .text-block p:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.travel-quote {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-content-section.visible .travel-quote {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.6s;
}

/* Grid item staggered entrance */
.experience-card,
.destination-card,
.blog-preview-card,
.category-card,
.gallery-item {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.experience-card.visible,
.destination-card.visible,
.blog-preview-card.visible,
.category-card.visible,
.gallery-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered delays for grid items */
.experience-card:nth-child(1) { transition-delay: 0.05s; }
.experience-card:nth-child(2) { transition-delay: 0.1s; }
.experience-card:nth-child(3) { transition-delay: 0.15s; }
.experience-card:nth-child(4) { transition-delay: 0.2s; }

.category-card:nth-child(1) { transition-delay: 0.05s; }
.category-card:nth-child(2) { transition-delay: 0.1s; }
.category-card:nth-child(3) { transition-delay: 0.15s; }
.category-card:nth-child(4) { transition-delay: 0.2s; }

.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }
.gallery-item:nth-child(5) { transition-delay: 0.25s; }
.gallery-item:nth-child(6) { transition-delay: 0.3s; }
.gallery-item:nth-child(7) { transition-delay: 0.35s; }
.gallery-item:nth-child(8) { transition-delay: 0.4s; }

.blog-preview-card:nth-child(1) { transition-delay: 0.05s; }
.blog-preview-card:nth-child(2) { transition-delay: 0.1s; }
.blog-preview-card:nth-child(3) { transition-delay: 0.15s; }

/* Card hover effects with 3D lift */
.experience-card,
.destination-card,
.blog-preview-card,
.category-card {
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.experience-card:hover,
.destination-card:hover,
.blog-preview-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--explore-shadow-lg);
}

/* Image reveal animation */
.experience-card img,
.destination-card img,
.blog-preview-card img,
.gallery-item img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.8s ease;
    will-change: transform, filter;
}

.experience-card:hover img,
.destination-card:hover img,
.blog-preview-card:hover img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.1);
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--text-on-accent);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    position: relative;
    z-index: 1;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-outline:hover::before {
    width: 100%;
}

.btn-outline:hover {
    color: var(--text-on-accent);
}

/* CTA section animation */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-section.visible .cta-content {
    opacity: 1;
    transform: translateY(0);
}

/* FAB menu enhancements */
.fab-main {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fab-main:hover {
    transform: scale(1.1);
}

.fab-main.active {
    transform: scale(1.06);
}

.fab-item {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fab-menu.active .fab-item {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.fab-menu.active .fab-item:nth-child(1) { transition-delay: 0.05s; }
.fab-menu.active .fab-item:nth-child(2) { transition-delay: 0.1s; }
.fab-menu.active .fab-item:nth-child(3) { transition-delay: 0.15s; }
.fab-menu.active .fab-item:nth-child(4) { transition-delay: 0.2s; }
.fab-menu.active .fab-item:nth-child(5) { transition-delay: 0.25s; }
.fab-menu.active .fab-item:nth-child(6) { transition-delay: 0.3s; }

.fab-item:hover {
    transform: scale(1.15) !important;
    background: var(--accent);
    color: var(--text-on-accent);
}

/* Navbar scroll effect enhancement */
.explore-navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.explore-navbar.scrolled {
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Skeleton loading pulse animation */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-secondary) 0%,
        var(--bg-hover) 50%,
        var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Floating animation for badges and icons */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.hero-badge {
    animation: gentleFloat 3s ease-in-out infinite, fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Text content section decorative elements */
.text-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--accent) 0%,
        var(--accent-secondary) 50%,
        var(--accent) 100%);
    background-size: 200% 100%;
    animation: accentLineGradient 3s linear infinite;
}

@keyframes accentLineGradient {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Image loading animation */
img {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

img.loaded {
    opacity: 1;
}

/* Smooth entrance for blog cards */
.blog-preview-card {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.blog-preview-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer fade in */
.explore-footer {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Scroll progress indicator (optional enhancement) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Mouse follower glow effect (subtle) */
body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(var(--mouse-x, -1000px), var(--mouse-y, -1000px));
    transition: transform 0.3s ease-out;
    z-index: 0;
    opacity: 0.3;
}

/* Focus states with smooth transitions */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    transition: outline-offset 0.2s ease;
}

/* Loading state for buttons */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.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: spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content {
        animation-duration: 0.8s;
    }

    .section-title {
        opacity: 1;
        transform: none;
    }

    .text-content-section .content-container {
        opacity: 1;
        transform: none;
    }

    .text-block p {
        opacity: 1;
        transform: none;
        transition-delay: 0s !important;
    }

    .travel-quote {
        opacity: 1;
        transform: none;
        transition-delay: 0s !important;
    }

    .fab-menu.active .fab-item {
        transition-delay: 0s !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
