/* Research Page Styles - Fixed Layout */

/* Reset page background to match header */
body {
  background: #ffffff;
}

/* Only apply to research page container and its children */
.research-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  min-height: calc(100vh - 64px);
  padding: 2rem 2rem 0;
}

.research-layout {
  padding: 4rem 0;
  background: #ffffff;
}

/* Research Main Content - Full Width */
.research-container .research-main {
  padding: 0;
  width: 100%;
}

.research-container .research-title {
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 4rem;
  font-weight: 400;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-align: left;
}

.research-container .research-subtitle {
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #6b7280;
  margin: 0 0 3rem 0;
  line-height: 1.5;
  text-align: left;
}

/* Filter Tabs - Left Aligned */
.research-container .filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.25rem;
  width: fit-content;
}

.research-container .filter-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  outline: none;
}

.research-container .filter-tab:focus {
  outline: none;
}

.research-container .filter-tab:focus-visible {
  outline: none;
}

.research-container .filter-tab:hover {
  color: #374151;
  background: rgba(255, 255, 255, 0.8);
}

.research-container .filter-tab.active {
  background: white;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.research-container .filter-tab .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Research Items - Clean Layout */
.research-container .research-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.research-container .research-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.research-container .research-item:last-child {
  border-bottom: none;
}

.research-container .research-item:hover {
  background: #f8f9fa;
  margin-left: -2rem;
  margin-right: -2rem;
  padding-left: 2rem;
  padding-right: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.research-container .item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.research-container .item-category {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.research-container .item-date {
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 400;
  line-height: 1.4;
}

.research-container .item-content {
  min-width: 0;
}

.research-container .item-title {
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  word-wrap: break-word;
  hyphens: auto;
}

.research-container .item-title a {
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s ease;
}

.research-container .item-title a:hover {
  color: #3b82f6;
}

.research-container .item-title a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.research-container .item-description {
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
}

/* Tags and Authors - Simplified */
.research-container .item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.research-container .tag {
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.research-container .item-authors {
  font-size: 0.875rem;
  color: #9ca3af;
}

.research-container .authors-label {
  font-weight: 500;
  color: #6b7280;
}

/* Tab Content */
.research-container .tab-content {
  display: none;
  padding-top: 2rem;
  width: 100%;
}

.research-container .tab-content.active {
  display: block;
}

.research-container .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 2rem;
}

.research-container .header-content {
    flex: 1;
}

.research-container .section-title {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.research-container .section-description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.research-container .badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #bae6fd;
    white-space: nowrap;
}

/* Grid Layout - Mobile Friendly */
.research-container .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  gap: 2rem;
}

/* Cards */
.research-container .card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.research-container .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

/* Card Header */
.research-container .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.research-container .card-title-section {
  flex: 1;
  min-width: 0;
}

.research-container .card-title {
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem 0;
  word-wrap: break-word;
}

.research-container .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.research-container .badge-outline {
  background: #f8fafc;
  color: #374151;
  border: 1px solid #d1d5db;
}

.research-container .badge-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Card Action Button */
.research-container .card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f8fafc;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

.research-container .card-action:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.research-container .card-action .icon {
  width: 18px;
  height: 18px;
}

/* Card Content */
.research-container .card-content {
  /* Content styles */
}

.research-container .card-description {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Card Stats */
.research-container .card-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.research-container .stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.research-container .stat .icon {
  width: 16px;
  height: 16px;
}

/* Tags in Cards */
.research-container .card-content .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.research-container .card-content .tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #bae6fd;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .research-container .section-description {
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) {
  .research-container {
    padding: 0 1.5rem;
  }

  .research-container .research-item {
    grid-template-columns: 120px 1fr;
    gap: 2rem;
  }

  .research-container .grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .research-container .section-header {
    gap: 1rem;
  }

  .research-container .section-title {
    font-size: 1.5rem;
  }

  .research-container .section-description {
    font-size: 0.85rem;
  }
}

@media (max-width: 900px) {
  /* Start reducing description length on smaller screens */
  .research-container .section-description {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .research-container {
    padding: 4rem 1rem 0; 
  }

  .research-container .research-layout {
    padding: 2rem 0;
  }

  .research-container .research-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }

  .research-container .filter-tabs {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    width: 100%;
  }

  .research-container .filter-tab {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    flex: 1;
    justify-content: center;
    text-align: center;
  }

  .research-container .research-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0;
  }

  .research-container .research-item:hover {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .research-container .item-meta {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .research-container .item-title {
    font-size: 1.25rem;
  }

  /* Section header responsive - still try to keep in one line */
  .research-container .section-header {
    gap: 0.75rem;
  }

  .research-container .section-title {
    font-size: 1.25rem;
  }

  .research-container .section-description {
    font-size: 0.8rem;
    max-width: 200px;
  }

  /* Release content responsive */
  .research-container .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .research-container .card {
    padding: 1.5rem;
  }

  .research-container .card-header {
    flex-direction: column;
    gap: 1rem;
  }

  .research-container .card-action {
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  /* At very small screens, allow description to wrap but keep title and badge on same line */
  .research-container .section-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .research-container .section-title {
    font-size: 1.125rem;
    flex-shrink: 0;
  }

  .research-container .badge {
    order: 2;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .research-container .section-description {
    order: 3;
    flex: 100%;
    font-size: 0.75rem;
    white-space: normal;
    max-width: none;
    margin-top: 0.25rem;
  }
}

@media (max-width: 480px) {
  .research-container {
    padding: 3.5rem 0.75rem 0;
  }

  .research-container .research-title {
    font-size: 2rem;
  }

  .research-container .filter-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .research-container .research-item {
    padding: 1.5rem 0;
  }

  .research-container .item-title {
    font-size: 1.125rem;
  }

  .research-container .card {
    padding: 1.25rem;
  }
}

/* Focus states for accessibility */
.research-container .filter-tab:focus,
.research-container .card-action:focus {
  outline: none;
}

.research-container .item-title a:focus {
  outline: none;
}

/* Ensure proper text wrapping */
.research-container .item-title,
.research-container .item-description,
.research-container .card-title,
.research-container .card-description {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Clean hover states */
.research-container .research-item:hover .item-title a {
  color: #3b82f6;
}

/* Remove animations that might cause layout issues */
.research-container .research-item {
  animation: none;
}