/**
 * Navigation Base Styles
 * Base navigation component styles
 * Navigation is separate from Header
 */

/* ============================================
   Desktop Navigation
   ============================================ */
.desktop-navigation {
  display: none;
  width: 100%;
  background-color: var(--nav-primary-color);
  color: var(--nav-text-color);
  margin-top: 10px;
}

.desktop-navigation .navigation-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
}

/* ============================================
   Navigation Menu - Desktop Only
   ============================================ */
/* Base styles for nav-menu - will be overridden by mobile */
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
}

/* Desktop Navigation Menu Styles */
.desktop-navigation .nav-menu {
  display: flex;
  gap: var(--spacing-unit);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  height: 100%;
}

.desktop-navigation .nav-menu li {
  position: relative;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.desktop-navigation .nav-menu a {
  padding: 10px 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-ar);
  text-decoration: none;
  transition: var(--transition-default);
  color: var(--color-primary);
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  border-radius: 4px;
  height: auto;
  min-height: 40px;
}

.desktop-navigation .nav-menu a:hover {
  color: var(--nav-hover-color);
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Submenu styles - white text for dropdowns - Desktop only */
.site-header .desktop-navigation .nav-menu .sub-menu a,
header#site-header .desktop-navigation .nav-menu .sub-menu a {
  color: #ffffff;
}

.site-header .desktop-navigation .nav-menu .sub-menu a:hover,
header#site-header .desktop-navigation .nav-menu .sub-menu a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Desktop Navigation Styles
   ============================================ */
@media (min-width: 992px) {
  .desktop-navigation .nav-menu a {
    color: var(--color-primary);
    font-weight: 600;
    padding: 12px 20px;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
  }

  .desktop-navigation .nav-menu a:hover {
    color: var(--nav-hover-color);
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .desktop-navigation {
    background-color: transparent;
    box-shadow: none;
    height: 60px;
    display: flex;
    align-items: center;
  }

  .desktop-navigation .nav-menu {
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0;
  }

  .desktop-navigation .nav-menu li {
    height: 100%;
    display: flex;
    align-items: center;
  }
}
/* ============================================
   Tree Menu Panel - Desktop Sidebar Menu
   ============================================ */
#tree-menu-panel,
.tree-menu-panel {
  /* Make panel scroll with the page instead of being fixed */
  position: sticky;
  /* Now inside header, so position at top of header container */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #ffffff;
  /* remove outer shadow while keeping the background */
  box-shadow: none;
  /* Lower z-index to stay below header elements (branding, navigation) */
  z-index: 5;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
  margin-top: 0;
  padding: 0;
  /* Allow page scroll; let content define its height */
  max-height: none;
  overflow: visible;
}

#tree-menu-panel.menu-open,
.tree-menu-panel.menu-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.tree-menu-panel-content {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  /* add extra top padding to shift menu items downward */
  padding: 160px 60px 40px 60px;
  box-sizing: border-box;
  /* Let content flow naturally */
  display: flex;
  flex-direction: column;
  gap: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}

.tree-menu-panel-content-list {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
}

.tree-menu-panel-content-quick-link {
  width: 100%;
  display: none; /* Hidden by default, shown in desktop */
}

.tree-menu-panel-content-quick-link .sv-text-portlet-content {
  width: 100%;
}

.quick-links-section {
  margin-bottom: 32px;
}

.quick-links-section:last-child {
  margin-bottom: 0;
}

.quick-links-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 16px 0;
  padding: 0;
  line-height: 1.4;
}

.quick-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick-links-list li {
  margin: 0 0 12px 0;
  padding: 0;
}

.quick-links-list li:last-child {
  margin-bottom: 0;
}

.quick-links-list a {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-base);
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.6;
  padding: 8px 16px;
  margin: 0 -16px;
  border-radius: 4px;
  position: relative;
}

.quick-links-list a:hover {
  color: var(--color-primary);
  background-color: rgba(0, 47, 95, 0.06);
  text-decoration: none;
  padding-left: 24px;
}

[dir="rtl"] .quick-links-list a:hover {
  padding-left: 16px;
  padding-right: 24px;
}

.quick-links-list a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.quick-links-list a:focus:not(:focus-visible) {
  outline: none;
}

.tree-menu-panel-content-list .nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.tree-menu-panel-content-list .nav-menu > li {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tree-menu-panel-content-list .nav-menu > li:last-child {
  border-bottom: none;
}

.tree-menu-panel-content-list .nav-menu > li > .d-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 50px;
}

/* This rule is now handled below with more specific selector for menu-item-has-children */

/* Regular links without submenus - should work normally */
.tree-menu-panel-content-list .nav-menu > li:not(.menu-item-has-children) > a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.5;
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  letter-spacing: 0.3px;
  cursor: pointer;
}

/* Links with submenus - inside d-flex container */
.tree-menu-panel-content-list
  .nav-menu
  > li.menu-item-has-children
  > .d-flex
  > a.nav-link {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.5;
  flex: 1;
  height: 100%;
  box-sizing: border-box;
  letter-spacing: 0.3px;
  cursor: pointer;
}

/* Hover effects for regular links (without submenus) */
.tree-menu-panel-content-list
  .nav-menu
  > li:not(.menu-item-has-children)
  > a:hover {
  background-color: rgba(0, 47, 95, 0.06);
  color: var(--color-primary);
}

/* Hover effects for links with submenus */
.tree-menu-panel-content-list
  .nav-menu
  > li.menu-item-has-children
  > .d-flex
  > a.nav-link:hover {
  background-color: rgba(0, 47, 95, 0.06);
  color: var(--color-primary);
}

.tree-menu-panel-content-list
  .nav-menu
  > li.menu-item-has-children
  > .d-flex:hover {
  background-color: rgba(0, 47, 95, 0.06);
}

/* RTL hover effects for regular links (without submenus) */
[dir="rtl"]
  .tree-menu-panel-content-list
  .nav-menu
  > li:not(.menu-item-has-children)
  > a:hover {
  background-color: rgba(0, 47, 95, 0.06);
  color: var(--color-primary);
}

/* RTL hover effects for links with submenus */
[dir="rtl"]
  .tree-menu-panel-content-list
  .nav-menu
  > li.menu-item-has-children
  > .d-flex
  > a.nav-link:hover {
  background-color: rgba(0, 47, 95, 0.06);
  color: var(--color-primary);
}

/* Navigation button styles - applies to all levels */
.tree-menu-panel-content-list .nav-button,
.tree-menu-panel-content-list .sub-menu .nav-button,
.tree-menu-panel-content-list .sub-menu .sub-menu .nav-button {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  color: var(--color-primary);
  border-radius: 4px;
}

.tree-menu-panel-content-list .nav-button:hover {
  background-color: rgba(0, 47, 95, 0.06);
}

/* Only show outline on keyboard focus (accessibility) */
.tree-menu-panel-content-list .nav-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  background-color: rgba(0, 47, 95, 0.06);
}

/* Remove outline on mouse click */
.tree-menu-panel-content-list .nav-button:focus:not(:focus-visible) {
  outline: none;
}

.tree-menu-panel-content-list .sub-menu .nav-button:hover,
.tree-menu-panel-content-list .sub-menu .nav-button:focus-visible,
.tree-menu-panel-content-list .sub-menu .sub-menu .nav-button:hover,
.tree-menu-panel-content-list .sub-menu .sub-menu .nav-button:focus-visible {
  background-color: rgba(0, 47, 95, 0.06);
}

.tree-menu-panel-content-list .sub-menu .nav-button:focus:not(:focus-visible),
.tree-menu-panel-content-list .sub-menu .sub-menu .nav-button:focus:not(:focus-visible) {
  outline: none;
}

.tree-menu-panel-content-list .nav-button .icon {
  width: 24px;
  height: 24px;
  display: block;
  position: relative;
  transition: transform 0.3s ease;
  fill: currentColor;
}

.tree-menu-panel-content-list .nav-button.icon-down .icon {
  transform: rotate(0deg);
}

.tree-menu-panel-content-list .nav-button.icon-up .icon {
  transform: rotate(180deg);
}

/* RTL: Flip icon direction for better visual consistency */
body[dir="rtl"] .tree-menu-panel-content-list .nav-button .icon,
[dir="rtl"] .tree-menu-panel-content-list .nav-button .icon,
.rtl-body .tree-menu-panel-content-list .nav-button .icon {
  transform: scaleX(-1); /* Flip horizontally for RTL */
}

body[dir="rtl"] .tree-menu-panel-content-list .nav-button.icon-up .icon,
[dir="rtl"] .tree-menu-panel-content-list .nav-button.icon-up .icon,
.rtl-body .tree-menu-panel-content-list .nav-button.icon-up .icon {
  transform: scaleX(-1) rotate(180deg); /* Flip and rotate for RTL */
}

.tree-menu-panel-content-list .nav-button .icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Toggle label text (+ / -) */
.tree-menu-panel-content-list .nav-button .toggle-label {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
  user-select: none;
}

/* Remove default button focus outline on click */
.site-header .tree-menu-panel-content-list .nav-button:active,
header#site-header .tree-menu-panel-content-list .nav-button:active {
  outline: none;
  box-shadow: none;
}

/* Remove outline when button is clicked (but keep for keyboard navigation) */
.tree-menu-panel-content-list .nav-button:focus {
  outline: none;
}

.tree-menu-panel-content-list .nav-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Submenu styles for tree menu panel */
.tree-menu-panel-content-list .nav-menu .sub-menu {
  position: static;
  display: none;
  background-color: rgba(0, 47, 95, 0.03);
  margin: 0;
  padding: 0;
  box-shadow: none;
  width: 100%;
  list-style: none;
  min-width: auto;
  top: auto;
  right: auto;
  left: auto;
}

/* Remove hover behavior - use click only */
/* Submenus only show when menu-open class is present */
/* Level 1 */
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-open > .sub-menu,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-open > .sub-menu {
  display: block;
}

/* Level 2 */
.site-header .tree-menu-panel-content-list .nav-menu .sub-menu li.menu-open > .sub-menu,
header#site-header .tree-menu-panel-content-list .nav-menu .sub-menu li.menu-open > .sub-menu {
  display: block;
}

/* Level 3 - أبناء الأبناء */
.site-header .tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu li.menu-open > .sub-menu,
header#site-header .tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu li.menu-open > .sub-menu {
  display: block;
}

/* Additional coverage for all nested levels */
.site-header .tree-menu-panel-content-list ul.sub-menu li.menu-open > ul.sub-menu,
header#site-header .tree-menu-panel-content-list ul.sub-menu li.menu-open > ul.sub-menu {
  display: block;
}

/* Ensure submenus are hidden by default (unless menu-open) */
/* Level 1 */
.site-header .tree-menu-panel-content-list .nav-menu > li:not(.menu-open) > .sub-menu,
header#site-header .tree-menu-panel-content-list .nav-menu > li:not(.menu-open) > .sub-menu {
  display: none;
}

/* Level 2 */
.site-header .tree-menu-panel-content-list .nav-menu .sub-menu li:not(.menu-open) > .sub-menu,
header#site-header .tree-menu-panel-content-list .nav-menu .sub-menu li:not(.menu-open) > .sub-menu {
  display: none;
}

/* Level 3 - أبناء الأبناء */
.site-header .tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu li:not(.menu-open) > .sub-menu,
header#site-header .tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu li:not(.menu-open) > .sub-menu {
  display: none;
}

/* Additional coverage for all nested levels */
.site-header .tree-menu-panel-content-list ul.sub-menu li:not(.menu-open) > ul.sub-menu,
header#site-header .tree-menu-panel-content-list ul.sub-menu li:not(.menu-open) > ul.sub-menu {
  display: none;
}

.tree-menu-panel-content-list .nav-menu .sub-menu li {
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin: 0;
  padding: 0;
  position: relative;
}

.tree-menu-panel-content-list .nav-menu .sub-menu li:last-child {
  border-bottom: none;
}

.tree-menu-panel-content-list .nav-menu .sub-menu li > .d-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 50px;
}

.tree-menu-panel-content-list .nav-menu .sub-menu li > .d-flex > a.nav-link {
  display: flex;
  align-items: center;
  padding: 0 24px 0 56px;
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text-base);
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.6;
  flex: 1;
  height: 100%;
  box-sizing: border-box;
  white-space: normal;
}

.tree-menu-panel-content-list .nav-menu .sub-menu a {
  display: flex;
  align-items: center;
  padding: 0 24px 0 56px;
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text-base);
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.6;
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  white-space: normal;
}

[dir="rtl"] .tree-menu-panel-content-list .nav-menu .sub-menu a,
[dir="rtl"]
  .tree-menu-panel-content-list
  .nav-menu
  .sub-menu
  li
  > .d-flex
  > a.nav-link {
  padding-left: 24px;
  padding-right: 56px;
}

.tree-menu-panel-content-list .nav-menu .sub-menu a:hover,
.tree-menu-panel-content-list
  .nav-menu
  .sub-menu
  li
  > .d-flex
  > a.nav-link:hover {
  background-color: rgba(0, 47, 95, 0.08);
  color: var(--color-primary);
}

.tree-menu-panel-content-list .nav-menu .sub-menu li > .d-flex:hover {
  background-color: rgba(0, 47, 95, 0.08);
}

[dir="rtl"] .tree-menu-panel-content-list .nav-menu .sub-menu a:hover,
[dir="rtl"]
  .tree-menu-panel-content-list
  .nav-menu
  .sub-menu
  li
  > .d-flex
  > a.nav-link:hover {
  background-color: rgba(0, 47, 95, 0.08);
  color: var(--color-primary);
}

/* Third level submenu */
.tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu {
  background-color: rgba(0, 47, 95, 0.05);
  position: static;
  top: auto;
  right: auto;
  left: auto;
}

.tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu li > .d-flex {
  height: 50px;
}

.tree-menu-panel-content-list
  .nav-menu
  .sub-menu
  .sub-menu
  li
  > .d-flex
  > a.nav-link {
  padding-left: 80px;
  font-size: 16px;
  color: var(--color-text-base);
}

.tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu a {
  padding-left: 80px;
  font-size: 16px;
  color: var(--color-text-base);
  height: 50px;
}

[dir="rtl"] .tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu a,
[dir="rtl"]
  .tree-menu-panel-content-list
  .nav-menu
  .sub-menu
  .sub-menu
  li
  > .d-flex
  > a.nav-link {
  padding-left: 24px;
  padding-right: 80px;
}

.tree-menu-panel-content-list .nav-menu .sub-menu .sub-menu a:hover {
  background-color: rgba(0, 47, 95, 0.08);
  color: var(--color-primary);
  padding-left: 88px;
}

[dir="rtl"]
  .tree-menu-panel-content-list
  .nav-menu
  .sub-menu
  .sub-menu
  a:hover {
  padding-left: 24px;
  padding-right: 88px;
}

/* ============================================
   Disable Parent Links - Prevent Clicking
   ============================================ */

/* Disable ONLY parent links with maximum specificity */
/* Desktop Navigation - Only direct children, not nested */
.site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a,
header#site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a {
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
  color: var(--color-primary);
  opacity: var(--nav-disabled-opacity);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a:hover,
.site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a:focus,
.site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a:active,
header#site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a:hover,
header#site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a:focus,
header#site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a:active {
  color: var(--color-primary);
  opacity: var(--nav-disabled-opacity);
  background-color: transparent;
  transform: none;
  box-shadow: none;
  text-decoration: none;
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
}

/* Tree Menu Panel - Disable ONLY top-level parent links */
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link {
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
  opacity: var(--nav-disabled-opacity);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a:hover,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a:hover,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link:hover,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a:focus,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a:focus,
.site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link:focus,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a:hover,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a:hover,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link:hover,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a:focus,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a:focus,
header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link:focus {
  opacity: var(--nav-disabled-opacity);
  background-color: transparent;
  color: var(--color-primary);
  text-decoration: none;
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
}

/* Mobile Navigation - Disable ONLY top-level parent links */
.site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a,
header#site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a {
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
  opacity: var(--nav-disabled-opacity);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a:hover,
.site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a:focus,
.site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a:active,
header#site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a:hover,
header#site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a:focus,
header#site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a:active {
  opacity: var(--nav-disabled-opacity);
  background-color: transparent;
  color: inherit;
  text-decoration: none;
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
}

/* Universal disable for ONLY direct menu-item-has-children links (not nested) */
.site-header .nav-menu > li.menu-item-has-children > a,
header#site-header .nav-menu > li.menu-item-has-children > a {
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
  opacity: var(--nav-disabled-opacity);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.site-header .nav-menu > li.menu-item-has-children > a:hover,
.site-header .nav-menu > li.menu-item-has-children > a:focus,
.site-header .nav-menu > li.menu-item-has-children > a:active,
header#site-header .nav-menu > li.menu-item-has-children > a:hover,
header#site-header .nav-menu > li.menu-item-has-children > a:focus,
header#site-header .nav-menu > li.menu-item-has-children > a:active {
  opacity: var(--nav-disabled-opacity);
  text-decoration: none;
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
}

/* RTL Support - Ensure disabled links work correctly in RTL */
[dir="rtl"] .site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] .site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] .site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a,
[dir="rtl"] .site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link,
[dir="rtl"] .site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] .site-header .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] header#site-header .desktop-navigation .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a,
[dir="rtl"] header#site-header .tree-menu-panel-content-list .nav-menu > li.menu-item-has-children > .d-flex > a.nav-link,
[dir="rtl"] header#site-header .mobile-navigation .nav-menu > li.menu-item-has-children > a,
[dir="rtl"] header#site-header .nav-menu > li.menu-item-has-children > a {
  pointer-events: var(--nav-disabled-pointer-events);
  cursor: var(--nav-disabled-cursor);
  opacity: var(--nav-disabled-opacity);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Accessibility - Add visual indicator for screen readers */
.nav-menu > li.menu-item-has-children > a::after {
  content: " (has submenu)";
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Focus styles - Ensure focus goes to toggle button instead */
.site-header .nav-menu > li.menu-item-has-children:focus-within > a,
header#site-header .nav-menu > li.menu-item-has-children:focus-within > a {
  outline: none;
}

/* Removed focus outline for nav-button - no outline on focus */
.site-header .nav-menu > li.menu-item-has-children .nav-button:focus,
header#site-header .nav-menu > li.menu-item-has-children .nav-button:focus {
  outline: none;
}

/* ============================================
   Desktop Display
   ============================================ */
@media (min-width: 992px) {
  /* Desktop navigation is hidden - tree menu panel is used instead */
  .desktop-navigation {
    display: none;
  }

  /* Show hamburger menu in desktop */
  .hamburger-menu-toggle {
    display: flex;
  }

  /* Hide mobile navigation in desktop */
  .site-header .mobile-navigation,
  header#site-header .mobile-navigation {
    display: none;
  }

  .site-header .mobile-menu-overlay,
  header#site-header .mobile-menu-overlay {
    display: none;
  }

  /* Tree menu panel content - two columns layout in desktop */
  .tree-menu-panel-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    height: calc(100vh - 116px);
    max-height: calc(100vh - 116px);
    overflow: hidden;
  }

  /* RTL: Reverse column order - quick-links on right, menu-list on left */
  body[dir="rtl"] .tree-menu-panel-content,
  [dir="rtl"] .tree-menu-panel-content,
  .rtl-body .tree-menu-panel-content {
    direction: rtl;
  }

  /* RTL: Position quick-links column first (on the right) */
  body[dir="rtl"] .tree-menu-panel-content .tree-menu-panel-content-quick-link,
  [dir="rtl"] .tree-menu-panel-content .tree-menu-panel-content-quick-link,
  .rtl-body .tree-menu-panel-content .tree-menu-panel-content-quick-link {
    order: 2;
  }

  /* RTL: Position menu-list column second (on the left) */
  body[dir="rtl"] .tree-menu-panel-content .tree-menu-panel-content-list,
  [dir="rtl"] .tree-menu-panel-content .tree-menu-panel-content-list,
  .rtl-body .tree-menu-panel-content .tree-menu-panel-content-list {
    order: 1;
  }

  /* LTR: Normal column order - menu-list on left, quick-links on right */
  body[dir="ltr"] .tree-menu-panel-content,
  [dir="ltr"] .tree-menu-panel-content {
    direction: ltr;
  }

  /* LTR: Position menu-list column first (on the left) */
  body[dir="ltr"] .tree-menu-panel-content .tree-menu-panel-content-list,
  [dir="ltr"] .tree-menu-panel-content .tree-menu-panel-content-list {
    order: 1;
  }

  /* LTR: Position quick-links column second (on the right) */
  body[dir="ltr"] .tree-menu-panel-content .tree-menu-panel-content-quick-link,
  [dir="ltr"] .tree-menu-panel-content .tree-menu-panel-content-quick-link {
    order: 2;
  }

  .tree-menu-panel-content-list {
    width: 100%;
    min-width: 0; /* Prevent grid overflow */
    height: 100%;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 10px; /* Space for scrollbar */
  }

  /* Custom scrollbar styling for webkit browsers */
  .tree-menu-panel-content-list::-webkit-scrollbar {
    width: 8px;
  }

  .tree-menu-panel-content-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
  }

  .tree-menu-panel-content-list::-webkit-scrollbar-thumb {
    background: rgba(0, 47, 95, 0.3);
    border-radius: 4px;
  }

  .tree-menu-panel-content-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 47, 95, 0.5);
  }

  .tree-menu-panel-content-quick-link {
    display: block;
    width: 100%;
    min-width: 0; /* Prevent grid overflow */
    position: sticky;
    top: 0;
    align-self: start;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-left: 10px; /* Space for scrollbar if needed */
  }

  /* Custom scrollbar styling for quick links if needed */
  .tree-menu-panel-content-quick-link::-webkit-scrollbar {
    width: 8px;
  }

  .tree-menu-panel-content-quick-link::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
  }

  .tree-menu-panel-content-quick-link::-webkit-scrollbar-thumb {
    background: rgba(0, 47, 95, 0.3);
    border-radius: 4px;
  }

  .tree-menu-panel-content-quick-link::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 47, 95, 0.5);
  }

  /* Hide "About University" menu items in desktop tree menu panel only */
  .tree-menu-panel-content-list .nav-menu > li#menu-item-53977,
  .tree-menu-panel-content-list .nav-menu > li#menu-item-55054 {
    display: none !important;
  }
}
