.glossary {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.glossary__description {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  max-width: 900px;
  margin-bottom: 32px;
}

.glossary__alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.glossary__letter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
}

.glossary__letter-btn:first-child {
  width: auto;
  padding: 0 18px;
  border-radius: 21px;
}

.glossary__letter-btn:hover {
  background: #ffe0f3;
  color: #333;
  text-decoration: none;
}

.glossary__letter-btn--active {
  background: #FF7FC9;
  color: #fff;
}

.glossary__letter-btn--active:hover {
  background: #e060b0;
  color: #fff;
}

.glossary__group {
  margin-bottom: 48px;
}

.glossary__group-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 24px;
  padding: 0;
  border: none;
  display: block;
}

.glossary__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.glossary__card {
  display: block;
  padding: 10px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  text-decoration: none;
  color: #1a1a1a;
  transition: color 0.2s;
}

.glossary__card:hover {
  border: none;
  box-shadow: none;
  transform: none;
  text-decoration: none;
  color: #FF7FC9;
}

.glossary__card-title {
  font-size: 16px;
  font-weight: 400;
  color: inherit;
  margin-bottom: 0;
  line-height: 1.4;
}

.glossary__card:hover .glossary__card-title {
  color: #FF7FC9;
}

.glossary__empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

@media (max-width: 1024px) {
  .glossary__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .glossary__grid { grid-template-columns: repeat(2, 1fr); }
  .glossary__letter-btn { width: 36px; height: 36px; font-size: 13px; }
  .glossary__letter-btn:first-child { width: auto; padding: 0 14px; }
}

@media (max-width: 480px) {
  .glossary__grid { grid-template-columns: 1fr; }
}