/* Mega Menu Container (now an li) */
#mega-menu-container.mega-menu-li {
    position: relative; /* Needed for absolute positioning of dropdown */
}

/* Mega Menu Toggle Link - Modern Style */
#mega-menu-button.mega-menu-toggle {
    padding: 8px 15px;
    color: #222; /* Darker text */
    background-color: #f9f9f9; /* Very light grey background */
    border: 1px solid #ccc; /* Slightly darker border */
    border-radius: 5px; /* Slightly more rounded */
    cursor: pointer;
    display: block;
    line-height: 20px;
    position: relative;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    margin-right: 10px;
    font-weight: 600; /* Slightly less bold */
}

#mega-menu-button.mega-menu-toggle:hover,
#mega-menu-container.mega-menu-li.open > #mega-menu-button.mega-menu-toggle { /* Style when open */
    color: #000; /* Black text */
    background-color: #e0e0e0; /* Darker grey background */
    border-color: #bbb; /* Even darker border */
    text-decoration: none;
}

/* Mega Menu Dropdown - Modern Style */
#mega-menu-container.mega-menu-li .mega-menu-dropdown.adam-hall-style {
    display: none !important; /* Keep hidden initially */
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
    width: 80vw;
    max-width: 1140px;
    background-color: #fff; /* White background */
    border: 1px solid #ccc; /* Match button border */
    border-top: none; /* Remove top border */
    box-shadow: 0 6px 12px rgba(0,0,0,0.175); /* Softer shadow */
    padding: 0;
    margin-top: 0; /* Remove gap */
    border-radius: 0 0 5px 5px; /* Rounded bottom corners */
    height: 70vh; /* Fixed height */
    max-height: 600px; /* Max pixel height */
    overflow: hidden; /* Hide overflow from main dropdown */
}

/* Show dropdown when container has 'open' class (added by JS) */
#mega-menu-container.mega-menu-li.open .mega-menu-dropdown.adam-hall-style {
    display: flex !important; /* Use flexbox for layout */
}

/* Content Area within Dropdown */
.adam-hall-style .mega-menu-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%; /* Fill height */
}

/* Level 1 List Styling (Left Column) - Modern Style */
.adam-hall-style ul.mega-menu-level-1 {
    list-style: none;
    padding: 10px 0; /* Add some vertical padding */
    margin: 0;
    height: 100%; /* Fill height */
    overflow-y: auto; /* Allow vertical scroll if needed */
    background-color: #f9f9f9; /* Match button background */
    width: 250px;
    flex-shrink: 0;
    border-right: 1px solid #eee; /* Lighter border */
}

.adam-hall-style ul.mega-menu-level-1 > li {
    position: relative;
}


.adam-hall-style ul.mega-menu-level-1 > li > a {
    display: flex; /* Use flex for icon alignment */
    align-items: center; /* Center icon vertically */
    padding: 10px 15px; /* Adjusted padding */
    color: #333; /* Dark grey text */
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500; /* Medium weight */
    border-left: 3px solid transparent; /* For active indicator */
}
.adam-hall-style ul.mega-menu-level-1 > li > a > i.fa-fw { /* Icon style */
    margin-right: 8px; /* Space between icon and text */
    color: #888; /* Grey icon */
    transition: color 0.2s ease;
}


/* Level 1 Hover/Active State - Modern Style */
.adam-hall-style ul.mega-menu-level-1 > li:hover > a,
.adam-hall-style ul.mega-menu-level-1 > li.active > a {
    background-color: #eee; /* Light grey background */
    color: #000; /* Black text */
    border-left-color: #555; /* Dark grey active indicator */
}
.adam-hall-style ul.mega-menu-level-1 > li:hover > a > i.fa-fw,
.adam-hall-style ul.mega-menu-level-1 > li.active > a > i.fa-fw {
    color: #000; /* Black icon */
}
.adam-hall-style ul.mega-menu-level-1 > li:hover > i.level-1-indicator,
.adam-hall-style ul.mega-menu-level-1 > li.active > i.level-1-indicator {
     color: #555; /* Dark grey arrow */
}


/* Submenu Indicators (Arrows) for Level 1 - Modern Style */
.adam-hall-style ul.mega-menu-level-1 > li > i.level-1-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc; /* Lighter grey arrow */
    font-size: 0.9em;
    transition: color 0.2s ease;
}


/* Level 2+ Panels Container (Right Area) - Modern Style */
.adam-hall-style .mega-menu-panels {
    flex-grow: 1;
    background-color: #fff;
    padding: 20px 30px; /* Increased padding */
    position: relative;
    height: 100%; /* Fill height */
    overflow-y: auto; /* Allow vertical scroll if needed */
}

/* Individual Level 2 Panel Wrapper */
.adam-hall-style .mega-menu-level-2-wrapper {
    display: none; /* Hidden by default, shown by JS */
}

/* Panel Title Styling (Optional) - Removed */


/* CSS :hover rule removed as JS now handles panel visibility */

/* Level 2 List Styling - Modern Style */
.adam-hall-style ul.mega-menu-level-2 {
     list-style: none;
     padding: 0;
     margin: 0;
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Slightly wider min column */
     gap: 25px 30px; /* Increased gap */
     width: 100%;
}


.adam-hall-style ul.mega-menu-level-2 > li > a {
     font-weight: 600; /* Slightly less bold title */
     color: #222; /* Darker title */
     margin-bottom: 10px; /* More space below title */
     display: block;
     padding: 5px 0;
     border-bottom: 1px solid #f0f0f0; /* Light separator */
     transition: color 0.2s ease;
}
.adam-hall-style ul.mega-menu-level-2 > li > a:hover {
     color: #555; /* Grey hover */
     background-color: transparent;
}


/* Level 3 List Styling - Modern Style */
.adam-hall-style ul.mega-menu-level-3 {
     list-style: none;
     padding: 5px 0 0 0; /* Add padding top */
     margin: 0;
}

.adam-hall-style ul.mega-menu-level-3 > li > a {
     font-weight: normal;
     color: #666; /* Lighter grey */
     padding: 5px 0; /* Consistent padding */
     white-space: normal;
     display: block;
     transition: color 0.2s ease;
}
.adam-hall-style ul.mega-menu-level-3 > li > a:hover {
     color: #000; /* Black hover */
     background-color: transparent;
}


/* Hide original Level 3 wrapper and indicator for now */
.adam-hall-style .mega-menu-level-3-wrapper,
.adam-hall-style .level-2-indicator {
    display: none !important;
}
