/**
 * Modern Compact Header with Multi-Language Dropdown
 */

.spasiff-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--spasiff-surface);
  border-bottom: 1px solid var(--spasiff-border);
  transition: background 0.2s ease;
}

.spasiff-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

/* Typographic Logo */
.spasiff-brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 4px;
}

.spasiff-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--spasiff-text);
  letter-spacing: -0.02em;
}

.spasiff-logo-accent {
  color: var(--spasiff-primary);
}

.spasiff-logo-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  background: var(--spasiff-accent-soft);
  color: var(--spasiff-accent);
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

.spasiff-desktop-menu {
  display: none;
  gap: 20px;
}

.spasiff-menu-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--spasiff-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.spasiff-menu-link:hover,
.spasiff-menu-link.active {
  color: var(--spasiff-primary);
}

.spasiff-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================
   MULTI-LANGUAGE DROPDOWN STYLING
   ========================================================= */
.spasiff-lang-dropdown {
  position: relative;
}

.spasiff-lang-trigger {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--spasiff-radius-sm);
  background: var(--spasiff-surface-soft);
  border: 1px solid var(--spasiff-border);
  color: var(--spasiff-text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  outline: none !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.spasiff-lang-trigger:hover {
  border-color: var(--spasiff-primary);
}

.spasiff-current-flag {
  font-size: 1rem;
  line-height: 1;
}

.spasiff-chevron {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.spasiff-lang-dropdown.is-open .spasiff-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu Container */
.spasiff-lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: var(--spasiff-surface);
  border: 1px solid var(--spasiff-border);
  border-radius: var(--spasiff-radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  overflow: hidden;
  animation: spasiffLangFadeIn 0.15s ease forwards;
}

.spasiff-lang-dropdown.is-open .spasiff-lang-menu {
  display: block;
}

.spasiff-lang-menu-inner {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 0;
}

/* Custom Scrollbar for Language Menu */
.spasiff-lang-menu-inner::-webkit-scrollbar {
  width: 5px;
}
.spasiff-lang-menu-inner::-webkit-scrollbar-thumb {
  background: var(--spasiff-border);
  border-radius: 10px;
}

.spasiff-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  text-decoration: none !important;
  color: var(--spasiff-text);
  font-size: 0.825rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.spasiff-lang-item:hover {
  background: var(--spasiff-surface-soft);
  color: var(--spasiff-primary);
}

.spasiff-lang-item.is-active {
  background: var(--spasiff-accent-soft);
  color: var(--spasiff-primary);
  font-weight: 700;
}

.lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-code {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--spasiff-text-muted);
  text-transform: uppercase;
}

@keyframes spasiffLangFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   THEME SWITCHER & HAMBURGER
   ========================================================= */
.spasiff-mode-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--spasiff-radius-sm);
  background: var(--spasiff-surface-soft);
  border: 1px solid var(--spasiff-border);
  color: var(--spasiff-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none !important;
  transition: all 0.15s ease;
}

.spasiff-mode-toggle:hover {
  border-color: var(--spasiff-primary);
}

.spasiff-mode-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.spasiff-hamburger-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--spasiff-radius-sm);
  background: var(--spasiff-surface-soft);
  border: 1px solid var(--spasiff-border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  outline: none !important;
}

.spasiff-hamburger-btn span {
  width: 18px;
  height: 2px;
  background: var(--spasiff-text);
  border-radius: 1px;
}

@media (min-width: 768px) {
  .spasiff-desktop-menu { display: flex; }
  .spasiff-hamburger-btn { display: none; }
}

/* Drawer */
.spasiff-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.spasiff-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.spasiff-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: var(--spasiff-surface);
  z-index: 1060;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 20px;
}

.spasiff-mobile-drawer.is-open {
  transform: translateX(0);
}

.spasiff-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.spasiff-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--spasiff-text);
  cursor: pointer;
}

.spasiff-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spasiff-drawer-item {
  color: var(--spasiff-text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}