/* Glossary index + term pages. Builds on resource-hubs.css (.rh) and the site green theme. */

/* ---------- hero search ---------- */
.gl-hero { padding-bottom: 80px; }
.gl-hero h1 { max-width: 18ch; }
.gl-search { position: relative; max-width: 560px; margin-top: 8px; }
.gl-search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: #5c6b65; pointer-events: none; }
.gl-search input { width: 100%; height: 58px; padding: 0 20px 0 50px; border: 2px solid transparent; border-radius: 16px; background: #fff; color: #00201b; font: 500 17px/1 "Inter", system-ui, sans-serif; box-shadow: 0 18px 40px rgba(0,0,0,.25); outline: none; transition: border-color .15s, box-shadow .15s; }
.gl-search input::placeholder { color: #7a8a84; }
.gl-search input:focus { border-color: #a3ffe4; box-shadow: 0 0 0 4px rgba(163,255,228,.25), 0 18px 40px rgba(0,0,0,.25); }
.gl-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 30px; }
.gl-stats div { color: rgba(255,255,255,.75); font-size: 13.5px; }
.gl-stats b { display: block; font-size: 28px; line-height: 1.1; color: #fff; font-weight: 800; }

/* ---------- sticky filter bar ---------- */
.gl-bar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rh-line); }
.gl-bar .rh-wrap { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.gl-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-topic { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--rh-line); background: #fff; color: var(--rh-body); font: 700 13.5px/1 "Inter", system-ui, sans-serif; transition: all .15s; }
.gl-topic:hover { border-color: var(--rh-green); color: var(--rh-green-d); }
.gl-topic small { font-size: 11.5px; background: var(--rh-tint); color: var(--rh-green-d); border-radius: 999px; padding: 2px 7px; font-weight: 800; }
.gl-topic.is-active { background: var(--rh-green); border-color: var(--rh-green); color: #fff; }
.gl-topic.is-active small { background: rgba(255,255,255,.22); color: #fff; }
.gl-az { display: flex; flex-wrap: wrap; gap: 4px; }
.gl-az a { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--rh-green-d); font-weight: 800; font-size: 13px; text-decoration: none; }
.gl-az a:hover { background: var(--rh-tint); }
.gl-az a.is-off { color: #b8c4bf; pointer-events: none; }

/* ---------- term cards ---------- */
.gl-section { padding-top: 56px; scroll-margin-top: 120px; }
.gl-letter { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; font-size: 30px; font-weight: 800; color: var(--rh-green); line-height: 1; }
.gl-letter::after { content: ""; flex: 1; height: 1px; background: var(--rh-line); }
.gl-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gl-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: #fff; border: 1px solid var(--rh-line); border-radius: 18px; text-decoration: none; color: inherit; box-shadow: 0 6px 22px rgba(0,41,37,.06); transition: transform .18s, box-shadow .18s, border-color .18s; }
.gl-card:hover { transform: translateY(-4px); border-color: #b7dccf; box-shadow: 0 18px 40px rgba(0,41,37,.14); }
.gl-card h3 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--rh-ink); }
.gl-card p { margin: 0; flex: 1; font-size: 14.5px; line-height: 1.6; }
.gl-card .rh-link { margin-top: 6px; }
.gl-tag { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rh-green-d); background: var(--rh-tint); border-radius: 999px; padding: 4px 10px; }
.gl-empty { display: none; text-align: center; padding: 70px 0; }
.gl-empty.is-on { display: block; }
.gl-empty strong { display: block; font-size: 20px; color: var(--rh-ink); margin-bottom: 6px; }

/* ---------- term page ---------- */
.gl-term-hero { padding-bottom: 70px; }
.gl-term-hero h1 { max-width: 22ch; }
.gl-term-hero .gl-tag { background: rgba(163,255,228,.12); color: var(--rh-mint); border: 1px solid rgba(163,255,228,.3); margin-bottom: 14px; }
.gl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.gl-def { margin: 0 0 30px; padding: 26px 28px; border-radius: 18px; background: var(--rh-tint); border: 1px solid #cfe9df; border-left: 6px solid var(--rh-green); }
.gl-def small { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rh-green); }
.gl-def p { margin: 0; font-size: 20px; line-height: 1.55; color: var(--rh-ink); font-weight: 500; }
.gl-body p { font-size: 17px; line-height: 1.8; margin: 0 0 18px; }
.gl-body a { color: var(--rh-green-d); font-weight: 700; }
.gl-side { position: sticky; top: 96px; display: grid; gap: 18px; }
.gl-box { padding: 22px; background: #fff; border: 1px solid var(--rh-line); border-radius: 18px; box-shadow: 0 6px 22px rgba(0,41,37,.06); }
.gl-box h2 { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rh-green); }
.gl-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gl-box li a { display: flex; gap: 10px; align-items: baseline; text-decoration: none; color: var(--rh-ink); font-weight: 700; font-size: 15px; line-height: 1.4; }
.gl-box li a:hover { color: var(--rh-green); }
.gl-box li a::before { content: "\2192"; color: var(--rh-green); font-weight: 800; flex: none; }
.gl-box--cta { background: linear-gradient(135deg, #004942, #002925); border: 0; color: #fff; }
.gl-box--cta h2 { color: var(--rh-mint); }
.gl-box--cta p { margin: 0 0 16px; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.6; }
.gl-box--cta .rh-btn { width: 100%; justify-content: center; }
.gl-related { margin-top: 44px; }
.gl-related h2 { margin: 0 0 16px; font-size: 24px; font-weight: 800; color: var(--rh-ink); }
.gl-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--rh-line); }
.gl-pager a { display: block; max-width: 48%; text-decoration: none; color: var(--rh-ink); font-weight: 800; font-size: 16px; }
.gl-pager a small { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--rh-body); letter-spacing: .08em; text-transform: uppercase; }
.gl-pager a:hover { color: var(--rh-green); }
.gl-pager a:last-child { text-align: right; margin-left: auto; }

@media (max-width: 900px) {
    .gl-layout { grid-template-columns: 1fr; gap: 32px; }
    .gl-side { position: static; }
    .gl-bar { position: static; }
    .gl-hero, .rh-hero.gl-term-hero { padding-top: 120px; }
}
@media (max-width: 560px) {
    .gl-grid { grid-template-columns: 1fr; }
    .gl-pager { flex-direction: column; }
    .gl-pager a { max-width: 100%; }
}
