.clemo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: var(--background-color);
  transition: all 0.3s ease;
  height: 150px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.clemo-header.clemo-shrink {
  height: 70px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.clemo-logo {
  max-height: 100px;
  transition: max-height 0.3s ease;
}

.clemo-header.clemo-shrink .clemo-logo {
  max-height: 40px;
}

.clemo-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.clemo-navbar-brand {
  margin-left: 0;
  display: flex;
  align-items: center;
}

.clemo-navbar-collapse {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  transition: max-height 0.3s ease;
  align-items: center;
}

.clemo-navbar-collapse.clemo-show {
  display: flex;
}

.clemo-navbar-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.clemo-nav-linkitem {
  padding-left: 15px;
  padding-right: 15px;
}

.clemo-nav-link {
  color: var(--nav-text-color);
  /* font-size: 1.3rem */
  text-transform: uppercase;
  padding: 15px 0;
  display: block;
  transition: font-size 0.3s ease, color 0.3s ease;
  cursor: pointer;
  font-size: clamp(0.85rem, 1vw + 0.2rem, 1.1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  position: relative;
  display: inline-block;
}

.clemo-nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px; /* adjust to taste; -6 to -10 works */
  transform: translateX(-50%) translateY(-4px);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--dark-background-color); /* triangle color */
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;   /* triangle shouldn't capture clicks */
  z-index: 2;             /* ensure above background */
}

.clemo-nav-link:hover::after,
.clemo-nav-link:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Optional: show triangle for active route too */
.clemo-nav-link.router-link-active::after,
.clemo-nav-link.is-active::after {  /* if you toggle a class yourself */
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Optional: avoid crowding in mobile collapsed nav */
@media (max-width: 991px) {
  .clemo-nav-link::after { display: none; }
}

.clemo-nav-link:hover {
  color: var(--dark-background-color);
}

.clemo-navbar-toggler {
  display: none;
}

/* Responsive toggler */
.clemo-navbar-toggler {
  display: none; /* Hide toggler by default */
}

.clemo-navbar-toggler-icon {
  width: 25px;
  height: 2px;
  background-color: #333;
  display: block;
  position: relative;
}

.clemo-navbar-toggler-icon::before,
.clemo-navbar-toggler-icon::after {
  content: "";
  width: 25px;
  height: 2px;
  background-color: #333;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease;
}

.clemo-navbar-toggler-icon::before {
  top: -7px;
}

.clemo-navbar-toggler-icon::after {
  top: 7px;
}


/* Style the dropdown */
.dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--background-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 200px;
  z-index: 1000;
}

/* When Angular sets .show on desktop */
.dropdown-menu.show {
  display: block;
}
.dropdown-item {
  padding: 20px 15px;
  cursor: pointer;
  color: var(--nav-text-color);
  transition: background 0.3s ease-in-out;
  text-transform: uppercase;
  font-weight: 500;
  width: max-content;
}

.dropdown-item-link {
  padding: 20px;
}
/* Show dropdown when hovering over the parent */
/* .dropdown:hover .dropdown-menu {
  display: block;
} */

.clemo-header a,
.clemo-header a:link,
.clemo-header a:visited {
  color: var(--nav-text-color) !important;
  text-decoration: none !important;
}

.clemo-header a:hover,
.clemo-header a:active {
  color: var(--dark-background-color) !important;
}

/* Admin dropdown button (not an <a>) */
.admin-dropbtn {
  color: var(--nav-text-color) !important;
  background: transparent;
  border: 0;
}

/* Admin dropdown anchors */
.clemo-header .admin-dropdown-content a,
.clemo-header .admin-dropdown-content a:visited {
  color: var(--nav-text-color) !important;
}
.clemo-header .admin-dropdown-content a:hover,
.clemo-header .admin-dropdown-content a:active {
  color: var(--dark-background-color) !important;
}

/* Optional: active router link */
.clemo-header a.router-link-active,
.clemo-header a.router-link-active:visited {
  color: var(--nav-active-text) !important;
  background: var(--nav-active-background) !important;
}

@media (max-width: 991px) {
  .clemo-navbar-nav {
    display: block;
    height: 80vh;
  }
  .clemo-navbar-collapse {
    display: none;
    flex-direction: column;
    background-color: var(--background-color);
    position: absolute;
    top: 170px;
    left: 0;
    width: 100%;
    z-index: 1000;
  }

  .clemo-nav-linkitem {
    width: 100%;
    text-align: center;
    /* padding: 15px; */
  }

  .clemo-nav-link {
    padding: 10px;
    font-size: 1.25rem;
  }

  .clemo-navbar-toggler {
    display: block;
    padding: 20px;

    background-color: transparent;
    border: 0px;
  }

  .clemo-navbar-collapse.clemo-show {
    display: flex;
  }

  .clemo-navbar-collapse {
    top: 170px;
  }
}

@media (max-width: 768px) {
  .clemo-navbar-collapse.clemo-show .dropdown-menu {
    display: block;
    position: relative;
    background-color: transparent;
    box-shadow: none;
    padding-left: 15px;
    border: 0;
  }

  .dropdown-item {
    padding-left: 30px;
    text-transform: uppercase;
    font-weight: 300;
  }
}

