/* ========================================
   SUBSERIES DETAIL PAGE STYLES
   ======================================== */

.subseries-header {
  margin-bottom: 2.5rem;
  padding: 2rem 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

:where(.dark, .dark *) .subseries-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.breadcrumb-link {
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: rgba(0, 0, 0, 1);
}

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

:where(.dark, .dark *) .breadcrumb-link:hover {
  color: rgba(255, 255, 255, 1);
}

.breadcrumb-separator {
  color: rgba(0, 0, 0, 0.4);
}

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

.breadcrumb-current {
  color: rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

:where(.dark, .dark *) .breadcrumb-current {
  color: rgba(255, 255, 255, 0.9);
}

.subseries-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.subseries-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.subseries-post-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 8px;
  font-weight: 500;
  background: rgba(59, 130, 246, 0.1);
  color: rgb(59, 130, 246);
}

:where(.dark, .dark *) .subseries-post-count-badge {
  background: rgba(59, 130, 246, 0.2);
  color: rgb(96, 165, 250);
}

.subseries-description {
  font-size: 1.0625rem;
  color: rgba(0, 0, 0, 0.7);
  margin: 0;
  line-height: 1.6;
}

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

/* Posts Grid */
.subseries-posts-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  padding: 0 1.5rem;
}

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

@media (min-width: 1280px) {
  .subseries-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Post Card */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
}

.post-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

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

:where(.dark, .dark *) .post-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.post-order-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.1);
  color: rgb(59, 130, 246);
  border-radius: 8px;
  border: 2px solid rgba(59, 130, 246, 0.2);
}

:where(.dark, .dark *) .post-order-badge {
  background: rgba(59, 130, 246, 0.2);
  color: rgb(96, 165, 250);
  border-color: rgba(96, 165, 250, 0.3);
}

.post-card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.9);
  transition: color 0.2s;
  padding-right: 4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-link:hover .post-card-title {
  color: rgb(59, 130, 246);
}

:where(.dark, .dark *) .post-card-title {
  color: rgba(255, 255, 255, 0.9);
}

:where(.dark, .dark *) .post-card-link:hover .post-card-title {
  color: rgb(96, 165, 250);
}

.post-card-description {
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-card-tag {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 500;
}

:where(.dark, .dark *) .post-card-tag {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.5);
  margin-top: auto;
  padding-top: 0.5rem;
}

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

.reading-time::before {
  content: "•";
  margin-right: 0.5rem;
}

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

:where(.dark, .dark *) .no-posts {
  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) {
  .subseries-header {
    padding: 1.5rem 1rem;
  }

  .subseries-title {
    font-size: 1.75rem;
  }

  .subseries-description {
    font-size: 0.9375rem;
  }

  .subseries-posts-grid {
    padding: 0 1rem;
    gap: 1.25rem;
  }

  .post-card-link {
    padding: 1.25rem;
  }

  .post-card-title {
    font-size: 1.125rem;
    padding-right: 3rem;
  }

  .post-order-badge {
    width: 2rem;
    height: 2rem;
    font-size: 0.8125rem;
  }
}

@media (min-width: 1024px) {
  .subseries-header {
    padding: 2rem 3rem;
  }

  .subseries-posts-grid {
    padding: 0 3rem;
  }
}
