/* ========================================
   SERIES LIST PAGE STYLES
   ======================================== */

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  padding: 1.5rem;
  padding-bottom: 0;
}

.page-description {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.6);
  margin: 0 0 2.5rem 0;
  padding: 0 1.5rem;
  line-height: 1.6;
}

:where(.dark, .dark *) .page-description {
  color: rgba(255, 255, 255, 0.6);
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  padding: 0 1.5rem;
}

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

@media (min-width: 1280px) {
  .series-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.series-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: white;
  height: 100%;
  transition: all 0.3s ease;
}

.series-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

:where(.dark, .dark *) .series-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

:where(.dark, .dark *) .series-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.series-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.series-card-title-link {
  flex: 1;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: color 0.2s;
}

.series-card-title-link:hover {
  color: rgb(139, 92, 246);
}

:where(.dark, .dark *) .series-card-title-link:hover {
  color: rgb(167, 139, 250);
}

.series-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.series-post-count {
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(139, 92, 246, 0.1);
  color: rgb(139, 92, 246);
}

:where(.dark, .dark *) .series-post-count {
  background: rgba(139, 92, 246, 0.2);
  color: rgb(167, 139, 250);
}

.series-card-preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.series-preview-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

:where(.dark, .dark *) .series-preview-heading {
  color: rgba(255, 255, 255, 0.7);
}

.series-subseries-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subseries-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.subseries-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

:where(.dark, .dark *) .subseries-item {
  background: rgba(255, 255, 255, 0.04);
}

:where(.dark, .dark *) .subseries-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Subseries link styles */
.subseries-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.subseries-link:hover {
  background: rgba(0, 0, 0, 0.06);
}

:where(.dark, .dark *) .subseries-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.subseries-icon {
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.75rem;
}

:where(.dark, .dark *) .subseries-icon {
  color: rgba(255, 255, 255, 0.4);
}

.subseries-name {
  flex: 1;
  color: rgba(0, 0, 0, 0.8);
}

:where(.dark, .dark *) .subseries-name {
  color: rgba(255, 255, 255, 0.8);
}

.subseries-count {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

:where(.dark, .dark *) .subseries-count {
  color: rgba(255, 255, 255, 0.5);
}

.series-posts-preview {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.preview-post {
  padding: 0.625rem 0.875rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  border-left: 3px solid rgba(59, 130, 246, 0.3);
  transition: all 0.2s;
}

.preview-post:hover {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: rgba(59, 130, 246, 0.6);
}

:where(.dark, .dark *) .preview-post {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: rgba(96, 165, 250, 0.3);
}

:where(.dark, .dark *) .preview-post:hover {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(96, 165, 250, 0.6);
}

.preview-post-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-post-meta {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
}

:where(.dark, .dark *) .preview-post-meta {
  color: rgba(255, 255, 255, 0.5);
}

.no-content {
  text-align: center;
  padding: 3rem 1.5rem;
  color: rgba(0, 0, 0, 0.5);
  font-size: 1rem;
}

:where(.dark, .dark *) .no-content {
  color: rgba(255, 255, 255, 0.5);
}

/* Override prose styles */
.prose h1,
.prose h2,
.prose h3 {
  margin-top: 0;
}

/* Increase page content width */
.prose {
  max-width: 90rem;
}

@media (min-width: 1280px) {
  .prose {
    max-width: 100rem;
  }
}

@media (min-width: 1536px) {
  .prose {
    max-width: 110rem;
  }
}

/* Responsive Design */
@media (max-width: 640px) {
  .page-title {
    font-size: 1.5rem;
    padding: 1rem;
    padding-bottom: 0;
  }

  .page-description {
    font-size: 0.9375rem;
    padding: 0 1rem;
    margin-bottom: 2rem;
  }

  .series-grid {
    padding: 0 1rem;
    gap: 1.5rem;
  }

  .series-card {
    padding: 1.25rem;
  }

  .series-card-title {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .page-title {
    padding: 1.5rem 3rem;
    padding-bottom: 0;
  }

  .page-description {
    padding: 0 3rem;
  }

  .series-grid {
    padding: 0 3rem;
  }
}
