/* ==========================================================================
   YOUR HURGHADA EXCURSION - RESPONSIVE & MOBILE POLISH + RTL
   Domain: yourhurghadaexcursion.com
   ========================================================================== */

/* Mobile Sticky Bottom Bar */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 1200;
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--brand-blue);
}

.mobile-nav-item svg {
    font-size: 1.3rem;
    stroke-width: 2.5px;
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
    .tours-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .floating-search-bar {
        grid-template-columns: 1fr 1fr;
        border-radius: var(--radius-xl);
        padding: 14px;
    }
    
    .search-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 8px 0;
    }
    
    .floating-search-btn {
        grid-column: 1 / -1;
        justify-content: center;
    }
    
    .spotlight-card {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    
    .why-grid, .reviews-grid, .guide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .related-tours-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .tour-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 100%;
        min-width: 0;
    }

    .modal-booking-box {
        position: static;
        top: auto;
    }
}

@media (max-width: 768px) {
    /* Global Adjustments */
    .container {
        padding: 0 16px;
    }

    body {
        padding-bottom: 64px; /* Space for bottom bar */
    }

    section {
        padding: 40px 0 !important;
    }

    /* Top Bar - Hide on Mobile to save space */
    .top-bar {
        display: none;
    }
    
    /* Header & Navigation */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
        border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    }

    .site-header-inner {
        height: 72px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        position: relative;
        width: 100%;
        max-width: 100%;
    }
    
    /* 1. Mobile Menu Button on Left (or Right in RTL) */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: transparent;
        border: none;
        color: var(--brand-navy);
        cursor: pointer;
        order: 1;
        transition: all 0.2s ease;
        flex-shrink: 0;
        margin-left: -8px; /* Offset padding */
    }

    body.rtl .mobile-menu-toggle {
        margin-left: 0;
        margin-right: -8px;
    }

    .mobile-menu-toggle:active {
        transform: scale(0.94);
        background: rgba(0, 0, 0, 0.04);
    }

    /* 2. Logo centered in Middle */
    .site-header-inner .brand-logo {
        order: 2;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        z-index: 10;
    }

    .site-header-logo {
        height: 52px;
        max-height: 52px;
        width: auto;
        max-width: 160px;
        display: block;
        object-fit: contain;
        filter: drop-shadow(0 2px 6px rgba(0,0,0,0.08));
        transition: transform 0.2s ease;
    }

    .brand-logo:active .site-header-logo {
        transform: scale(0.97);
    }

    /* 3. Header Actions (Cart) on Right (or Left in RTL) */
    .header-actions {
        order: 3;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        margin-left: auto;
        margin-right: -8px; /* Offset padding */
    }

    body.rtl .header-actions {
        margin-left: -8px;
        margin-right: auto;
    }

    .header-actions .btn-primary {
        display: none !important;
    }

    .header-icon-btn.cart-trigger {
        display: none !important;
    }

    /* 4. Luxury Mobile Navigation Drawer */
    .main-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        padding: 16px 20px 24px;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
        gap: 4px;
        z-index: 1001;
        animation: mobileNavSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .main-nav.show {
        display: flex;
    }

    .nav-link {
        font-size: 1.02rem;
        font-weight: 600;
        color: var(--text-heading);
        padding: 12px 14px;
        border-radius: 10px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: all 0.15s ease;
    }

    .nav-link:hover, .nav-link.active {
        background: #f8fafc;
        color: var(--brand-blue);
        padding-left: 18px;
    }

    body.rtl .nav-link:hover, body.rtl .nav-link.active {
        padding-left: 14px;
        padding-right: 18px;
    }

    .site-footer-logo {
        height: 85px;
        max-height: 85px;
        max-width: 260px;
        margin: 0 auto 12px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 40px 0 50px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.25;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }
    
    /* Search Bar */
    .floating-search-bar {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 100%;
    }
    
    .search-col {
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 12px;
    }
    
    .search-col:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .hero-trust-bar {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        font-size: 0.85rem;
        margin-top: 24px;
    }
    
    /* Tour Cards Grid */
    .tours-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tour-card .card-content {
        padding: 16px;
    }

    .tour-card .card-title {
        font-size: 1.1rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-header {
        margin-bottom: 24px;
    }

    /* Grids */
    .why-grid, .reviews-grid, .guide-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Toolbar */
    .toolbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .toolbar-left, .toolbar-search {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Footer */
    .footer-section {
        padding: 40px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    /* Floating Actions on Mobile (Horizontal Dock at Bottom) */
    .floating-whatsapp {
        bottom: 16px;
        right: 12px;
        left: auto;
        width: auto;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        z-index: 1500;
        background: rgba(15, 41, 77, 0.88);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 5px 8px;
        border-radius: 30px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.15);
        transition: bottom 0.25s ease;
    }
    
    body.rtl .floating-whatsapp {
        left: 12px;
        right: auto;
        flex-direction: row;
    }

    /* Float above the mobile sticky booking bar when it exists */
    body:has(.mobile-sticky-bottom-bar) .floating-whatsapp,
    #dedicatedTourDetailContainer .floating-whatsapp,
    .mobile-sticky-bottom-bar ~ .floating-whatsapp,
    .has-sticky-bar .floating-whatsapp {
        bottom: 78px;
    }

    body.rtl:has(.mobile-sticky-bottom-bar) .floating-whatsapp,
    body.rtl#dedicatedTourDetailContainer .floating-whatsapp,
    body.rtl .mobile-sticky-bottom-bar ~ .floating-whatsapp,
    body.rtl .has-sticky-bar .floating-whatsapp {
        bottom: 78px;
        left: 12px;
        right: auto;
    }

    .floating-social-btn,
    .wa-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .floating-social-btn svg {
        width: 17px;
        height: 17px;
    }

    .wa-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .detail-gallery-main {
        height: 240px;
        border-radius: var(--radius-md);
    }

    .detail-thumb {
        width: 72px;
        height: 52px;
    }

    .mobile-sticky-bottom-bar {
        display: flex !important;
    }

    .quick-highlights-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        margin: 16px 0 20px !important;
    }

    /* Tour Details Page Mobile Polish */
    .tour-detail-page {
        padding: 16px 0 85px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .tour-detail-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .tour-detail-main,
    .tour-booking-column {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Related Tours Swipeable Carousel on Mobile */
    .related-tours-section {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        margin-top: 36px;
        padding-top: 24px;
        box-sizing: border-box !important;
    }

    .related-tours-carousel-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .related-tours-carousel,
    .related-tours-grid,
    #relatedToursGrid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 4px 2px 14px 2px !important;
        scrollbar-width: thin !important;
        scrollbar-color: var(--brand-blue) var(--bg-subtle) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .related-tours-carousel::-webkit-scrollbar,
    .related-tours-grid::-webkit-scrollbar,
    #relatedToursGrid::-webkit-scrollbar {
        height: 5px !important;
        display: block !important;
    }

    .related-tours-carousel::-webkit-scrollbar-track,
    .related-tours-grid::-webkit-scrollbar-track,
    #relatedToursGrid::-webkit-scrollbar-track {
        background: var(--bg-subtle) !important;
        border-radius: 10px !important;
    }

    .related-tours-carousel::-webkit-scrollbar-thumb,
    .related-tours-grid::-webkit-scrollbar-thumb,
    #relatedToursGrid::-webkit-scrollbar-thumb {
        background: var(--brand-blue) !important;
        border-radius: 10px !important;
    }

    .related-tours-carousel .tour-card,
    .related-tours-grid .tour-card,
    #relatedToursGrid .tour-card {
        flex: 0 0 260px !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 270px !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: normal !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
    }

    .modal-booking-box {
        position: static !important;
        top: auto !important;
        padding: 20px 16px !important;
        border-radius: var(--radius-lg) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        gap: 16px !important;
        margin: 0 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    }

    .booking-header-price {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .booking-header-price span[data-i18n="modalBookingTitle"] {
        font-size: 1.2rem !important;
    }

    .booking-input, .booking-select {
        font-size: 16px !important;
        height: 48px !important;
        min-height: 48px !important;
        padding: 10px 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .guest-counters-group {
        padding: 12px 14px !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .guest-counter-row {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .guest-label-title {
        font-size: 0.88rem !important;
    }

    .guest-label-sub {
        font-size: 0.76rem !important;
    }

    .counter-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .counter-val {
        font-size: 1.05rem !important;
        min-width: 20px !important;
    }

    .calc-total-box {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 14px 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .calc-total-val {
        font-size: 1.45rem !important;
    }

    .booking-submit-btn {
        width: 100% !important;
        min-height: 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        font-size: 1rem !important;
        font-weight: 800 !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    /* Responsive Grids on Mobile */
    .contact-card-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .charter-showcase-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .charter-form-row-2col {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .modal-tabs {
        margin: 16px 0 16px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .modal-tab-btn {
        padding: 8px 12px;
        font-size: 0.86rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
}
