/* ===== WeldFolio Navigation System ===== */

:root {
  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms;
  --transition-base: 250ms;
  --transition-slow: 350ms;

  /* Letter spacing */
  --tracking-tight: -0.025em;
  --tracking-wide: 0.05em;

  /* Z-index */
  --z-sticky: 1000;
  --z-overlay: 999;
}

/* =====================
   1. MAIN NAVBAR
   ===================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(15, 17, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dark-border);
  transition: all var(--transition-base);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--orange);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.navbar-logo .logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--white);
  letter-spacing: var(--tracking-tight);
}
.navbar-logo .logo-text .accent {
  color: var(--orange);
}

/* Desktop nav links */
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
@media (max-width: 768px) {
  .navbar-links { display: none; }
}

.navbar-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.navbar-link:hover {
  color: var(--white);
  background: var(--dark-card);
}
.navbar-link.active {
  color: var(--orange);
  background: rgba(255, 122, 0, 0.1);
}

/* Navbar CTA */
.navbar-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .navbar-cta { display: none; }
}

/* =====================
   2. MOBILE MENU
   ===================== */

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--dark-border);
  cursor: pointer;
  gap: 5px;
  border-radius: var(--radius-md);
  padding: 0;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.hamburger:hover {
  background: var(--dark-card);
  border-color: rgba(255,255,255,0.2);
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
}
.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--gray);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.hamburger:hover span { background: var(--white); }
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--white);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--white);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(24px);
  z-index: calc(var(--z-sticky) - 1);
  display: flex;
  flex-direction: column;
  padding: var(--space-20) var(--space-6) var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  overflow-y: auto;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu .nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-menu .nav-link {
  padding: var(--space-4) var(--space-4);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}
.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active {
  color: var(--white);
  background: var(--dark-card);
}
.mobile-menu .nav-link.active {
  color: var(--orange);
}

.mobile-menu .nav-divider {
  height: 1px;
  background: var(--dark-border);
  margin: var(--space-4) 0;
}
.mobile-menu .nav-footer {
  margin-top: auto;
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* =====================
   3. TABS
   ===================== */

.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--dark-border);
  padding: 0 var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }

/* Tab button */
.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.tab:hover { color: var(--light); }
.tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
.tab .tab-icon { flex-shrink: 0; }

/* Pills variant (rounded) */
.tabs-pills {
  border-bottom: none;
  gap: var(--space-2);
}
.tabs-pills .tab {
  border-radius: var(--radius-full);
  border-bottom: none;
  background: var(--dark-card);
}
.tabs-pills .tab:hover { background: var(--dark-input); }
.tabs-pills .tab.active {
  background: rgba(255, 122, 0, 0.15);
  color: var(--orange);
  border-bottom: none;
}

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Sticky tabs variant */
.tabs-sticky {
  position: sticky;
  top: 64px;
  background: var(--dark);
  z-index: 10;
  padding-top: var(--space-4);
}

/* =====================
   4. BREADCRUMB
   ===================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--gray);
  flex-wrap: wrap;
}
.breadcrumb-item {
  color: var(--gray);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.breadcrumb-item:hover { color: var(--white); }
.breadcrumb-item.current { color: var(--light); }
.breadcrumb-separator {
  color: var(--gray);
  opacity: 0.5;
}

/* =====================
   5. SIDEBAR NAV (dashboard)
   ===================== */

.sidebar {
  width: 240px;
  background: var(--dark-card);
  border-right: 1px solid var(--dark-border);
  min-height: 100vh;
  padding: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
@media (max-width: 1024px) {
  .sidebar { display: none; }
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}
.sidebar-item:hover {
  color: var(--white);
  background: var(--dark-input);
}
.sidebar-item.active {
  color: var(--orange);
  background: rgba(255, 122, 0, 0.1);
  border-left-color: var(--orange);
}
.sidebar-item .sidebar-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--dark-border);
  margin: var(--space-4) 0;
}

.sidebar-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
}

/* =====================
   LEGACY COMPAT ALIASES
   ===================== */

/* Legacy nav (inner pages) */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  height: 64px;
  background: rgba(15, 17, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dark-border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}
nav .logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--white);
  flex-shrink: 0;
}
nav .logo-icon {
  width: 32px;
  height: 32px;
}
nav .nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
nav .nav-links a {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
nav .nav-links a:hover { color: var(--white); background: var(--dark-card); }
nav .nav-links a.active { color: var(--orange); background: rgba(255, 122, 0, 0.1); }
@media (max-width: 768px) {
  nav .nav-links { display: none; }
}

/* Profile tabs (spawacz.html) */
.profile-tabs-nav {
  position: sticky;
  top: 64px;
  background: var(--dark);
  z-index: 10;
  padding-top: var(--space-4);
  border-bottom: 1px solid var(--dark-border);
}
.profile-tabs-list {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.profile-tabs-list::-webkit-scrollbar { display: none; }
.profile-tab-btn {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.profile-tab-btn:hover { color: var(--light); }
.profile-tab-btn.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
.profile-tab-content.hidden { display: none; }
