/* FLOXR MOBILE OVERRIDES - Managed separately per user request */

@media (max-width: 768px) {

    /* Global Mobile constraints */
    html,
    body {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex !important;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 1px solid var(--border-subtle);
        border-radius: 12px;
        color: var(--text-head);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        margin-left: 0.5rem;
        padding: 0 !important;
    }

    /* Ensure 3-stack menu icon (burger) is visible and correctly styled */
    .mobile-menu-toggle svg {
        width: 24px !important;
        height: 24px !important;
        display: block !important;
    }

    .mobile-menu-toggle svg line {
        stroke: var(--text-head) !important;
        stroke-width: 2.5 !important;
        stroke-linecap: round !important;
    }

    /* Keep theme toggle visible on mobile */
    .header-cta .theme-toggle-btn {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* SHORTEN BOOK DEMO BUTTON ON MOBILE */
    .btn-header-demo {
        padding: 0.4rem 0.8rem !important;
        /* Extremely short/compact */
        font-size: 0.8rem !important;
        border-radius: 30px !important;
        min-width: unset !important;
        flex: 0 0 auto !important;
    }

    /* Hide desktop nav */
    .header-inner .nav:not(#mobile-nav) {
        display: none !important;
    }

    /* Fixed Mobile Navigation Drawer - True Overlay */
    #mobile-nav.nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        /* Start completely offscreen */
        width: 280px !important;
        height: 100vh !important;
        background: var(--bg-card) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border-left: 1px solid var(--border-subtle) !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 2rem 1.5rem !important;
        gap: 0.5rem !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2) !important;
        z-index: 10000 !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        /* Transition right property specifically */
        display: flex !important;
        transform: none !important;
        /* Simplify: Use right property for movement */
    }

    #mobile-nav.nav.active {
        right: 0 !important;
    }

    /* Prevent body scroll when menu is active */
    body.menu-open {
        overflow: hidden !important;
    }

    /* Mobile Nav Header */
    .mobile-nav-header {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 2rem !important;
    }

    .mobile-nav-header span {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
        color: var(--text-head) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.1em !important;
    }

    .mobile-nav-divider {
        width: 100% !important;
        height: 1px !important;
        background: var(--border-subtle) !important;
        margin-bottom: 2rem !important;
        opacity: 0.5 !important;
        display: block !important;
    }

    .mobile-nav-close {
        width: 44px !important;
        height: 44px !important;
        background: var(--bg-subtle) !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: 12px !important;
        font-size: 1.8rem !important;
        color: var(--text-head) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }

    /* Menu Links */
    #mobile-nav.nav a {
        width: 100% !important;
        padding: 1.25rem 1rem !important;
        font-size: 1.05rem !important;
        border-radius: 12px !important;
        color: var(--text-head) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        transition: all 0.2s ease !important;
        border: 1px solid transparent !important;
        margin-bottom: 0.5rem !important;
        background: transparent !important;
    }

    #mobile-nav.nav a:hover,
    #mobile-nav.nav a:active {
        background: var(--bg-subtle) !important;
        color: var(--primary) !important;
        padding-left: 1.5rem !important;
    }

    #mobile-nav.nav a::after {
        content: '→';
        opacity: 0.5;
        font-size: 1.2rem;
    }

    /* Hero Scaling and constraints */
    .hero {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* CRITICAL: Prevent dashboard mockup from causing horizontal scroll */
    main {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .mockup-container {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .mockup-window {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        /* Disable 3D transforms on mobile */
    }

    .mockup-content {
        overflow: hidden !important;
        width: 100% !important;
    }

    /* Disable any transform animations that may cause overflow */
    .hero * {
        max-width: 100% !important;
    }

    .hero h1 {
        font-size: clamp(2.0rem, 8vw, 2.4rem) !important;
        line-height: 1.15 !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* FORCE VERTICAL CARD LAYOUTS FOR READABILITY */
    .pricing-grid,
    .pricing-grid-3,
    .pricing-grid-2,
    .features-grid,
    .scale-grid,
    .stats-grid,
    .details-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .pricing-card,
    .scale-card,
    .feature-card,
    .stat-item {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem !important;
        flex: 1 1 auto !important;
    }

    /* Mockup adjustments */
    .mockup-content>div {
        flex-direction: column !important;
    }

    .mockup-content>div>div:first-child {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        padding: 1rem !important;
    }

    .mockup-content .stats-row,
    .mockup-content .charts-row {
        grid-template-columns: 1fr !important;
    }

    /* Fix email text overflow in dashboard mockup */
    .typing-input {
        overflow: hidden !important;
        max-width: 100% !important;
        word-break: break-all !important;
    }

    #typed-email {
        font-size: 0.8rem !important;
        word-break: break-all !important;
    }

    .input-field {
        overflow: hidden !important;
        max-width: 100% !important;
    }

    .live-demo-container {
        overflow: hidden !important;
        max-width: 100% !important;
    }

    .header-inner {
        padding: 0.75rem 0.5rem !important;
    }

    /* GLOBE SECTION MOBILE FIX */
    .globe-section {
        overflow: hidden !important;
        padding: 3rem 0 !important;
    }

    .globe-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .globe-container {
        height: auto !important;
        min-height: 300px !important;
        order: 1 !important;
    }

    .globe-wrapper {
        width: 280px !important;
        height: 280px !important;
        margin: 0 auto !important;
    }

    .globe-text {
        order: 2 !important;
        text-align: center !important;
        max-width: 100% !important;
        padding: 0 1rem !important;
    }

    .glow-text {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
    }

    .globe-description {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .globe-stats {
        position: relative !important;
        bottom: auto !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }

    .stat-badge {
        padding: 0.75rem 1rem !important;
        min-width: auto !important;
        flex: 1 1 calc(50% - 0.5rem) !important;
    }

    .stat-number {
        font-size: 1.5rem !important;
    }

    .stat-label {
        font-size: 0.75rem !important;
    }

    /* Disable pulse animation on mobile to save performance */
    .pulse-point {
        animation: none !important;
    }

    .pulse-point::before {
        animation: none !important;
    }
}