/* ============================================================
   Раздел «Глоссарий» Allora. Тематический словарь авиационных
   аббревиатур. Тёмная тема бренда, собственная вёрстка словаря
   (двухколоночные записи: термин | расшифровка).
   ============================================================ */
:root {
  --bg:          #0e1117;
  --bg-soft:     #161b22;
  --bg-card:     #1c232c;
  --bg-card-2:   #222a35;
  --line:        #2a3340;
  --text:        #e6edf3;
  --text-dim:    #8b96a3;
  --text-muted:  #6b7480;
  --accent:      #6fb1ff;
  --accent-soft: rgba(111,177,255,0.10);
  --accent-line: rgba(111,177,255,0.30);
  --serif: "Iowan Old Style", "Charter", "Cambria", "Georgia", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background:
    radial-gradient(900px 500px at 90% -5%, #1c2a45 0%, transparent 60%),
    radial-gradient(700px 400px at -10% 10%, #16243a 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ---------------- Шапка ---------------- */
.gl-top {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(14,17,23,0.7);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.gl-top__brand { display: inline-flex; align-items: center; transition: opacity 0.2s; }
.gl-top__brand:hover { opacity: 0.8; }
.gl-top__brand img { height: 42px; width: auto; display: block; }
.gl-top__sep { width: 1px; height: 26px; background: var(--line); }
.gl-top__crumbs { font-size: 14px; color: var(--text-dim); }
.gl-top__crumbs .cur { color: var(--text); }

/* ---------------- Каркас ---------------- */
.gl-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 28px 72px; }
.gl-hero { margin-bottom: 26px; }
.gl-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: 40px; line-height: 1.1; margin: 0 0 10px; letter-spacing: 0.01em;
}
.gl-hero p { color: var(--text-dim); font-size: 16px; line-height: 1.6; max-width: 720px; margin: 0; }

/* поиск по глоссарию */
.gl-search { position: relative; margin: 4px 0 4px; }
.gl-search input {
  width: 100%; box-sizing: border-box;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 40px 12px 42px; color: var(--text);
  font-size: 15px; font-family: var(--sans); outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b96a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat; background-position: 14px center; background-size: 17px;
  transition: border-color 0.2s;
}
.gl-search input:focus { border-color: var(--accent-line); }
.gl-search input::placeholder { color: var(--text-muted); }
.gl-search__clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer;
  color: var(--text-muted); font-size: 18px; line-height: 1; border-radius: 8px;
}
.gl-search__clear:hover { color: var(--text); background: var(--bg-card-2); }

.gl-empty { color: var(--text-dim); font-size: 15px; padding: 28px 4px; display: none; }
.gl-cat.is-hidden, .gl-item.is-hidden { display: none; }

/* быстрый переход по разделам — статичный (без прокрутки вместе с экраном) */
.gl-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 0 6px; margin-bottom: 8px;
}
.gl-nav a {
  font-size: 12.5px; color: var(--text-dim);
  border: 1px solid var(--line); background: rgba(22,27,34,0.82);
  padding: 6px 12px; border-radius: 100px; white-space: nowrap;
  backdrop-filter: blur(6px);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.gl-nav a:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------------- Разделы ---------------- */
.gl-cat { margin-top: 40px; scroll-margin-top: 140px; }
.gl-cat__title {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--text); margin: 0 0 4px;
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.gl-cat__count {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.04em;
}

.gl-list { display: flex; flex-direction: column; }

/* запись словаря: слева термин, справа расшифровка */
.gl-item {
  display: grid; grid-template-columns: 190px 1fr; gap: 10px 24px;
  padding: 15px 6px; border-bottom: 1px solid var(--line);
  scroll-margin-top: 150px;
}
.gl-item:hover { background: rgba(28,35,44,0.5); border-radius: 10px; }
.gl-term { display: flex; flex-direction: column; gap: 3px; }
.gl-abbr {
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.01em; line-height: 1.15;
}
.gl-rus { font-size: 13px; color: var(--text-muted); letter-spacing: 0.02em; }
.gl-def { min-width: 0; padding-top: 2px; }
.gl-en {
  color: var(--text); font-weight: 600; font-style: italic;
}
.gl-en::after { content: " — "; font-style: normal; color: var(--text-muted); }
.gl-ru { color: var(--text-dim); line-height: 1.55; }

.gl-foot {
  margin: 8px 28px 40px; padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-muted); font-size: 13px; text-align: center;
}

/* ---------------- Адаптив ---------------- */
@media (max-width: 680px) {
  .gl-wrap { padding: 28px 18px 56px; }
  .gl-hero h1 { font-size: 30px; }
  .gl-top { padding: 14px 18px; gap: 12px; }
  .gl-top__brand img { height: 36px; }
  .gl-item { grid-template-columns: 1fr; gap: 4px; padding: 14px 4px; }
  .gl-abbr { font-size: 18px; }
}
