/* ==========================================================================
   Wiki (student glossary) — search page + term pages
   Visual language matches home.css / news.css: #2c3e50 navy, #0085A1 teal,
   14px rounded cards, soft hover shadows, pill tags.
   ========================================================================== */

.wiki-page {
  max-width: 1000px;
  margin: 0 auto;
  scroll-behavior: smooth;
}

/* ---- Hero / search band ---- */
.wiki-hero-band {
  background: #2c3e50;
  border-radius: 14px;
  padding: 2rem 2rem 2.2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.wiki-hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 1.4rem;
  max-width: 640px;
  line-height: 1.6;
}

.wiki-search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.wiki-search-icon {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.wiki-search-box input {
  width: 100%;
  padding: 0.9rem 1.1rem 0.9rem 2.6rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.15s ease;
}

.wiki-search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 133, 161, 0.5), 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* ---- A-Z quick nav ---- */
.wiki-az-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.wiki-az-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #eaf4f8;
  color: #2c3e50;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.wiki-az-nav a:hover {
  background: #0085A1;
  color: #fff;
  text-decoration: none;
}

.wiki-no-results {
  color: #888;
  font-style: italic;
  margin: 1.5rem 0;
  text-align: center;
}

/* ---- Term grid (index page) ---- */
.wiki-letter-section {
  margin-bottom: 2rem;
}

.wiki-letter-heading {
  display: inline-block;
  margin: 0 0 1rem;
  padding-bottom: 0.15rem;
  border-bottom: 3px solid #0085A1;
  color: #2c3e50;
  font-weight: 800;
  font-size: 1.4rem;
}

.wiki-term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}

.wiki-term-card {
  display: block;
  padding: 1.3rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wiki-term-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.wiki-term-card h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #222;
}

.wiki-term-card:hover h3 {
  color: #0085A1;
}

.wiki-term-card p {
  margin: 0;
  font-size: 0.92rem;
  color: #666;
  line-height: 1.6;
}

/* ---- Shared pill tag ---- */
.wiki-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: #eaf4f8;
  color: #2c3e50;
}

/* ---- Term detail page ---- */
.wiki-breadcrumb {
  margin-bottom: 1rem;
}

.wiki-breadcrumb a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0085A1;
  text-decoration: none;
}

.wiki-breadcrumb a:hover {
  text-decoration: underline;
}

.wiki-term-detail-card {
  padding: 1.8rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 1.5rem;
}

.wiki-term-body {
  margin-top: 1rem;
  font-size: 1.08rem;
  line-height: 1.75;
  color: #333;
}

.wiki-term-body p:last-child {
  margin-bottom: 0;
}

.wiki-panel {
  background: #f8f9fa;
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.wiki-panel h3 {
  font-weight: 800;
  color: #2c3e50;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.wiki-panel h3 i {
  color: #0085A1;
  margin-right: 6px;
}

.wiki-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.wiki-related-list li a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #fff;
  border: 1px solid #cfe8ff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0085A1;
  text-decoration: none;
}

.wiki-related-list li a:hover {
  background: #0085A1;
  border-color: #0085A1;
  color: #fff;
}

.wiki-sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wiki-sources-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.92rem;
  line-height: 1.6;
}

.wiki-sources-list li:last-child {
  border-bottom: none;
}

.wiki-source-title {
  display: block;
  font-weight: 700;
  color: #333;
}

.wiki-source-meta {
  display: block;
  color: #888;
  font-style: italic;
  font-size: 0.88rem;
}

.wiki-source-doi {
  font-size: 0.85rem;
  color: #0085A1;
  text-decoration: none;
}

.wiki-source-doi:hover {
  text-decoration: underline;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
  .wiki-hero-band {
    padding: 1.5rem 1.2rem 1.75rem;
  }

  .wiki-term-detail-card,
  .wiki-panel {
    padding: 1.3rem 1.4rem;
  }

  .wiki-term-grid {
    grid-template-columns: 1fr;
  }
}
