/* Site search */
.site-search {
  position: relative;
  z-index: 30;
}

/* Панель выходит ниже шапки — без z-index шапки её перекрывает соседний navbar */
.site-header {
  position: relative;
  z-index: 5;
}

.site-search__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: none !important;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-search__toggle:hover,
.site-search.is-open .site-search__toggle {
  background: rgba(243, 156, 18, 0.28);
  border-color: #ffd166;
  transform: translateY(-1px);
}

.site-search__toggle i {
  color: #ffd166 !important;
}

.site-search__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 40;
  width: min(92vw, 22rem);
  padding: 0.75rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 42, 77, 0.28);
  border: 1px solid #e8ecf2;
}

.site-search__form {
  display: flex;
  gap: 0.4rem;
}

.site-search__input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1a1a2e !important;
  background: #fff !important;
  -webkit-text-fill-color: #1a1a2e !important;
  caret-color: #1a1a2e;
  font-weight: 500 !important;
  text-shadow: none !important;
}

.site-search__input::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1;
}

.site-search__input:focus {
  outline: none;
  border-color: #f39c12;
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

/* Шапка принудительно красит span/a/p в белый — внутри белой панели нужен тёмный текст */
.site-header .site-search__panel,
.site-header .site-search__panel p,
.site-header .site-search__panel a,
.site-header .site-search__panel span {
  color: #1a1a2e !important;
  text-shadow: none !important;
  -webkit-text-fill-color: unset;
  font-weight: 600;
}

.site-search__submit {
  width: 2.6rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  font-size: 1.15rem;
}

.site-search__dropdown {
  margin-top: 0.65rem;
  max-height: 18rem;
  overflow: auto;
}

.site-search__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.55rem;
  border-radius: 10px;
  text-decoration: none !important;
  color: #1a1a2e !important;
}

.site-search__item:hover {
  background: #fff8e7;
}

.site-header .site-search__badge,
.site-search__badge {
  font-size: 0.72rem;
  font-weight: 700 !important;
  color: #d68910 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-header .site-search__item-title,
.site-search__item-title {
  font-size: 0.92rem;
  font-weight: 700 !important;
  line-height: 1.35;
  color: #1a1a2e !important;
}

.site-header .site-search__empty,
.site-search__empty {
  margin: 0.5rem 0 0;
  color: #64748b !important;
  font-size: 0.9rem;
  font-weight: 500 !important;
}

.site-header .site-search__all,
.site-search__all {
  display: inline-block;
  margin-top: 0.55rem;
  font-weight: 700 !important;
  color: #d68910 !important;
  text-decoration: none;
}

.search-page__form {
  max-width: 40rem;
  margin: 0 auto;
}

.search-page__field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem 0.55rem 1rem;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(22, 33, 62, 0.08);
}

.search-page__field i {
  color: #d68910;
  font-size: 1.15rem;
}

.search-page__field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 1.05rem;
  padding: 0.55rem 0;
  color: #1a1a2e;
  background: transparent;
}

.search-page__field button {
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  font-weight: 700;
}

.search-page__meta {
  color: #475569;
}

.search-results {
  display: grid;
  gap: 0.75rem;
}

.search-result {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-result:hover {
  border-color: rgba(243, 156, 18, 0.55);
  box-shadow: 0 10px 24px rgba(22, 33, 62, 0.08);
  transform: translateY(-1px);
}

.search-result__badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #d68910;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-result__title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #1a1a2e;
}

.search-result__desc {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 767.98px) {
  .site-search__toggle-text {
    display: none;
  }

  .site-search__panel {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
