/**
 * AVIHPSAM - Scholars Directory & Detail Page Styles
 * Modern documentation style - clean, compact, readable
 */

/* ============================================
   SCHOLARS DIRECTORY PAGE
   ============================================ */

/* Header - Compact clean banner */
.scholars-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: white;
  padding: 1.5rem 0;
  text-align: center;
}

.scholars-header-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.scholars-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.scholars-header p {
  font-size: 0.875rem;
  opacity: 0.85;
  line-height: 1.5;
}

.filter-context {
  margin-top: 0.75rem;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.8125rem;
  display: inline-block;
}

.filter-context .clear-filter {
  color: white;
  text-decoration: underline;
  margin-left: 8px;
  opacity: 0.9;
}

.filter-context .clear-filter:hover {
  opacity: 1;
}

/* Layout */
.scholars-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  background: #fff;
}

/* Sidebar Filters */
.scholars-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.filter-section {
  margin-bottom: 1rem;
}

.filter-section:last-of-type {
  margin-bottom: 0;
}

.filter-section h3 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 6px;
}

.filter-section input,
.filter-section select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8125rem;
  background: white;
  transition: border-color 0.2s ease;
}

.filter-section input:focus,
.filter-section select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
}

.btn-filter {
  width: 100%;
  padding: 8px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 0.75rem;
}

.btn-filter:hover {
  background: #1e3a5f;
}

.btn-clear {
  display: block;
  width: 100%;
  text-align: center;
  padding: 6px;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.btn-clear:hover {
  color: #1e293b;
}

/* Content Area */
.scholars-content-header {
  margin-bottom: 0.75rem;
}

.results-count {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Scholars Grid */
.scholars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.scholar-card,
.scholar-card:hover,
.scholar-card:visited {
  display: block;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scholar-card * {
  text-decoration: none;
}

.scholar-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.scholar-sanskrit {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-accent);
  font-family: var(--font-sanskrit);
  margin-bottom: 2px;
}

.scholar-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 4px;
  line-height: 1.3;
}

.scholar-period {
  display: inline-block;
  font-size: 0.6875rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.scholar-description {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scholar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  color: #94a3b8;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.topic-count {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.view-link {
  color: var(--color-accent);
  font-weight: 500;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 2.5rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  grid-column: 1 / -1;
}

.no-results-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.no-results h3 {
  margin-bottom: 4px;
  color: #475569;
  font-size: 1rem;
}

.no-results p {
  font-size: 0.8125rem;
}

/* ============================================
   SCHOLAR DETAIL PAGE
   ============================================ */

.scholar-detail-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: white;
  padding: 1.75rem 0;
  text-align: center;
}

.scholar-detail-header-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.scholar-sanskrit-title {
  font-size: 1rem;
  font-family: var(--font-sanskrit);
  opacity: 0.8;
  margin-bottom: 4px;
}

.scholar-detail-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.scholar-period-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

.scholar-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.scholar-stats .stat {
  text-align: center;
}

.scholar-stats .stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
}

.scholar-stats .stat-label {
  font-size: 0.6875rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Detail Layout */
.scholar-detail-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  background: #fff;
}

.scholar-detail-content {
  min-width: 0;
}

.scholar-section {
  margin-bottom: 1.5rem;
}

.scholar-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.section-desc {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.scholar-bio {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #475569;
}

/* Notable Works */
.notable-works-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notable-works-list li {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #475569;
}

/* Contributions */
.domain-group {
  margin-bottom: 1.25rem;
}

.domain-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.contributions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contribution-card {
  display: block;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contribution-card:hover {
  border-color: var(--color-accent);
  background: #f8fafc;
}

.contribution-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.contribution-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}

.contribution-text {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Sidebar */
.scholar-detail-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-card {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 12px;
}

.sidebar-card h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.quick-facts {
  margin: 0;
}

.quick-facts dt {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 10px;
}

.quick-facts dt:first-child {
  margin-top: 0;
}

.quick-facts dd {
  font-size: 0.875rem;
  color: #1e293b;
  margin: 2px 0 0 0;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 8px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8125rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Tier badges - Compact pills */
.tier-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tier-1a, .tier-1b, .tier-1c {
  background: #dcfce7;
  color: #166534;
}

.tier-2 {
  background: #fef3c7;
  color: #92400e;
}

.tier-3 {
  background: #dbeafe;
  color: #1e40af;
}

.tier-4 {
  background: #fee2e2;
  color: #991b1b;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .scholars-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .scholars-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0.875rem;
  }

  .filter-section {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
  }

  .btn-filter {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 16px;
    margin-top: 0;
  }

  .btn-clear {
    display: none;
  }

  .scholar-detail-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .scholar-detail-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }

  .sidebar-card {
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .scholars-header,
  .scholar-detail-header {
    padding: 1.25rem 1rem;
  }

  .scholars-header h1,
  .scholar-detail-header h1 {
    font-size: 1.25rem;
  }

  .scholars-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .scholar-card {
    padding: 0.875rem;
  }

  .scholar-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .scholar-stats .stat-value {
    font-size: 1.125rem;
  }
}
