@import "https://fonts.googleapis.com/css?family=Monda:0,500;0,700;0,600&display=swap";

.navbar-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  background: #D5D1C4;
  border-radius: 16px;
  align-items: center;
  gap: 10px;
  width: 752px;
  height: 54px;
  padding: 10px;
  display: flex;
  overflow: visible;
  transition: width 0.3s ease;
}

.navbar-container.expanded-news {
  width: 808px;
}

.navbar-container.expanded-network {
  width: 833px;
}

.navbar-container.expanded-hub {
  width: 800px;
}

.navbar-explore {
  box-sizing: border-box;
  background: #ECE8DF;
  border: 0.7px solid #FFFDF0;
  border-radius: 10px;
  flex-shrink: 1;
  align-items: center;
  gap: 5px;
  width: 320px;
  height: 34px;
  padding: 8.438px;
  display: flex;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-explore:hover {
  background: #F5F2E8;
  transform: translateY(-1px);
}

.navbar-explore-icon {
  aspect-ratio: 1;
  fill: #2c2e30;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.navbar-explore-text {
  color: #2c2e30;
  font-family: Monda;
  font-size: 14.625px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  display: inline-block;
}

.navbar-icon-button {
  box-sizing: border-box;
  background: #ECE8DF;
  border: 0.7px solid #FFFDF0;
  border-radius: 10px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  display: flex;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-icon-button:hover {
  background: #F5F2E8;
  transform: translateY(-1px);
}

.navbar-icon {
  aspect-ratio: 1;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.navbar-icon-projects {
  aspect-ratio: 15.42/18;
  flex-shrink: 0;
  width: 15.42px;
  height: 18px;
}

.navbar-divider {
  box-sizing: border-box;
  background: #ECE8DF;
  width: 0.563px;
  height: 22.5px;
}

.navbar-mile-button {
  box-sizing: border-box;
  background: #ECE8DF;
  border: 0.7px solid #FFFDF0;
  border-radius: 10px;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  width: 110px;
  height: 34px;
  padding: 8px 0 8px 8px;
  display: flex;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-mile-button:hover {
  background: #F5F2E8;
  transform: translateY(-1px);
}

.navbar-mile-icon {
  aspect-ratio: 1;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.navbar-mile-text {
  color: #2c2e30;
  font-family: Monda;
  font-size: 14.625px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  display: inline-block;
}

.navbar-modules {
  background: #2c2e30;
  border-radius: 10px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 140px;
  height: 34px;
  padding: 8px 10px 8px 0;
  display: flex;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar-modules:hover {
  background: #3a3c40;
  transform: translateY(-1px);
}

.navbar-modules-text-container {
  flex: 1 0 0;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 7px;
  display: flex;
}

.navbar-modules-text {
  color: #F2EEE6;
  font-family: Monda;
  font-size: 14.625px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  display: inline-block;
}

.navbar-modules-divider-container {
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  gap: 6.537px;
  width: 8px;
  display: flex;
}

.navbar-modules-divider {
  box-sizing: border-box;
  background: #F2EEE6;
  width: 0.654px;
  height: 18px;
}

.navbar-modules-icon-container {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  width: 20px;
  padding: 0 2px 0 4px;
  display: flex;
}

.navbar-modules-icon {
  aspect-ratio: 1;
  flex-shrink: 0;
  width: 20px;
  height: 18px;
}

/* Modules Dropdown Styles */
.navbar-modules {
  position: relative;
}

.navbar-modules-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #2c2e30;
  border-radius: 10px;
  border: 0.7px solid #FFFDF0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-out;
  z-index: 2001;
}

.navbar-modules-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background: #3a3c40;
}

.dropdown-text {
  color: #cfccb8;
  font-family: Monda;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
}

.dropdown-link-icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.dropdown-item:hover .dropdown-link-icon {
  opacity: 1;
}

.dropdown-divider {
  height: 1px;
  background: #ECE8DF;
  margin: 4px 0;
  opacity: 0.3;
}

/* Expandable buttons - FORCE CENTER WITH ABSOLUTE POSITIONING */
.navbar-expandable {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.navbar-expandable .navbar-icon,
.navbar-expandable .navbar-icon-projects {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.navbar-button-text {
  color: #2c2e30;
  font-family: Monda;
  font-size: 14.625px;
  font-weight: 500;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin-left: 0;
}

.navbar-expandable:hover {
  padding: 8px 12px !important;
  justify-content: flex-start !important;
  background: #F5F2E8;
}

.navbar-expandable:hover .navbar-icon,
.navbar-expandable:hover .navbar-icon-projects {
  position: static;
  transform: none;
  margin-right: 5px;
}

.navbar-expandable:hover .navbar-button-text {
  opacity: 1;
  width: auto;
  margin-left: 0;
}

/* Specific widths for each expandable button */
.navbar-expandable[data-text="News"]:hover {
  width: 90px !important;
}

.navbar-expandable[data-text="Network"]:hover {
  width: 115px !important;
}

.navbar-expandable[data-text="Hub"]:hover {
  width: 82px !important;
}

/* Large Tablet responsive (1024px) */
@media (max-width: 1024px) {
  .navbar-container {
    width: auto;
    max-width: calc(100vw - 100px);
  }

  .navbar-explore {
    width: 200px;
  }

  .navbar-container.expanded-news,
  .navbar-container.expanded-network,
  .navbar-container.expanded-hub {
    width: auto;
  }
}

/* Tablet responsive (768px) */
@media (max-width: 768px) {
  .navbar-container {
    top: auto;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%);
    width: calc(100vw - 40px);
    max-width: 400px;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .navbar-container.expanded-news,
  .navbar-container.expanded-network,
  .navbar-container.expanded-hub {
    width: calc(100vw - 40px);
    max-width: 400px;
  }
  
  .navbar-explore {
    width: 100%;
    order: 1;
    height: 38px;
  }

  .navbar-explore-text {
    font-size: 13px;
  }
  
  .navbar-icon-button {
    width: 38px;
    height: 38px;
    order: 2;
  }

  /* Disable expand on mobile - just show icons */
  .navbar-expandable:hover {
    width: 38px !important;
    padding: 8px !important;
    justify-content: center !important;
  }

  .navbar-expandable:hover .navbar-icon,
  .navbar-expandable:hover .navbar-icon-projects {
    position: absolute;
    transform: translate(-50%, -50%);
    margin-right: 0;
  }

  .navbar-expandable:hover .navbar-button-text {
    opacity: 0;
    width: 0;
  }
  
  .navbar-mile-button {
    width: auto;
    flex: 1;
    height: 38px;
    order: 3;
    justify-content: center;
  }

  .navbar-mile-text {
    font-size: 13px;
  }
  
  .navbar-modules {
    width: auto;
    flex: 1;
    height: 38px;
    order: 4;
  }

  .navbar-modules-text {
    font-size: 13px;
  }
  
  .navbar-divider {
    display: none;
  }

  /* Dropdown adjustments */
  .navbar-modules-dropdown {
    bottom: calc(100% + 10px);
    top: auto;
    right: 0;
    transform: translateY(10px);
  }

  .navbar-modules-dropdown.show {
    transform: translateY(0);
  }
}

/* Small Mobile responsive (480px) */
@media (max-width: 480px) {
  .navbar-container {
    width: calc(100vw - 40px);
    max-width: none;
    padding: 8px;
    gap: 6px;
    bottom: 20px;
    border-radius: 14px;
  }

  .navbar-explore {
    height: 36px;
    padding: 6px;
  }

  .navbar-explore-icon {
    width: 18px;
    height: 18px;
  }

  .navbar-explore-text {
    font-size: 12px;
  }

  .navbar-icon-button {
    width: 36px;
    height: 36px;
  }

  .navbar-icon {
    width: 16px;
    height: 16px;
  }

  .navbar-icon-projects {
    width: 14px;
    height: 16px;
  }

  .navbar-mile-button {
    height: 36px;
    padding: 6px;
    gap: 6px;
  }

  .navbar-mile-icon {
    width: 18px;
    height: 18px;
  }

  .navbar-mile-text {
    font-size: 12px;
  }

  .navbar-modules {
    height: 36px;
    padding: 6px 8px 6px 0;
  }

  .navbar-modules-text {
    font-size: 12px;
  }

  .navbar-modules-icon {
    width: 16px;
    height: 14px;
  }

  .navbar-modules-divider {
    height: 14px;
  }

  /* Dropdown mobile */
  .dropdown-item {
    padding: 10px 14px;
  }

  .dropdown-text {
    font-size: 13px;
  }
}

/* Very small screens (360px and below) */
@media (max-width: 360px) {
  .navbar-container {
    gap: 4px;
    padding: 6px;
  }

  .navbar-icon-button {
    width: 32px;
    height: 32px;
  }

  .navbar-mile-button,
  .navbar-modules {
    height: 32px;
  }

  .navbar-mile-text,
  .navbar-modules-text {
    font-size: 11px;
  }
}

/* Safe area insets for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .navbar-container {
      bottom: calc(12px + env(safe-area-inset-bottom));
    }
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .navbar-container {
    bottom: 10px;
    width: auto;
    max-width: 500px;
    flex-wrap: nowrap;
  }

  .navbar-explore {
    width: 180px;
    order: 0;
  }
}
