:root {
  --navbar-logo-margin: calc(100px - ((1700px - 100vw) / 5.5));
}

/* Base styles (mobile-first) */
.navbar {
  background-color: var(--color-navbar-transparent);
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1000;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);

  transition: background-color 0.3s ease;
}

/*navigation top clickable header "kaliakair-pourashava"*/
.navbar-content a {
  text-decoration: none;
  color: rgb(0, 0, 0);
}

.navbar-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;

  margin: 0 auto;
}

.imageSection {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: space-between;

  transition: margin-left 0.3s ease;
}

.logoAtTop {
  width: 100px;
  height: 100px;
}

.website_title {
  font-size: 32px;
  margin: 0;
  font-family: "Lora", serif;
  /*font-size: 48px;*/
  color: #ffffff;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(6, 2, 2, 0.5);
  font-weight: 700;
  letter-spacing: 1px;
  padding: 15px;
}
.header-container {
  background-color: #006400;
  padding: 40px 0;
}
.hamburger {
  display: block;
  background: none;
  border: none;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.navigation-section {
  display: none;
  width: 100%;
  flex-direction: column;
  background-color: var(--color-navbar-solid);

  flex-wrap: nowrap; /* Prevent wrapping on smaller screens */
}

.navigation-section.show {
  display: flex;
}

.navigation-section .noDrop,
.dropdown .dropbtn {
  width: 100%;
  text-align: left;
  padding: 15px;
  color: white;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;

  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: max-content; /* Ensure buttons don't shrink smaller than their content */

  transition: background-color 0.4s ease;
}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-content {
  display: none;
  width: 100%;
  background-color: rgba(22, 134, 97, 0.74);
}

.dropdown.active .dropdown-content {
  display: block;
}

.dropdown-content a {
  padding: 10px 30px;
  color: white;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.navigation-section a,
.dropdown-content a {
  text-decoration: none;
}

/* Hover effects */
.navbar:hover {
  background-color: var(--color-navbar-solid);
}

.navigation-section .noDrop:hover,
.dropdown .dropbtn:hover,
.dropdown-content a:hover {
  background-color: rgba(91, 221, 167, 0.767);
}

/* Language selector styles for desktop size*/
.language-selector {
  position: absolute;
  top: var(--height-navbar);
  right: 20px;
  background-color: rgba(57, 175, 136, 0.548);
  padding: 5px 15px;
  border-radius: 0 0 4px 4px;
  z-index: 999;
}

.language-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  color: white;
}

.lang-btn {
  color: white;
  text-decoration: none;
  padding: 2px 5px;
  transition: opacity 0.3s ease;
}

.lang-btn:hover {
  opacity: 0.8;
}

.lang-btn.active {
  font-weight: bold;
  border-bottom: 2px solid white;
}

.language-selector:hover {
  background-color: rgb(57, 175, 136);
}

/* Mobile responsive adjustments for lang selector */
@media screen and (max-width: 804px) {
  .language-selector {
    top: 137px; /* Adjust based on your mobile navbar height */
  }
}

/* Desktop styles */
@media screen and (min-width: 926px) {
  .navbar {
    height: var(--height-navbar);
  }

  .navbar-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
  }

  .imageSection {
    width: auto;
    /* Add margin to push it right */
    margin-left: 100px; /* Adjust this value as needed */
  }

  .logoAtTop {
    width: 100px;
    height: 100px;
  }

  .website_title {
    font-size: 1.5rem;
  }

  .hamburger {
    display: none;
  }

  .navigation-section {
    display: flex !important;
    flex-direction: row;
    width: auto;
    background-color: transparent;
  }

  .dropdown {
    position: relative;
  }

  .dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: max-content;
    z-index: 1000;

    /* Center the dropdown relative to its parent */
    left: 70%;
    transform: translateX(-70%);
    /* Add some padding to prevent text touching edges */
  }

  .dropdown-content a {
    background-color: rgb(47, 133, 97);
    white-space: nowrap;
  }

  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* Add a media query to gradually reduce margin as screen gets smaller */
/* Movement range */
@media screen and (min-width: 1050px) and (max-width: 1700px) {
  .imageSection {
    margin-left: var(--navbar-logo-margin);
  }
}

/* When screen gets too small, remove margin completely */
@media screen and (max-width: 1050px) {
  .imageSection {
    margin-left: 0;
  }
  /*reduce font size and padding*/
  .navigation-section .noDrop,
  .navigation-section .dropdown .dropbtn {
    height: 100%;
    font-size: 14px;
  }

  .navigation-section .noDrop,
  .dropdown .dropbtn {
    padding: 20px 10px;
  }
}
