/* MODERN MOBILE MENU - PREMIUM DESIGN */

@media (max-width: 768px) {
    /* Hide desktop elements */
    .top-bar {
        display: none !important;
    }

    .auth-buttons {
        display: none !important;
    }

    .phone-btn-desktop {
        display: none !important;
    }

    /* Top navigation bar */
    nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: white !important;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
    }

    .nav-container {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        height: 65px;
    }

    /* Logo - positioned on left */
    .logo {
        order: 1;
        flex: 0 0 auto;
        text-align: left;
    }

    .logo img {
        height: 32px;
        max-width: 140px;
        width: auto;
        object-fit: contain;
    }

    /* Hamburger button - Modern animated design */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #003580 0%, #0071c2 100%) !important;
        border: none !important;
        border-radius: 10px;
        cursor: pointer;
        padding: 8px;
        order: 3;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 53, 128, 0.3);
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }

    .menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        margin: 2px 0;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Phone button in header - center position */
    .mobile-phone-btn {
        order: 2;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #febb02 0%, #ff9500 100%);
        border-radius: 10px;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(254, 187, 2, 0.3);
        transition: all 0.3s ease;
        margin-left: auto;
        margin-right: 10px;
    }

    .mobile-phone-btn:active {
        transform: scale(0.95);
    }

    .mobile-phone-btn svg {
        width: 20px;
        height: 20px;
        fill: #1a1a1a;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Mobile menu dropdown - Slide from right */
    .main-nav {
        display: block !important;
        position: fixed;
        top: 65px;
        right: -100%;
        left: auto;
        width: 85%;
        max-width: 320px;
        height: calc(100vh - 65px);
        background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
        overflow-y: auto;
        z-index: 9999;
        flex-direction: column !important;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        padding-bottom: 100px;
    }

    .main-nav.active {
        right: 0;
    }

    /* Menu header */
    .mobile-menu-header {
        padding: 20px;
        background: linear-gradient(135deg, #003580 0%, #0071c2 100%);
        color: white;
    }

    .mobile-menu-header h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .mobile-menu-header p {
        font-size: 13px;
        opacity: 0.8;
    }

    /* Force ALL menu items to stack vertically */
    .main-nav > li {
        width: 100% !important;
        display: block !important;
        border-bottom: none;
        float: none !important;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .main-nav.active > li {
        opacity: 1;
        transform: translateX(0);
    }

    .main-nav.active > li:nth-child(1) { transition-delay: 0.1s; }
    .main-nav.active > li:nth-child(2) { transition-delay: 0.15s; }
    .main-nav.active > li:nth-child(3) { transition-delay: 0.2s; }
    .main-nav.active > li:nth-child(4) { transition-delay: 0.25s; }
    .main-nav.active > li:nth-child(5) { transition-delay: 0.3s; }
    .main-nav.active > li:nth-child(6) { transition-delay: 0.35s; }
    .main-nav.active > li:nth-child(7) { transition-delay: 0.4s; }

    .main-nav > li > a {
        display: flex !important;
        align-items: center;
        width: 100% !important;
        padding: 16px 20px;
        text-decoration: none;
        color: #1a1a1a;
        background: transparent;
        border: none;
        text-align: left;
        font-size: 15px;
        font-weight: 600;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }

    .main-nav > li > a:hover,
    .main-nav > li > a:active {
        background: rgba(0, 53, 128, 0.05);
        border-left-color: #003580;
        color: #003580;
    }

    /* Menu item icons */
    .main-nav > li > a::before {
        margin-right: 12px;
        font-size: 18px;
    }

    /* Dropdown styling - Ensure proper stacking and flow */
    .nav-dropdown {
        position: static !important;
        overflow: visible !important;
        display: block !important;
        width: 100% !important;
    }

    .nav-dropdown > a {
        position: relative;
        display: block !important;
        width: 100% !important;
    }

    .nav-dropdown > a::after {
        content: '';
        position: absolute;
        right: 20px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid #666;
        border-bottom: 2px solid #666;
        transform: translateY(-50%) rotate(45deg);
        transition: transform 0.3s ease;
    }

    .nav-dropdown.active > a::after {
        transform: translateY(-50%) rotate(-135deg);
    }

    .nav-dropdown.active > a {
        background: linear-gradient(135deg, #003580 0%, #0071c2 100%);
        color: white !important;
        border-left-color: #febb02;
    }

    .nav-dropdown.active > a::after {
        border-color: white;
    }

    /* Dropdown content - Push down behavior - MUST override desktop absolute positioning */
    .nav-dropdown-content {
        display: block !important;
        position: static !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        background: #f8f9fa !important;
        overflow: hidden !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        transition: max-height 0.4s ease-out !important;
        float: none !important;
        clear: both !important;
    }

    .nav-dropdown.active .nav-dropdown-content {
        max-height: 1000px !important;
        transition: max-height 0.5s ease-in !important;
    }

    /* Ensure dropdown hover doesn't trigger on mobile */
    .nav-dropdown:hover .nav-dropdown-content {
        max-height: 0 !important;
    }

    .nav-dropdown.active:hover .nav-dropdown-content {
        max-height: 1000px !important;
    }

    .nav-dropdown-content a {
        display: block !important;
        padding: 14px 20px 14px 48px !important;
        color: #444 !important;
        text-decoration: none !important;
        background: transparent !important;
        font-size: 14px;
        font-weight: 500;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        transition: all 0.2s ease;
        position: relative;
    }

    .nav-dropdown-content a::before {
        content: '→';
        position: absolute;
        left: 28px;
        color: #003580;
        opacity: 0;
        transform: translateX(-5px);
        transition: all 0.2s ease;
    }

    .nav-dropdown-content a:hover::before,
    .nav-dropdown-content a:active::before {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-dropdown-content a:hover,
    .nav-dropdown-content a:active {
        background: rgba(0, 53, 128, 0.08) !important;
        color: #003580 !important;
        padding-left: 52px !important;
    }

    .nav-dropdown-content a:last-child {
        border-bottom: none !important;
    }

    /* Auth/Phone buttons section */
    .auth-buttons-mobile {
        display: block !important;
        width: 100% !important;
        padding: 20px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        margin-top: 10px;
    }

    .auth-buttons-mobile .btn {
        display: none !important;
    }

    .auth-buttons-mobile .activate-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        padding: 16px 20px;
        background: linear-gradient(135deg, #febb02 0%, #ff9500 100%);
        color: #1a1a1a !important;
        text-decoration: none;
        text-align: center;
        font-weight: 700;
        font-size: 16px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(254, 187, 2, 0.3);
        transition: all 0.3s ease;
    }

    .auth-buttons-mobile .activate-btn:active {
        transform: scale(0.98);
    }

    /* Scrollbar styling */
    .main-nav::-webkit-scrollbar {
        width: 4px;
    }

    .main-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .main-nav::-webkit-scrollbar-thumb {
        background: #003580;
        border-radius: 4px;
    }

    /* Body padding when nav is fixed */
    body {
        padding-top: 65px;
    }

    /* Hero section adjustment */
    .hero {
        margin-top: 0;
    }

    /* Hot offer section mobile adjustments */
    .hot-offer-section {
        flex-direction: column !important;
        padding: 25px !important;
        margin-top: 0 !important;
    }

    .hot-offer-text h2 {
        font-size: 1.5rem !important;
    }

    .hot-offer-text h3 {
        font-size: 1.2rem !important;
    }

    /* ============================================
       GLOBAL MOBILE VIEWPORT FIXES
       Ensure nothing goes outside viewport
       ============================================ */

    /* Force all elements to respect viewport */
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Ensure all containers respect viewport */
    .container,
    section,
    main,
    article,
    div,
    header,
    footer {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix hero sections on all pages */
    .hero {
        position: relative !important;
        min-height: auto !important;
        height: auto !important;
        padding-top: 80px !important;
        padding-bottom: 40px !important;
        margin-top: 0 !important;
    }

    .hero-content {
        position: relative !important;
        z-index: 10 !important;
        padding: 20px !important;
        text-align: center !important;
    }

    .hero h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .hero p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .hero-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .hero-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Fix content wrappers that overlap hero */
    .content-wrapper {
        position: relative !important;
        z-index: 20 !important;
        margin-top: 20px !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
        padding: 20px !important;
        width: calc(100% - 30px) !important;
        max-width: calc(100% - 30px) !important;
        box-sizing: border-box !important;
    }

    /* Fix highlights grid */
    .highlights-grid {
        display: block !important;
        width: 100% !important;
    }

    .highlight-item {
        width: 100% !important;
        margin-bottom: 15px !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    /* Fix destination grids */
    .destination-grid {
        display: block !important;
        width: 100% !important;
    }

    .destination-card {
        width: 100% !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }

    /* Fix any grid that might overflow */
    .grid,
    [class*="grid"] {
        display: block !important;
        width: 100% !important;
    }

    /* Fix footer for mobile */
    footer {
        padding: 20px 15px !important;
    }

    .footer-grid {
        display: block !important;
        width: 100% !important;
    }

    .footer-section {
        width: 100% !important;
        margin-bottom: 25px !important;
        text-align: center !important;
    }

    .footer-bottom {
        text-align: center !important;
        padding: 15px !important;
        font-size: 12px !important;
        line-height: 1.6 !important;
    }

    .footer-bottom p {
        word-wrap: break-word !important;
    }

    /* Fix images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix tables */
    table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }

    /* Fix any absolutely positioned elements that might overflow */
    [style*="position: absolute"],
    [style*="position:absolute"] {
        max-width: 100vw !important;
    }

    /* Fix modals */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* Fix content sections */
    .content-section {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    .content-section h2 {
        font-size: 22px !important;
        margin-bottom: 15px !important;
    }

    .content-section h3 {
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }

    .content-section p {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }

    /* Fix feature items */
    .feature-item {
        width: 100% !important;
        padding: 15px !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }

    /* Fix package cards */
    .package-card {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    /* Fix any flex containers that might cause overflow */
    .flex,
    [class*="flex"] {
        flex-wrap: wrap !important;
    }

    /* Ensure text doesn't overflow */
    h1, h2, h3, h4, h5, h6, p, span, a, li {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    /* Fix buttons */
    .btn,
    button,
    [class*="btn"] {
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* ============================================
       BECOME A PARTNER PAGE MOBILE FIXES
       ============================================ */

    /* Activation container */
    .activation-container {
        margin: 20px 15px !important;
        width: calc(100% - 30px) !important;
        max-width: calc(100% - 30px) !important;
        border-radius: 8px !important;
    }

    .activation-body {
        padding: 20px 15px !important;
    }

    /* Packages grid */
    .packages-grid {
        display: block !important;
        width: 100% !important;
        grid-template-columns: 1fr !important;
    }

    .package-card {
        width: 100% !important;
        margin-bottom: 20px !important;
        padding: 20px 15px !important;
        box-sizing: border-box !important;
    }

    .package-title {
        font-size: 18px !important;
    }

    .package-price {
        font-size: 24px !important;
    }

    .package-description {
        font-size: 13px !important;
    }

    /* Details content */
    .details-content {
        padding: 0 10px !important;
    }

    .destinations-list {
        column-count: 1 !important;
        font-size: 12px !important;
    }

    /* Section titles */
    .section-title {
        font-size: 22px !important;
        padding: 0 10px !important;
    }

    /* Why Partner section */
    .why-partner,
    [class*="partner"] {
        padding: 20px 15px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero for become-a-partner */
    .hero {
        padding: 60px 15px 80px !important;
    }

    .hero-badge {
        font-size: 12px !important;
        padding: 8px 16px !important;
    }

    .hero-subtitle {
        font-size: 16px !important;
    }

    .hero-video {
        min-height: 300px !important;
    }

    /* Form elements */
    .form-row {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .form-group {
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    /* CTA buttons */
    .cta-button,
    .submit-btn,
    .activate-btn {
        width: 100% !important;
        padding: 15px 20px !important;
        font-size: 16px !important;
    }

    /* ============================================
       ALL PAGES - COMPREHENSIVE MOBILE FIXES
       ============================================ */

    /* Videos */
    video,
    iframe {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .hero-video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Feature grids and benefit sections */
    .features-grid,
    .benefits-grid,
    .services-grid,
    .team-grid,
    .testimonials-grid {
        display: block !important;
        width: 100% !important;
    }

    .feature-card,
    .benefit-card,
    .service-card,
    .team-card,
    .testimonial-card {
        width: 100% !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }

    /* Stats and numbers */
    .stats-container,
    .numbers-section {
        display: block !important;
        text-align: center !important;
    }

    .stat-item,
    .number-item {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    /* Pricing tables */
    .pricing-table,
    .pricing-grid {
        display: block !important;
        width: 100% !important;
    }

    .pricing-card {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    /* FAQ sections */
    .faq-container {
        padding: 0 15px !important;
    }

    .faq-item {
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    /* Contact sections */
    .contact-form,
    .contact-info {
        width: 100% !important;
        padding: 20px 15px !important;
    }

    /* Two column layouts */
    .two-column,
    .split-section,
    .side-by-side {
        display: block !important;
    }

    .two-column > *,
    .split-section > *,
    .side-by-side > * {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    /* Cards with images */
    .card-image,
    .image-container {
        width: 100% !important;
        height: auto !important;
    }

    .card-image img,
    .image-container img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }

    /* Lists */
    ul, ol {
        padding-left: 20px !important;
    }

    /* Blockquotes */
    blockquote {
        margin: 15px 0 !important;
        padding: 15px !important;
    }

    /* Auth modal on mobile */
    .auth-modal .container {
        width: 95% !important;
        max-width: 95% !important;
        padding: 25px 20px !important;
        margin: 10px !important;
    }

    /* Fix any overflow from inline styles */
    [style*="width: 1"],
    [style*="width:1"],
    [style*="min-width"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Ensure padding doesn't cause overflow */
    [style*="padding"] {
        box-sizing: border-box !important;
    }

    /* Fix absolute positioned content */
    .hero-content,
    .overlay-content {
        position: relative !important;
        width: 100% !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-container {
        padding: 0 15px;
    }

    .main-nav {
        gap: 15px;
    }

    .main-nav > li > a {
        font-size: 13px;
    }
}
