/* Hero Parallax & Scroll Animation Styles
 * Shared across flight search and hotel search pages
 * JumboBookings - Feb 2026
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ========== HERO PARALLAX SECTION ========== */
.hero-parallax {
    min-height: 520px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -64px; /* offset the header height so hero starts at top */
    padding-top: 64px; /* compensate for header */
}

.hero-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
}

/* Animated Gradient Background (for pages without images) */
.hero-parallax-bg.gradient-flight {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #1a56db 60%, #7c3aed 100%);
    background-size: 400% 400%;
    animation: heroGradientShift 15s ease infinite;
}

.hero-parallax-bg.gradient-hotel {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #003580 60%, #06b6d4 100%);
    background-size: 400% 400%;
    animation: heroGradientShift 15s ease infinite;
}

@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
    100% { background-position: 0% 50%; }
}

/* Dark Overlay */
.hero-parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Floating Particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.hero-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

.hero-particle:nth-child(1) { width: 6px; height: 6px; left: 10%; animation-duration: 20s; animation-delay: 0s; top: 80%; }
.hero-particle:nth-child(2) { width: 8px; height: 8px; left: 25%; animation-duration: 25s; animation-delay: 2s; top: 90%; }
.hero-particle:nth-child(3) { width: 4px; height: 4px; left: 40%; animation-duration: 18s; animation-delay: 4s; top: 85%; }
.hero-particle:nth-child(4) { width: 10px; height: 10px; left: 55%; animation-duration: 22s; animation-delay: 1s; top: 95%; }
.hero-particle:nth-child(5) { width: 5px; height: 5px; left: 70%; animation-duration: 28s; animation-delay: 3s; top: 88%; }
.hero-particle:nth-child(6) { width: 7px; height: 7px; left: 85%; animation-duration: 24s; animation-delay: 5s; top: 92%; }
.hero-particle:nth-child(7) { width: 3px; height: 3px; left: 15%; animation-duration: 16s; animation-delay: 7s; top: 75%; }
.hero-particle:nth-child(8) { width: 9px; height: 9px; left: 60%; animation-duration: 30s; animation-delay: 6s; top: 82%; }

@keyframes floatParticle {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Floating Icons (airplane, hotel, etc) */
.hero-float-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.12;
    z-index: 2;
    pointer-events: none;
    animation: floatIcon ease-in-out infinite;
}

.hero-float-icon:nth-child(1) { top: 20%; left: 8%; animation-duration: 6s; font-size: 2.5rem; }
.hero-float-icon:nth-child(2) { top: 60%; right: 10%; animation-duration: 8s; animation-delay: 1s; font-size: 1.8rem; }
.hero-float-icon:nth-child(3) { top: 30%; right: 20%; animation-duration: 7s; animation-delay: 2s; font-size: 2rem; }
.hero-float-icon:nth-child(4) { bottom: 20%; left: 15%; animation-duration: 9s; animation-delay: 3s; font-size: 1.5rem; }
.hero-float-icon:nth-child(5) { top: 50%; left: 5%; animation-duration: 10s; animation-delay: 4s; font-size: 2.2rem; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(5deg); }
    50% { transform: translateY(-25px) rotate(-3deg); }
    75% { transform: translateY(-10px) rotate(2deg); }
}

/* Twinkling Stars (like homepage) */
.hero-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 350px 350px;
    animation: twinkle 5s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Hero Content Container */
.hero-parallax-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 60px 20px 50px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-title span {
    background: linear-gradient(135deg, #febb02, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 35px;
    font-weight: 400;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Glassmorphism Search Container */
.hero-search-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.6s both;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    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); }
}

/* ========== SCROLL ANIMATIONS ========== */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.scroll-fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays for grid items */
.scroll-fade-in:nth-child(1) { transition-delay: 0s; }
.scroll-fade-in:nth-child(2) { transition-delay: 0.1s; }
.scroll-fade-in:nth-child(3) { transition-delay: 0.2s; }
.scroll-fade-in:nth-child(4) { transition-delay: 0.3s; }
.scroll-fade-in:nth-child(5) { transition-delay: 0.4s; }
.scroll-fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-parallax {
        min-height: 450px;
        padding-top: 80px;
    }

    .hero-parallax-bg {
        background-attachment: scroll; /* iOS doesn't support fixed */
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-search-widget {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .hero-parallax-content {
        padding: 40px 15px 30px;
    }

    .hero-float-icon {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 18px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .hero-particle,
    .hero-float-icon,
    .hero-stars {
        animation: none;
    }

    .scroll-fade-in,
    .scroll-fade-left,
    .scroll-fade-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-parallax-bg {
        animation: none;
    }
}
