﻿.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    rgba(233, 233, 233, 0.1),
    rgba(80, 80, 80, 0.1)
  );
  border: 2px solid rgba(12, 21, 39, 0.6);
  box-shadow: 0 0 8px rgba(12, 21, 39, 0.4);
}

.brand--bg {
  display: inline-block;
  height: 40px;
  width: 200px;
  background-image: url("../assets/img/LOGO_SM.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.menu {
  display: flex;
  gap: 28px;
  font-size: clamp(12px, 2em, 22px);
  margin-right: 30px;
  font-family: Telegraf, Garet;
  white-space: nowrap;
  flex: 1 1 auto;
  justify-content: right;
}

.menu a {
  font-family: "Garet", sans-serif !important;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  opacity: 0.95;
}

.menu a:hover {
  text-decoration: underline;
}

.menu a.active {
  opacity: 1;
  font-weight: 900;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

@media (max-width: 900px) {
  .menu {
    display: none;
  }

  .menu.open {
    display: flex;
    position: absolute;
    right: 24px;
    top: 64px;
    flex-direction: column;
    gap: 16px;
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 16px;
    border-radius: 12px;
  }

  .nav-toggle {
    display: block;
  }
}

/* ===== Nav Services ===== */
#nav-services.nav-services {
  position: absolute;
  top: var(--navH, 64px);
  left: 0;
  right: 0;
  z-index: 1100;

  display: flex;
  justify-content: center;

  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;

  transition:
    max-height 0.36s ease,
    opacity 0.22s ease,
    transform 0.28s ease;
}

#nav-services.nav-services.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 85vh;
}

#nav-services .nav-services__card {
  position: relative;
  margin: 12px;
  max-width: 1300px;
  width: 100%;
  border-radius: 22px;
  background: rgba(255, 255, 255);
  box-shadow: none !important;
  transform-origin: top center;
  animation: none;
}

#nav-services .nav-services__backdrop {
  display: none !important;
}

@media (max-width: 900px) {
  #nav-services .nav-services__card {
    margin: 8px 12px 14px;
  }
}

.nav-services__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  color: #111827;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.nav-services__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

#nav-services .svc-list a.active[aria-current="page"] {
  font-weight: 700;
}

.svc-col {
  display: grid;
  grid-template-rows: auto 1fr;
}

.svc-heading {
  margin: 0 0 12px;
  line-height: 1.15;
  min-height: calc(1.15em * 3);
  display: flex;
  align-items: center;
}

/* ===== Language switch ===== */
.lang-switch {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.lang-btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition:
    transform 0.12s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.lang-btn.is-active,
.lang-btn[aria-current="true"] {
  background: #ffffff;
  color: #111827;
  border-color: #ffffff;
}

@media (max-width: 900px) {
  .lang-switch {
    top: 8px;
    right: 10px;
    gap: 6px;
  }
  .lang-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* Dropdown otwierany tylko kliknięciem, nie hoverem */
.nav-item.has-submenu .submenu {
  display: none;
}

.nav-item.has-submenu.is-open .submenu {
  display: block;
}

.nav-item.has-submenu > .nav-link {
  cursor: pointer;
}

/* Fix pozycji dropdownu uslug w katalogu /uslugi-cyberbezpieczenstwa/ */
#nav-services.nav-services,
.nav-services {
  top: 96px !important;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

@media (max-width: 768px) {
  #nav-services.nav-services,
  .nav-services {
    top: 76px !important;
    max-height: calc(100vh - 96px);
  }
}
