/* NAVBAR - Dashy (redesign) */

.navbar {
  position: fixed;
  width: 100%;
  max-width: 100vw;
  top: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: var(--border-light, #f0f0f1);
  padding: 10px 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  max-width: var(--maxw, 1240px);
  margin: auto;
  padding-inline: 20px;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  color: var(--ink, #0a0a0b);
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  flex-shrink: 0;
}
.logo i { color: var(--primary, #4f46e5); font-size: 1.1rem; }
.logo:has(.logo-img) i,
.logo:has(.logo-img) span { display: none; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--text-muted, #56565e);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink, #0a0a0b); }

.right-menu { display: flex; align-items: center; gap: 14px; }

/* Social — desktop w navbarze */
.nav-social {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--text-muted, #56565e);
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.nav-social a:hover {
  color: var(--primary, #4f46e5);
  background: var(--primary-soft, #eef2ff);
  transform: translateY(-1px);
}

.nav-drawer-extra { display: none; }

.lang-btn {
  background: transparent;
  border: 1px solid var(--border, #e7e7e9);
  color: var(--text-muted, #56565e);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
}
.lang-btn:hover { background: var(--bg-muted, #f4f4f5); color: var(--ink, #0a0a0b); }

.login {
  color: var(--text-muted, #56565e);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  transition: color 0.2s;
}
.login:hover { color: var(--ink, #0a0a0b); }

.signup {
  background: var(--ink, #0a0a0b);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.signup:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(10,10,11,0.45); }

/* Stały CTA na mobile (jak naffy) */
.nav-cta-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 9px 14px;
  margin-left: auto;
  margin-right: 8px;
  border-radius: var(--radius-pill, 999px);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: var(--gradient-brand-h, linear-gradient(90deg, #4338ca, #7c3aed));
  box-shadow: 0 8px 20px -10px rgba(90, 0, 255, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta-mobile:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(90, 0, 255, 0.5);
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
  color: var(--ink, #0a0a0b);
  cursor: pointer;
  padding: 0;
  background: var(--bg-muted, #f4f4f5);
  border: 1px solid var(--border, #e7e7e9);
  border-radius: 12px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.hamburger:hover { background: #fff; border-color: var(--border-strong, #d4d4d8); }
.hamburger .hamburger-icon { position: relative; width: 18px; height: 14px; }
.hamburger .hamburger-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease, cubic-bezier(0.22,0.61,0.36,1)), opacity 0.2s, top 0.3s;
}
.hamburger .hamburger-icon span:nth-child(1) { top: 0; }
.hamburger .hamburger-icon span:nth-child(2) { top: 6px; }
.hamburger .hamburger-icon span:nth-child(3) { top: 12px; width: 70%; }
.hamburger.active .hamburger-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.hamburger.active .hamburger-icon span:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-icon span:nth-child(3) { top: 6px; width: 100%; transform: rotate(-45deg); }

.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,11,0.45);
  backdrop-filter: blur(2px);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mobile-menu-backdrop.active {
  display: block;
  opacity: 1;
}

/* Mobile drawer — jeden panel */
.mobile-drawer {
  display: none;
}

@media (max-width: 992px) {
  .nav-social--desktop { display: none; }

  /* Linki tylko w szufladzie — nie w pasku (gdy JS jeszcze nie przeniósł węzłów) */
  .nav-wrapper > .nav-links,
  .nav-wrapper > #navLinks,
  .nav-wrapper > .right-menu,
  .nav-wrapper > #rightMenu {
    display: none !important;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    background: #fff;
    z-index: 1101;
    box-shadow: -12px 0 48px rgba(10,10,11,0.14);
    transform: translateX(100%);
    transition: transform 0.38s var(--ease, cubic-bezier(0.22,0.61,0.36,1));
    overflow: hidden;
  }
  .mobile-drawer.active { transform: translateX(0); }

  /* Pasek nawigacji nie nachodzi na szufladę — zamyka się wraz z menu */
  body.mobile-menu-open .navbar {
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light, #f0f0f1);
    flex-shrink: 0;
  }
  .mobile-drawer-head .logo { font-size: 1.15rem; }
  .mobile-drawer-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border, #e7e7e9);
    border-radius: 10px;
    background: var(--bg-subtle, #fafafa);
    color: var(--ink, #0a0a0b);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 8px 22px 24px;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: static;
    width: 100%;
    height: auto;
    padding: 0;
    gap: 0;
    box-shadow: none;
    transform: none;
    background: transparent;
  }
  .nav-links a {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light, #f0f0f1);
    font-size: 1.05rem;
    font-weight: 600;
  }
  .nav-links a.active {
    color: var(--primary, #4f46e5);
  }

  .nav-drawer-extra {
    display: block;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light, #f0f0f1);
  }
  .nav-drawer-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light, #8b8b94);
    margin-bottom: 12px;
  }
  .nav-social--drawer { gap: 8px; }
  .nav-social--drawer a {
    width: 42px;
    height: 42px;
    background: var(--bg-subtle, #fafafa);
    border: 1px solid var(--border-light, #f0f0f1);
    font-size: 1.05rem;
  }

  .right-menu {
    display: flex;
    flex-direction: column;
    position: static;
    width: 100%;
    padding: 20px 0 0;
    margin-top: auto;
    gap: 10px;
    background: transparent;
    border-top: 1px solid var(--border-light, #f0f0f1);
    transform: none;
  }
  .right-menu .lang-btn { align-self: flex-start; }
  .right-menu .signup {
    text-align: center;
    padding: 14px;
    width: 100%;
  }
  .right-menu .login {
    text-align: center;
    padding: 8px 0;
  }

  .nav-cta-mobile {
    display: inline-flex;
  }

  .hamburger {
    display: flex !important;
    margin-left: 0;
  }
  .nav-wrapper { position: relative; }

  .mobile-drawer .nav-links,
  .mobile-drawer #navLinks {
    display: flex !important;
  }
  .mobile-drawer .right-menu,
  .mobile-drawer #rightMenu {
    display: flex !important;
  }

  .mobile-drawer-head .logo-img {
    height: 28px;
    max-width: 110px;
  }
}

@media (min-width: 993px) {
  .nav-cta-mobile { display: none !important; }

  .navbar .nav-wrapper > .logo .logo-img {
    height: 34px;
    max-width: 148px;
  }
  .navbar.scrolled .nav-wrapper > .logo .logo-img {
    height: 30px;
    max-width: 132px;
  }
}

@media (max-width: 768px) {
  .navbar { padding: 10px 0; }
  .nav-wrapper {
    padding-inline: 12px;
    gap: 6px;
  }
  .nav-wrapper > .logo {
    min-width: 0;
    flex: 0 1 auto;
    max-width: none;
  }
  .nav-cta-mobile {
    padding: 8px 12px;
    font-size: 0.74rem;
  }
  .nav-wrapper > .logo .logo-img {
    height: 28px;
    max-width: min(118px, 44vw);
  }
  .hamburger {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}
