/* Centralized Navigation Styles */

/* =============================================
   DESKTOP STYLES - DO NOT MODIFY
   ============================================= */

/* RTL specific styles for desktop */
html[dir="rtl"] .header .container {
    text-align: right;
}

html[dir="rtl"] .main-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .menu-items {
    margin-right: 0;
    margin-left: auto;
}

html[dir="rtl"] .other-menu {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .mega-menu .row {
    direction: rtl;
}

html[dir="rtl"] .sub-menu {
    text-align: right;
}

/* Desktop header height - KEEP AS 120px */
@media (min-width: 992px) {
    header.header.header-home {
        height: 120px;
    }
}

/* Ensure only one menu shows at a time */
.nav-wrapper {
    display: none;
}

.nav-wrapper.active {
    display: block;
}

@media (max-width: 992px) {
    .main-nav .menu-items {
        display: none !important;
    }
}

@media (min-width: 993px) {
    .nav-wrapper {
        display: none !important;
    }

    .main-nav .menu-items {
        display: flex !important;
    }
}

.nav-wrapper.show-menu {
    display: block;
}

/* RTL Header Layout Overrides */
[dir="rtl"] .header-container.container {
    direction: ltr !important;
}

[dir="rtl"] .menu-items {
    margin-left: 0 !important;
}

/* LTR Header Layout Overrides */
[dir="ltr"] .header-container.container {
    direction: ltr !important;
}

[dir="rtl"] ul#menu-main-menu {
    direction: rtl !important;
}

header.header.header-home,
ul.sub-menu,
.mega-menu {
    background-color: white !important;
}

a.menu-link,
a.sub-item-link {
    color: black !important;
}

/* Default: hide other-menu (mobile toggle area) */
.header .other-menu {
    display: none !important;
}

/* Show other-menu on screens smaller than 992px */
@media (max-width: 991.98px) {
    .header .other-menu {
        display: -webkit-box !important;
    }
}

@media (min-width: 992px) {
    .header .other-menu {
        display: none !important;
    }
}

/* Products Mega Menu (Desktop) */
.products-mega-menu {
    position: absolute;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 900px;
    padding: 25px;
    z-index: 1001;
    left: 0;
    top: 100%;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.companies-column {
    border-right: 1px solid #e0e0e0;
    padding-right: 20px;
}

.products-display-column {
    padding-left: 20px;
}

.companies-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.company-list-item {
    margin-bottom: 8px;
}

.company-link {
    color: #555;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.company-link:hover,
.company-list-item.active .company-link {
    color: #007bff;
    background-color: #f8f9fa;
    border-left-color: #007bff;
}

.products-display {
    min-height: 300px;
}

.products-placeholder {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
}

.hw-section,
.sw-section {
    margin-bottom: 25px;
}

.hw-section h4,
.sw-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-list li {
    margin-bottom: 8px;
}

.product-link {
    color: #555;
    text-decoration: none;
    padding: 6px 12px;
    display: block;
    border-radius: 4px;
    transition: all 0.2s;
}

.product-link:hover {
    color: #007bff;
    background-color: #f8f9fa;
    padding-left: 20px;
}

[dir="rtl"] .row.mt-50.home-v,
.row.mt-50.home-li {
    direction: ltr !important;
}

.header .menu-items .menu-item .mega-menu {
    top: calc(90% + 5px);
}

@media (min-width: 990px) {
    div .spotlight {
        display: flex;
        justify-content: end;
    }
}

/* =============================================
   MOBILE STYLES ONLY
   ============================================= */

@media (max-width: 991px) {
    /* Mobile header height */
    header.header.header-home {
        height: 80px;
    }
}

/* Mobile Menu specific elements */
.nav-wrapper.show-menu {
    width: 100%;
    max-width: 400px;
}

@media (max-width: 767px) {
    .nav-wrapper.show-menu {
        max-width: 100%;
    }
}

/* Nav Toggle Bar */
.nav-toggle {
    height: 55px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: #000;
    color: #fff;
    position: relative;
}

/* LTR: [<] Title [X] */
html[dir="ltr"] .nav-toggle {
    flex-direction: row;
}

html[dir="ltr"] .nav-toggle .nav-back {
    order: 1;
}

html[dir="ltr"] .nav-toggle .nav-title {
    order: 2;
    margin-inline-start: 2rem;
}

html[dir="ltr"] .nav-toggle .nav-close {
    order: 3;
}

/* RTL: [X] Title [>] */
html[dir="rtl"] .nav-toggle {
    flex-direction: row;
}

html[dir="rtl"] .nav-toggle .nav-back {
    order: 3;
}

html[dir="rtl"] .nav-toggle .nav-title {
    order: 2;
}

html[dir="rtl"] .nav-toggle .nav-close {
    order: 1;
}

span.nav-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 10px;
    color: #fff;
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[dir="ltr"] span.nav-title {
    text-align: left;
    flex-direction: row;
}

html[dir="rtl"] span.nav-title {
    text-align: right;
    flex-direction: row;
    text-align: right;
    width: 66%;
    align-content: revert-layer;
    align-items: flex-start;
    display: flow;
}

/* Breadcrumb items in nav-title */
.nav-title .breadcrumb-item {
    color: #fff;
    font-size: 0.95rem;
}

.nav-title .breadcrumb-item.clickable {
    cursor: pointer;
    opacity: 0.7;
}

.nav-title .breadcrumb-item.clickable:hover {
    opacity: 1;
    text-decoration: underline;
}

.nav-title .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0 2px;
}

/* span.breadcrumb-item.clickable {
    
       margin-inline-start: 2rem;

} */

/* Nav Back Button - CLEAN ICON */
span.nav-back {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    position: relative;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 18px;
}

/* Remove ALL background images and pseudo elements from theme */
span.nav-back,
span.nav-back * {
    background-image: none !important;
}

span.nav-back::before,
span.nav-back::after {
    content: none !important;
    display: none !important;
}

/* Add Font Awesome icon via JavaScript instead */

/* Nav Close Button */
span.nav-close {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 20px;
}

/* Base Navigation Wrapper */
.nav-wrapper {
    position: fixed;
    top: 80px;
    width: 100%;
    max-width: 400px;
    height: calc(100vh - 80px);
    background: #3d4953;
    z-index: 1000;
    transition: transform 0.3s ease;
    display: none;
    overflow-y: auto;
}

html[dir="ltr"] .nav-wrapper {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

html[dir="rtl"] .nav-wrapper {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

.nav-wrapper.show-menu,
.nav-wrapper.active {
    display: block !important;
    transform: translateX(0) !important;
}

/* Mobile Menu Items */
.nav-wrapper nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

a.mobile-item {
    font-size: 1rem;
    color: #fff;
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

a.mobile-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

#industryList1 li a {
    color: #fff !important;
    font-size: 0.95rem;
    padding: 10px 20px;
}

/* Dropdown Items */
li.has-dropdown > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 15px;
}

/* Remove theme icons - override theme-style.min.css */
.nav-wrapper nav li.has-dropdown > a::before,
.nav-wrapper nav li.has-dropdown > a::after,
li.has-dropdown > a::before,
li.has-dropdown > a::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    visibility: hidden !important;
}

/* Main menu items with dropdown arrow */
.nav-wrapper nav > ul > li.has-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-wrapper nav > ul > li.has-dropdown > a .menu-arrow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

html[dir="ltr"] .nav-wrapper nav > ul > li.has-dropdown > a .menu-arrow {
    position: absolute;
    right: 15px;
    left: auto;
}

.nav-wrapper nav > ul > li.has-dropdown > a .menu-arrow i {
    font-size: 12px;
}

html[dir="rtl"] .nav-wrapper nav > ul > li.has-dropdown > a {
    flex-direction: row;
    position: relative;
}

html[dir="rtl"] .nav-wrapper nav > ul > li.has-dropdown > a .menu-arrow {
    position: absolute;
    left: 15px;
    right: auto;
}

html[dir="rtl"] .nav-wrapper nav > ul > li.has-dropdown > a span:not(.menu-arrow) {
    text-align: right;
    width: 100%;
    padding-right: 0;
}

/* Mobile Submenu Containers */
ul#mobile-products-container,
ul#industryList1,
ul#mobile-list-lang {
    height: auto;
    max-height: none;
    overflow: visible;
    padding-left: 0;
    padding-top: 55px;
    display: none;
    margin-top: 0;
}

.nav-wrapper nav li.nav-dropdown-open > ul {
    display: block !important;
}

/* Company Mobile Items */
li.company-mobile-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

a.company-mobile-link {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    position: relative;
    width: 100%;
}

html[dir="ltr"] a.company-mobile-link {
    flex-direction: row;
    justify-content: space-between;
}

html[dir="rtl"] a.company-mobile-link {
    flex-direction: row;
    justify-content: space-between;
}

html[dir="rtl"] a.company-mobile-link .company-text {
    text-align: right;
    order: 2;
}

html[dir="rtl"] a.company-mobile-link .mobile-arrow {
    /* margin-left: auto; */
    margin-right: 0;
    order: 1;
}

a.company-mobile-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Company Submenu */
.company-mobile-submenu {
    display: none;
    background-color: rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative !important;
}

html[dir="ltr"] .company-mobile-submenu {
    padding-left: 15px;
}

html[dir="rtl"] .company-mobile-submenu {
    padding-right: 15px;
}

.company-mobile-submenu.active,
.company-mobile-item.open > .company-mobile-submenu {
    display: block !important;
}

/* Product Category (Hardware/Software) */
.product-category-link {
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    width: 100%;
}

html[dir="ltr"] .product-category-link {
    border-left: 3px solid #007bff;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
}

html[dir="ltr"] .product-category-link .category-text {
    text-align: left;
    width: 100%;
}

html[dir="ltr"] .product-category-link .mobile-arrow {
    position: absolute !important;
    right: 15px !important;
    left: auto !important;
}

html[dir="rtl"] .product-category-link {
    border-right: 3px solid #007bff;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
}

html[dir="rtl"] .product-category-link .category-text {
    text-align: right;
    width: 100%;
}

html[dir="rtl"] .product-category-link .mobile-arrow {
    position: absolute;
    left: 15px;
    right: auto;
}

.product-category-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Product List (under category) - appears inline, not as slide */
.mobile-product-list {
    display: none;
    background-color: rgba(0, 0, 0, 0.25);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
}

html[dir="ltr"] .mobile-product-list {
    padding-left: 15px;
}

html[dir="rtl"] .mobile-product-list {
    padding-right: 15px;
}

.mobile-product-list.active,
.product-category-item.open > .mobile-product-list,
.product-category-item.open .mobile-product-list,
li.open > .mobile-product-list {
    display: block !important;
}

/* Individual Product Links */
a.mobile-product-link {
    color: #ccc;
    text-decoration: none;
    padding: 10px 25px;
    display: block;
    font-size: 0.9rem;
    transition: all 0.2s;
}

html[dir="ltr"] a.mobile-product-link {
    border-left: 2px solid transparent;
}

html[dir="rtl"] a.mobile-product-link {
    border-right: 2px solid transparent;
}

a.mobile-product-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

html[dir="ltr"] a.mobile-product-link:hover {
    border-left-color: #007bff;
    padding-left: 30px;
}

html[dir="rtl"] a.mobile-product-link:hover {
    border-right-color: #007bff;
    padding-right: 30px;
}

/* Arrow Icons for Expandable Items */
.mobile-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.mobile-arrow i {
    font-size: 12px;
}

/* Rotate arrow when open */
.company-mobile-item.open > a .mobile-arrow,
li.open > .product-category-link .mobile-arrow {
    transform: rotate(90deg);
}

html[dir="rtl"] .company-mobile-item.open > a .mobile-arrow,
html[dir="rtl"] li.open > .product-category-link .mobile-arrow {
    transform: rotate(-90deg);
}

/* =============================================
   BREADCRUMB NAVIGATION
   ============================================= */

.mobile-breadcrumb {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.8rem;
    color: #aaa;
    gap: 5px;
}

.mobile-breadcrumb.active {
    display: flex;
}

.mobile-breadcrumb-item {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-breadcrumb-item:hover {
    color: #fff;
}

.mobile-breadcrumb-item.current {
    color: #fff;
    font-weight: 600;
}

.mobile-breadcrumb-separator {
    color: #666;
    margin: 0 2px;
}

html[dir="ltr"] .mobile-breadcrumb-separator::after {
    content: "›";
}

html[dir="rtl"] .mobile-breadcrumb-separator::after {
    content: "‹";
}

html[dir="rtl"] .mobile-breadcrumb {
    flex-direction: row-reverse;
}

/* =============================================
   RTL SPECIFIC FIXES
   ============================================= */

html[dir="rtl"] .nav-wrapper nav ul {
    text-align: right;
}

html[dir="rtl"] a.mobile-item {
    text-align: right;
}

html[dir="rtl"] a.company-mobile-link {
    flex-direction: row-reverse;
}

html[dir="rtl"] .product-category-link {
    flex-direction: row-reverse;
}

/* Language Selector */
ul#mobile-list-lang {
    background: rgba(0, 0, 0, 0.1);
}

ul#mobile-list-lang li {
    margin: 0;
}

ul#mobile-list-lang li a {
    padding: 12px 25px;
    display: block;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

ul#mobile-list-lang li a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Fix spacing between items */
li.ii {
    margin: 0;
}

li.ii a {
    padding: 8px 25px;
}
