/* ===== GLOSSAR ===== */
/* (ergänzend zu main.css; :root-Variablen, Haupt-Navigation und Footer kommen von dort) */

/* ── PAGE HERO ── */
.page-hero { background: var(--green-deep); padding: 96px 80px 56px; margin-top: 60px; }
/* Schutz: Breadcrumb-nav aus globaler "nav { position: fixed }"-Regel (main.css) lösen */
.page-hero nav, .alpha-nav, .sidebar-alpha { position: static; width: auto; height: auto; background: none; border: none; padding: 0; backdrop-filter: none; z-index: auto; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 24px; list-style: none; }
.breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.9); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 8px; }
.page-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-light); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(36px, 4.5vw, 60px); line-height: 1.07; letter-spacing: -1.2px; color: var(--white); margin-bottom: 18px; }
.page-hero h1 em { font-style: italic; color: var(--green-light); }
.page-hero-lead { font-size: 17px; font-weight: 300; line-height: 1.65; color: rgba(255,255,255,0.62); max-width: 580px; margin-bottom: 36px; }

.hero-example { display: inline-flex; align-items: flex-start; gap: 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 16px 20px; max-width: 640px; }
.hero-example-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.hero-example p { font-size: 14px; font-style: italic; color: rgba(255,255,255,0.65); line-height: 1.6; font-weight: 300; }

/* ── SEARCH + ALPHABET BAR ── */
.search-bar { background: var(--white); border-bottom: 1px solid var(--border-light); padding: 16px 80px; position: sticky; top: 60px; z-index: 100; display: flex; align-items: center; gap: 20px; box-shadow: 0 4px 20px rgba(26,60,46,0.05); }
.search-wrap { position: relative; flex: 1; max-width: 360px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--text-muted); pointer-events: none; }
.search-input { width: 100%; padding: 10px 14px 10px 40px; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--sans); font-size: 14px; color: var(--text-dark); background: var(--off-white); transition: border-color 0.2s, box-shadow 0.2s; }
.search-input:focus { border-color: var(--green-accent); box-shadow: 0 0 0 3px rgba(92,138,60,0.12); outline: none; background: var(--white); }
.search-input::placeholder { color: var(--text-muted); }
.search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; padding: 2px; display: none; }
.search-count { font-size: 12px; color: var(--text-muted); font-family: var(--mono); white-space: nowrap; }

.alpha-nav { display: flex; align-items: center; justify-content: flex-start; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.alpha-btn { width: 28px; height: 28px; border-radius: 4px; border: none; background: none; cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; text-decoration: none; }
.alpha-btn:hover { background: var(--green-ultra); color: var(--green-accent); }
.alpha-btn.active { background: var(--green-accent); color: var(--white); }
.alpha-btn.empty { opacity: 0.3; cursor: default; pointer-events: none; }

/* ── MAIN LAYOUT ── */
.page-body { display: grid; grid-template-columns: 200px 1fr; gap: 0; max-width: 1160px; margin: 0 auto; padding: 0 80px; align-items: start; }

/* ── SIDEBAR: sticky letter index ── */
.glossar-sidebar { position: sticky; top: 114px; padding: 40px 24px 40px 0; }
.sidebar-heading { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sidebar-alpha { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.sidebar-alpha a { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; padding: 5px 10px; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; transition: color 0.15s, border-color 0.15s, background 0.15s; display: flex; align-items: center; justify-content: space-between; }
.sidebar-alpha a:hover, .sidebar-alpha a.active { color: var(--green-accent); border-left-color: var(--green-accent); background: var(--green-ultra); }
.sidebar-alpha a .entry-count { font-size: 10px; font-weight: 400; color: var(--text-muted); }
.sidebar-divider { height: 1px; background: var(--border-light); margin: 14px 0; }

/* ── GLOSSAR CONTENT ── */
.glossar-content { padding: 40px 0 80px 48px; border-left: 1px solid var(--border-light); min-width: 0; }

/* no-results */
.no-results { display: none; padding: 48px 0; text-align: center; color: var(--text-muted); }
.no-results p { font-size: 15px; }
.no-results strong { display: block; font-family: var(--serif); font-size: 24px; color: var(--text-light); margin-bottom: 8px; }

/* Letter section */
.letter-section { margin-bottom: 0; scroll-margin-top: 130px; }
.letter-anchor { display: block; }
.letter-header { display: flex; align-items: center; gap: 16px; padding: 32px 0 20px; border-top: 1px solid var(--border-light); margin-top: 8px; }
.letter-header:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.letter-badge { width: 48px; height: 48px; border-radius: 10px; background: var(--green-deep); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 26px; color: var(--white); letter-spacing: -1px; }
.letter-meta { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }

/* Entry list */
.entry-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 8px; }
.glossar-entry { padding: 20px 0; border-bottom: 1px solid var(--border-light); display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: baseline; transition: background 0.15s; }
.glossar-entry:last-child { border-bottom: none; }
.glossar-entry:hover { background: var(--off-white); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: var(--radius); }
.entry-term { font-weight: 600; font-size: 15px; color: var(--text-dark); line-height: 1.3; padding-top: 2px; }
.entry-term .term-alt { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); font-family: var(--mono); margin-top: 2px; }
.entry-body p { font-size: 14px; line-height: 1.7; color: var(--text-mid); font-weight: 300; margin-bottom: 8px; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-body p strong { font-weight: 600; color: var(--text-dark); }
.entry-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--green-accent); text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid var(--green-lightest); padding-bottom: 1px; transition: border-color 0.2s; }
.entry-link:hover { border-bottom-color: var(--green-accent); }

/* Search highlight */
mark { background: rgba(92,138,60,0.18); color: var(--green-deep); border-radius: 2px; padding: 0 1px; }

/* hidden during search */
.letter-section.hidden { display: none; }
.glossar-entry.hidden { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .page-hero { padding: 80px 24px 40px; }
  .search-bar { padding: 14px 24px; flex-wrap: wrap; top: 60px; }
  .alpha-nav { display: none; }
  .search-count { order: 3; width: 100%; }
  .page-body { grid-template-columns: 1fr; padding: 0 24px; }
  .glossar-sidebar { display: none; }
  .glossar-content { padding: 32px 0 56px; border-left: none; }
  .glossar-entry { grid-template-columns: 1fr; gap: 8px; }
}
