/* Navigation Enhancements */
/* Dropdown navigation, breadcrumbs, series navigation, and category highlights */

/* ========================================
   NAVIGATION DROPDOWN
   ======================================== */

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-color, #333);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.nav-dropdown-toggle:hover {
  color: var(--primary-color, #2c5aa0);
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border-color, #e1e4e8);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 100;
}

.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color, #333);
  text-decoration: none;
  transition: background-color 0.2s;
}

.nav-dropdown-menu a:hover {
  background-color: var(--bg-color-secondary, #f6f8fa);
  color: var(--primary-color, #2c5aa0);
}

/* ========================================
   BREADCRUMB NAVIGATION
   ======================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-color-secondary, #586069);
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
}

.breadcrumb a {
  color: var(--primary-color, #2c5aa0);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-color-dark, #1e3a7a);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-color-tertiary, #959da5);
}

.breadcrumb-current {
  color: var(--text-color, #333);
  font-weight: 500;
}

/* ========================================
   SERIES NAVIGATION
   ======================================== */

.series-navigation {
  background: var(--bg-color-secondary, #f6f8fa);
  border: 1px solid var(--border-color, #e1e4e8);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.series-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.series-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color, #333);
}

.series-parts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.series-parts li {
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.series-parts li.current {
  background-color: var(--primary-color, #2c5aa0);
  color: white;
}

.series-parts li.current a {
  color: white;
  font-weight: 600;
}

.series-parts li:not(.current):hover {
  background-color: var(--bg-color-tertiary, #e1e4e8);
}

.series-parts a {
  color: var(--primary-color, #2c5aa0);
  text-decoration: none;
  display: block;
}

.series-parts a:hover {
  text-decoration: underline;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.series-badge {
  background-color: var(--primary-color, #2c5aa0);
  color: white;
}

.draft-badge {
  background-color: var(--warning-color, #f59f00);
  color: white;
}

.category-badge {
  background-color: var(--bg-color-tertiary, #e1e4e8);
  color: var(--text-color, #333);
}

/* ========================================
   CATEGORY HIGHLIGHTS (Homepage)
   ======================================== */

.category-highlights {
  margin: 3rem 0;
}

.category-highlights h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  background: white;
  border: 1px solid var(--border-color, #e1e4e8);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.category-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.category-card h3 a {
  color: var(--primary-color, #2c5aa0);
  text-decoration: none;
}

.category-card h3 a:hover {
  text-decoration: underline;
}

.category-card p {
  color: var(--text-color-secondary, #586069);
  margin-bottom: 1.5rem;
}

.category-link {
  color: var(--primary-color, #2c5aa0);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.category-link:hover {
  text-decoration: underline;
}

/* ========================================
   CATEGORY ARCHIVE PAGES
   ======================================== */

.category-header {
  text-align: center;
  margin-bottom: 3rem;
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-header .lead {
  font-size: 1.25rem;
  color: var(--text-color-secondary, #586069);
  max-width: 700px;
  margin: 0 auto;
}

.series-section {
  margin-bottom: 3rem;
}

.series-card {
  background: var(--bg-color-secondary, #f6f8fa);
  border: 1px solid var(--border-color, #e1e4e8);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.series-card h3 {
  margin-top: 0;
  color: var(--primary-color, #2c5aa0);
}

.series-description {
  color: var(--text-color-secondary, #586069);
  margin-bottom: 1.5rem;
}

.series-list {
  padding-left: 1.5rem;
  margin: 0;
}

.series-list li {
  margin-bottom: 0.75rem;
}

.series-list a {
  color: var(--primary-color, #2c5aa0);
  text-decoration: none;
}

.series-list a:hover {
  text-decoration: underline;
}

/* ========================================
   RELATED POSTS
   ======================================== */

.related-posts {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-color-secondary, #f6f8fa);
  border-radius: 8px;
}

.related-posts h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-post-card {
  background: white;
  border: 1px solid var(--border-color, #e1e4e8);
  border-radius: 6px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-post-title {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.related-post-title a {
  color: var(--text-color, #333);
  text-decoration: none;
}

.related-post-title a:hover {
  color: var(--primary-color, #2c5aa0);
}

.related-post-reason {
  font-size: 0.875rem;
  color: var(--text-color-secondary, #586069);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.related-post-excerpt {
  font-size: 0.875rem;
  color: var(--text-color-secondary, #586069);
  margin-bottom: 1rem;
}

.related-post-link {
  color: var(--primary-color, #2c5aa0);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.related-post-link:hover {
  text-decoration: underline;
}

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

@media (max-width: 768px) {
  .nav-dropdown-menu {
    left: auto;
    right: 0;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .series-navigation {
    padding: 1rem;
  }

  .breadcrumb {
    font-size: 0.75rem;
  }
}
