/**
 * Tour Animations — search & listing pages
 */

/* ── Loading overlay ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top-color: #3554d1;
    border-radius: 50%;
    animation: ta-spin 0.75s linear infinite;
}
@keyframes ta-spin {
    to { transform: rotate(360deg); }
}

/* ── Scroll progress bar ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #3554d1, #05b3a4);
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ── Scroll-reveal base states ── */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.animate-on-scroll.fade-up    { transform: translateY(28px); }
.animate-on-scroll.fade-left  { transform: translateX(-28px); }
.animate-on-scroll.fade-right { transform: translateX(28px); }

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* ── Stagger children ── */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.stagger-animation.is-visible > * {
    opacity: 1;
    transform: none;
}
.stagger-animation.is-visible > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger-animation.is-visible > *:nth-child(2)  { transition-delay: 0.10s; }
.stagger-animation.is-visible > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger-animation.is-visible > *:nth-child(4)  { transition-delay: 0.20s; }
.stagger-animation.is-visible > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger-animation.is-visible > *:nth-child(6)  { transition-delay: 0.30s; }

/* ── Mobile 2-column tour card compacting (< 576px) ── */
@media (max-width: 575.98px) {

    /* Tighter gap between cards */
    .bravo_search_tour .row.y-gap-30 {
        --y-gap: 16px;
        row-gap: 16px;
    }

    /* Square-ish image instead of tall ratio */
    .tourCard.-type-1 .cardImage.ratio {
        padding-bottom: 75% !important;
    }

    /* Compact card content */
    .tourCard.-type-1 .tourCard__content {
        margin-top: 6px !important;
        padding: 0 4px;
    }

    /* Smaller title */
    .tourCard.-type-1 .tourCard__title {
        font-size: 12px !important;
        line-height: 1.3 !important;
        margin-bottom: 2px;
        /* clamp to 2 lines */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Smaller meta text */
    .tourCard.-type-1 .tourCard__content .text-14,
    .tourCard.-type-1 .tourCard__content .text-18 {
        font-size: 11px !important;
    }

    /* Tighter price row */
    .tourCard.-type-1 .tourCard__content .row.justify-between {
        padding-top: 6px !important;
        flex-direction: column;
        gap: 2px;
    }

    /* Hide review count text on tiny cards, keep stars */
    .tourCard.-type-1 .tourCard__content .text-14.text-light-1.ml-10 {
        display: none;
    }

    /* Smaller wishlist button */
    .tourCard.-type-1 .cardImage__wishlist .size-30 {
        width: 24px !important;
        height: 24px !important;
    }
    .tourCard.-type-1 .cardImage__wishlist .text-12 {
        font-size: 10px !important;
    }

    /* Smaller badges */
    .tourCard.-type-1 .cardImage__leftBadge > div {
        font-size: 9px !important;
        padding: 3px 8px !important;
    }
}
