/* ===================================
   Mobile App-Like Styles
   =================================== */

/* Mobile Screens (<768px) */
@media (max-width: 767px) {

    /* Bottom Navigation Bar */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #eee;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #999;
        font-size: 10px;
        gap: 3px;
        padding: 4px 12px;
        transition: color 0.2s;
    }
    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        color: var(--primary-color, #63ab45);
    }
    .mobile-bottom-nav a i {
        font-size: 18px;
    }

    /* Body padding for bottom nav */
    body {
        padding-bottom: 70px !important;
    }

    /* Header smaller on mobile */
    .header-upper {
        padding: 10px 0 !important;
    }
    .main-header .logo img {
        height: 30px !important;
    }

    /* Hide desktop-only elements */
    .menu-btns,
    .nav-search,
    .lang-switcher {
        display: none !important;
    }
    .menu-sidebar {
        display: block !important;
    }

    /* Cards full width and app-like */
    .destination-item,
    .blog-item {
        border-radius: 12px !important;
    }

    /* Touch friendly - minimum 44px tap targets */
    a, button, .btn, select, input {
        min-height: 44px;
    }

    /* Footer extra padding for bottom nav */
    footer {
        padding-bottom: 80px !important;
    }

    /* App-like page transitions */
    .page-wrapper {
        animation: fadeIn 0.3s ease;
    }
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Search filter on homepage - stack vertically */
    .hero-area form > div {
        flex-direction: column !important;
    }
    .hero-area form > div > div {
        min-width: 100% !important;
    }

    /* Card shadows for app feel */
    .widget,
    .tour-item,
    .blog-card {
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }

    /* Full-width containers on mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Tour booking widget mobile improvements */
    .widget-booking {
        border-radius: 16px !important;
        margin: 0 -5px;
    }
    .widget-booking .tickets li select {
        min-width: 60px;
    }
}

/* Tablet and Mobile (<992px) - Hamburger Menu */
@media (max-width: 991px) {

    /* Slide-in mobile menu */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: #1a1a2e;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
    }
    .navbar-collapse.show {
        left: 0;
    }
    .navbar-collapse .navigation li a {
        color: rgba(255,255,255,0.8) !important;
        padding: 12px 0;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 15px;
    }
    .navbar-collapse .navigation li a:hover {
        color: #fff !important;
    }
    .navbar-collapse .mobile-logo {
        margin-bottom: 20px;
    }
    .navbar-collapse .mobile-logo img {
        height: 30px;
        filter: brightness(0) invert(1);
    }

    /* Dropdown items in mobile menu */
    .navbar-collapse .navigation li.dropdown > ul {
        position: static !important;
        display: none;
        background: rgba(255,255,255,0.05);
        padding-left: 15px;
        border-radius: 8px;
        margin-top: 5px;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .navbar-collapse .navigation li.dropdown > ul li a {
        font-size: 14px;
        padding: 10px 0;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        display: none;
    }
    .mobile-menu-overlay.active {
        display: block;
    }

    /* Close button for mobile menu */
    .navbar-collapse .close-menu {
        position: absolute;
        top: 15px;
        right: 15px;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Navbar toggle button styling */
    .navbar-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 100;
    }
    .navbar-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s;
    }
    .white-menu .navbar-toggle .icon-bar {
        background: #fff;
    }
}

/* Standalone mode (added to home screen) */
@media (display-mode: standalone) {
    .main-header {
        padding-top: env(safe-area-inset-top, 20px) !important;
    }
    /* Hide browser-specific elements in standalone */
    .mobile-bottom-nav {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}
