/* ===== MAIN MENU STRUCTURE ===== */
.sf-menu, .sf-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.sf-menu {
  gap: 15px;
}

.sf-menu li {
  position: relative;
}

.sf-menu a {
  display: block;
  padding: 5px 0;
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ===== SUBMENU CONTAINERS ===== */
.sf-menu ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  min-width: 300px;
  width: max-content; 
  max-width: 700px; 
  padding: 0;
  background: #00a686;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 1000;
}

/* ===== AUTO-WIDTH SUBMENU ITEMS ===== */
.sf-menu ul li {
  width: auto; 
  min-width: 240px; 
  max-width: 100%; 
}

.sf-menu ul li a,
.sf-menu ul li span.nolink {
  white-space: nowrap; 
  overflow: hidden;
  text-overflow: ellipsis; 
  display: block;
  width: 100%;
}

/* For multi-line items when needed */
.sf-menu ul li.long-text-item a,
.sf-menu ul li.long-text-item span.nolink {
  white-space: normal; /* Allow wrapping */
  word-break: break-word; /* Break long words */
}

/* Submenu container adjustment */
.sf-menu ul {
  width: auto; /* Auto-size container */
  min-width: 240px; /* Minimum width */
}



.sf-menu ul li a,
.sf-menu ul span.nolink {
  display: block;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  text-transform: uppercase;
  font-size: 0.9em;
  line-height: 1.4; /* Better for multi-line */
}

/* Remove border from last item */
.sf-menu ul li:last-child a,
.sf-menu ul li:last-child span.nolink {
  border-bottom: none;
}

/* ===== PARENT ITEMS IN SUBMENU ===== */
.sf-depth-1.menuparent ul.sf-menu span.nolink, 
span.sf-depth-2.menuparent.nolink.sf-with-ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #00a686;
    color: #fff;
}

/* ===== HOVER EFFECTS ===== */
.sf-menu ul li a:hover,
.sf-menu ul span.nolink:hover {
  background: rgba(0,0,0,0.15);
  padding-left: 10px;
}

/* ===== DROPDOWN INDICATORS ===== */
.sf-with-ul::after {
    content: "▾";
    margin-left: 10px;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.sf-menu li:hover > .sf-with-ul::after {
  transform: rotate(180deg);
}

/* ===== SECOND LEVEL MENUS ===== */
.sf-menu ul ul {
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: 1px;
}

/* ===== SECOND MENU ROW ===== */
.sf-menu.second-row {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* COMPLETELY REMOVE DEFAULT DROPDOWN INDICATOR */
.sf-menu .sf-sub-indicator,
.sf-menu .sf-sub-indicator:after {
  display: none !important;
  content: none !important;
}

/* ===== SMOOTHER TRANSITIONS ===== */
.sf-menu ul {
  display: block; /* Changed from none for transitions */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 
    opacity 0.25s ease-out,
    transform 0.25s ease-out,
    visibility 0.25s;
  pointer-events: none;
}

.sf-menu li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===== IMPROVED DROPDOWN INDICATORS ===== */
.sf-with-ul {
  position: relative;
  padding-right: 20px; /* Space for arrow */
}

.sf-with-ul::after {
  content: "▾";
  /* position: absolute; */
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

/* ===== LEVEL-SPECIFIC FIXES ===== */
/* First level dropdowns */
.sf-menu > li > ul {
  transform: translateY(15px); /* More noticeable entry */
}

/* Second level dropdowns */
.sf-menu ul ul {
  transform: translateX(15px) translateY(0);
  transition: 
    opacity 0.25s ease-out,
    transform 0.25s ease-out;
}

.sf-menu li:hover > ul ul {
  transform: translateX(0) translateY(0);
}

/* ===== IMPROVED HOVER EFFECTS ===== */
.sf-menu ul li a,
.sf-menu ul span.nolink {
  transition: 
    background 0.2s ease,
    padding 0.2s ease;
}

/* ===== NOLINK ITEM FIXES ===== */
.sf-depth-1.menuparent ul.sf-menu span.nolink,
span.sf-depth-2.menuparent.nolink.sf-with-ul {
  transition: all 0.3s ease; /* Add transition to nolink items */
}

/* ===== Z-INDEX LAYERING ===== */
.sf-menu ul {
  z-index: 1000;
}

.sf-menu ul ul {
  z-index: 1001;
}

/* ===== SUBMENU WIDTH FIX ===== */
.sf-menu ul {
  width: auto;
}

ul.sf-menu a, ul.sf-menu span.nolink {
    display: block;
    padding-top: 13px;
    padding-right: 5px;
    padding-bottom: 13px;
    padding-left: 5px;
    position: relative;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    color: #000;
}


ul.sf-menu .sf-with-ul {
    padding-right: initial;
}

/* ===== BG Color SOLUTION ===== */


.navbar.bg-light {
    background-image: linear-gradient(#f9fafb,#f8f9fa 60%,#e9eaeb);
    background-color: #fff !important;
    background-image: none;
    border-top: 1px solid gray;
    border-bottom: 1px solid gray
}

/* Target only on /en/who page */
body.page-view-who-s-who .block-system-breadcrumb-block ol.breadcrumb .breadcrumb-item:last-child {
  display: none;
}
