/* MorphoPsiche - Encyclopedia & Case Studies Museum Styles */

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

.search-input-wrapper {
  position: relative;
  margin: 1rem 0;
}

.search-input-wrapper svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
  margin-bottom: 1.25rem;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  user-select: none;
}

.chip-btn:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.chip-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(184, 134, 11, 0.25) 100%);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  font-weight: 700;
}

/* Theory Cards Grid */
.theory-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .theory-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.theory-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.theory-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.theory-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.theory-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--gold-primary);
  text-transform: uppercase;
  font-weight: 700;
}

.theory-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.theory-snippet {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Case Studies Cards */
.case-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.25s ease;
}

.case-card:hover {
  border-color: var(--border-subtle);
  transform: translateY(-2px);
}

.case-person-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.case-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--gold-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.case-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.case-archetype-badge {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.case-quote-box {
  background: rgba(10, 15, 29, 0.6);
  border-left: 3px solid var(--gold-primary);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.case-traits-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.case-trait-item {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.case-trait-item span.highlight {
  color: var(--gold-light);
  font-weight: 600;
}
