/* Navbar — dark background, white text */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #111111;
  color: #ffffff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  margin: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.navbar.sticky {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  z-index: 10;
}

.navbar-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
}

.logo-image {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
}

.navbar-menu {
  width: 100%;
  display: block;
}

.navbar-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
}

.navbar-item {
  position: relative;
}

.navbar-link,
.n-link {
  color: #ffffff;
  text-decoration: none;
  font-family: Inter, Montserrat, Arial, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  padding: 10px 6px;
  display: inline-block;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.n-link {
  font-weight: 600;
}

.navbar-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  opacity: 0.9;
}

.navbar-link:hover,
.navbar-link:focus {
  color: #ffffff;
  opacity: 0.8;
}

.navbar-link:hover::after,
.navbar-link:focus::after,
.navbar-link.active::after {
  transform: scaleX(1);
}

.navbar-link.active {
  font-weight: 600;
  opacity: 1;
}

.navbar-item-contact {
  margin-left: auto;
}

.contact-link {
  padding: 10px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  color: #ffffff;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.1s ease, border-color 0.25s ease;
}

.contact-link:hover,
.contact-link:focus,
.contact-link.active {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.contact-link:active {
  transform: translateY(1px);
}

/* Language switcher inside navbar */
.navbar .lang-toggle {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.navbar .lang-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
}

.navbar .lang-toggle i {
  color: #ffffff;
}

.navbar .lang-dropdown {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.navbar .lang-dropdown a {
  color: #e8e8ec;
}

.navbar .lang-dropdown a:hover,
.navbar .lang-dropdown a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.navbar-toggle {
  margin-left: 12px;
  margin-right: -6px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease;
  position: relative;
  flex-direction: column;
  gap: 5px;
}

.navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.toggle-line:nth-child(1) {
  top: 12px;
}

.toggle-line:nth-child(2) {
  top: 50%;
  transform: translate(-50%, -50%);
}

.toggle-line:nth-child(3) {
  bottom: 12px;
}

.navbar-toggle.active .toggle-line:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.navbar-toggle.active .toggle-line:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%);
}

.navbar-toggle.active .toggle-line:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 1200px) {
  .navbar-container {
    padding: 8px 18px;
  }

  .navbar-list {
    gap: 18px;
  }

  .navbar-link,
  .n-link {
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  .navbar {
    margin: 15px;
    border-radius: 16px;
  }

  .navbar-container {
    padding: 6px 14px;
  }

  .logo-image {
    height: 36px;
  }

  .contact-link {
    padding: 8px 14px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .navbar {
    margin: 10px;
    border-radius: 14px;
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
  }

  .navbar-container {
    padding: 6px 12px;
  }

  .navbar-actions {
    order: -1;
  }

  .navbar .lang-toggle span {
    display: none;
  }

  .navbar .lang-toggle {
    padding: 0.5rem;
    margin: 0 6px;
    min-width: 44px;
    height: 44px;
    justify-content: center;
    border-radius: 10px;
  }

  .navbar .lang-toggle i.fa-chevron-down {
    display: none;
  }

  .navbar-menu {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .logo-image {
    height: 32px;
  }

  .navbar-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    padding: 20px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    display: block;
    max-height: 0;
    overflow: hidden;
  }

  .navbar-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 500px;
  }

  .navbar-menu .navbar-list {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .navbar-menu .navbar-item {
    width: 100%;
    text-align: center;
  }

  .navbar-menu .navbar-link,
  .navbar-menu .n-link {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    border-radius: 10px;
  }

  .navbar-menu .navbar-link:hover,
  .navbar-menu .navbar-link:focus {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
  }

  .navbar-menu .navbar-link.active {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
  }

  .navbar-menu .navbar-link.active::after {
    display: block;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    width: 30px;
    background: #ffffff;
  }

  .navbar-menu .navbar-link::after {
    display: none;
  }

  .navbar-menu .navbar-item-contact {
    margin-left: 0;
    margin-top: 4px;
  }

  .navbar-menu .contact-link {
    margin: 0 auto;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
  }

  .navbar-menu .contact-link:hover,
  .navbar-menu .contact-link:focus,
  .navbar-menu .contact-link.active {
    background: #ffffff;
    color: #111111;
  }
}

@media (max-width: 480px) {
  .navbar {
    margin: 8px;
    border-radius: 12px;
  }

  .logo-image {
    height: 28px;
  }
}

.navbar a:focus-visible,
.navbar button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
