/* Mobile-Fixed Menu Styles with Proper Hover Detection */

.accessible-menu {

}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-direction: row;
    gap: 0;
}

.nav-list li {
    margin-bottom: 0 !important;
}

.nav-item {
    position: relative;
    border-color: #ccc;
    border-style: solid;
    border-width: 0 1px 0 0;
    border-color: #ccc;
}

.nav-list .nav-item:last-child{
   border:none;
}

@media (max-width: 1024px) {
    .nav-list {
        margin-top: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-item {
        border: none;    }
}

/* Container for split link/button structure */
.nav-item-container {
    display: flex;
    align-items: center;
}

.soft-shadow{
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.5);
}

.nav-link {
    display: flex;
    align-items: center;
    height: 20px;
    padding:  0 15px 0 15px ;
    color: #313558;
    text-decoration: none;
    background: none;
    border: none;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

/* Main link styling */
.nav-link.main-link {
    padding-right: 8px;
}

/* Dropdown toggle button styling */
.nav-link.dropdown-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    mmax-width: 30px;
    padding: 0 5px 0 5px;
    height: 20px;
    justify-content: center;
}

.nav-link:hover {
    color: #000;
}

.nav-link:focus {
    outline: 3px solid #3498db;
    outline-offset: -3px;
    background-color: #efefefe;
    color: #000;
}

.nav-link:focus .dropdown-arrow svg{
    fill:#000 !important;
}

.dropdown-item:focus {
 
    color: #000;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dropdown-arrow svg{
    fill:#000 !important;
    padding: 2px;
    width: 14px;
    height: 14px;
}

/* Rotate arrow when dropdown is open */
.nav-item[aria-expanded="true"] .dropdown-arrow svg{
    transform: rotate(90deg);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
    
    /* Hidden by default */
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

/* 
 * Desktop hover - only on devices that support proper hover
 * This excludes touch devices that might have "fake" hover
 */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .nav-item.has-submenu:hover .dropdown {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    
    .nav-item.has-submenu:hover .dropdown-arrow svg{
        transform: rotate(90deg);
        fill:#000;
    }
    
    .nav-item.has-submenu:hover .nav-link {
        
        color: #000;
    }
}

/* Always show when programmatically opened (keyboard/click) */
.nav-item[aria-expanded="true"] .dropdown {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Mobile styles */
@media (max-width: 1024px) {
    .nav-item-container {
        width: 100%;
    }

    
    .nav-link.main-link {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex: 1;
        padding-right: 16px;
    }
    
    .dropdown {
        position: relative;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #000;
        width: 100%;
        min-width: auto;
    }
    
    .nav-item[aria-expanded="true"] .dropdown {
        transform: none;
    }
    
    /* Explicitly disable any hover effects on mobile */
    .nav-item.has-submenu:hover .dropdown {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    .nav-item.has-submenu:hover .nav-link {
        background-color: transparent !important;
        color: white !important;
    }
    
    .nav-item.has-submenu:hover .dropdown-arrow {
        transform: none !important;
    }
}

.dropdown-item {
    margin: 0;
}

.dropdown-link {
    display: block;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    font-weight: normal;
}

.dropdown-link:hover {
  
}

.dropdown-link:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    
}

@media (max-width: 1024px) {
    .dropdown-link {
        color: #000;
        background-color: #efefef;
    }
    
    .dropdown-link:hover {
        color: #000;
    }
    
    .dropdown-link:focus {
        
        color: #000;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link:focus {
        outline: 4px solid;
    }
    
    .dropdown-link:focus {
        outline: 3px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dropdown-arrow,
    .dropdown,
    .nav-link,
    .dropdown-link {
        transition: none;
    }
}

/* Debug styles - remove when satisfied */
.accessible-menu .nav-item[aria-expanded="true"] {
    
}

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .accessible-menu .nav-item.has-submenu:hover {
       
    }
}


