.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  flex-shrink: 0;
  border-bottom: 1px solid #000;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.logo {
  font-size: 40px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-brand {
  font-family: "Futura Boo", Helvetica, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0px;
  position: relative;
  display: inline-block;
  min-width: 200px;
  height: 1.2em;
  filter: url(#threshold) blur(0.6px);
}

.morph-text {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  white-space: nowrap;
  font-family: "ITC Avant Garde", Helvetica, Arial, sans-serif;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: inherit;
  user-select: none;
}

.morph-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.logo-eye {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.nav-link:hover {
  opacity: 0.6;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-link {
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.search-link:hover {
  opacity: 0.6;
}

.search-input {
  font-size: 15px;
  letter-spacing: 0.3px;
  border: none;
  outline: none;
  padding: 0;
  width: 180px;
  max-width: 180px;
  font-family: Helvetica, Arial, sans-serif;
  display: none;
  background: transparent;
  color: inherit;
  text-align: right;
}

.search-input.active {
  display: block;
}

.search-link.hidden {
  display: none;
}

.mode-wrap,
.pages-wrap {
  position: relative;
}

.mode-btn,
.pages-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.mode-btn svg,
.pages-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.mode-btn.open svg,
.pages-btn.open svg {
  transform: rotate(180deg);
}

.mode-dropdown,
.pages-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 80px;
  display: none;
  z-index: 200;
  border: 1px solid #000;
  background: #fff;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.pages-dropdown {
  min-width: 120px;
}

.mode-dropdown.open,
.pages-dropdown.open {
  display: block;
}

.mode-option,
.page-option {
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px solid #ccc;
  transition:
    background 0.3s,
    color 0.3s;
}

.mode-option:hover,
.mode-option.active,
.page-option:hover,
.page-option.active {
  background: #000;
  color: #fff;
}

.mode-option:last-child,
.page-option:last-child {
  border-bottom: none;
}

.mode-option:hover,
.mode-option.active {
  background: #000;
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #000;
  transition: background 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 150;
  flex-direction: column;
  padding: 72px 24px 24px;
  overflow-y: auto;
  transition: background 0.3s;
}

.mobile-menu.open {
  display: flex;
}

body.dark .mobile-menu {
  background: #000;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

/* Mobile search */
.mobile-search-wrap {
  margin-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

body.dark .mobile-search-wrap {
  border-color: #333;
}

.mobile-search-input {
  width: 100%;
  font-size: 18px;
  padding: 14px 0;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
}

.mobile-search-input::placeholder {
  color: #999;
}

/* Mobile section labels */
.mobile-section-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  padding: 16px 0 4px;
}

/* Mobile dropdown groups */
.mobile-dropdown-group {
  border-bottom: 1px solid #e0e0e0;
}

body.dark .mobile-dropdown-group {
  border-color: #333;
}

.mobile-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: left;
}

.mobile-dropdown-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mobile-dropdown-btn.open svg {
  transform: rotate(180deg);
}

.mobile-dropdown-items {
  display: none;
  padding-bottom: 8px;
}

.mobile-dropdown-items.open {
  display: block;
}

.mobile-dropdown-item {
  font-size: 16px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition:
    background 0.15s,
    color 0.15s;
}

.mobile-dropdown-item:hover,
.mobile-dropdown-item.active {
  background: #000;
  color: #fff;
}

body.dark .mobile-dropdown-item:hover,
body.dark .mobile-dropdown-item.active {
  background: #fff;
  color: #000;
}
