/* Wrapper setup */
.nav-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Main nav layout */
.nav-item {
  font-size: 0.9rem;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  height: 90px;
  /* line-height: 90px; */
  /* background-color: red; */
  display: flex;
  align-items: center;           /* ✅ vertical centering */
  text-align: center;
  white-space: normal; /* ✅ allow wrapping */
  word-break: break-word; /* ✅ break long words if needed */
  /* background-color: yellow; */

  flex: 0 1 auto;        /* ✅ allow shrinking */
  min-width: 0;          /* ✅ required inside flex to shrink below content size */
}

@media (max-width: 768px) {
  .nav-item {
    font-size: 0.75rem;      /* ✅ smaller font on small screens */
    max-width: 15vw;        /* ✅ limit width */
    padding: 0 0.01rem;      /* ✅ tighter padding */
  }
}


/* Nav links in the center of 75% of the screen */

nav a:hover {
  text-decoration: underline;
}

/* Reset styles for links if needed */
a.no-style {
  all: unset;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0; /* prevent extra space */
}

a.no-style:hover {
  text-decoration: none;
}

#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 2rem;
}

.nav-logo {
  /* background-color: red; */
  width: 120px;
  height: auto;            /* Maintain aspect ratio */
  object-fit: contain;

}

/* Default: show desktop, hide mobile */
.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

/* On small screens: show mobile, hide desktop */
@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }
}


/* Each section: left, center, right */
.nav-images,
.nav-links,
.nav-language {
  display: flex;
  align-items: center;
}

/* Center the nav links */
.nav-links {
  justify-content: center;
  gap: 2rem;
  /* margin-left: -1rem; */
}

/* Align images to the left */
.nav-images {
  justify-content: flex-start;
  gap: 1rem;
}

/* Align language to the right */
.nav-language {
  justify-content: flex-end;
  gap: 1rem;
}

@media (max-width: 768px) {
  .nav-wrapper, 
  .nav-links a,
  .nav-item,
  .language-link,
  .menu .list a {
    font-size: 0.9rem !important;  /* override any mobile-downsizing rules */
  }
  /* Reduce horizontal padding in the fixed nav bar */
  #nav {
    padding: 0 0.5rem;
    justify-content: space-evenly !important; /* ✅ more balanced for tight layouts */
  }

  /* Optional: reduce gap between nav links */
  .nav-links {
    /* background-color: green; */
    gap: 1rem;
    overflow-wrap: anywhere;     /* ✅ break at any point if needed */
    text-align: center;
    min-width: 0;                /* ✅ critical for flex containers */
    flex: 0 1 auto;              /* ✅ allow shrinking */
  }

  .nav-links a {
    white-space: normal;         /* ✅ allow wrapping */
    word-break: break-word;      /* ✅ break long words */
  }

  /* Optional: reduce image size slightly */
  .nav-logo {
    width: 50px;
  }
}