/**
 * DPS.MEDIA - Nexus Intelligence Mobile Navigation Stylesheet
 * Typography: 'Be Vietnam Pro' + 'JetBrains Mono'
 * Scope: @media (max-width: 991px) exclusively.
 */

:root {
    /* 1. Surfaces & Canvas */
    --dps-mob-bg: #f8fafc;
    --dps-mob-surface: #ffffff;
    --dps-mob-surface-low: #f1f5f9;
    --dps-mob-surface-container: #e2e8f0;
    
    /* 2. Typography Colors */
    --dps-mob-text-main: #0b0f19;
    --dps-mob-text-sub: #475569;
    --dps-mob-text-muted: #64748b;

    /* 3. Brand Foundations (Nexus Intelligence) */
    --dps-mob-primary-navy: #000033;
    --dps-mob-primary-deep: #131645;
    --dps-mob-primary-indigo: #2d3e80;

    /* Secondary: Growth & Action */
    --dps-mob-secondary-green: #059669;
    --dps-mob-secondary-dark: #047857;
    --dps-mob-secondary-light: #10b981;
    --dps-mob-secondary-bg: #ecfdf5;

    /* Tertiary: AI & Automation */
    --dps-mob-tertiary-purple: #6366f1;
    --dps-mob-tertiary-deep: #4338ca;
    --dps-mob-tertiary-bg: #eef2ff;

    /* 4. Strict Semantic Badge Colors */
    --dps-badge-hot-bg: #fef2f2;
    --dps-badge-hot-text: #dc2626;
    --dps-badge-hot-border: rgba(220, 38, 38, 0.25);

    --dps-badge-free-bg: #ecfdf5;
    --dps-badge-free-text: #059669;
    --dps-badge-free-border: rgba(5, 150, 105, 0.25);

    --dps-badge-ai-bg: #eef2ff;
    --dps-badge-ai-text: #4338ca;
    --dps-badge-ai-border: rgba(99, 102, 241, 0.25);

    --dps-badge-pro-bg: #000033;
    --dps-badge-pro-text: #ffffff;
    --dps-badge-pro-border: #000033;

    /* 5. Borders & Shapes */
    --dps-mob-border: rgba(0, 0, 0, 0.08);
    --dps-mob-radius-sm: 4px;
    --dps-mob-radius-md: 6px;
    --dps-mob-radius-lg: 8px;

    /* 6. Layout Metrics */
    --dps-mob-header-height: 60px;
    --dps-mob-bottom-bar-height: 64px;
    --dps-mob-touch-target: 44px;
}

/* ===================================================
   DESKTOP VIEWPORT (≥ 992px)
   Completely hide Mobile Navigation Root
   =================================================== */
@media (min-width: 992px) {
    .dps-mobile-nav-root {
        display: none !important;
    }
}

/* ===================================================
   MOBILE VIEWPORT (< 992px)
   Activate Clean Nexus Mobile Navigation System
   =================================================== */
@media (max-width: 991px) {
    /* HIDE THE OLD CLUNKY DESKTOP/ELEMENTOR HEADER ON MOBILE */
    .dps-desktop-header-wrapper,
    header.site-header,
    .bi-header-section,
    .mean-container,
    .mobile_menu_wrapper,
    .mobile_menu_overlay,
    div[data-elementor-type="header"],
    section[data-elementor-type="header"] {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    body {
        padding-bottom: var(--dps-mob-bottom-bar-height) !important;
    }

    .dps-mobile-nav-root {
        display: block;
        width: 100%;
        position: relative;
        font-family: 'Be Vietnam Pro', -apple-system, sans-serif;
        color: var(--dps-mob-text-main);
    }

    .dps-mobile-nav-root *:not(i):not([class*="fa-"]):not([class*="fa"]):not(.dps-mono) {
        font-family: 'Be Vietnam Pro', -apple-system, sans-serif;
        box-sizing: border-box;
    }

    /* Font Awesome Icon Family Protection */
    .dps-mobile-nav-root i.fa-solid,
    .dps-mobile-nav-root i.fas {
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
        font-weight: 900 !important;
    }
    .dps-mobile-nav-root i.fa-brands,
    .dps-mobile-nav-root i.fab {
        font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
        font-weight: 400 !important;
    }
    .dps-mobile-nav-root i.fa-regular,
    .dps-mobile-nav-root i.far {
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
        font-weight: 400 !important;
    }

    .dps-mono {
        font-family: 'JetBrains Mono', monospace !important;
    }

    /* 1. BADGE COMPONENT */
    .dps-badge {
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 9.5px;
        font-weight: 700;
        letter-spacing: 0.04em;
        padding: 3px 7px;
        border-radius: var(--dps-mob-radius-sm);
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        text-transform: uppercase;
        line-height: 1;
    }
    .dps-badge-hot {
        background: var(--dps-badge-hot-bg);
        color: var(--dps-badge-hot-text);
        border: 1px solid var(--dps-badge-hot-border);
    }
    .dps-badge-free {
        background: var(--dps-badge-free-bg);
        color: var(--dps-badge-free-text);
        border: 1px solid var(--dps-badge-free-border);
    }
    .dps-badge-ai {
        background: var(--dps-badge-ai-bg);
        color: var(--dps-badge-ai-text);
        border: 1px solid var(--dps-badge-ai-border);
    }
    .dps-badge-pro {
        background: var(--dps-badge-pro-bg);
        color: var(--dps-badge-pro-text);
        border: 1px solid var(--dps-badge-pro-border);
    }

    /* 2. UNIFIED 40x40 ICON CONTAINER */
    .dps-icon-box {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: var(--dps-mob-radius-lg);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: all 0.2s;
    }
    .dps-icon-navy {
        background: var(--dps-mob-surface-low);
        color: var(--dps-mob-primary-navy);
        border: 1px solid var(--dps-mob-border);
    }
    .dps-icon-green {
        background: var(--dps-mob-secondary-bg);
        color: var(--dps-mob-secondary-green);
        border: 1px solid rgba(5, 150, 105, 0.2);
    }
    .dps-icon-purple {
        background: var(--dps-mob-tertiary-bg);
        color: var(--dps-mob-tertiary-deep);
        border: 1px solid rgba(99, 102, 241, 0.2);
    }
    .dps-icon-blue {
        background: #eff6ff;
        color: #0284c7;
        border: 1px solid rgba(2, 132, 199, 0.2);
    }
    .dps-icon-red {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid rgba(220, 38, 38, 0.2);
    }

    /* 3. TOP MOBILE HEADER */
    .dps-top-header {
        height: var(--dps-mob-header-height);
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--dps-mob-border);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    .dps-header-logo {
        display: flex;
        align-items: center;
        text-decoration: none;
        height: var(--dps-mob-touch-target);
    }
    .dps-brand-logo-img {
        max-height: 32px;
        width: auto;
        display: block;
        object-fit: contain;
    }

    .dps-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .dps-header-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        border-radius: 50% !important;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.09) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
        color: var(--dps-mob-secondary-green) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        cursor: pointer !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
    }
    .dps-header-btn:active {
        background: #ffffff !important;
        border-color: var(--dps-mob-secondary-green) !important;
        transform: scale(0.95) !important;
    }

    /* 4. FULL-SCREEN SEARCH OVERLAY */
    .dps-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #ffffff;
        z-index: 99999;
        display: flex;
        flex-direction: column;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }
    .dps-search-overlay.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .dps-search-header {
        height: calc(var(--dps-mob-header-height) + 16px);
        padding: 16px 16px 0;
        display: flex;
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid var(--dps-mob-border);
        background: #ffffff;
    }
    .dps-search-input-wrap {
        flex: 1;
        height: 44px;
        background: var(--dps-mob-surface-low);
        border: 1.5px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-sm);
        padding: 0 12px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .dps-search-input-wrap:focus-within {
        border-color: var(--dps-mob-secondary-green);
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
    }
    .dps-search-input-wrap input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 13.5px;
        color: var(--dps-mob-text-main);
        width: 100%;
        font-weight: 500;
    }
    .dps-btn-close-search {
        height: 44px;
        padding: 0 12px;
        border: none;
        background: transparent;
        color: var(--dps-mob-secondary-green);
        font-size: 13.5px;
        font-weight: 700;
        cursor: pointer;
    }
    .dps-search-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
    }
    .dps-search-hints-title {
        font-size: 11px;
        font-weight: 700;
        color: var(--dps-mob-text-muted);
        text-transform: uppercase;
        margin-bottom: 10px;
    }

    /* Tags scroll with fade */
    .dps-tags-container {
        position: relative;
        margin-bottom: 20px;
    }
    .dps-tags-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 30px;
        background: linear-gradient(to right, transparent, #ffffff);
        pointer-events: none;
    }
    .dps-tags-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        padding-right: 20px;
    }
    .dps-tags-list::-webkit-scrollbar {
        display: none;
    }
    .dps-tag-item {
        padding: 6px 12px;
        background: var(--dps-mob-surface-low);
        border: 1px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-sm);
        font-size: 12px;
        color: var(--dps-mob-text-sub);
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }
    .dps-tag-item:active {
        background: var(--dps-mob-secondary-bg);
        color: var(--dps-mob-secondary-green);
    }

    /* 5. FULL-SCREEN APP DRAWER (SLIDES UP ON TAB CLICK) */
    .dps-app-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #f8fafc;
        z-index: 8000;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
        padding-bottom: var(--dps-mob-bottom-bar-height);
        overflow-y: auto;
        overflow-x: hidden;
    }
    .dps-app-drawer.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .dps-content-container {
        padding: 16px;
    }

    .dps-drawer-top-bar {
        height: 52px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--dps-mob-border);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: sticky;
        top: 0;
        z-index: 9000;
    }
    .dps-drawer-close-btn {
        width: 32px;
        height: 32px;
        border-radius: var(--dps-mob-radius-sm);
        background: var(--dps-mob-surface-low);
        border: 1px solid var(--dps-mob-border);
        color: var(--dps-mob-text-main);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        cursor: pointer;
    }

    /* 6. HORIZONTAL CHIPS BAR (FADE GRADIENT HINT) */
    .dps-category-header {
        padding: 10px 16px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--dps-mob-border);
        position: sticky;
        top: 52px;
        z-index: 8999;
    }
    .dps-chips-relative {
        position: relative;
        display: flex;
        align-items: center;
    }
    .dps-chips-relative::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 32px;
        background: linear-gradient(to right, transparent, #ffffff);
        pointer-events: none;
        z-index: 2;
    }
    .dps-chips-bar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        padding-right: 32px;
        width: 100%;
    }
    .dps-chips-bar::-webkit-scrollbar {
        display: none;
    }
    .dps-chip {
        padding: 8px 14px;
        background: var(--dps-mob-surface-low);
        border: 1px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-sm);
        color: var(--dps-mob-text-sub);
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s;
        flex-shrink: 0;
    }
    .dps-chip i {
        font-size: 13px;
    }
    .dps-chip.active {
        background: var(--dps-mob-primary-navy);
        color: #ffffff;
        border-color: var(--dps-mob-primary-navy);
        box-shadow: 0 2px 8px rgba(0, 0, 51, 0.2);
    }
    .dps-chip.active i {
        color: var(--dps-mob-secondary-light);
    }

    /* 7. FULL-WIDTH SERVICE CARDS */
    .dps-content-container {
        padding: 16px 16px 80px;
    }
    .dps-lead-banner {
        background: linear-gradient(135deg, #f0fdf4 0%, #eef2ff 100%) !important;
        border: 1px solid rgba(5, 150, 105, 0.2);
        border-radius: var(--dps-mob-radius-lg);
        padding: 14px;
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .dps-banner-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--dps-mob-primary-navy);
        margin-bottom: 2px;
    }
    .dps-banner-desc {
        font-size: 11.5px;
        color: var(--dps-mob-text-sub);
    }
    .dps-service-stack {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .dps-service-card {
        background: #ffffff !important;
        border: 1px solid var(--dps-mob-border) !important;
        border-radius: var(--dps-mob-radius-sm);
        padding: 12px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-decoration: none;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        transition: all 0.2s;
        min-height: var(--dps-mob-touch-target);
    }
    .dps-service-card:active {
        background: var(--dps-mob-surface-low) !important;
        border-color: var(--dps-mob-secondary-green) !important;
        transform: translateX(3px);
    }
    .dps-card-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .dps-card-title {
        font-size: 13.5px;
        font-weight: 700;
        color: var(--dps-mob-primary-navy);
        line-height: 1.35;
    }
    .dps-card-sub {
        font-size: 11px;
        color: var(--dps-mob-text-sub);
        margin-top: 2px;
    }

    /* 8. CONTACT HUB VIEW */
    .dps-hub-lead {
        background: #ffffff !important;
        border: 1px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-lg);
        padding: 16px;
        margin-bottom: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    .dps-hub-company {
        font-size: 15px;
        font-weight: 700;
        color: var(--dps-mob-primary-navy);
        margin-bottom: 4px;
    }
    .dps-hub-addr {
        font-size: 12px;
        color: var(--dps-mob-text-sub);
        line-height: 18px;
        margin-bottom: 8px;
    }
    .dps-extra-card {
        background: #ffffff;
        border: 1px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-lg);
        padding: 14px;
        margin-top: 14px;
    }
    .dps-extra-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--dps-mob-primary-navy);
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    /* Mobile Contact Hub Social Networks Card */
    .dps-mobile-socials-card {
        background: #ffffff;
        border: 1px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-lg);
        padding: 14px 16px;
        margin-bottom: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }
    .dps-mobile-socials-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--dps-mob-primary-navy);
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .dps-mobile-socials-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }
    .dps-mob-soc-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        background: var(--dps-mob-surface-low);
        border: 1px solid var(--dps-mob-border);
        border-radius: var(--dps-mob-radius-sm);
        text-decoration: none;
        transition: all 0.2s;
    }
    .dps-mob-soc-item:active {
        background: #ffffff;
        border-color: var(--dps-mob-secondary-green);
        transform: scale(0.98);
    }
    .dps-mob-soc-icon {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-size: 11px;
        flex-shrink: 0;
    }
    .dps-mob-soc-name {
        font-size: 12px;
        font-weight: 700;
        color: var(--dps-mob-text-main);
    }

    /* 9. STICKY 5-TAB BOTTOM NAVIGATION BAR */
    .dps-bottom-nav-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: var(--dps-mob-bottom-bar-height);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--dps-mob-border);
        box-shadow: 0 -4px 16px rgba(0, 0, 51, 0.05);
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0 4px 6px;
        z-index: 9999;
    }
    .dps-nav-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--dps-mob-text-muted);
        text-decoration: none;
        cursor: pointer;
        position: relative;
        padding: 6px 0;
        min-height: var(--dps-mob-touch-target);
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .dps-nav-tab i {
        font-size: 18px;
        transition: transform 0.2s;
    }
    .dps-nav-tab span {
        font-size: 11px;
        font-weight: 600;
    }
    .dps-nav-tab.active {
        color: var(--dps-mob-primary-navy);
    }
    .dps-nav-tab.active i {
        color: var(--dps-mob-secondary-green);
        transform: translateY(-2px);
    }
    .dps-nav-tab.active span {
        color: var(--dps-mob-primary-navy);
        font-weight: 700;
    }

    /* Center AI Studio Tab */
    .dps-nav-tab.dps-center-cta {
        transform: translateY(-6px);
    }
    .dps-center-cta .dps-cta-box {
        width: 44px;
        height: 44px;
        border-radius: var(--dps-mob-radius-sm);
        background: var(--dps-mob-surface-low);
        border: 1px solid var(--dps-mob-border);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--dps-mob-tertiary-deep);
        transition: all 0.2s;
        position: relative;
    }
    .dps-center-cta .dps-cta-box i {
        font-size: 18px;
        color: var(--dps-mob-tertiary-deep);
    }
    .dps-center-cta .dps-cta-badge {
        position: absolute;
        top: -5px;
        right: -5px;
    }
    .dps-nav-tab.dps-center-cta.active .dps-cta-box {
        background: var(--dps-mob-primary-navy);
        border-color: var(--dps-mob-tertiary-purple);
        box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    }
    .dps-nav-tab.dps-center-cta.active .dps-cta-box i {
        color: #ffffff;
    }
    .dps-nav-tab.dps-center-cta.active span {
        color: var(--dps-mob-primary-navy);
        font-weight: 700;
    }
}
