/* ============================================================
   LANEX - Mobile Fix CSS (rewritten)
   Targeted phone/tablet fixes. Desktop layout is untouched.
   ============================================================ */

/* Lazy-loaded images stay responsive */
img[data-lazy-src],
img[data-lazy-srcset],
img.lazyload,
img.lazyloading,
img.lazyloaded {
    max-width: 100%;
    height: auto;
}

/* Background videos cover their section (kept from the original file) */
video { max-width: 100%; }
.elementor-background-video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}
.video_bg video,
.elementor-widget-container video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

img.lazy-loaded { animation: mfFadeIn 0.4s ease-in; }
@keyframes mfFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   PHONES AND SMALL TABLETS (max-width: 767px)
   ============================================================ */
@media only screen and (max-width: 767px) {

    html, body { overflow-x: hidden; }

    /* ---------- Header: solid bar, logo left, menu button right ---------- */
    header.elementor-top-section.elementor-element-e562858 {
        position: fixed !important;
        top: 0; left: 0; right: 0;
        width: 100% !important;
        z-index: 999 !important;
        background: rgba(10, 10, 10, 0.92) !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    header.elementor-element-e562858 > .elementor-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 64px !important;
        padding: 0 16px !important;
        max-width: 100% !important;
    }
    header.elementor-element-e562858 > .elementor-container > .elementor-column {
        width: auto !important;
        flex: 0 0 auto !important;
        min-height: 0 !important;
    }
    header.elementor-element-e562858 > .elementor-container > .elementor-column > .elementor-widget-wrap {
        padding: 0 !important;
        margin: 0 !important;
        align-items: center !important;
    }
    header.elementor-element-e562858 img {
        width: auto !important;
        max-width: 130px !important;
        height: auto !important;
        max-height: 34px !important;
        margin: 0 !important;
        display: block;
    }
    header.elementor-element-e562858 .elementor-inner-section,
    header.elementor-element-e562858 .elementor-inner-section > .elementor-container,
    header.elementor-element-e562858 .elementor-inner-column,
    header.elementor-element-e562858 .elementor-inner-column > .elementor-widget-wrap {
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Push page content below the fixed header */
    body { padding-top: 64px !important; }

    /* Hamburger: visible white bars on dark header, 44px tap target */
    .elementskit-menu-hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.35) !important;
        border-radius: 6px;
        cursor: pointer;
        float: none !important;
    }
    .elementskit-menu-hamburger .elementskit-menu-hamburger-icon {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        margin: 0 !important;
        background-color: #ffffff !important;
        border-radius: 2px;
    }


    /* ---------- Mobile menu panel ----------
       Before: it opened as an empty white panel with invisible links.
       Now: dark panel under the header listing all solution pages.
       Tap the menu button again to close it. */
    #ekit-megamenu-main-menu.elementskit-menu-offcanvas-elements {
        position: fixed !important;
        top: 64px !important;
        bottom: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 64px) !important;
        height: calc(100dvh - 64px) !important;
        background: #0d0d0d !important;
        overflow-y: auto !important;
        padding: 8px 0 24px !important;
        z-index: 998 !important;
        visibility: hidden;
        opacity: 0;
        transform: translateX(100%) !important;
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s linear 0.25s !important;
    }
    #ekit-megamenu-main-menu.elementskit-menu-offcanvas-elements.active {
        visibility: visible;
        opacity: 1;
        transform: none !important;
        transition: transform 0.25s ease, opacity 0.25s ease !important;
    }
    #ekit-megamenu-main-menu .elementskit-navbar-nav,
    #ekit-megamenu-main-menu .elementskit-navbar-nav > li {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
    }
    /* The "☰" mega-menu trigger is redundant inside the open panel */
    #ekit-megamenu-main-menu .elementskit-navbar-nav > li > a.ekit-menu-nav-link {
        display: none !important;
    }
    #ekit-megamenu-main-menu .elementskit-megamenu-panel,
    #ekit-megamenu-main-menu .elementskit-megamenu-panel * {
        pointer-events: auto !important;
    }
    #ekit-megamenu-main-menu .elementskit-megamenu-panel {
        display: block !important;
        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        background: transparent !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #ekit-megamenu-main-menu .elementskit-megamenu-panel .elementor-section,
    #ekit-megamenu-main-menu .elementskit-megamenu-panel .elementor-container,
    #ekit-megamenu-main-menu .elementskit-megamenu-panel .elementor-column,
    #ekit-megamenu-main-menu .elementskit-megamenu-panel .elementor-widget-wrap {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
    }
    #ekit-megamenu-main-menu ul.menu,
    #ekit-megamenu-main-menu ul.sub-menu {
        display: block !important;
        position: static !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        background: transparent !important;
    }
    #ekit-megamenu-main-menu ul.sub-menu > li {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        float: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    #ekit-megamenu-main-menu ul.sub-menu > li > a {
        display: block !important;
        padding: 14px 20px !important;
        color: #ffffff !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        text-decoration: none !important;
    }
    #ekit-megamenu-main-menu ul.sub-menu > li > a .menu-item-description {
        display: block !important;
        margin-top: 4px;
        color: rgba(255, 255, 255, 0.6) !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        font-family: Roboto, Arial, sans-serif !important;
        line-height: 1.45 !important;
    }
    #ekit-megamenu-main-menu ul.sub-menu > li > a:active { background: rgba(255, 255, 255, 0.06); }
    /* The hamburger stays on top so it can close the panel */
    header.elementor-element-e562858 .elementskit-menu-hamburger { position: relative; z-index: 1000; }

    /* ---------- Elementor columns and widgets ---------- */
    /* Widgets must use the full column width (fixes headings squeezed to ~150px) */
    .elementor-column > .elementor-widget-wrap { width: 100% !important; max-width: 100% !important; }
    .elementor-widget-wrap > .elementor-element:not(.elementor-widget__width-auto):not(.elementor-widget__width-initial):not(.elementor-absolute) {
        width: 100% !important;
        max-width: 100% !important;
    }


    /* Some pages have a column accidentally nested inside another column
       (missing closing tag). Stack them instead of squeezing side by side. */
    .elementor-column:has(> .elementor-column),
    .elementor-element-29f27f1 {
        flex-wrap: wrap !important;
    }
    .elementor-column > .elementor-column {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* No mid-word hyphenation on headings */
    h1, h2, h3, h4, .elementor-heading-title {
        -webkit-hyphens: manual !important;
        hyphens: manual !important;
        word-break: normal !important;
        overflow-wrap: break-word;
    }


    /* Headings: line-height never smaller than the font (fixes overlapping lines) */
    h1.elementor-heading-title,
    h2.elementor-heading-title,
    h3.elementor-heading-title {
        line-height: 1.2 !important;
    }


    /* Some paragraphs had inline line-height of 0.1 to 0.5, so wrapped lines
       stacked on top of each other on small screens */
    p[style*="line-height"],
    p.elementor-icon-list-text {
        line-height: 1.5 !important;
    }

    /* Footer copyright line: center it with side padding instead of hugging the right edge */
    .elementor-top-section:has(a[href^="mailto"]) .elementor-column > .elementor-widget-wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    p[style*="text-align: right"] {
        text-align: center !important;
        padding: 0 20px !important;
    }

    /* Justified paragraphs leave big gaps on narrow screens */
    [style*="justify"] { text-align: left !important; }

    /* Section that touched the screen edges (Enterprise Security page) */
    .elementor-element-ef6037c .elementor-column > .elementor-widget-wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* "Technology" cards on the home page: image fills the card height */
    .card .card-body > .row { align-items: stretch; flex-wrap: nowrap; }
    .card .card-body > .row > .col-auto { display: flex; }
    .card .left_side_img { height: 100%; }
    .card .left_side_img img {
        height: 100% !important;
        width: 110px !important;
        max-width: 110px !important;
        object-fit: cover;
    }

    /* ---------- Hero background video fills its section ---------- */
    .elementor-background-video-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
    .elementor-background-video-container video.elementor-background-video-hosted {
        position: absolute !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
        transform: none !important;
    }

    /* Inline videos never wider than the screen */
    .elementor-widget-video video,
    .elementor-widget-video iframe {
        max-width: 100% !important;
    }

    /* Tables scroll instead of breaking the layout */
    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
