/* ═══════════════════════════════════════════════════════════════
   Mobile Enhancements — TenderGlobal
   1. Hide breadcrumbs / user pathway on mobile
   2. Hide floating communication icons on mobile
   3. App Download Smart Banner (one-time dismissible popup)
   4. Mobile QA fixes (320–768px)
   5. Mobile Header (top) & Bottom Navigation Bar
   6. TendersSearch Hero Mobile Compaction
   7. Homepage-specific mobile hides
   8. Compact footer on mobile
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Hide breadcrumbs / pathway on mobile ────────────────── */
@media (max-width: 768px) {
    .breadcrumbs,
    .breadcrumbs.pull-right,
    .sl-breadcrumb,
    .sd-breadcrumb,
    .ts-hero-breadcrumb,
    .page-title-container .breadcrumbs,
    nav[aria-label="breadcrumb"] {
        display: none !important;
    }
}

/* ── 2. Hide floating icons on mobile ───────────────────────── */
@media (max-width: 768px) {
    /* Support widget (headset FAB) */
    .support-widget,
    .sw-trigger,
    #swTrigger,
    .sw-widget,
    #swWidget {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* UserWay accessibility widget */
    .userway_p1,
    .userway_p2,
    .userway_p3,
    .userway_p4,
    .userway_p5,
    .userway_p6,
    #userwayAccessibilityIcon,
    [data-userway],
    .uwy {
        display: none !important;
    }

    /* Scroll-to-top button: hidden here except the enhanced one (.tg-stt), which page-default.css places above the bottom bar */
    #scrollToTopBtn:not(.tg-stt) {
        display: none !important;
    }

    /* Homepage Campaign Banner */
    #tgHomeBanner,
    .hb {
        display: none !important;
    }
}


/* ── 3. App Download Banner ─────────────────────────────────── */
/* Floats above the mobile bottom bar (never covers navigation) and
   below the off-canvas menu/overlay (z-index 9999/10000). */
.tg-app-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    padding: 0 8px 8px;
    transform: translateY(calc(100% + 80px));
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.tg-app-banner.tg-app-banner--over-bar {
    bottom: var(--tg-bottombar-height, 54px);
}

.tg-app-banner.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

.tg-app-banner__inner {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.14);
    padding: 10px 12px;
    padding-inline-start: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
}

/* App icon */
.tg-app-banner__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}

/* Text block */
.tg-app-banner__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tg-app-banner__title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-app-banner__subtitle,
.tg-app-banner__meta {
    font-size: 11.5px;
    color: #4b5563;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-app-banner__meta {
    color: #6b7280;
    font-size: 11px;
}

/* CTA button — 44px tap target */
.tg-app-banner__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    min-width: 72px;
    padding: 0 16px;
    background: #2e8795;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 22px;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.tg-app-banner__cta:hover,
.tg-app-banner__cta:focus {
    background: #237a87;
    color: #fff;
    text-decoration: none;
}

.tg-app-banner__cta:focus-visible,
.tg-app-banner__store:focus-visible,
.tg-app-banner__close:focus-visible {
    outline: 2px solid #e67e22;
    outline-offset: 2px;
}

.tg-app-banner__cta i {
    font-size: 16px;
}

/* Unknown platform: two store icon buttons */
.tg-app-banner__stores {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tg-app-banner__store {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
}

.tg-app-banner__store:hover,
.tg-app-banner__store:focus {
    background: #2e8795;
    color: #fff;
}

/* Close button — inline, 36px visual / 44px tap area */
.tg-app-banner__close {
    order: -1;
    flex-shrink: 0;
    width: 32px;
    height: 44px;
    margin-inline-end: -6px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tg-app-banner__close:hover {
    color: #111827;
}

/* Hide on desktop — only show on mobile */
@media (min-width: 769px) {
    .tg-app-banner {
        display: none !important;
    }
}

/* Keep page content clear of banner + bottom bar */
@media (max-width: 768px) {
    body.has-tg-app-banner {
        padding-bottom: calc(var(--tg-bottombar-height, 0px) + var(--tg-app-banner-height, 72px) + 16px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Safe area for iOS home indicator when there is no bottom bar */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .tg-app-banner:not(.tg-app-banner--over-bar) {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-app-banner { transition: none; }
}

/* ── 4. Mobile QA fixes (320–768px) ─────────────────────────── */

/* Fix: BuyersList card grid — the 1200px :not(.view-list) selector
   has higher specificity than the plain 768px selector, forcing 2
   columns on mobile. Match specificity to ensure single column. */
@media (max-width: 768px) {
    .bl-card-grid,
    .bl-card-grid:not(.view-list) {
        grid-template-columns: 1fr !important;
    }
}

/* Fix: Services page divider-with-image overflows at ≤ 320px.
   The gem image (150px) + two divider lines create a 346px row. */
@media (max-width: 414px) {
    .service-page .divider-with-image {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .service-page .divider-with-image .divider-line {
        display: none;
    }
    .service-page .divider-with-image img {
        max-width: 120px;
        height: auto;
    }
}
/* Prevent horizontal scrolling globally */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}


/* ═══════════════════════════════════════════════════════════════
   5. MOBILE HEADER & BOTTOM NAVIGATION BAR
   Top header: Account/Login | Logo (center) | Country Selector
   Bottom bar (fixed): Tenders | Categories | Newsletter | ☰ Hamburger
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Top Header ───────────────────────────────────────────── */

    /* Make header non-sticky and scroll normally */
    .TenderHeaderMenu-navbar {
        position: relative !important;
        top: auto !important;
        z-index: 1000 !important;
    }

    /* Compact the navbar container to a single row */
    [dir="rtl"] .TenderHeaderMenu-navContainer,
    [dir="ltr"] .TenderHeaderMenu-navContainer,
    .TenderHeaderMenu-navContainer {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 10px !important;
        gap: 6px !important;
        min-height: 48px !important;
        flex-wrap: nowrap !important;
    }

    /* Left side: Logo + region — reorder so logo is visually centered */
    .TenderHeaderMenu-left {
        order: 2 !important;
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    /* Logo link — centered, compact */
    .TenderHeaderMenu-logoLink {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    /* Logo image */
    .TenderHeaderMenu-logo img {
        max-height: 28px !important;
        width: auto !important;
    }

    /* Hide the locale text next to logo on mobile */
    .TenderHeaderMenu-logoLocale {
        display: none !important;
    }

    /* Region selector circle button — enhanced mobile styling */
    .TenderHeaderMenu-regionContainer {
        order: 2 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #TenderHeaderMenuRegionSelector,
    .TenderHeaderMenu-regionSelector {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        border: 1.5px solid rgba(203, 213, 225, 0.85) !important;
        box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.08), 0 1px 3px -1px rgba(15, 23, 42, 0.04) !important;
        transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
        cursor: pointer !important;
        outline: none !important;
        position: relative !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    #TenderHeaderMenuRegionSelector:hover,
    .TenderHeaderMenu-regionSelector:hover {
        border-color: rgba(46, 135, 149, 0.45) !important;
        box-shadow: 0 4px 12px rgba(46, 135, 149, 0.18), 0 1px 3px rgba(15, 23, 42, 0.06) !important;
        transform: translateY(-1px) scale(1.05) !important;
    }

    #TenderHeaderMenuRegionSelector:active,
    .TenderHeaderMenu-regionSelector:active {
        transform: scale(0.94) !important;
        background: #f8fafc !important;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
    }

    #TenderHeaderMenuRegionSelector.is-open,
    #TenderHeaderMenuRegionSelector[aria-expanded="true"],
    .TenderHeaderMenu-regionSelector.is-open {
        border-color: var(--thm-primary, #2e8795) !important;
        box-shadow: 0 0 0 3px rgba(46, 135, 149, 0.22), 0 4px 14px rgba(46, 135, 149, 0.18) !important;
        background: #ffffff !important;
        transform: scale(1.02) !important;
    }

    #TenderHeaderMenuRegionSelector:focus-visible,
    .TenderHeaderMenu-regionSelector:focus-visible {
        outline: none !important;
        border-color: var(--thm-primary, #2e8795) !important;
        box-shadow: 0 0 0 3px rgba(46, 135, 149, 0.3) !important;
    }

    #TenderHeaderMenuRegionSelector .TenderHeaderMenu-regionIcon,
    .TenderHeaderMenu-regionSelector .TenderHeaderMenu-regionIcon {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        display: block !important;
        margin: 0 !important;
        pointer-events: none !important;
        transition: transform 0.2s ease !important;
    }

    #TenderHeaderMenuRegionSelector:hover .TenderHeaderMenu-regionIcon,
    .TenderHeaderMenu-regionSelector:hover .TenderHeaderMenu-regionIcon {
        transform: scale(1.04) !important;
    }

    #TenderHeaderMenuRegionSelector .TenderHeaderMenu-regionLabel,
    #TenderHeaderMenuRegionSelector .TenderHeaderMenu-langLabel,
    #TenderHeaderMenuRegionSelector .TenderHeaderMenu-regionArrow,
    .TenderHeaderMenu-regionSelector .TenderHeaderMenu-regionLabel,
    .TenderHeaderMenu-regionSelector .TenderHeaderMenu-langLabel,
    .TenderHeaderMenu-regionSelector .TenderHeaderMenu-regionArrow {
        display: none !important;
    }

    /* Dividers — hide on mobile */
    .TenderHeaderMenu-leftDivider {
        display: none !important;
    }

    /* Actions area (bell) — appears next to logo */
    .TenderHeaderMenu-actions {
        order: 1 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    /* Header Bell Module & Circle Button — matching TenderHeaderMenuRegionSelector geometry */
    #ctl00_tgBellModuleHeader,
    #tgBellModuleHeader,
    .tg-bell-header {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-btn,
    #tgBellModuleHeader .tg-bell-btn,
    .tg-bell-header .tg-bell-btn,
    .header-notif-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        border: 1.5px solid rgba(203, 213, 225, 0.85) !important;
        box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.08), 0 1px 3px -1px rgba(15, 23, 42, 0.04) !important;
        transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
        cursor: pointer !important;
        outline: none !important;
        position: relative !important;
        color: #475569 !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-btn:hover,
    #tgBellModuleHeader .tg-bell-btn:hover,
    .tg-bell-header .tg-bell-btn:hover,
    .header-notif-btn:hover {
        border-color: rgba(46, 135, 149, 0.45) !important;
        box-shadow: 0 4px 12px rgba(46, 135, 149, 0.18), 0 1px 3px rgba(15, 23, 42, 0.06) !important;
        transform: translateY(-1px) scale(1.05) !important;
        color: var(--thm-primary, #2e8795) !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-btn:active,
    #tgBellModuleHeader .tg-bell-btn:active,
    .tg-bell-header .tg-bell-btn:active,
    .header-notif-btn:active {
        transform: scale(0.94) !important;
        background: #f8fafc !important;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-btn.active,
    #ctl00_tgBellModuleHeader .tg-bell-btn[aria-expanded="true"],
    #tgBellModuleHeader .tg-bell-btn.active,
    #tgBellModuleHeader .tg-bell-btn[aria-expanded="true"],
    .tg-bell-header .tg-bell-btn.active,
    .tg-bell-header .tg-bell-btn[aria-expanded="true"],
    .header-notif-btn.is-active,
    .header-notif-btn[aria-expanded="true"] {
        border-color: var(--thm-primary, #2e8795) !important;
        box-shadow: 0 0 0 3px rgba(46, 135, 149, 0.22), 0 4px 14px rgba(46, 135, 149, 0.18) !important;
        background: #ffffff !important;
        color: var(--thm-primary, #2e8795) !important;
        transform: scale(1.02) !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-btn:focus-visible,
    #tgBellModuleHeader .tg-bell-btn:focus-visible,
    .tg-bell-header .tg-bell-btn:focus-visible,
    .header-notif-btn:focus-visible {
        outline: none !important;
        border-color: var(--thm-primary, #2e8795) !important;
        box-shadow: 0 0 0 3px rgba(46, 135, 149, 0.3) !important;
    }

    /* Bell SVG Icon */
    #ctl00_tgBellModuleHeader .tg-bell-icon,
    #tgBellModuleHeader .tg-bell-icon,
    .tg-bell-header .tg-bell-icon,
    .header-notif-btn .notif-bell-icon {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
        stroke: currentColor !important;
        fill: none !important;
        stroke-width: 2 !important;
        display: block !important;
        margin: 0 !important;
        pointer-events: none !important;
        transition: transform 0.2s ease, color 0.2s ease !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-btn:hover .tg-bell-icon,
    #tgBellModuleHeader .tg-bell-btn:hover .tg-bell-icon,
    .tg-bell-header .tg-bell-btn:hover .tg-bell-icon,
    .header-notif-btn:hover .notif-bell-icon {
        transform: scale(1.08) !important;
    }

    /* Bell Notification Badge */
    #ctl00_tgBellModuleHeader .tg-bell-badge,
    #tgBellModuleHeader .tg-bell-badge,
    .tg-bell-header .tg-bell-badge,
    .header-notif-btn .notif-badge-bubble {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
        left: auto !important;
        width: auto !important;
        min-width: 18px !important;
        height: 18px !important;
        padding: 0 4px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        line-height: 14px !important;
        border-radius: 999px !important;
        background: #ff7f27 !important;
        color: #ffffff !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 2 !important;
        pointer-events: none !important;
        box-sizing: border-box !important;
    }

    #ctl00_tgBellModuleHeader .tg-bell-badge[data-count="0"],
    #ctl00_tgBellModuleHeader .tg-bell-badge:empty,
    #tgBellModuleHeader .tg-bell-badge[data-count="0"],
    #tgBellModuleHeader .tg-bell-badge:empty,
    .tg-bell-header .tg-bell-badge[data-count="0"],
    .tg-bell-header .tg-bell-badge:empty,
    .header-notif-btn .notif-badge-bubble[hidden] {
        display: none !important;
    }

    /* Mobile Bell Dropdown */
    .tg-bell-header .tg-bell-dropdown {
        position: fixed !important;
        top: 54px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        border-radius: 14px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        border: 1px solid rgba(203, 213, 225, 0.8) !important;
        z-index: 2000 !important;
        background: #ffffff !important;
    }

    /* Newsletter button in header — hide on mobile (it's in bottom bar) */
    .TenderHeaderMenu-newsletterBtn {
        display: none !important;
    }

    /* Profile dropdown button — compact avatar only, pushed to edge */
    .TenderHeaderMenu-profileDropdown {
        order: 0 !important;
        flex-shrink: 0 !important;
    }

    .TenderHeaderMenu-profileBtn {
        padding: 2px !important;
        gap: 0 !important;
    }

    .TenderHeaderMenu-profileInfo,
    .TenderHeaderMenu-profileArrow {
        display: none !important;
    }

    .TenderHeaderMenu-profileAvatar {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }

    /* Get Started button & dropdown — mobile responsive & touch-optimized */
    .TenderHeaderMenu .get-started-container {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .TenderHeaderMenu .get-started-inner {
        position: static !important;
    }

    .TenderHeaderMenu .get-started-btn {
        min-width: 36px !important;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border: 2.5px solid #ffffff !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ff7f27 !important;
        box-shadow: 0 4px 14px rgba(255, 127, 39, 0.35) !important;
        cursor: pointer !important;
        transition: all 0.25s ease !important;
    }

    .TenderHeaderMenu .get-started-btn .btn-text {
        display: none !important;
    }

    .TenderHeaderMenu .get-started-btn .btn-icon {
        font-size: 14px !important;
        line-height: 1 !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffffff !important;
    }

    /* Fixed full-width dropdown card below header */
    .TenderHeaderMenu .get-started-menu {
        position: fixed !important;
        top: 60px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 auto !important;
        transform: translateY(-8px) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        background: #ffffff !important;
        border-radius: 14px !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 10px !important;
        z-index: 2001 !important;
        transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s !important;
    }

    /* Reset dir="rtl" transform overrides */
    .TenderHeaderMenu .get-started-inner[dir="rtl"] .get-started-menu {
        left: 10px !important;
        right: 10px !important;
        transform: translateY(-8px) !important;
    }

    /* Open state on mobile: triggered strictly by JS .is-open */
    .TenderHeaderMenu .get-started-inner.is-open .get-started-menu,
    .TenderHeaderMenu .get-started-inner[dir="rtl"].is-open .get-started-menu {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    /* Closed state on mobile: suppress sticky touch :hover / :focus-within */
    .TenderHeaderMenu .get-started-inner:not(.is-open) .get-started-menu,
    .TenderHeaderMenu .get-started-inner[dir="rtl"]:not(.is-open) .get-started-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-8px) !important;
    }

    .TenderHeaderMenu .get-started-inner.is-open .get-started-btn {
        background: #98ce44 !important;
        animation: none !important;
        transform: scale(0.96) !important;
    }

    /* Options inside menu */
    .TenderHeaderMenu .get-started-option {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 10px 14px !important;
        min-height: 52px !important;
        border-radius: 10px !important;
        background: #ffffff !important;
        border: 1.5px solid #e2e8f0 !important;
        text-decoration: none !important;
        transition: all 0.15s ease !important;
    }

    .TenderHeaderMenu .get-started-inner[dir="rtl"] .get-started-option {
        flex-direction: row !important;
        text-align: right !important;
    }

    .TenderHeaderMenu .get-started-option + .get-started-option {
        margin-top: 8px !important;
    }

    .TenderHeaderMenu .get-started-option:hover,
    .TenderHeaderMenu .get-started-option:active {
        background-color: #f8fafc !important;
        border-color: #cbd5e1 !important;
        transform: none !important;
    }

    .TenderHeaderMenu .get-started-option .option-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 15px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .TenderHeaderMenu .get-started-option .option-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .TenderHeaderMenu .get-started-option .option-title {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        line-height: 1.25 !important;
    }

    .TenderHeaderMenu .get-started-option .option-desc {
        font-size: 11.5px !important;
        color: #64748b !important;
        line-height: 1.25 !important;
    }

    /* Bell module — compact */
    .tg-bell-header .tg-bell-btn {
        padding: 4px !important;
    }

    .tg-bell-header .tg-bell-icon {
        width: 20px !important;
        height: 20px !important;
    }

    /* Employee wheat badge — hide on mobile */
    .TenderHeaderMenu-employeeWheat {
        display: none !important;
    }

    /* Membership badge on avatar — smaller */
    .TenderHeaderMenu-membershipBadge {
        width: 14px !important;
        height: 14px !important;
    }
    .TenderHeaderMenu-membershipBadge img {
        width: 14px !important;
        height: 14px !important;
    }


    /* ── TenderCompactNav: hide entirely on mobile ────────────── */
    /* The bottom bar replaces this; no second header row needed */
    .TenderCompactNav {
        display: none !important;
    }


    /* ── Bottom Navigation Bar (fixed) ────────────────────────── */
    /* Injected by JS as #tg-mobile-bottombar, appended to body  */
    .tg-mobile-bottombar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9998 !important;
        background: #fff !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08) !important;
        display: flex !important;
        align-items: stretch !important;
        min-height: 54px !important;
        height: 54px !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
    }

    /* iOS safe-area support */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .tg-mobile-bottombar {
            height: calc(54px + env(safe-area-inset-bottom)) !important;
            padding-bottom: env(safe-area-inset-bottom) !important;
        }
    }

    /* Bottom bar links & button */
    .tg-bottombar-link {
        flex: 1 1 0 !important;
        height: 100% !important;
        min-height: 54px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        padding: 6px 2px 4px !important;
        color: #6b7280 !important;
        text-decoration: none !important;
        font-family: inherit !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        transition: color 0.15s, background-color 0.15s !important;
        -webkit-tap-highlight-color: transparent !important;
        border: none !important;
        background: transparent !important;
        cursor: pointer !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        appearance: none !important;
        -webkit-appearance: none !important;
    }

    .tg-bottombar-link:hover,
    .tg-bottombar-link:focus {
        color: #2e8795 !important;
        text-decoration: none !important;
    }

    .tg-bottombar-link.is-active,
    .tg-bottombar-link[aria-expanded="true"] {
        color: #2e8795 !important;
    }

    .tg-bottombar-link i {
        font-size: 18px !important;
        width: 22px !important;
        height: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        line-height: 1 !important;
    }

    .tg-bottombar-link span {
        line-height: 1 !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        display: block !important;
    }

    /* Body padding so content isn't hidden behind fixed bar */
    body {
        padding-bottom: 60px !important;
    }
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        body {
            padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* Hide bottom bar on desktop */
@media (min-width: 769px) {
    .tg-mobile-bottombar {
        display: none !important;
    }
    /* Remove mobile body padding on desktop */
    body {
        padding-bottom: 0 !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   5b. HAMBURGER MOBILE OFF-CANVAS MENU
   When hamburger is tapped, a full off-canvas menu slides in.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Off-canvas panel — uses flexbox: topbar (pinned) + list (scrollable) */
    .tg-mobile-offcanvas {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 85vw;
        max-width: 360px;
        background: #fff;
        z-index: 10000;
        overflow: hidden;
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
    }

    /* LTR: slide from left */
    [dir="ltr"] .tg-mobile-offcanvas,
    :not([dir]) .tg-mobile-offcanvas {
        left: 0;
        right: auto;
        transform: translateX(-100%);
    }
    [dir="ltr"] .tg-mobile-offcanvas.is-open,
    :not([dir]) .tg-mobile-offcanvas.is-open {
        transform: translateX(0);
    }

    /* RTL: slide from right */
    [dir="rtl"] .tg-mobile-offcanvas {
        right: 0;
        left: auto;
        transform: translateX(100%);
    }
    [dir="rtl"] .tg-mobile-offcanvas.is-open {
        transform: translateX(0);
    }

    /* Off-canvas overlay */
    .tg-mobile-offcanvas-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.45);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .tg-mobile-offcanvas-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    /* ── Pinned top bar (Logo + Home + Fav + Close) ────────── */
    .tg-offcanvas-topbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 6px;
        padding: 10px 14px;
        border-bottom: 1px solid #e5e7eb;
        flex-shrink: 0;
        background: #fff;
        min-height: 50px;
    }

    .tg-offcanvas-logo {
        display: flex;
        align-items: center;
    }
    .tg-offcanvas-logo img {
        width: 30px;
        height: 30px;
        border-radius: 6px;
    }

    .tg-offcanvas-topbar-spacer {
        flex: 1;
    }

    .tg-offcanvas-topbar-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: transparent;
        color: #2e8795;
        font-size: 16px;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }
    .tg-offcanvas-topbar-icon:hover,
    .tg-offcanvas-topbar-icon:focus {
        background: rgba(46,135,149,0.08);
        color: #1a5f6a;
        text-decoration: none;
    }

    /* Close button (X) in top bar — slightly different color */
    .tg-offcanvas-close {
        color: #6b7280;
    }
    .tg-offcanvas-close:hover {
        background: #f3f4f6;
        color: #374151;
    }

    /* ── Scrollable menu list ────────────────────────────────── */
    .tg-offcanvas-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 16px;
    }

    /* Off-canvas menu item */
    .tg-offcanvas-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 20px;
        color: #374151;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        border-bottom: 1px solid #f3f4f6;
        transition: background 0.15s;
    }
    .tg-offcanvas-item:hover {
        background: rgba(46,135,149,0.06);
        color: #2e8795;
        text-decoration: none;
    }
    .tg-offcanvas-item i {
        width: 20px;
        text-align: center;
        color: #2e8795;
        font-size: 15px;
        flex-shrink: 0;
    }

    /* Off-canvas section heading */
    .tg-offcanvas-heading {
        padding: 14px 20px 4px;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #9ca3af;
    }
    /* First heading — no top padding */
    .tg-offcanvas-list .tg-offcanvas-heading:first-child {
        padding-top: 8px;
    }

    /* App store badges (official black badge layout, 40px high) */
    .tg-offcanvas-stores-caption {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 12px 16px 0;
        font-size: 12px;
        font-weight: 700;
        color: #374151;
    }
    .tg-offcanvas-stores-caption i {
        color: #2e8795;
    }
    .tg-offcanvas-stores {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 16px 12px;
        border-bottom: 1px solid #f3f4f6;
    }
    .tg-store-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 44px;
        min-width: 0;
        padding: 0 10px;
        box-sizing: border-box;
        background: #000;
        color: #fff;
        border: 1px solid #a6a6a6;
        border-radius: 8px;
        text-decoration: none;
        flex: 1 1 120px;
        max-width: 180px;
    }
    .tg-store-badge:hover,
    .tg-store-badge:focus {
        color: #fff;
        text-decoration: none;
        background: #1f1f1f;
    }
    .tg-store-badge:focus-visible {
        outline: 2px solid #2e8795;
        outline-offset: 2px;
    }
    .tg-store-badge i {
        font-size: 22px;
        width: 22px;
        text-align: center;
        flex-shrink: 0;
    }
    .tg-store-badge__text {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        text-align: start;
        min-width: 0;
    }
    .tg-store-badge__text small {
        font-size: 9.5px;
        font-weight: 500;
        letter-spacing: 0.2px;
        white-space: nowrap;
    }
    .tg-store-badge__text strong {
        font-size: 15px;
        font-weight: 600;
        white-space: nowrap;
    }
    [dir="rtl"] .tg-store-badge__text small {
        font-size: 10.5px;
    }
}


/* Hide off-canvas on desktop */
@media (min-width: 769px) {
    .tg-mobile-offcanvas,
    .tg-mobile-offcanvas-overlay {
        display: none !important;
    }
}


/* ── 6. TendersSearch Hero Mobile Compaction ─────────────────── */
@media (max-width: 768px) {
    .ts-hero {
        padding: 12px 0 10px !important;
    }
    .ts-hero::before,
    .ts-hero::after {
        display: none !important;
    }
    .ts-hero-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        font-size: 16px !important;
    }
    .ts-hero-inner {
        flex-direction: row !important;
        text-align: start !important;
        gap: 12px !important;
        padding: 0 16px !important;
    }
    .ts-hero .ts-hero-text h1,
    .ts-hero .ts-hero-text h2,
    .ts-hero .ts-hero-text h3,
    .ts-hero .ts-hero-text h4,
    .ts-hero .ts-hero-text h5,
    .ts-hero .ts-hero-text h6,
    .ts-hero .ts-hero-text .entry-title {
        font-size: 18px !important;
    }
    .ts-hero-text p {
        font-size: 12px !important;
        margin: 2px 0 0 !important;
    }
    .ts-hero-pills {
        display: none !important;
    }
}


/* ── 7. Homepage-specific mobile hides ──────────────────────── */
@media (max-width: 768px) {
    /* Hide notification bell on homepage mobile */
    .default-page .tg-bell-module,
    .default-page .tg-bell-header {
        display: none !important;
    }

    /* Hide buyer/publisher rep banner on homepage mobile */
    .default-page .publisher-rep-banner,
    .default-page #dvPublisherRepBanner {
        display: none !important;
    }


    /* Hide notification center section (cards) on homepage mobile */
    .default-page #NotificationCenter {
        display: none !important;
    }
}


/* ── 8. Compact footer on mobile ────────────────────────────── */
@media (max-width: 768px) {
    .tg-footer {
        padding: 16px 0 0 !important;
        margin-top: 16px !important;
    }

    .tg-footer__container {
        padding: 0 12px !important;
    }

    .tg-footer__main {
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* Brand column — very compact */
    .tg-footer__brand {
        text-align: center !important;
        padding-bottom: 12px !important;
    }

    .tg-footer__tagline {
        font-size: 11px !important;
        margin: 2px 0 6px !important;
    }

    .tg-footer__logo {
        max-height: 24px !important;
    }

    /* Hide app store buttons in brand section — mobile users already have the app */
    .tg-footer__apps {
        display: none !important;
    }

    /* Hide the link columns on mobile — navigation is via bottom bar */
    .tg-footer__col:not(.tg-footer__brand):not(.tg-footer__contact) {
        display: none !important;
    }

    /* Compact contact section */
    .tg-footer__contact {
        padding: 10px 0 !important;
        border-top: 1px solid rgba(0,0,0,0.06) !important;
    }

    .tg-footer__heading {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    .tg-footer__contact-block {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }

    .tg-footer__contact-label {
        font-size: 10px !important;
    }

    .tg-footer__contact-row {
        font-size: 11px !important;
        gap: 4px !important;
    }

    /* Hide the decorative headset icon */
    .tg-footer__contact-icon,
    .tg-footer__contact > img,
    .tg-footer__contact .tg-footer__contact-block > img {
        display: none !important;
    }

    /* Base/legal row — includes bottom padding to clear the fixed bottom bar */
    .tg-footer__base {
        padding: 8px 0 12px !important;
        margin-top: 8px !important;
        font-size: 10px !important;
        flex-direction: column !important;
        gap: 6px !important;
        text-align: center !important;
    }

    .tg-footer__social {
        gap: 12px !important;
        justify-content: center !important;
    }

    .tg-footer__social a {
        font-size: 14px !important;
    }

    .tg-footer__legal {
        font-size: 10px !important;
    }

    .tg-footer__copy {
        font-size: 10px !important;
    }
}


/* ── 8b. Compact LEGACY footer (Default.aspx dynamic-footer) ── */
@media (max-width: 768px) {
    .dynamic-footer {
        padding: 12px 0 0 !important;
        margin-top: 16px !important;
    }

    .dynamic-footer .footer-wave {
        display: none !important;
    }

    .dynamic-footer .footer-container {
        padding: 0 12px !important;
    }

    /* Compact header — smaller logo and flags */
    .dynamic-footer .footer-header {
        padding: 8px 0 !important;
        gap: 8px !important;
    }

    .dynamic-footer .footer-logo img {
        max-height: 24px !important;
    }

    .dynamic-footer .footer-header > img {
        max-width: 140px !important;
    }

    /* On mobile: hide link columns (handled by tg-footer-compact), display compact Contact & Social card */
    .dynamic-footer .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 12px 0 0 !important;
        gap: 0 !important;
    }

    .dynamic-footer .footer-grid .footer-column:not(.contact-column) {
        display: none !important;
    }

    .dynamic-footer .footer-column.contact-column {
        width: 100% !important;
        max-width: 360px !important;
        margin: 0 auto !important;
    }

    .dynamic-footer .footer-column.contact-column .footer-heading {
        display: none !important;
    }

    .dynamic-footer .contact-bubble {
        margin: 0 auto !important;
        padding: 12px 16px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }

    .dynamic-footer .social-minimal {
        justify-content: center !important;
        margin-top: 10px !important;
    }

    /* Compact social and legal */
    .dynamic-footer .footer-bottom {
        padding: 8px 0 !important;
        font-size: 10px !important;
        flex-direction: column !important;
        gap: 6px !important;
        text-align: center !important;
    }

    .dynamic-footer .footer-social a {
        font-size: 14px !important;
    }

    /* Payment logos — smaller */
    .dynamic-footer .footer-payments,
    .dynamic-footer .payment-logos {
        gap: 4px !important;
    }

    .dynamic-footer .footer-payments img,
    .dynamic-footer .payment-logos img {
        max-height: 20px !important;
    }

    /* Add padding to clear the fixed bottom bar */
    .dynamic-footer {
        padding-bottom: 12px !important;
    }
}


/* ── 9. Newsletter Mobile Fixes ─────────────────────────────── */
@media (max-width: 768px) {
    /* Fix: Tender card date/deadline row overflows horizontally.
       Three col-sm-* children (4+6+2=12) each get forced to width: 50%
       on mobile, totalling 150% — the third col (location) is clipped.
       Allow wrapping so location drops to its own line. */
    article.box.demo-card-hover .second-row.border-bl .time,
    article.box.demo-card-hover .second-row .time,
    .flight-list .time {
        flex-flow: row wrap !important;
    }

    /* Location column (col-sm-2) — when wrapped, give it full width */
    article.box.demo-card-hover .second-row .time .col-sm-2 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Location — center the flag+text nicely when wrapped */
    article.box.demo-card-hover .tender-location-enhanced {
        justify-content: flex-end !important;
        padding: 4px 0 !important;
    }

    /* Fix: Deadline badge (منتهي) aligns to LTR start instead of RTL end
       in the column flex layout. Use flex-start which in RTL column = right. */
    [dir="rtl"] article.box.demo-card-hover .deadline-info-inline {
        align-items: flex-start !important;
    }

    /* Fix: Calendar popup (caleran) overflows left side on mobile.
       The popup is 470px wide and anchored to the right-side calendar
       button, causing it to clip off-screen at negative left. */
    body .caleran-container.caleran-popup {
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, 0) !important;
        max-width: 95vw !important;
    }
}
