/* ============================================
   EBATO TRAVELS - Custom Styles & Animations
   ============================================ */

/* ---- Preloader ---- */
.loading-bar {
    animation: loadingProgress 2s ease-in-out forwards;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

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

@keyframes flyPlane {
    0%, 100% { transform: translateX(-10px) rotate(-5deg); }
    50% { transform: translateX(10px) rotate(5deg); }
}

/* ---- Navbar ---- */
.navbar-scrolled {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* ---- Floating Elements ---- */
.floating-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.floating-medium {
    animation: floatMedium 4s ease-in-out infinite;
}

.floating-fast {
    animation: floatFast 3s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-10deg); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* ---- Scroll Indicator ---- */
.scroll-dot {
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.3; }
}

/* ---- Hero Animations ---- */
.hero-title,
.hero-subtitle,
.hero-badge,
.hero-search,
.hero-stats {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-badge { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.4s; }
.hero-subtitle { animation-delay: 0.6s; }
.hero-search { animation-delay: 0.8s; }
.hero-stats { animation-delay: 1.0s; }

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Filter Buttons ---- */
.filter-btn {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.filter-btn:hover {
    border-color: #0f766e;
    color: #0f766e;
}

.filter-btn.active {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
}

/* ---- Destination Cards ---- */
.dest-card {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}

.dest-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dest-card.hidden-card {
    display: none;
}

/* ---- Package Cards ---- */
.package-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

/* ---- Scroll Animations ---- */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

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

/* Stagger children */
.scroll-animate:nth-child(2) { transition-delay: 0.1s; }
.scroll-animate:nth-child(3) { transition-delay: 0.2s; }
.scroll-animate:nth-child(4) { transition-delay: 0.3s; }
.scroll-animate:nth-child(5) { transition-delay: 0.4s; }
.scroll-animate:nth-child(6) { transition-delay: 0.5s; }

/* ---- Heart Button ---- */
.heart-active {
    color: #ef4444 !important;
}

.heart-active i {
    font-weight: 900;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0f766e, #14b8a6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d5c55;
}

/* ---- Selection ---- */
::selection {
    background: rgba(15, 118, 110, 0.3);
    color: #1a1a2e;
}

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

/* ---- Image Hover Shine Effect ---- */
.dest-card .relative::after {
    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.7s ease;
}

.dest-card:hover .relative::after {
    left: 100%;
}

/* ---- Glow Effects ---- */
.dest-card:hover .rounded-3xl {
    box-shadow: 0 0 40px rgba(15, 118, 110, 0.1);
}

/* ---- Input Focus Animation ---- */
input:focus, select:focus, textarea:focus {
    transform: scale(1.01);
}

/* ---- Button Ripple ---- */
button, a {
    position: relative;
    overflow: hidden;
}

/* ---- Mobile Menu ---- */
#mobileMenu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* ---- Parallax-like effect ---- */
.hero-parallax {
    will-change: transform;
}

/* ---- Toast Animation ---- */
#toast.show {
    transform: translateX(0);
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-search .flex-col {
        gap: 0.5rem;
    }

    .hero-stats {
        gap: 1rem;
    }
}

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

    .hero-title span {
        display: inline;
    }
}

/* ---- Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Border Gradient ---- */
.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #0f766e, #f59e0b) border-box;
}

/* ---- Experience Card Hover Glow ---- */
.exp-card:hover {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

/* ---- Ticker / Marquee ---- */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Map Pulse ---- */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0; }
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s ease-in-out infinite;
}

/* ---- Smooth Transitions for All Cards ---- */
.dest-card, .exp-card, .package-card {
    will-change: transform, box-shadow;
}

/* ---- Disabled Button ---- */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ---- Coming Soon Card Pulse Badge ---- */
@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

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

.group .absolute.-top-3.-right-3 {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* ---- Package Highlight Items ---- */
.highlight-item {
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

/* ---- Itinerary Button ---- */
.itinerary-btn {
    position: relative;
    overflow: hidden;
}

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

.itinerary-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* ---- Package Card List Items ---- */
.package-highlight {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.package-highlight:hover {
    border-left-color: #f59e0b;
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Responsive Fixes for Packages ---- */
@media (max-width: 640px) {
    .package-card .flex-wrap.gap-2 {
        gap: 0.375rem;
    }
    .package-card .flex-wrap.gap-2 span {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ---- Filter Animation ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Mobile Sticky CTA ---- */
#mobileStickyCta.show {
    transform: translateY(0);
}

/* ---- Destination WhatsApp Popup ---- */
#destWhatsappPopup {
    animation: fadeInBg 0.3s ease forwards;
}

#destPopupCard {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeInBg {
    from { background: rgba(0,0,0,0); }
    to { background: rgba(0,0,0,0.5); }
}

.dest-popup-option {
    transition: all 0.25s ease;
}

.dest-popup-option:active {
    transform: scale(0.97);
}

@media (max-width: 480px) {
    #destPopupCard {
        max-height: 85vh;
        border-radius: 1.25rem;
    }
    #destPopupCard .p-5 {
        padding: 1rem;
    }
    .dest-popup-option {
        padding: 0.75rem;
    }
    .dest-popup-option .w-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* ---- Print Styles ---- */
@media print {
    .floating-slow, .floating-medium, .floating-fast,
    #navbar, #backToTop, .whatsapp-btn, .scroll-indicator,
    #mobileStickyCta {
        display: none !important;
    }
}
