/* ========================================
   Article Detail Page Styles
   ======================================== */

/* Back Link */
.article-back {
  margin-top: 64px;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 0;
}

.article-back-container {
  width: 1360px;
  margin: 0 auto;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #0a0a0a;
  text-decoration: none;
  transition: all 0.2s;
}

.article-back-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.article-back-link img {
  width: 16px;
  height: 16px;
}

/* Main Content */
.article-page-content {
  width: 1360px;
  margin: 0 auto;
  padding: 40px 0 80px;
  display: flex;
  gap: 32px;
}

@media (max-width: 1400px) {
  .article-back-container,
  .article-page-content {
    width: 100%;
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Article Main */
.article-main {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 32px;
}

/* Article Header */
.article-header {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e7e8ec;
}

.article-header-image {
  width: 160px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.article-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-title {
  font-size: 28px;
  font-weight: 600;
  color: #101828;
  line-height: 36px;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #8b8d98;
}

.article-meta img {
  width: 16px;
  height: 16px;
}

/* Article Content - Rich Text */
.article-content {
  font-size: 16px;
  color: #333;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: #101828;
  margin: 32px 0 16px;
  line-height: 1.4;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #101828;
  margin: 24px 0 12px;
  line-height: 1.4;
}

.article-content p {
  margin-bottom: 16px;
  color: #4a5565;
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.article-content li {
  margin-bottom: 8px;
  color: #4a5565;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 16px;
  margin: 24px 0;
  color: #6b7280;
  font-style: italic;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 24px 0;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

/* Sidebar */
.article-sidebar {
  width: 485px;
  flex-shrink: 0;
}

.sidebar-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.sidebar-indicator {
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 20px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  color: #101828;
  line-height: 24px;
}

.hot-articles-list {
  display: flex;
  flex-direction: column;
}

.hot-article-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.hot-article-item:last-child {
  border-bottom: none;
}

.hot-article-item:hover .hot-article-title {
  color: var(--primary-color);
}

.hot-article-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7e8ec;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #80828d;
  flex-shrink: 0;
}

.hot-article-rank.top {
  background: var(--primary-color);
  color: white;
}

.hot-article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hot-article-title {
  font-size: 14px;
  font-weight: 500;
  color: #101828;
  line-height: 20px;
  transition: color 0.2s;
}

.hot-article-date {
  font-size: 12px;
  color: #8b8d98;
}

/* Responsive */
@media (max-width: 1200px) {
  .article-page-content {
    flex-direction: column;
  }
  
  .article-sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Hide back link on mobile */
  .article-back {
    display: none;
  }

  .article-page-content {
    margin-top: 96px;
    padding: 16px;
    flex-direction: column;
    gap: 24px;
    background: transparent;
  }

  /* Article Main Mobile - White background container */
  .article-main {
    padding: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
  }

  /* Article Header Mobile - Gray background inside white container */
  .article-header {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
    padding: 16px;
    padding-bottom: 24px;
    border-bottom: none;
    background: #f5f5f5;
    border-radius: 8px;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid #e7e8ec;
    margin: 16px;
  }

  .article-header-image {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    background: #000;
  }

  .article-header-info {
    gap: 8px;
  }

  .article-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    margin-bottom: 8px;
    color: #000;
  }

  .article-meta {
    font-size: 12px;
    color: #8b8d98;
  }

  /* Article Content Mobile - White background (inside main container) */
  .article-content {
    font-size: 14px;
    line-height: 1.8;
    background: white;
    border-radius: 0;
    padding: 16px;
  }

  .article-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px;
  }

  .article-content h2:first-child {
    margin-top: 0;
  }

  .article-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
  }

  .article-content p {
    font-size: 14px;
    color: #4a5565;
    margin-bottom: 12px;
  }

  .article-content ul,
  .article-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
  }

  .article-content li {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* Sidebar Mobile */
  .article-sidebar {
    width: 100%;
  }

  .sidebar-section {
    background: white;
    border-radius: 16px;
    padding: 16px;
  }

  .sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
  }

  .sidebar-indicator {
    width: 4px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 20px;
  }

  .sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    line-height: 24px;
  }

  .hot-articles-list {
    display: flex;
    flex-direction: column;
  }

  .hot-article-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .hot-article-item:last-child {
    border-bottom: none;
  }

  .hot-article-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7e8ec;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #80828d;
    flex-shrink: 0;
  }

  .hot-article-rank.top {
    background: var(--primary-color);
    color: white;
  }

  .hot-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hot-article-title {
    font-size: 14px;
    font-weight: 600;
    color: #101828;
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hot-article-date {
    font-size: 12px;
    color: #8b8d98;
  }
}
