/* ================================================================
   岳西人网 - 文章详情页样式 (details.css)
   ================================================================ */

/* --- 详情页布局 --- */
.detail-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 0;
}

.detail-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.detail-article {
  flex: 1;
  min-width: 0;
}

/* --- 面包屑导航 --- */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-4);
  margin-bottom: 32px;
}

.breadcrumb-nav a {
  color: var(--text-3);
  text-decoration: none;
  transition: color .2s;
}

.breadcrumb-nav a:hover {
  color: var(--primary);
}

.breadcrumb-nav .sep {
  color: var(--text-4);
}

.breadcrumb-nav span {
  color: var(--text-4);
}

/* --- 文章头部 --- */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-meta {
  font-size: 13px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  gap: 16px;
}

.article-meta .iconfont {
  margin-right: 4px;
}

/* --- 文章正文 --- */
.article-content {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.9;
}

.article-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 24px 0 12px;
}

.article-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
  margin: 20px 0 10px;
}

.article-content p {
  margin-bottom: 16px;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

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

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

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

/* 代码块 */
.article-content pre {
  position: relative;
  background: #f6f8fa;
  color: #24292e;
  padding: 20px 20px 16px;
  border-radius: 8px;
  border: 1px solid #e1e4e8;
  margin: 16px 0;
  line-height: 1.6;
  overflow-x: hidden;
}

.article-content pre code {
  font-family: "Cascadia Code", "Fira Code", "Source Code Pro", Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* 代码块复制按钮 */
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #57606a;
  cursor: pointer;
  line-height: 1.4;
  transition: all 0.15s;
  z-index: 1;
}
.code-copy-btn:hover {
  background: #f3f4f6;
  color: #24292e;
}
.code-copy-btn.copied {
  color: #2D7A5F;
  border-color: #2D7A5F;
}

/* 行内代码 */
.article-content code {
  background: #f0f0f0;
  color: #c7254e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Cascadia Code", "Fira Code", Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

/* --- 上一篇/下一篇 --- */
.article-nav {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-nav a {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: all .2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-nav a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.article-nav .nav-next {
  text-align: right;
}

/* --- 侧边栏 --- */
.detail-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.sidebar-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

/* --- 相关推荐 --- */
.recommend-list {
  list-style: none;
}

.recommend-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.recommend-list li:last-child {
  border-bottom: none;
}

.recommend-list a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  transition: color .2s;
}

.recommend-list a:hover {
  color: var(--primary);
}

/* --- 公司介绍 --- */
.about-text {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.8;
  margin-bottom: 20px;
}

.btn-consult {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .3s;
}

.btn-consult:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(254,103,0,.35);
  color: #fff;
}

/* --- 表单 --- */
.form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 13px;
  color: var(--text-4);
  text-align: center;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border-color .2s;
}

.form-input:focus {
  border-color: var(--primary);
}

.form-captcha {
  display: flex;
  gap: 10px;
}

.form-captcha .form-input {
  flex: 1;
}

.form-captcha-btn {
  padding: 11px 16px;
  background: var(--primary-ultra-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}

.form-captcha-btn:hover {
  background: var(--primary);
  color: #fff;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-4);
}

.form-check input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.form-check a {
  color: var(--primary);
}

.form-submit {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #5364e3, #1949af);
  color: #fff;
  border: none;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .3s;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(83,100,227,.4);
}

/* --- 响应式 --- */
@media(max-width: 1100px) {
  .detail-sidebar {
    width: 260px;
  }
}

@media(max-width: 960px) {
  .detail-layout {
    flex-direction: column;
  }
  
  .detail-sidebar {
    width: 100%;
  }
}

@media(max-width: 600px) {
  .detail-wrap {
    padding: 40px 16px;
  }
  
  .article-header h1 {
    font-size: 20px;
  }
  
  .article-nav {
    flex-direction: column;
  }
}
