/* =========================================================
   GLOSSARY PAGE — specific styles
   These extend style.css (loaded first).
   Edit content in glossary.js, not here.
========================================================= */

/* =========================================================
   HERO + SEARCH
========================================================= */
.gl-hero {
  position: relative;
  padding: 96px 24px 60px;
  text-align: center;
  overflow: hidden;
}

.gl-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.gl-hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--white);
  margin: 0;
}

.gl-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
  margin: 0;
}

/* ---- search box ---- */
.gl-search {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-top: 10px;
}

.gl-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--muted-2);
  pointer-events: none;
}

.gl-search-input {
  width: 100%;
  padding: 16px 46px 16px 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gl-search-input::placeholder { color: var(--muted-2); }

.gl-search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.12);
}

.gl-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.gl-search-clear:hover {
  background: var(--orange);
  color: #15100c;
  border-color: var(--orange);
}

/* =========================================================
   BODY
========================================================= */
.gl-body {
  border-top: 1px solid var(--border);
  padding: 40px 0 110px;
}

.gl-body-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- filter pills ---- */
.gl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 20px;
}

.gl-filter {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gl-filter:hover {
  border-color: var(--orange);
  color: var(--white);
}

.gl-filter.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #15100c;
}

/* ---- result count ---- */
.gl-count {
  text-align: center;
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 36px;
}

/* ---- empty state ---- */
.gl-empty {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 60px 0;
}

/* =========================================================
   GROUPS
========================================================= */
.gl-group { margin-bottom: 44px; }

.gl-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.gl-group-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 106, 26, 0.7);
  flex-shrink: 0;
}

.gl-group-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange-light);
  background: rgba(255, 106, 26, 0.1);
  border: 1px solid rgba(255, 106, 26, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

.gl-group-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================================
   TERM CARDS (accordion)
========================================================= */
.gl-term {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.gl-term:hover { border-color: rgba(255, 106, 26, 0.4); }

.gl-term.open {
  border-color: var(--orange);
}

.gl-term-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.gl-term-name {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.35;
}

.gl-term.open .gl-term-name { color: var(--orange-light); }

.gl-term-chevron {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s ease;
}

.gl-term-chevron svg { width: 18px; height: 18px; }

.gl-term.open .gl-term-chevron {
  transform: rotate(180deg);
  color: var(--orange);
}

/* collapsible body */
.gl-term-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.gl-term-body-inner {
  padding: 0 20px 20px;
}

.gl-term-def {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* extra note (example / tip / why this matters) */
.gl-term-extra {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(255, 106, 26, 0.06);
  border: 1px solid rgba(255, 106, 26, 0.18);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
}

.gl-extra-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-light);
  margin-bottom: 6px;
}

.gl-extra-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* search highlight */
.gl-mark {
  background: rgba(255, 106, 26, 0.3);
  color: var(--white);
  border-radius: 3px;
  padding: 0 2px;
}

/* =========================================================
   BACK TO TOP
========================================================= */
.gl-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--orange);
  border: none;
  color: #15100c;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 106, 26, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gl-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 106, 26, 0.5);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 600px) {
  .gl-hero { padding: 70px 20px 50px; }
  .gl-term-head { padding: 14px 16px; }
  .gl-term-body-inner { padding: 0 16px 16px; }
  .gl-top { bottom: 18px; right: 18px; }
}