/* Taxonomy Navigation Tabs */
.taxonomy-navigation-tabs {
  background: #fff;
  border-bottom: none;
  padding: 0;
  margin: 0;
}

.nav-tabs-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

.nav-tab-item {
  flex: 1;
  margin: 0;
  padding: 0;
}

.nav-tab-link {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* PRODUTOS tab - Cyan/Blue */
.nav-tab-item:first-child .nav-tab-link {
  background-color: #03A7E0;
}

.nav-tab-item:first-child .nav-tab-link:hover {
  background-color: #0292c7;
}

.nav-tab-item:first-child .nav-tab-link.active {
  background-color: #0292c7;
  border-bottom-color: #fff;
}

/* SERVIÇOS tab - Green */
.nav-tab-item:last-child .nav-tab-link {
  background-color: #4DA803;
}

.nav-tab-item:last-child .nav-tab-link:hover {
  background-color: #3d8602;
}

.nav-tab-item:last-child .nav-tab-link.active {
  background-color: #3d8602;
  border-bottom-color: #fff;
}

.nav-tab-link:hover {
  color: #fff;
}

.nav-tab-link.active {
  color: #fff;
  font-weight: 700;
}

.nav-tab-item:first-child .nav-tab-link {
  border-top-left-radius: 0;
}

.nav-tab-item:last-child .nav-tab-link {
  border-top-right-radius: 0;
}

/* SERVIÇOS Dropdown Styles */
.servicos-dropdown-wrapper {
  position: relative;
}

.servicos-tab {
  border: none;
  cursor: pointer;
  width: 100%;
}

.dropdown-indicator {
  margin-left: 8px;
  font-size: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
  padding: 0 8px;
  cursor: pointer;
  border-radius: 3px;
}

.dropdown-indicator:hover {
  background: rgba(255, 255, 255, 0.2);
}

.servicos-dropdown-wrapper:hover .dropdown-indicator,
.servicos-dropdown-wrapper.active .dropdown-indicator {
  transform: rotate(180deg);
}

.servicos-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #4DA803;
  list-style: none;
  margin: 0;
  padding: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.servicos-dropdown-wrapper:hover .servicos-dropdown,
.servicos-dropdown-wrapper.active .servicos-dropdown {
  display: block;
}

.servicos-dropdown li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.servicos-dropdown li:last-child {
  border-bottom: none;
}

.servicos-dropdown a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 14px;
}

.servicos-dropdown a:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Taxonomy Navigation Styles */
.taxonomy-navigation {
  background: #03A7E0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1000;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  margin-top: 1.5rem !important;
}

.taxonomy-nav-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.taxonomy-nav-item {
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  overflow: visible !important;
  box-sizing: border-box;
  background: #03A7E0 !important;
}

.taxonomy-nav-link {
  display: block;
  padding: 15px 70px 15px 20px;
  text-decoration: none;
  color: #fff !important;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  min-height: 50px;
  height: auto;
  box-sizing: border-box;
  position: relative;
  background: #03A7E0 !important;
  max-width: 100%;
}

/* Different cursor for expandable vs clickable items */
.expandable-link {
  cursor: pointer !important;
  text-decoration: none !important;
  user-select: none;
}

.expandable-link:hover {
  text-decoration: none !important;
  color: #fff;
  background-color: #0292c7;
}

.clickable-link {
  cursor: pointer !important;
}

.clickable-link:hover {
  text-decoration: underline;
}

/* Visual indication for expandable items */
.has-dropdown > .taxonomy-nav-link::after,
.has-sub-dropdown > .taxonomy-nav-dropdown-link::after {
  content: "";
  display: inline-block;
  margin-left: auto;
  font-size: 10px;
  color: #666;
}

/* Ensure expandable links don't look clickable */
.expandable-link {
  outline: none !important;
}

.expandable-link:focus {
  outline: 2px solid #007cba !important;
  outline-offset: 2px;
}

.taxonomy-nav-link:hover {
  color: #fff !important;
  background-color: #0292c7 !important;
}

.taxonomy-nav-item.active > .taxonomy-nav-link {
  color: #fff !important;
  background-color: #0292c7 !important;
  border-bottom-color: transparent !important;
}

/* Force text wrapping before arrow */
.has-dropdown .taxonomy-nav-link {
  padding-right: 75px !important;
  width: 100%;
  box-sizing: border-box;
}

.dropdown-arrow {
  position: absolute !important;
  right: 15px !important;
  top: 25px !important;  /* Fixed position instead of 50% */
  transform: none !important;
  font-size: 12px;
  transition: transform 0.3s ease;
  line-height: 1;
  width: 20px;
  height: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
  z-index: 10;
  color: #ffffff !important;  /* White color for main dropdown */
}

.dropdown-arrow:hover {
  background-color: rgba(0, 124, 186, 0.1);
  border-radius: 3px;
}

.taxonomy-nav-item.active .dropdown-arrow {
  transform: rotate(180deg) !important;
}

.sub-dropdown-arrow {
  position: absolute !important;
  right: 10px !important;
  top: 20px !important;  /* Fixed position instead of 50% */
  transform: none !important;
  font-size: 10px;
  transition: transform 0.3s ease;
  line-height: 1;
  width: 16px;
  height: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
  z-index: 10;
  color: #ffffff !important;  /* White color for visibility */
}

.sub-dropdown-arrow:hover {
  background-color: rgba(0, 124, 186, 0.1);
  border-radius: 3px;
}

.taxonomy-nav-dropdown-item.active .sub-dropdown-arrow {
  transform: rotate(90deg) !important;
}

.product-count {
  font-size: 11px;
  color: #666;
  margin-left: 6px;
  font-weight: normal;
}

/* Dropdown Styles - Expanding Menu */
.taxonomy-nav-dropdown {
  position: static;
  background: #03A7E0 !important;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, overflow 0s 0.3s;
  z-index: 1001;
}

.taxonomy-nav-item.active .taxonomy-nav-dropdown {
  max-height: 2000px;
  padding: 8px 0;
  overflow: visible;
  transition: max-height 0.3s ease, padding 0.3s ease, overflow 0s 0s;
}

.taxonomy-nav-dropdown-item {
  position: relative;
  overflow: visible !important;
}

.taxonomy-nav-dropdown-link {
  display: flex;
  align-items: center;
  padding: 12px 40px 12px 40px;
  text-decoration: none;
  color: #fff !important;
  font-size: 13px;
  line-height: 1.4;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
  background: transparent;
  position: relative;
  min-height: 40px;
  height: auto;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.taxonomy-nav-dropdown-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-left-color: #fff;
}

/* Sub-dropdown Styles - Expanding Menu */
.taxonomy-nav-sub-dropdown {
  position: static;
  background: #0292c7;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, overflow 0s 0.3s;
  z-index: 1002;
}

.taxonomy-nav-dropdown-item.active .taxonomy-nav-sub-dropdown {
  max-height: 2000px;
  padding: 8px 0;
  overflow: visible;
  transition: max-height 0.3s ease, padding 0.3s ease, overflow 0s 0s;
}

.taxonomy-nav-sub-dropdown-link {
  display: block;
  padding: 10px 20px 10px 60px;
  text-decoration: none;
  color: #fff !important;
  font-size: 12px;
  line-height: 1.4;
  transition: all 0.2s ease;
  background: transparent;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.taxonomy-nav-sub-dropdown-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Desktop single column layout */
@media (min-width: 769px) {
  .taxonomy-navigation {
    max-width: 300px;
  }
  
  .taxonomy-nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .taxonomy-navigation {
    max-width: 100%;
  }
  
  .taxonomy-nav-link {
    padding: 12px 40px 12px 15px;
    font-size: 12px;
    line-height: 1.2;
    min-height: 45px;
  }
  
  .dropdown-arrow {
    font-size: 10px;
    right: 15px;
    width: 10px;
    height: 10px;
  }
  
  .taxonomy-nav-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-radius: 0;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, overflow 0s 0.3s;
  }
  
  .taxonomy-nav-item.active .taxonomy-nav-dropdown {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    transition: max-height 0.3s ease, overflow 0s 0s;
  }
  
  .taxonomy-nav-sub-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid #f0f0f0;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, overflow 0s 0.3s;
  }
  
  .taxonomy-nav-dropdown-item:hover .taxonomy-nav-sub-dropdown,
  .taxonomy-nav-dropdown-item.active .taxonomy-nav-sub-dropdown {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    transition: max-height 0.3s ease, overflow 0s 0s;
  }
  
  .dropdown-arrow {
    transition: transform 0.3s ease;
  }
  
  .taxonomy-nav-item.active .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
  }
}

/* Modern styling similar to the image */
.taxonomy-navigation {
  background: #03A7E0;
  padding: 0;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.taxonomy-nav-link {
  color: #fff !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  padding: 18px 25px;
  border-bottom: none;
  width: 100%;
  justify-content: space-between;
  text-align: left;
}

.taxonomy-nav-link:hover,
.taxonomy-nav-item:hover > .taxonomy-nav-link {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: #fff;
}

.product-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
}

/* Ensure dropdown product counts are also dark */
.taxonomy-nav-dropdown .product-count,
.taxonomy-nav-sub-dropdown .product-count {
  background: rgba(0, 0, 0, 0.1);
  color: #666 !important;
}

/* Mobile responsive styles for tabs */
@media (max-width: 768px) {
  .nav-tabs-list {
    flex-direction: column;
  }
  
  .nav-tab-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-tab-item:last-child {
    border-bottom: none;
  }
  
  .nav-tab-link {
    text-align: left;
    padding: 12px 15px;
    font-size: 13px;
    color: #fff;
  }
  
  .nav-tab-link:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}

@media (max-width: 480px) {
  .nav-tab-link {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* Swap white logo for colored logo in offcanvas sidebar */
#navigationRegion .offcanvas-header .site-logo img {
  content: url('/sites/default/files/electromoises-logo-1590517985.png');
  max-width: 180px;
  height: auto;
}
