/* ==========================================================================
   GLOSSARY TERM LAYOUT
   Definition card, category badge, related terms grid
   ========================================================================== */

/* --- Term Header (Dark Hero) --- */
.term-header-section {
  background-color: var(--bg-dark);
  color: #ffffff;
  padding: 80px 0 60px;
  position: relative;
}

.term-category-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.term-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #f8fafc;
}

/* --- Definition Section --- */
.term-definition-section {
  padding: 64px 0 80px;
}

.back-to-glossary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.back-to-glossary:hover {
  color: var(--accent-primary);
}

.back-to-glossary svg,
.back-to-glossary i {
  width: 16px;
  height: 16px;
}

/* --- Definition Card --- */
.term-definition-card {
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 48px;
  box-shadow: var(--shadow-subtle);
}

.definition-text {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-main);
  font-weight: 400;
  margin-bottom: 0;
  max-width: 720px;
}

/* --- Resource Callout (subtle inline tip, not a competing CTA) --- */
.resource-callout {
  margin-top: 40px;
  padding: 24px 28px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.resource-callout-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.resource-callout-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.resource-callout-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
  transition:
    color 0.2s ease,
    gap 0.2s ease;
}

.resource-callout-link:hover {
  color: var(--accent-hover);
  gap: 9px;
}

.resource-callout-link svg,
.resource-callout-link i {
  width: 16px;
  height: 16px;
}

/* --- Related Terms --- */
.related-terms-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border-light);
}

.related-terms-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.related-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.related-term-card {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: all var(--transition-base);
}

.related-term-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.related-term-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.related-term-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}

.related-term-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* --- CTA Section --- */
.term-cta-section {
  padding: 0 0 80px;
}

.term-cta-section .cta-box {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 56px 48px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.term-cta-section .cta-box h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.term-cta-section .cta-box p {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.125rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .term-header-section {
    padding: 60px 0 40px;
  }
  .term-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  .term-definition-section {
    padding: 48px 0 60px;
  }
  .term-definition-card {
    padding: 32px 24px;
  }
  .definition-text {
    font-size: 1.05rem;
  }
  .related-terms-grid {
    grid-template-columns: 1fr;
  }
  .related-terms-title {
    font-size: 1.25rem;
  }
  .related-term-card {
    padding: 20px;
  }
  .resource-callout {
    padding: 24px;
    margin-top: 32px;
  }
  .term-cta-section {
    padding: 0 0 60px;
  }
  .term-cta-section .cta-box {
    padding: 36px 24px;
  }
  .term-cta-section .cta-box h3 {
    font-size: 1.5rem;
  }
  .term-cta-section .cta-box p {
    font-size: 1rem;
    margin-bottom: 28px;
  }
}

@media (max-width: 480px) {
  .resource-callout {
    padding: 20px 16px;
  }
  .term-definition-card {
    padding: 24px 20px;
  }
  .definition-text {
    font-size: 1rem;
  }
  .term-cta-section .cta-box {
    padding: 28px 20px;
  }
}
