/* Site Header Container */
.site-header {
    width: 100%;
    position: relative;
}

/* Utility Bar (Top Dark Blue Bar) */
.utility-bar {
    background-color: var(--primary-blue);
    width: 100%;
    padding: 0;
    position: relative;
    z-index: 1;
    min-height: 40px;
}

.utility-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    gap: 24px;
    min-height: 40px;
}

.utility-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 8px 0;
    margin-left: auto; /* Push to the right */
}

/* WordPress Menu Structure - Utility Menu */
.utility-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.utility-menu .menu-item {
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.utility-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    transition: opacity 0.2s ease;
    letter-spacing: 1px;
}

.utility-link:hover {
    opacity: 0.8;
}

/* Custom Arrow Down for Utility Bar */
.utility-link .arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid #ffffff;
    margin-left: 4px;
    vertical-align: middle;
}

.utility-link.dropdown {
    cursor: pointer;
    position: relative;
}

.utility-link.dropdown:hover {
    opacity: 1;
}

/* Active state for dropdown when menu is open */
.utility-dropdown-wrapper.active .utility-link.dropdown {
    opacity: 1;
}

.utility-dropdown-wrapper.active .utility-link.dropdown .arrow-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.utility-link .arrow-down {
    transition: transform 0.3s ease;
}

/* Utility Dropdown Wrapper */
.utility-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Utility Dropdown Menu */
.utility-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: #ffffff;
    min-width: 320px;
    max-width: 480px;
    width: max-content;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 0;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
}

/* News and Languages Dropdowns - Smaller width */
#news-menu,
#languages-menu {
    min-width: 180px;
    max-width: 220px;
    padding: 6px 0;
}

/* LU Services Dropdown - Reduced spacing */
#lu-services-menu {
    padding: 6px 0;
}

.utility-dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.utility-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    position: relative;
    border-left: 3px solid transparent;
    word-wrap: break-word;
    white-space: normal;
    min-height: 48px;
}

/* News and Languages Dropdown Items - Reduced padding and spacing */
#news-menu .dropdown-item,
#languages-menu .dropdown-item {
    padding: 10px 16px;
    min-height: 40px;
    font-size: 13px;
}

/* LU Services Dropdown Items - Reduced padding and spacing */
#lu-services-menu .dropdown-item {
    padding: 10px 16px;
    min-height: 42px;
    font-size: 13px;
}

.utility-dropdown-menu .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-blue);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.utility-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-blue);
    padding-left: 24px;
    border-left-color: var(--primary-blue);
}

/* News and Languages Dropdown Items - Reduced hover padding */
#news-menu .dropdown-item:hover,
#languages-menu .dropdown-item:hover {
    padding-left: 20px;
}

/* LU Services Dropdown Items - Reduced hover padding */
#lu-services-menu .dropdown-item:hover {
    padding-left: 20px;
}

.utility-dropdown-menu .dropdown-item:hover::before {
    transform: scaleY(1);
}

.utility-dropdown-menu .dropdown-item:active {
    background-color: #f0f2f5;
}

/* Subtle divider between items */
.utility-dropdown-menu .dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e9eb 20%, #e8e9eb 80%, transparent);
}

/* News and Languages Dropdown Items - Reduced divider spacing */
#news-menu .dropdown-item:not(:last-child)::after,
#languages-menu .dropdown-item:not(:last-child)::after {
    left: 16px;
    right: 16px;
}

/* LU Services Dropdown Items - Reduced divider spacing */
#lu-services-menu .dropdown-item:not(:last-child)::after {
    left: 16px;
    right: 16px;
}

/* RTL Support for Dropdown */
[dir="rtl"] .utility-dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .utility-dropdown-menu .dropdown-item {
    border-left: none;
    border-right: 3px solid transparent;
}

[dir="rtl"] .utility-dropdown-menu .dropdown-item::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .utility-dropdown-menu .dropdown-item:hover {
    padding-left: 20px;
    padding-right: 24px;
    border-right-color: var(--primary-blue);
}

/* RTL Support for News and Languages Dropdown Items - Reduced hover padding */
[dir="rtl"] #news-menu .dropdown-item:hover,
[dir="rtl"] #languages-menu .dropdown-item:hover {
    padding-left: 16px;
    padding-right: 20px;
}

/* RTL Support for LU Services Dropdown Items - Reduced hover padding */
[dir="rtl"] #lu-services-menu .dropdown-item:hover {
    padding-left: 16px;
    padding-right: 20px;
}

/* Register Button */
.register-btn {
    background-color: var(--primary-red);
    color: #ffffff;
    border: 2px solid var(--primary-red);
    padding: 12px 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.2s ease;
    border-left: 2px solid var(--primary-red);
    border-right: 2px solid var(--primary-red);
    letter-spacing: 1px;
}

.register-btn:hover {
    background-color: #7f0000;
    border-color: #7f0000;
}

/* Arabic font for register button span on Arabic pages */
html[lang="ar"] .register-btn span,
html[dir="rtl"] .register-btn span {
    font-family: var(--font-arabic);
}

/* Mobile Search Toggle Button */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
}

.mobile-search-toggle:hover {
    opacity: 0.7;
}

.mobile-search-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none; /* Hidden by default, shown only on small screens */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    z-index: 10001;
    flex-shrink: 0;
    position: relative;
    min-width: 40px;
    min-height: 40px;
    pointer-events: auto;
}

/* Ensure burger menu toggle is hidden on large screens */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Hide "More" menu trigger (burger menu) on large screens */
    button#more-menu-trigger {
        display: none !important;
    }
}

.mobile-menu-toggle:hover {
    opacity: 0.7;
}

.mobile-menu-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* Mobile Nav Close Button */
.mobile-nav-close {
    display: none; /* Hidden by default, shown on small screens */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
}

.mobile-nav-close:hover {
    opacity: 0.7;
}

.mobile-nav-close-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* Main Navigation Bar (White Bottom Bar) */
.main-nav-bar {
    background-color: #ffffff;
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 20px;
}

/* Logo Section */
.logo-section {
    position: relative;
    margin-top: -20px;
    margin-bottom: 0;
    z-index: 10;
    margin-right: 10px;
}
.logo-container{
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Burger Menu Button */
.burger-menu-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
}

.burger-menu-btn:hover {
    opacity: 0.7;
}

.burger-menu-btn:active {
    transform: scale(0.95);
}

.burger-menu-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.logo-image {
    height: 100px;
    width: auto;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

/* RTL alignment for logo section */
[dir="rtl"] .logo-section {
    align-items: flex-end;
    text-align: right;
}

.logo-line-1,
.logo-line-2 {
    font-size: 22px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.2px;
}

.logo-line-1 {
    margin-bottom: 2px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    flex: 1;
    justify-content: flex-end;
}

/* Nav Actions (Search, More) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

/* WordPress Menu Structure - Main Menu */
.main-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu .menu-item {
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

/* WordPress Sub-menu Structure */
.main-menu .sub-menu,
.utility-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu .sub-menu .menu-item,
.utility-menu .sub-menu .menu-item {
    display: block;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    position: relative;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link.dropdown {
    cursor: pointer;
}

/* Custom Arrow Down for Navigation Bar */
.nav-link .arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid var(--text-dark);
    margin-left: 4px;
    vertical-align: middle;
}

/* Utility & Navigation Icons */


.nav-link .nav-icon {
    margin-left: 6px;
}

[dir="rtl"] .nav-link .nav-icon {
    margin-left: 0;
    margin-right: 6px;
}

/* Search Link Styling */
.nav-link.search-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: 0 4px;
}

.nav-link.search-link .nav-icon {
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-link.search-link:hover .nav-icon {
    opacity: 1;
}

.nav-link.search-link:hover {
    color: var(--primary-blue);
}

/* Main Navigation Dropdown */
.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    max-width: 300px;
    width: max-content;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 0;
    padding: 6px 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
}

/* Mega Menu Styling for Faculties & Institutes */
.nav-dropdown-mega {
    position: absolute;
    top: calc(100% + 2px);
    min-width: 1000px;
    max-width: 1200px;
    width: max-content;
    padding: 16px;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
    overflow: visible;
    pointer-events: none;
}

.nav-dropdown-mega.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: absolute;
    overflow: visible;
    /* Transform is handled by #faculties-menu.show for proper centering */
}

.faculties-menu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    position: relative;
}

/* Generic mega menu columns (new concise layout) */
.nav-mega-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    width: 100%;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-mega-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

/* Add vertical divider after first column (Human & Social Sciences) */
.nav-mega-column:first-child::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50px;
    bottom: 50px;
    width: 1px;
    background-color: #e0e0e0;
    opacity: 1;
}

/* Technology & Health column that spans 2 grid columns and has 2 internal columns */
.nav-mega-column-2cols {
    grid-column: span 2;
    position: relative;
}

/* Add vertical divider on the left side of Technology & Health section */
.nav-mega-column-2cols::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50px;
    bottom: 50px;
    width: 3px;
    background-color: var(--primary-blue);
    opacity: 0.3;
    border-radius: 2px;
}

/* Add vertical divider after Technology & Health section */
.nav-mega-column-2cols::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50px;
    bottom: 50px;
    width: 3px;
    background-color: var(--primary-blue);
    opacity: 0.3;
    border-radius: 2px;
}


.nav-mega-items-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 32px;
}

.nav-mega-items-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-mega-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    text-align: center;
    position: relative;
    padding-bottom: 8px;
}


.nav-mega-column .nav-dropdown-item {
    padding: 10px 0;
    padding-right: 20px;
    border: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Submenu wrapper */
.nav-dropdown-item-wrapper {
    position: relative;
}

/* Submenu styling - replaces mega columns */
.nav-dropdown-submenu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    padding: 12px 16px;
    z-index: 1001;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

[dir="rtl"] .nav-dropdown-submenu {
    width: 100%;
}

.nav-dropdown-submenu.show {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    min-height: 500px;
    padding: 12px 16px;
}

/* Hide mega columns when submenu is shown */
.nav-dropdown-mega.submenu-active .nav-mega-columns,
.nav-dropdown-mega.branches-active .nav-mega-columns {
    display: none;
}

/* Back button styling */
.nav-dropdown-submenu-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 12px;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid #e8e9eb;
    transition: all 0.2s ease;
    width: 50%;
}

.nav-dropdown-submenu-back:hover {
    color: var(--primary-blue);
    opacity: 0.8;
}

.nav-dropdown-submenu-back-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.nav-dropdown-submenu-back-icon::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 8px 5px 0;
    border-color: transparent var(--primary-blue) transparent transparent;
}

[dir="rtl"] .nav-dropdown-submenu-back-icon::before {
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent var(--primary-blue);
}

.nav-dropdown-submenu-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: none;
    width: 40%;
    position: relative;
}

.nav-dropdown-submenu-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 2px;
}

[dir="rtl"] .nav-dropdown-submenu-title::after {
    left: auto;
    right: 0;
}

.nav-dropdown-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 50%;
}

.nav-dropdown-submenu-item {
    display: block;
    padding: 8px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}

.nav-dropdown-submenu-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-blue);
    padding-left: 24px;
}

/* Right arrow for Branches item */
.nav-dropdown-submenu-item:last-child {
    position: relative;
    padding-right: 30px;
}

.nav-dropdown-submenu-item:last-child::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--text-dark);
    border-top: 2px solid var(--text-dark);
    transform: rotate(45deg);
    opacity: 0.6;
    transition: all 0.2s ease;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-dropdown-submenu-item:last-child:hover::after {
    opacity: 1;
    border-right-color: var(--primary-blue);
    border-top-color: var(--primary-blue);
    transform: translateY(-50%) rotate(45deg) translateX(4px);
}

[dir="rtl"] .nav-dropdown-submenu-item:last-child {
    padding-right: 0;
    padding-left: 30px;
}

/* [dir="rtl"] .nav-dropdown-submenu-item:last-child::after {
    right: auto;
    left: 12px;
    border-right: none;
    border-top: none;
    border-left: 2px solid var(--text-dark);
    border-bottom: 2px solid var(--text-dark);
} */

/* [dir="rtl"] .nav-dropdown-submenu-item:last-child:hover::after {
    border-right-color: transparent;
    border-top-color: transparent;
    border-left-color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    transform: translateY(-50%) rotate(-45deg) translateX(-4px);
} */

/* Branches View Styling */
.nav-dropdown-branches-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    padding: 12px 16px;
    z-index: 1001;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    border-radius: 8px;
}

.nav-dropdown-branches-view.show {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    min-height: 500px;
}

.nav-branches-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    margin-top: 12px;
}

.nav-branch-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-right: 16px;
}

/* Add divider only after columns 1, 2, 3 (not after column 4 or columns in second row) */
.nav-branch-column:nth-child(1)::after,
.nav-branch-column:nth-child(2)::after,
.nav-branch-column:nth-child(3)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e8e9eb;
}

.nav-branch-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: none;
    position: relative;
}

.nav-branch-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 2px;
}

[dir="rtl"] .nav-branch-title::after {
    left: auto;
    right: 0;
}

.nav-branch-item {
    display: block;
    padding: 6px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0;
}

.nav-branch-item:hover {
    color: var(--primary-blue);
    padding-left: 8px;
}

/* RTL Support */
[dir="rtl"] .nav-dropdown-submenu {
    left: auto;
    right: -16px;
    transform: translateX(-20px);
}

[dir="rtl"] .nav-dropdown-submenu.show {
    transform: translateX(0);
}

[dir="rtl"] .nav-dropdown-submenu-item:hover {
    padding-left: 20px;
    padding-right: 24px;
}

[dir="rtl"] .nav-dropdown-branches-view {
    left: auto;
    right: -16px;
    transform: translateX(-20px);
}

[dir="rtl"] .nav-dropdown-branches-view.show {
    transform: translateX(0);
}

[dir="rtl"] .nav-branch-column {
    padding-right: 0;
    padding-left: 24px;
}

[dir="rtl"] .nav-branch-column:not(:last-child)::after {
    right: auto;
    left: 0;
}

[dir="rtl"] .nav-branch-item:hover {
    padding-left: 0;
    padding-right: 8px;
}

.nav-mega-column .nav-dropdown-item::after {
    content: '' !important;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--text-dark);
    border-top: 2px solid var(--text-dark);
    transform: rotate(45deg);
    opacity: 0.6;
    transition: all 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
    position: static !important;
    display: inline-block;
    vertical-align: middle;
}

.nav-mega-column .nav-dropdown-item:hover::after {
    opacity: 1;
    border-right-color: var(--primary-blue);
    border-top-color: var(--primary-blue);
    transform: rotate(45deg) translateX(4px);
}

[dir="rtl"] .nav-mega-column .nav-dropdown-item::after {
    border-right: none;
    border-top: none;
    border-left: 2px solid var(--text-dark);
    border-bottom: 2px solid var(--text-dark);
    margin-left: 0;
    margin-right: 8px;
    transform: rotate(45deg);
}

[dir="rtl"] .nav-mega-column .nav-dropdown-item:hover::after {
    border-left-color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    transform: rotate(45deg) translateX(-4px);
}

#faculties-menu-content {
    display: grid;
}

.faculties-menu-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 12px;
    position: relative;
}

.faculties-menu-column:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e8e9eb;
}


.faculties-menu-column:first-child {
    padding-left: 0;
}

.faculties-menu-column:last-child {
    padding-right: 0;
}


.faculties-menu-column-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e9eb;
    line-height: 1.3;
}

.faculties-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faculties-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.2s ease;
    line-height: 1.4;
    position: relative;
    border-bottom: 1px solid #e8e9eb;
    width: 100%;
}

/* Remove border from accordion headers - borders handled by accordion wrapper */
.faculties-menu-accordion-header {
    border-bottom: none !important;
}

.faculties-menu-item:last-child {
    border-bottom: none;
}

.faculties-menu-item > span:first-child {
    flex: 1;
    padding-right: 8px;
}

.faculties-menu-item .accordion-icon {
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-dark);
    transition: color 0.2s ease;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.faculties-menu-item:hover {
    color: var(--primary-blue);
    padding-left: 4px;
}

.faculties-menu-item:hover .accordion-icon {
    color: var(--primary-blue);
    opacity: 1;
}

.faculties-menu-item:active {
    color: var(--primary-blue);
}

/* Faculties Menu Accordion Styling */
.faculties-menu-accordion {
    position: relative;
    border-bottom: 1px solid #e8e9eb;
}

.faculties-menu-accordion:last-child {
    border-bottom: none;
}

.faculties-menu-accordion-header {
    cursor: pointer;
    user-select: none;
    border-bottom: none !important;
}

.faculties-menu-accordion-header:hover {
    background-color: transparent;
}

.faculties-menu-accordion-header.active {
    background-color: #f8f9fa;
}

.faculties-menu-accordion-header.active .accordion-icon {
    color: var(--primary-blue);
    opacity: 1;
}

.faculties-menu-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
    background-color: #fafbfc;
    padding: 0;
}

.faculties-menu-accordion-content.show {
    max-height: 500px;
    opacity: 1;
    padding: 2px 0 4px 0;
}

.faculties-menu-subitem {
    display: block;
    padding: 6px 16px 6px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    line-height: 1.4;
    position: relative;
    border-bottom: 1px solid #e8e9eb;
    min-height: 28px;
}

.faculties-menu-subitem:last-child {
    border-bottom: none;
}

.faculties-menu-subitem:hover {
    background-color: #f0f2f5;
    color: var(--primary-blue);
    padding-left: 24px;
}

.faculties-menu-subitem:active {
    background-color: #e8e9eb;
}

.faculties-menu-accordion-content.show {
    border-top: 1px solid #e8e9eb;
}

/* Branches Link */
.faculties-menu-branches-link {
    cursor: pointer;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.faculties-menu-branches-link span:first-child {
    flex: 1;
}

.faculties-menu-branches-link .accordion-icon {
    font-size: 14px;
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.faculties-menu-branches-link:hover .accordion-icon {
    opacity: 1;
    color: var(--primary-blue);
}

/* Branches View (Replaces Faculties Menu) */
.branches-view {
    width: 100%;
    display: none;
}

.branches-view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: none;
}

.branches-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.branches-back-btn:hover {
    background-color: transparent;
    border: none;
    color: #666;
}

.branches-back-btn:active {
    background-color: transparent;
    color: #333;
}

.branches-back-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.branches-view-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.4;
}

/* Branches Grid Layout */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

.branch-column {
    padding: 0 14px;
    min-width: 0;
    overflow: hidden;
}

.branch-column:nth-child(4n) .branch-items {
    border-right: none;
}

.branch-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    
    height: 40px;
    padding: 15px 0px;
}

.branch-items {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    padding-right: 12px;
}

.faculty-branch-item {
    display: block;
    padding: 5px 0;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    line-height: 1.5;
    position: relative;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-bottom: 1px solid #e0e0e0;

}

.faculty-branch-item:last-child {
    border-bottom: none;
}

.faculty-branch-item:active {
    color: var(--primary-blue);
}



[dir="rtl"] .branch-items {
    border-right: none;
    border-left: 1px solid #e0e0e0;
    padding-right: 0;
    padding-left: 12px;
}

[dir="rtl"] .branch-column:nth-child(4n) .branch-items {
    border-left: none;
}


[dir="rtl"] .branches-back-btn svg {
    transform: scaleX(-1);
}



/* Responsive Branches Grid */
@media (max-width: 1024px) {
    .branches-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .branch-column {
        padding: 0 12px;
    }
    
    .branch-items {
        padding-right: 10px;
    }
    
    .branch-column:nth-child(4n) .branch-items {
        border-right: 1px solid #e0e0e0;
    }
    
    .branch-column:nth-child(2n) .branch-items {
        border-right: none;
    }
    
    [dir="rtl"] .branch-items {
        padding-left: 10px;
    }
    
    [dir="rtl"] .branch-column:nth-child(2n) .branch-items {
        border-left: none;
    }
    
    .branch-title {
        font-size: 12px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    
    .faculty-branch-item {
        font-size: 11px;
        padding: 4px 0;
    }
}

@media (max-width: 768px) {
    .branches-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .branch-column {
        padding: 0 10px;
    }
    
    .branch-items {
        padding-right: 8px;
    }
    
    .branch-column:nth-child(2n) .branch-items {
        border-right: none;
    }
    
    [dir="rtl"] .branch-items {
        padding-left: 8px;
    }
    
    [dir="rtl"] .branch-column:nth-child(2n) .branch-items {
        border-left: none;
    }
    
    .branch-title {
        font-size: 11px;
        margin-bottom: 8px;
        padding-bottom: 5px;
    }
    
    .faculty-branch-item {
        font-size: 10px;
        padding: 4px 0;
    }
    
    .branches-view-title {
        font-size: 14px;
    }
    
    .branches-view-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
}

/* RTL Support for Mega Menu */

/* Mega menu show state */
.nav-dropdown-mega.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

/* Ensure mega menu is positioned correctly relative to navigation */
.nav-dropdown-wrapper.nav-dropdown-mega-wrapper {
    position: relative;
}

#faculties-menu {
    position: absolute;
    left: 50%;
    top: calc(100% + 2px);
    right: auto;
    bottom: auto;
    margin: 0;
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#faculties-menu.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
    pointer-events: auto;
}


/* General dropdown menu show state - exclude mega menu which has its own transform */
.nav-dropdown-menu:not(.nav-dropdown-mega).show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
    position: relative;
    border-left: 3px solid transparent;
    word-wrap: break-word;
    white-space: normal;
    min-height: 40px;
}

.nav-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-blue);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-blue);
    padding-left: 20px;
    border-left-color: var(--primary-blue);
}

.nav-dropdown-item:hover::before {
    transform: scaleY(1);
}

.nav-dropdown-item:active {
    background-color: #f0f2f5;
}

/* Subtle divider between nav dropdown items (exclude mega menu items) */
.nav-dropdown-menu:not(.nav-dropdown-mega) .nav-dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e9eb 20%, #e8e9eb 80%, transparent);
}

/* Active state for nav dropdown when menu is open */
.nav-dropdown-wrapper.active .nav-link.dropdown .arrow-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* RTL Support for Nav Dropdown */
[dir="rtl"] .nav-dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-dropdown-item {
    border-left: none;
    border-right: 3px solid transparent;
}

[dir="rtl"] .nav-dropdown-item::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-dropdown-item:hover {
    padding-left: 16px;
    padding-right: 20px;
    border-right-color: var(--primary-blue);
}

[dir="rtl"] .nav-dropdown-item:not(:last-child)::after {
    left: 16px;
    right: 16px;
}

/* Accordion Styling for Nav Dropdown */
.nav-dropdown-accordion {
    position: relative;
    margin-bottom: 0;
}

/* Hide divider after accordion header */
.nav-dropdown-accordion-header::after {
    display: none !important;
}

/* Show divider after accordion wrapper (not the header) when it's not the last item */
.nav-dropdown-accordion:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e9eb 20%, #e8e9eb 80%, transparent);
}

.nav-dropdown-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

.nav-dropdown-accordion-header::before {
    display: none;
}

.nav-dropdown-accordion-header:hover {
    background-color: #f8f9fa;
    color: var(--primary-blue);
    padding-left: 16px;
}

.nav-dropdown-accordion-header:hover::before {
    display: none;
}

.nav-dropdown-accordion-header.active {
    background-color: #f8f9fa;
    color: var(--primary-blue);
}

.nav-dropdown-accordion-header span:first-child {
    flex: 1;
}

.nav-dropdown-accordion-header .accordion-icon {
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-dark);
    transition: color 0.2s ease;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

[dir="rtl"] .nav-dropdown-accordion-header .accordion-icon {
    margin-left: 0;
    margin-right: 8px;
}

.nav-dropdown-accordion-header:hover .accordion-icon {
    color: var(--primary-blue);
}

.nav-dropdown-accordion-header.active .accordion-icon {
    color: var(--primary-blue);
}

.nav-dropdown-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease;
    opacity: 0;
    background-color: #fafbfc;
    padding: 0;
}

.nav-dropdown-accordion-content.show {
    max-height: 500px;
    opacity: 1;
    padding: 4px 0;
}

.nav-dropdown-subitem {
    display: block;
    padding: 8px 16px 8px 32px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    line-height: 1.5;
    position: relative;
    border-left: 2px solid transparent;
    min-height: 36px;
}

[dir="rtl"] .nav-dropdown-subitem {
    padding-left: 16px;
    padding-right: 32px;
}

.nav-dropdown-subitem:hover {
    background-color: #f0f2f5;
    color: var(--primary-blue);
    padding-left: 36px;
    border-left-color: var(--primary-blue);
}

[dir="rtl"] .nav-dropdown-subitem:hover {
    padding-left: 16px;
    padding-right: 36px;
    border-left: none;
    border-right: 2px solid var(--primary-blue);
}

.nav-dropdown-subitem:active {
    background-color: #e8e9eb;
}

/* Subtle divider between subitems */
.nav-dropdown-subitem:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 32px;
    right: 16px;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e1e3 20%, #e0e1e3 80%, transparent);
}

[dir="rtl"] .nav-dropdown-subitem:not(:last-child)::after {
    left: 16px;
    right: 32px;
}

/* Responsive Design - Header */
@media (max-width: 1024px) {
    .utility-left {
        gap: 16px;
    }
    
    .main-nav {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .utility-bar {
        display: none;
    }
    
    .utility-container {
        flex-wrap: wrap;
    }
    
    .utility-left {
        gap: 12px;
        font-size: 12px;
    }
    
    .utility-link span {
        display: none;
    }
    
    .utility-link i:not(.fa-chevron-down) {
        font-size: 14px;
    }
    
    .register-btn span {
        display: none;
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
    
    .logo-container {
        gap: 12px;
    }
    
    .burger-menu-btn {
        padding: 6px;
    }
    
    .burger-menu-icon {
        width: 20px;
        height: 20px;
    }
    
    .logo-image {
        height: 80px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    /* Dropdown menu responsive adjustments */
    .utility-dropdown-menu {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        width: auto;
        right: 0;
        left: auto;
        border-radius: 6px;
        padding: 6px 0;
    }
    
    .utility-dropdown-menu .dropdown-item {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .utility-dropdown-menu .dropdown-item:hover {
        padding-left: 20px;
    }
    
    [dir="rtl"] .utility-dropdown-menu {
        right: auto;
        left: 0;
    }
    
    [dir="rtl"] .utility-dropdown-menu .dropdown-item:hover {
        padding-left: 16px;
        padding-right: 20px;
    }
    
    /* Main Navigation Dropdown responsive adjustments */
    .nav-dropdown-menu {
        min-width: 200px;
        max-width: calc(100vw - 40px);
        width: auto;
        right: 0;
        left: auto;
        border-radius: 6px;
    }
    
    [dir="rtl"] .nav-dropdown-menu {
        right: auto;
        left: 0;
    }
    
    /* Mega Menu responsive adjustments */
    #faculties-menu {
        min-width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        width: auto !important;
        padding: 12px !important;
        left: 50% !important;
        right: auto !important;
        top: 50% !important;
        transform: translate(-50%, -50%) translateY(-8px) !important;
        position: fixed !important;
    }
    
    #faculties-menu.show {
        transform: translate(-50%, -50%) translateY(0) !important;
    }
    
    
    .faculties-menu-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .faculties-menu-column {
        padding: 0 !important;
    }
    
    .faculties-menu-column:not(:last-child)::after {
        display: none;
    }
    
    .faculties-menu-column-title {
        font-size: 14px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    
    .faculties-menu-item {
        padding: 6px 0;
        font-size: 12px;
    }
}

/* Medium screens - 2 columns for mega menu */
@media (min-width: 769px) and (max-width: 1024px) {
    #faculties-menu {
        min-width: 600px !important;
        max-width: 700px !important;
        padding: 14px !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) translateY(-8px) !important;
        position: fixed !important;
    }
    
    #faculties-menu.show {
        transform: translate(-50%, -50%) translateY(0) !important;
    }
    
    
    .faculties-menu-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .faculties-menu-column {
        padding: 0 10px;
    }
    
    .faculties-menu-column:nth-child(2)::after {
        display: none;
    }
    
    .faculties-menu-column:last-child {
        grid-column: 1 / -1;
        padding-top: 12px;
        margin-top: 12px;
        border-top: 1px solid #e8e9eb;
        padding-left: 0;
        padding-right: 0;
    }
    
    .faculties-menu-column:last-child::after {
        display: none;
    }
    
}

/* Side Menu Styles */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8e9eb;
}

.side-menu-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.side-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}

.side-menu-close:hover {
    color: var(--primary-blue);
    background-color: #f8f9fa;
}

.side-menu-close-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* WordPress Side Menu Structure */
.side-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-menu-list .menu-item {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-menu-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.side-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    position: relative;
}

.side-menu-item:last-child {
    border-bottom: none;
}

.side-menu-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-blue);
}

.side-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #666;
    transition: color 0.2s ease;
    display: block;
}

.side-menu-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.side-menu-item:hover .side-menu-icon {
    color: var(--primary-blue);
}

.side-menu-item span {
    flex: 1;
}

.side-menu-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #666;
    transition: color 0.2s ease, transform 0.2s ease;
}

.side-menu-item:hover .side-menu-arrow {
    color: var(--primary-blue);
}

.side-menu-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #666;
    transition: color 0.2s ease, transform 0.2s ease;
}

.side-menu-item-dropdown.active .side-menu-chevron {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.side-menu-item-dropdown.active {
    background-color: #f8f9fa;
    color: var(--primary-blue);
}

.side-menu-item-dropdown.active .side-menu-icon {
    color: var(--primary-blue);
}

/* Side Menu Dropdown Wrapper */
.side-menu-dropdown-wrapper {
    position: relative;
}

/* Side Menu Submenu */
.side-menu-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
    background-color: #fafbfc;
    padding: 0;
}

.side-menu-dropdown-wrapper.active .side-menu-submenu {
    max-height: 500px;
    opacity: 1;
    padding: 4px 0;
}

.side-menu-submenu-item {
    display: block;
    padding: 12px 20px 12px 52px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    line-height: 1.5;
    position: relative;
    border-bottom: 1px solid #f0f2f5;
}

.side-menu-submenu-item:last-child {
    border-bottom: none;
}

.side-menu-submenu-item:hover {
    background-color: #f0f2f5;
    color: var(--primary-blue);
    padding-left: 56px;
}

.side-menu-submenu-item:active {
    background-color: #e8e9eb;
}

/* RTL Support for Side Menu */
[dir="rtl"] .side-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

[dir="rtl"] .side-menu.active {
    transform: translateX(0);
}

[dir="rtl"] .side-menu-arrow {
    transform: scaleX(-1);
}

/* Prevent body scroll when side menu is open */
body.side-menu-open {
    overflow: hidden;
}
/* Add vertical divider after first column (Human & Social Sciences) */
.nav-mega-column:nth-child(2)::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50px;
    bottom: 50px;
    width: 1px;
    background-color: #e0e0e0;
    opacity: 1;
}