.lexicon-page {
  background: #f9fafd;
  font-family: 'IBM Plex Sans Hebrew', sans-serif;
  color: #232f65;
  padding-bottom: 100px;
}

.lexicon-hero {
  height: 350px;
  background: #0d4f5c url('lexicon_top.webp') center bottom / cover no-repeat;
  display: flex;
  align-items: center;
}

.lexicon-hero__inner {
  width: 100%;
  max-width: 1780px;
  margin: 0 auto;
  padding: 0 50px;
  box-sizing: border-box;
}

.lexicon-hero__title {
  margin: 0;
  font-size: 70px;
  font-weight: 500;
  line-height: 1.1;
  color: #fff;
  text-align: right;
}

.lexicon-body {
  padding: 0 16px;
}

.lexicon-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 100px auto 0;
  padding: 70px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 20px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.lexicon-card__intro {
  font-size: 18px;
  line-height: 1.5;
  text-align: right;
}

.lexicon-card__intro > :first-child {
  margin-top: 0;
}

.lexicon-card__intro > :last-child {
  margin-bottom: 0;
}

.lexicon-search__field {
  position: relative;
}

.lexicon-search__input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 60px;
  padding: 16px 20px 16px 62px;
  background: #fff url('search.svg') no-repeat left 20px center / 22px 22px;
  border: 1px solid #c5cceb;
  border-radius: 50px;
  font: inherit;
  font-size: 20px;
  line-height: 1.2;
  color: #232f65;
  text-align: right;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.lexicon-search__input::placeholder {
  color: rgba(35, 47, 101, 0.5);
}

.lexicon-search__input:focus {
  border-color: #00aeb9;
}

.lexicon-search__input::-webkit-search-cancel-button {
  display: none;
}

.lexicon-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 340px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #c5cceb;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(35, 47, 101, 0.08);
}

.lexicon-results[hidden] {
  display: none;
}

.lexicon-results__item {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.2;
  text-align: right;
  cursor: pointer;
}

.lexicon-results__item[aria-selected='true'],
.lexicon-results__item:hover {
  background: rgba(197, 204, 235, 0.3);
}

.lexicon-results__item mark {
  background: none;
  color: #00aeb9;
  font-weight: 700;
}

.lexicon-results__empty {
  padding: 12px 20px;
  font-size: 18px;
  text-align: right;
  color: rgba(35, 47, 101, 0.6);
}

.lexicon-term {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 40px;
  background: rgba(197, 204, 235, 0.2);
  border-radius: 20px;
  color: rgba(35, 47, 101, 0.96);
  text-align: right;
}

.lexicon-term[hidden] {
  display: none;
}

.lexicon-term__title {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.1;
}

.lexicon-term__description {
  font-size: 18px;
  line-height: 1.5;
}

.lexicon-term__description > :first-child {
  margin-top: 0;
}

.lexicon-term__description > :last-child {
  margin-bottom: 0;
}

.lexicon-term__related[hidden] {
  display: none;
}

.lexicon-term__related-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.lexicon-term__related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lexicon-term__related-list a {
  display: inline-block;
  padding: 8px 20px;
  background: #fff;
  border: 1px solid #c5cceb;
  border-radius: 50px;
  font-size: 18px;
  line-height: 1.2;
  color: #232f65;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.lexicon-term__related-list a:hover,
.lexicon-term__related-list a:focus-visible {
  border-color: #00aeb9;
  color: #00aeb9;
}

@media (max-width: 1024px) {
  .lexicon-hero {
    height: 240px;
  }

  .lexicon-hero__inner {
    padding: 0 24px;
  }

  .lexicon-hero__title {
    font-size: 48px;
  }

  .lexicon-card {
    margin-top: 48px;
    padding: 40px 24px;
    gap: 40px;
  }

  .lexicon-term {
    padding: 24px;
  }

  .lexicon-term__title {
    font-size: 30px;
  }
}
