/* Premium Redesign for Packages Page */

.page-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: calc(-1 * var(--nav-height));
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    animation: heroZoom 20s infinite alternate;
}

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-overlay-refined {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.5) 60%,
            var(--bg-primary) 100%);
}

.hero-content-refined {
    position: relative;
    z-index: 2;
    color: var(--text-inverse);
}

.hero-content-refined .badge {
    background: var(--color-gold);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    display: inline-block;
}

.hero-content-refined h1 {
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content-refined p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Filters Section - Ultra Glass Sticky */
.filters-section {
    padding: 20px 0;
    background: var(--bg-primary);
    position: sticky !important;
    top: 70px !important;
    /* Aligned with fixed header */
    z-index: 9999 !important;
    margin-top: -40px;
    transition: all 0.4s ease;
}

.filters-section.sticky-active {
    background: rgba(var(--bg-rgb), 0.9) !important;
    backdrop-filter: blur(20px) !important;
    padding: 10px 0 !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .filters-section {
        top: 60px !important;
    }
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(197, 160, 40, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-gold);
    animation: spin 1s ease-in-out infinite;
    margin: 40px auto;
    grid-column: 1 / -1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* AI Robot centering */
.chatbot-pill i {
    font-size: 18px;
    color: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-trigger .chatbot-pill {
    background: rgba(197, 160, 40, 0.1);
    border: 1px solid var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Video Subtitles (Ribbon) */
.video-subtitles {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 90%;
    max-width: 800px;
    text-align: center;
    pointer-events: none;
}

.subtitle-text {
    display: inline-block;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.subtitle-text.show {
    opacity: 1;
}

@media (max-width: 768px) {
    .subtitle-text {
        font-size: 0.9rem;
    }

    .video-subtitles {
        bottom: 80px;
    }
}

.filters-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 350px;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gold);
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: var(--bg-primary);
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(197, 160, 40, 0.2);
    outline: none;
}

.filter-tabs {
    display: flex;
    gap: 12px;
}

.filter-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.filter-tab.active {
    background: var(--color-gold);
    color: #fff;
    box-shadow: 0 10px 20px rgba(197, 160, 40, 0.2);
}

/* Tours Grid Refinement */
.tours-section {
    padding: 60px 0 120px;
    background: var(--bg-primary);
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Premium Card Design */
.tour-card {
    /* Local variable fallbacks */
    --local-glass-bg: rgba(255, 255, 255, 0.05);
    --local-glass-border: 1px solid rgba(255, 255, 255, 0.1);

    display: flex;
    flex-direction: column;
    border-radius: 28px;
    overflow: hidden;
    background: var(--glass-bg, var(--local-glass-bg));
    backdrop-filter: var(--glass-blur, blur(20px));
    -webkit-backdrop-filter: var(--glass-blur, blur(20px));
    border: var(--glass-border, var(--local-glass-border));
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 480px;
    position: relative;
}

/* Glint Effect */
.tour-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0) 100%);
    z-index: 5;
    transition: none;
    pointer-events: none;
}

.tour-card:hover::before {
    animation: glint-shine 0.8s ease-in-out forwards;
}

@keyframes glint-shine {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* Progressive Image Loading (Blur-up) */
.tour-image-container img {
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-image-container img.loaded {
    opacity: 1;
}

.tour-card:hover .tour-image-container img {
    transform: scale(1.08);
}

.scarcity-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #ff3b30;
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
    z-index: 2;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.wishlist-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.wishlist-btn:hover {
    background: #fff;
    transform: scale(1.1);
    color: #ff3b30;
}

.card-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--color-gold);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.tour-image-container {
    height: 260px;
    position: relative;
    overflow: hidden;
}

.image-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 60%);
}

.tour-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tour-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-gold);
    font-size: 13px;
    font-weight: 700;
}

.tour-info {
    padding: 24px;
    flex: 1;
}

.tour-title {
    font-size: 1.4rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.tour-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.tour-footer {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-actions {
    display: flex;
    gap: 10px;
}

/* Responsive fixes */
@media (max-width: 1100px) {
    .tours-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

/* Scroll Reveal Animations */
.reveal-element {
    opacity: 0;
    will-change: transform, opacity;
}

.reveal-fade-up {
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
        border-radius: 24px;
        padding: 20px;
        gap: 20px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .filter-tab {
        flex-shrink: 0;
    }

    .tours-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        height: 40vh;
    }
}