/* Glossary Stylesheet - PanelQA */

body {
  padding-top: 70px;
  background: #f8f9fa;
  min-height: 100vh;
}

main {
  display: block;
  min-height: calc(100vh - 200px);
}

.glossary-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.glossary-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
}

.glossary-header h1 {
  font-size: 40px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem;
  letter-spacing: -0.5px;
}

.glossary-header p {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
}

.breadcrumb a {
  color: #0891b2;
  text-decoration: none;
  transition: all 0.2s;
}

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

.breadcrumb span {
  color: #cbd5e1;
}

/* Glossary Index Page */
.search-box {
  margin-bottom: 2rem;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.08);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.term-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.term-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.term-card a {
  text-decoration: none;
  color: inherit;
}

.term-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.term-definition {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 1rem;
  flex-grow: 1;
}

.term-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0891b2;
  background: #f0f9ff;
  padding: 4px 8px;
  border-radius: 4px;
}

.term-card:hover .term-title {
  color: #0891b2;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

/* Glossary Detail Page */
.glossary-detail {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 3rem;
  margin-bottom: 2rem;
}

.term-heading {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.term-heading h1 {
  font-size: 36px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1rem;
}

.term-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.meta-value {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.category-badge {
  display: inline-block;
  background: #f0f9ff;
  color: #0891b2;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid #bae6fd;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
}

.category-badge:hover {
  background: #ecfeff;
  border-color: #a5f3fc;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.15);
  transform: translateY(-1px);
}

.category-badge:active {
  transform: translateY(0);
}

.term-body {
  margin-bottom: 2rem;
}

.term-definition-full {
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #0891b2;
}

.related-terms {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.related-terms h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.related-link {
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #0891b2;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}

.related-link:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
  transform: translateY(-2px);
}

.nav-links {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.nav-link {
  flex: 1;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #0891b2;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}

.nav-link:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.nav-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Back to Glossary */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 8px 12px;
  background: #f0f9ff;
  color: #0891b2;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.back-link:hover {
  background: #bae6fd;
  color: #0369a1;
}

/* Responsive */
@media (max-width: 768px) {
  .glossary-container {
    padding: 0 1rem;
  }

  .glossary-header h1 {
    font-size: 28px;
  }

  .glossary-detail {
    padding: 1.5rem;
  }

  .term-heading h1 {
    font-size: 24px;
  }

  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .term-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .related-list {
    grid-template-columns: 1fr;
  }

  .nav-links {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 60px;
  }

  .glossary-container {
    padding: 0 0.75rem;
    margin: 1rem auto;
  }

  .glossary-header h1 {
    font-size: 24px;
  }

  .glossary-header {
    margin-bottom: 1.5rem;
  }

  .term-heading h1 {
    font-size: 20px;
  }

  .glossary-detail {
    padding: 1rem;
  }
}

/* Fixed Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: #94a3b8;
  padding: 12px 2rem;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  z-index: 100;
  margin: 0;
}

footer a {
  color: #0891b2;
  text-decoration: none;
  margin: 0 8px;
}

footer a:hover {
  text-decoration: underline;
}

body {
  padding-bottom: 50px;
}
