/* NAVBAR BASE */
.main_navbar {
  background-color: #161a1d;
  padding: 15px 0;
}

.nav_container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav_container img {
  width: 120px;
  height: auto;
}

.nav_links {
  display: flex;
  align-items: center;
  column-gap: 25px;
}

.nav_links li {
  position: relative;
  list-style: none;
}

.nav_links li a,
.dropdown_toggle {
  color: white;
  cursor: pointer;
}

.dropdown_toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
}

.dropdown_toggle i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.has_dropdown.is_open .dropdown_toggle {
  color: var(--green);
}

.has_dropdown.is_open .dropdown_toggle i {
  transform: rotate(180deg);
}

/* DROPDOWN — modern floating card, right-aligned so it can never push the
   page into horizontal scroll even when the trigger sits at the far edge */
.has_dropdown {
  position: relative;
}

.dropdown_menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  min-width: 200px;
  max-width: min(280px, calc(100vw - 32px));
  background-color: #ffffff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.has_dropdown.is_open .dropdown_menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown_menu li a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown_menu li a:hover {
  background-color: var(--green);
  color: white;
}

/* TOGGLE BUTTON */
.nav_toggle {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: none;
}

/* FOOTER */
.site_footer {
  background-color: var(--dark);
  color: white;
  padding: 42px 0px 27px 0px;
  margin-top: 80px;
}

.footer_logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer_logos a img {
  width: 250px;
}

.copyright {
  font-weight: 500;
  line-height: 20px;
  margin: 25px 0px;
  color: white !important;
}

.footer_nav {
  margin-bottom: 20px;
}

.footer_nav ul {
  display: flex;
  column-gap: 20px;
}

.footer_nav li a {
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-transform: uppercase;
}

/* MOBILE STYLES ────────────────────────────────────────────────
   Logo + hamburger stay pinned together as the header row; the menu
   opens as a floating panel *below* it (position: absolute), so it
   never pushes the hamburger button out of place or reflows the row. */
@media (max-width: 768px) {
  .nav_container {
    position: relative;
  }

  .footer_logos {
    flex-direction: column;
    row-gap: 16px;
  }

  .nav_links {
    flex-direction: column;
    row-gap: 4px;

    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    width: auto;

    background-color: #1f242b;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: max-height 0.25s ease, opacity 0.2s ease,
      transform 0.25s ease, visibility 0.25s;
  }

  .nav_links.show {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav_links li {
    width: 100%;
    text-align: center;
  }

  .nav_links > li > a {
    display: block;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
  }

  .nav_links > li > a:hover {
    background-color: var(--green);
  }

  .dropdown_toggle {
    justify-content: center;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
  }

  .has_dropdown.is_open .dropdown_toggle {
    background-color: rgba(255, 255, 255, 0.06);
  }

  .dropdown_menu {
    position: static;
    max-width: none;
    width: 100%;
    margin-top: 0;
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    transform: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.2s ease,
      margin-top 0.2s ease, opacity 0.2s ease;
  }

  .has_dropdown.is_open .dropdown_menu {
    transform: none;
    max-height: 400px;
    padding: 8px;
    margin-top: 4px;
  }

  .dropdown_menu li a {
    color: white;
    text-align: center;
    padding: 12px;
  }

  .dropdown_menu li a:hover {
    background-color: var(--green);
  }

  .nav_toggle {
    display: block;
    position: relative;
    z-index: 1001;
  }

  .nav_toggle.is_open i:before {
    content: "\f00d"; /* fa-xmark */
  }
}
