/* ========================================
   news-detail.css - 新闻详情页样式
   电将军智慧能源 3.0 版
   ======================================== */

/* 页面Banner */
.page-banner {
  position: relative;
  height: 368px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.85) 0%, rgba(45, 90, 135, 0.75) 100%);
}

.page-banner-content {
  position: relative;
  z-index: 1;
  text-align: left;
  color: white;
  padding: 0px 0px 16px 20px;
}

.page-banner-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-banner-subtitle {
  font-size: 16px;
  opacity: 0.9;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.page-banner-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
}

.page-banner-breadcrumb a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
}

.page-banner-breadcrumb a:hover {
  color: white;
}

.page-banner-breadcrumb span {
  color: rgba(255,255,255,0.5);
}

/* 主内容区域 - 98%宽度 */
.detail-main-wrapper {
  width: 98%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

.detail-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 文章内容 - 全宽 */
.detail-content {
  width: 100%;
}

/* 侧边栏 - 文章下方横排展示 */
.detail-sidebar {
  width: 100%;
  display: flex;
  gap: 24px;
  order: 2;
  display: none;
}

.detail-sidebar .sidebar-card {
  flex: 1;
}

.detail-sidebar .contact-mini-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 侧边栏卡片 */
.sidebar-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.sidebar-card-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  padding: 16px 20px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-card-header i {
  font-size: 18px;
}

.sidebar-card-body {
  padding: 16px;
}

/* 热门新闻列表 */
.sidebar-news-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.sidebar-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-news-item:first-child {
  padding-top: 0;
}

.sidebar-news-item:hover {
  transform: translateX(4px);
}

.sidebar-news-img {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.sidebar-news-item:hover .sidebar-news-img img {
  transform: scale(1.1);
}

.sidebar-news-info {
  flex: 1;
  min-width: 0;
}

.sidebar-news-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  transition: color 0.3s;
}

.sidebar-news-item:hover .sidebar-news-title {
  color: var(--primary);
}

.sidebar-news-date {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 快速链接 */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.quick-link-item:hover {
  background: var(--primary);
  color: white;
  transform: translateX(4px);
}

.quick-link-item i {
  width: 20px;
  text-align: center;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud-item {
  padding: 6px 14px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.tag-cloud-item:hover {
  background: var(--primary);
  color: white;
}

/* 联系卡片 */
.contact-mini-card {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  border-radius: 16px;
  padding: 24px;
  color: white;
  text-align: center;
}

.contact-mini-card h4 {
  font-size: 18px;
  margin-bottom: 12px;
}

.contact-mini-card p {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-mini-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.contact-mini-btn:hover {
  background: white;
  color: var(--primary);
  transform: scale(1.05);
}

/* 文章头部 */
.article-header {
  padding: 0;
  background: white;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.article-header .container {
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 40px 30px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-light);
}

.article-breadcrumb a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.article-breadcrumb a:hover {
  color: var(--primary);
}

.article-breadcrumb span {
  color: var(--text-light);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.article-category {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50px;
  color: white;
  letter-spacing: 0.5px;
}

.article-category.company { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.article-category.industry { background: linear-gradient(135deg, #009624 0%, #006400 100%); }
.article-category.whitepaper { background: linear-gradient(135deg, var(--accent) 0%, #e65100 100%); }

.article-date {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-date::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  color: var(--primary);
}

.article-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, #333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
}

/* 封面图区域 */
.article-cover-section {
  display: flex;
  justify-content: center;
  background: white;
  padding: 0;
}

.article-cover {
  width: 94vw;
  border-radius: 8px 8px 8px 8px;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s;
  border-radius: 0;
}

.article-cover:hover img {
  transform: scale(1.02);
}

/* 文章主体 */
.article-body {
  padding: 0;
  background: white;
  border-radius: 0 0 16px 16px;
}

.article-body .container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.article-content {
  max-width: 100%;
  padding: 40px;
}

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 50px 0 24px;
  padding: 0 0 16px;
  border-bottom: 3px solid var(--primary);
  position: relative;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
}

.article-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 20px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
}

.article-content p {
  font-size: 17px;
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: justify;
  text-indent: 2em;
}

.article-content p:first-of-type {
  text-indent: 0;
}

.article-content ul,
.article-content ol {
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.article-content li {
  font-size: 16px;
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-left: 32px;
  position: relative;
}

.article-content ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(126, 182, 59, 0.4);
}

.article-content ol {
  counter-reset: item;
}

.article-content ol li::before {
  content: counter(item);
  counter-increment: item;
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-content blockquote {
  margin: 40px 0;
  padding: 32px 40px;
  background: linear-gradient(135deg, #f0f7e6 0%, #e8f5e9 100%);
  border: none;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 80px;
  color: var(--primary);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.article-content blockquote p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
  text-indent: 0;
  position: relative;
  z-index: 1;
}

.article-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 40px 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* 正文行内媒体块（段落配图 / 配视频） */
.article-inline-media {
  width: 94vw;
  margin-top: 32px;
  margin-bottom: 32px;
  margin-left: calc(50% - 47vw);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.article-inline-media img {
  width: 100%;
  height: auto;
  display: block;
  /*border-radius: 0;*/
  margin: 0;
  box-shadow: none;
}
.article-inline-media video {
  width: 100%;
  height: auto;
  max-height: 600px;
  display: block;
  background: #000;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 40px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-content th,
.article-content td {
  padding: 16px 24px;
  text-align: left;
}

.article-content th {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content td {
  font-size: 15px;
  color: var(--text-secondary);
  background: white;
  border-bottom: 1px solid var(--border-color);
}

.article-content tr:last-child td {
  border-bottom: none;
}

.article-content tr:hover td {
  background: #f8f9fa;
}

/* 作者信息 */
.article-author {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  padding: 24px;
  background: var(--bg-light);
  border-radius: 12px;
}

.article-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.article-author-info {
  flex: 1;
}

.article-author-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.article-author-title {
  font-size: 13px;
  color: var(--text-light);
}

/* 文章底部 */
.article-footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.article-tags-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.article-tag {
  padding: 8px 20px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  font-weight: 500;
}

.article-tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(126, 182, 59, 0.3);
}

/* 分享按钮 */
.article-share {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 12px;
  margin-bottom: 40px;
}

.article-share-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  transition: var(--transition);
  font-size: 18px;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.share-btn.wechat:hover {
  background: #07c160;
  color: white;
  border-color: #07c160;
}

.share-btn.weibo:hover {
  background: #e6162d;
  color: white;
  border-color: #e6162d;
}

.share-btn.link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 相关文章 */
.related-articles {
  margin-top: 80px;
  padding: 60px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 20px;
}

.related-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.related-title::before {
  content: '';
  width: 6px;
  height: 28px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 3px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.related-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.related-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  transform: translateY(-8px);
}

.related-card-img {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.related-card-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
  pointer-events: none;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.related-card:hover .related-card-img img {
  transform: scale(1.1);
}

.related-card-body {
  padding: 24px;
}

.related-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}

.related-card:hover .related-card-title {
  color: var(--primary);
}

.related-card-date {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.related-card-date::before {
  content: '\f017';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
}

/* 导航按钮 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.article-nav-item {
  padding: 24px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: var(--transition);
}

.article-nav-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(126, 182, 59, 0.1);
}

.article-nav-item.next {
  text-align: right;
}

.article-nav-label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-nav-title {
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
}

.article-nav-item:hover .article-nav-title {
  color: var(--primary);
}

/* 响应式 */
@media (max-width: 1200px) {
  .detail-main-wrapper {
    width: 96%;
  }
  
  .detail-layout {
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  .detail-sidebar {
    flex-direction: column;
    width: 94vw;
    margin-left: 3vw;
  }
  
  .detail-content {
    width: 100%;
  }
  
  .article-title {
    font-size: 28px;
  }

  .article-subtitle {
    font-size: 16px;
  }

  .related-articles {
    padding: 40px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }
  
  .page-banner {
    height: 220px;
  }
  
  .page-banner-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .detail-main-wrapper {
    width: 100%;
    padding: 20px 0 60px;
  }
  
  .article-header .container {
    padding: 30px 20px 24px;
  }

  .article-title {
    font-size: 24px;
    line-height: 1.4;
  }

  .article-subtitle {
    font-size: 15px;
    padding-left: 12px;
  }
  
  .article-content {
    padding: 24px 20px;
  }

  .article-inline-media {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .article-content h2 {
    font-size: 22px;
    margin: 40px 0 20px;
  }

  .article-content h3 {
    font-size: 18px;
  }

  .article-content p {
    font-size: 15px;
    line-height: 1.9;
  }

  .article-content blockquote {
    padding: 24px;
    margin: 30px 0;
  }

  .article-content blockquote::before {
    font-size: 60px;
    top: 5px;
    left: 10px;
  }

  .article-content blockquote p {
    font-size: 16px;
  }

  .related-articles {
    padding: 30px 20px;
    margin-top: 50px;
    border-radius: 16px;
  }

  .related-title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .related-card-img {
    height: 160px;
  }

  .article-share {
    flex-wrap: wrap;
    padding: 16px;
  }

  .article-tags {
    gap: 8px;
  }

  .article-tag {
    padding: 6px 14px;
    font-size: 12px;
  }
  
  .page-banner {
    height: 180px;
  }
  
  .page-banner-title {
    font-size: 22px;
  }
  
  .page-banner-subtitle {
    font-size: 12px;
  }
  
  .sidebar-card-body {
    padding: 12px;
  }
  
  .sidebar-news-img {
    width: 60px;
    height: 45px;
  }
  
  .sidebar-news-title {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 20px;
  }

  .article-meta {
    gap: 12px;
  }

  .article-category {
    padding: 6px 14px;
    font-size: 12px;
  }

  .share-btn {
    width: 40px;
    height: 40px;
  }
  
  .page-banner {
    height: 280px;
  }
}
