/* ==========================================================================
   DHAKA HOLIDAY UK - MASTER MOBILE RESPONSIVE STYLESHEET
   Comprehensive Mobile & Tablet Optimization across All Pages
   Theme: Crimson / Ruby Red & Obsidian Luxury Slate
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Large Tablets & Small Laptops (max-width: 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .search-cards-row.flight-row {
        grid-template-columns: 1.25fr auto 1.25fr 1fr 1.2fr;
        gap: 1rem;
    }

    .search-cards-row.flight-row.roundtrip-active {
        grid-template-columns: 1.15fr auto 1.15fr 1fr 1fr 1.15fr;
        gap: 0.85rem;
    }

    .search-cards-row.tours-row,
    .search-cards-row.hotels-row,
    .search-cards-row.visa-row {
        gap: 1rem;
    }

    .footer-top {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 2.5rem;
    }
}

/* --------------------------------------------------------------------------
   2. Tablets & iPad Portrait (max-width: 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: #F1F5F9;
        color: #0F172A;
        border: 1px solid #E2E8F0;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-toggle:hover {
        background: #FEE2E2;
        color: #DC2626;
        border-color: rgba(220, 38, 38, 0.3);
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    .navbar {
        height: 76px;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 76px);
        background: #FFFFFF;
        flex-direction: column;
        align-items: stretch;
        padding: 2rem 1.75rem;
        gap: 0.5rem;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.open {
        left: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        font-weight: 700;
        width: 100%;
        padding: 0.85rem 1.15rem;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #1E293B;
        transition: all 0.2s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        background: #FEF2F2;
        color: #DC2626;
        padding-left: 1.4rem;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .search-tabs-nav {
        justify-content: flex-start !important;
    }

    /* 2-Column Search Layout on Tablet */
    .search-cards-row,
    .search-cards-row.flight-row,
    .search-cards-row.flight-row.roundtrip-active,
    .search-cards-row.tours-row,
    .search-cards-row.hotels-row,
    .search-cards-row.visa-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .btn-swap-airports {
        grid-column: 1 / -1;
        margin: 0.25rem auto;
        transform: rotate(90deg);
    }

    .custom-tour-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .flash-deals-banner {
        flex-direction: column;
        text-align: center;
    }

    .flash-countdown {
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   3. Mobile Devices & Phablets (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1.25rem;
    }

    .navbar {
        height: 72px;
    }

    .brand-logo img {
        height: 52px;
    }

    /* Hero Section */
    .hero-section {
        padding: 3.25rem 0 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.15rem;
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
        margin-bottom: 1.75rem;
    }

    .hero-search-container {
        padding: 0;
        background: #FFFFFF !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35) !important;
        border: 1px solid rgba(255, 255, 255, 0.9) !important;
    }

    /* Scrollable Tab Bar with Smooth Touch */
    .search-tabs-nav {
        justify-content: flex-start !important;
        margin: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        width: 100% !important;
        padding: 0.4rem 0.65rem 0 !important;
        gap: 0.35rem !important;
        border-bottom: 1px solid #F1F5F9 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
        scroll-padding-left: 0.65rem;
    }

    .search-tabs-nav::-webkit-scrollbar {
        display: none !important;
    }

    .search-tab-btn {
        padding: 0.75rem 0.95rem !important;
        font-size: 0.88rem !important;
        gap: 0.4rem !important;
        flex-shrink: 0 !important;
        border-radius: 8px 8px 0 0 !important;
    }

    .search-tab-btn i,
    .search-tab-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .search-tab-btn.active::after {
        bottom: -1px !important;
        left: 8px !important;
        right: 8px !important;
        height: 3px !important;
    }

    .hero-search-box {
        padding: 1.25rem 1rem 1.6rem !important;
        border-radius: 0 0 20px 20px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* 1-Column Search on Phones */
    .search-cards-row,
    .search-cards-row.flight-row,
    .search-cards-row.flight-row.roundtrip-active,
    .search-cards-row.tours-row,
    .search-cards-row.hotels-row,
    .search-cards-row.visa-row {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }

    /* Dropdown Menus on Mobile: Full-width matching card */
    .custom-dropdown-menu {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        max-height: 280px;
        border-radius: 14px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    }

    .search-cards-row > div:last-child .custom-dropdown-menu,
    .search-cards-row > div:nth-last-child(2) .custom-dropdown-menu {
        left: 0 !important;
        right: 0 !important;
    }

    .dropdown-option-item {
        padding: 0.65rem 0.75rem;
        gap: 0.6rem;
    }

    .dropdown-option-item .option-main-title {
        font-size: 0.92rem;
    }

    .dropdown-option-item .option-sub-desc {
        font-size: 0.74rem;
    }

    .dropdown-option-item .option-pill-badge {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    .btn-hero-search {
        width: 100%;
        padding: 0.95rem 1.5rem;
        font-size: 1.05rem;
        height: 52px;
        margin-top: 0.5rem;
    }

    /* Stats Row */
    .hero-stats-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        margin-top: 2.25rem;
    }

    .hero-stat-item {
        text-align: center;
    }

    .hero-stat-num {
        font-size: 1.9rem;
    }

    /* Grids across all pages */
    .packages-grid,
    .destinations-grid,
    .reviews-grid,
    .visa-cards-grid,
    .holiday-packages-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* All inline minmax grids collapsed for mobile */
    div[style*="minmax(340px"],
    div[style*="minmax(360px"],
    div[style*="minmax(320px"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .section-title {
        font-size: 2rem !important;
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Trip Type Container on air-ticket.php */
    #tripTypeContainer {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }

    .trip-type-label {
        padding: 0.75rem 1rem !important;
    }

    /* Air Ticket Form Card & Submit Button */
    .air-ticket-card {
        padding: 1.6rem 1.2rem !important;
        border-radius: 18px !important;
    }

    .air-submit-btn {
        padding: 1.05rem 1.3rem !important;
        font-size: 1.05rem !important;
    }

    /* Filter Tabs in packages.php */
    .category-filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        justify-content: flex-start !important;
    }

    .category-filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.88rem;
    }

    /* Modals & Booking Wizard on Mobile */
    .modal-backdrop {
        padding: 0.75rem;
    }

    .modal-container {
        width: 100% !important;
        max-width: 520px !important;
        border-radius: 18px;
        max-height: 92vh;
    }

    .wizard-steps-header {
        padding: 0.75rem 0.85rem;
        overflow-x: auto;
    }

    .step-label {
        display: none;
    }

    .form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1fr !important;
        gap: 2.25rem;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-socials {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-badges {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Floating WhatsApp Button */
    .floating-whatsapp-btn {
        bottom: 20px;
        right: 18px;
        width: 50px;
        height: 50px;
    }

    .floating-whatsapp-btn svg {
        width: 26px;
        height: 26px;
    }

    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}

/* --------------------------------------------------------------------------
   4. Small Mobile Phones (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .navbar {
        height: 66px;
    }

    .brand-logo img {
        height: 46px;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
    }

    .hero-search-container {
        border-radius: 18px !important;
    }

    .search-tabs-nav {
        justify-content: flex-start !important;
        border-radius: 18px 18px 0 0 !important;
        padding: 0.35rem 0.5rem 0 !important;
        gap: 0.25rem !important;
        scroll-padding-left: 0.5rem;
    }

    .search-tab-btn {
        padding: 0.65rem 0.8rem !important;
        font-size: 0.84rem !important;
        gap: 0.35rem !important;
    }

    .hero-search-box {
        padding: 1rem 0.85rem 1.4rem !important;
        border-radius: 0 0 18px 18px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .search-pill-types {
        gap: 0.4rem;
    }

    .pill-type-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .search-input-card {
        padding: 0.85rem 1rem;
    }

    .trigger-text {
        font-size: 0.95rem;
    }

    .date-trigger-display .date-display-val {
        font-size: 0.95rem;
    }

    .hero-stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-container {
        border-radius: 14px;
        max-height: 94vh;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }

    .wizard-body {
        padding: 1rem 0.85rem;
    }

    .booking-voucher-card {
        padding: 1.15rem 0.85rem;
    }

    .voucher-code-badge {
        font-size: 0.92rem;
        padding: 0.35rem 0.75rem;
    }

    /* Visa Cards Padding */
    .visa-service-card {
        padding: 1.5rem 1.25rem !important;
    }

    /* Air Ticket Page on Small Phones */
    .air-ticket-card {
        padding: 1.35rem 0.95rem !important;
    }

    .air-submit-btn {
        font-size: 0.98rem !important;
        padding: 1rem 0.9rem !important;
        gap: 0.6rem !important;
    }
}
