/* ═══════════════════════════════════════
   SITE HEADER  (sticky, two-row)
   ═══════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--white-14);
}

/* ── Top row ── */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.burger-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--icon-color);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xs);
  transition: opacity var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.burger-btn:hover  { opacity: 0.75; }
.burger-btn:active { opacity: 0.5; background: var(--white-08); }

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Bigger logo */
.header-logo img { display: block; height: 40px; width: auto; }

/* Tagline */
.header-tagline {
  flex: 1;
  text-align: center;
  font-family: 'Unbounded', 'RoadRadio', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.3s;
  line-height: 1;
}

.header-tagline .lime   { color: var(--lime); }
.header-tagline .violet { color: var(--purple); }

/* Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Разместить button: purple circle + text ── */
.btn-post {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  transition: opacity var(--transition), transform 0.1s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn-post:hover  { opacity: 0.82; }
.btn-post:active { transform: scale(0.96); opacity: 0.7; }

.btn-post + .icon-action { margin-left: 12px; }

.btn-post-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}

.btn-post:hover .btn-post-icon { background: #7a4de8; }

.icon-action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  border-radius: 50%;
  cursor: pointer;
  color: var(--icon-color);
  transition: background var(--transition), border-color var(--transition), transform 0.1s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.icon-action img {
	width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white-14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    flex-shrink: 0;
    transition: background 0.3s;
}

.icon-action:hover  { background: var(--white-08); border-color: var(--white-40); }
.icon-action:active { transform: scale(0.9); }

/* ── Search row ── */
.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 16px;
  position: relative;
}

.search-cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  border: none;
  border-radius: var(--r-xxl);
  padding: 10px 18px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.search-cat-btn:hover  { background: #7a4de8; }
.search-cat-btn:active { transform: scale(0.97); background: var(--purple-dark); }

.search-cat-wrap.open .search-cat-btn { background: var(--purple-dark); }
.search-cat-wrap .search-cat-btn svg:last-child { opacity: 0.7; transition: transform 0.2s; }
.search-cat-wrap.open .search-cat-btn svg:last-child { transform: rotate(180deg); opacity: 1; }

/* ── Dropdown wrappers ── */
.search-dropdown-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  border-radius: var(--r-xxl);
  padding: 9px 16px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.search-dropdown:hover  { background: var(--white-08); border-color: var(--white-40); }
.search-dropdown:active { transform: scale(0.97); }

.search-dropdown-wrap.open .search-dropdown {
  border-color: var(--purple);
  background: var(--white-08);
}

.search-dropdown svg { opacity: 0.6; flex-shrink: 0; transition: transform 0.2s; }
.search-dropdown-wrap.open .search-dropdown svg { transform: rotate(180deg); opacity: 1; }

/* ── Dropdown panel ── */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--white-14);
  border-radius: var(--r-l);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: background 0.3s, border-color 0.3s;
}

.search-dropdown-wrap.open .dropdown-panel { display: flex; }

.dropdown-item {
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  width: 100%;
}

.dropdown-item:hover  { background: var(--white-08); }
.dropdown-item:active { background: var(--white-14); }
.dropdown-item.selected { color: var(--purple); font-weight: 600; }

[data-theme="light"] .dropdown-item { color: var(--white); }

/* ── Category mega dropdown ── */
.cat-mega {
  flex-direction: row !important;
  gap: 0;
  padding: 8px;
}

.cat-mega-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
}

.cat-mega-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 210px;
  padding-left: 8px;
  margin-left: 8px;
  border-left: 1px solid var(--white-14);
  transition: border-color 0.3s;
}
.cat-mega.has-sub .cat-mega-sub { display: flex; }

.cat-mega-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  transition: background var(--transition), color var(--transition);
}
.cat-mega-item:hover  { background: var(--white-08); }
.cat-mega-item.active { background: rgba(139,93,246,0.1); color: var(--purple); }
.cat-mega-item.selected { color: var(--purple); font-weight: 600; }
.cat-mega-item svg    { flex-shrink: 0; opacity: 0.4; transition: opacity var(--transition); }
.cat-mega-item.active svg { opacity: 1; }
.cat-mega-all { justify-content: flex-start; }

.cat-sub-list {
  display: none;
  flex-direction: column;
  gap: 2px;
}
.cat-sub-list.active { display: flex; }

.cat-sub-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.cat-sub-item:hover  { background: var(--white-08); }
.cat-sub-item:active { background: var(--white-14); }
.cat-sub-item.selected { color: var(--purple); font-weight: 600; }

/* ── Search input ── */
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  border-radius: var(--r-xxl);
  padding: 9px 18px;
  transition: border-color var(--transition), background var(--transition);
  min-width: 0;
}

.search-input-wrap:focus-within {
  border-color: var(--purple);
  background: var(--white-08);
}

.search-input-wrap svg { flex-shrink: 0; color: var(--white-70); }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  caret-color: var(--purple);
  min-width: 0;
  transition: color 0.3s;
}

.search-input::placeholder { color: var(--white-40); }

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--white-14);
  border: none;
  border-radius: 50%;
  color: var(--white-70);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.search-clear:hover  { background: var(--white-40); color: var(--white); }
.search-clear:active { transform: scale(0.9); }

.btn-search {
  background: var(--lime);
  border: none;
  border-radius: var(--r-xxl);
  padding: 10px 28px;
  color: #1e1e2a;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), transform 0.1s, opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-search:hover  { background: #c8ff30; }
.btn-search:active { transform: scale(0.97); opacity: 0.9; }

/* ── Search filters group (dropdowns) ── */
.search-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Filter icon (collapsed, small screens) ── */
.search-filter-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  border: 1px solid var(--white-14);
  color: var(--icon-color);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.search-filter-btn:hover  { background: var(--white-08); border-color: var(--white-40); }
.search-filter-btn.active { border-color: var(--purple); background: var(--white-08); }

/* ── Responsive header ── */
@media (max-width: 1024px) {
  .header-tagline { font-size: 18px; }
}

@media (max-width: 860px) {
  .header-tagline { display: none; }
  .header-top { justify-content: space-between; }
}

@media (max-width: 700px) {
  .header-top { height: 56px; }
  .btn-post-label { display: none; }
  .btn-post { gap: 0; }
}

/* Collapse dropdowns → filter icon at ≤950px */
@media (max-width: 950px) {
  .search-filter-btn { display: flex; }
  .search-filters { display: none; width: 100%; order: 10; flex-wrap: wrap; gap: 8px; }

  .header-search { flex-wrap: wrap; }

  .header-search.filters-open .search-filters {
    display: flex;
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (max-width: 500px) {
  .header-search { gap: 8px; }
  .btn-search { padding: 10px 16px; font-size: 14px; }
}

/* ── HIDE DESKTOP HEADER ON MOBILE ── */
@media (max-width: 510px) {
  .site-header { display: none !important; }
}
/* ══════════════════════════════════════════
   SEARCH SUGGESTIONS
   ══════════════════════════════════════════ */
.search-input-outer {
  flex: 1;
  position: relative;
  min-width: 0;
}

.search-input-outer .search-input-wrap {
  flex: none;
  width: 100%;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--white-14);
  border-radius: var(--r-xl);
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  transition: background 0.3s, border-color 0.3s;
}

.search-suggest-section {
  padding: 8px 0;
}

.search-suggest-label {
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--white-30);
}

.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.search-suggest-item:hover { background: var(--white-08); }

.search-suggest-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-m);
  background: var(--white-08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white-40);
}
.search-suggest-icon--history { color: var(--white-30); }
.search-suggest-icon--trend   { color: var(--purple); background: rgba(139,93,246,0.12); }

.search-suggest-text {
  flex: 1;
  font-size: 14px;
  color: var(--white);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-suggest-text em {
  font-style: normal;
  color: var(--purple);
  font-weight: 600;
}

.search-suggest-sep {
  height: 1px;
  background: var(--white-08);
  margin: 0 16px;
}

/* Mobile suggestions — above the input (drop-up) */
.m-search-pill { position: relative; flex: 1; }
.m-search-suggestions {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--white-14);
  border-radius: var(--r-xl);
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 -8px 28px rgba(0,0,0,0.45);
  transition: background 0.3s, border-color 0.3s;
}

.lk-tab-badge2 {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #fff;
    transition: background 0.2s, transform 0.15s;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    margin-right: -35px;
    top: 8px;
}

.search-dropdown-wrap select {
  width: 100%;
  height: 44px;
  padding: 0 32px 0 16px;
  background: var(--white-08);
  border: 1px solid var(--white-14);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.search-dropdown-wrap select:focus {
  outline: none;
  border-color: #c6ff00;
}
.search-select {
  width: 100%;
  height: 44px;
  padding: 0 32px 0 16px;
  background: var(--white-08);
  border: 1px solid var(--white-14);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.search-select:focus {
  outline: none;
  border-color: #c6ff00;
}