/* 跨境资讯页面样式 */

:root {
  --cbn-accent: #f97316;
  --cbn-accent-soft: rgba(249, 115, 22, 0.15);
}

/* 跨境资讯轮播组件覆盖样式 */
.cbn-section-home {
  padding: 60px 0 20px;
  background: var(--bg-color, #0b0e14);
}

.cbn-section-home .container {
  max-width: 1660px; /* 加宽容器，让一行 4 个卡片更宽 */
  padding: 0 40px;
}

.cbn-swiper {
  width: 100%;
  overflow: hidden;
  padding: 20px 10px; /* 为阴影留出空间 */
  position: relative; /* 必须加相对定位，以约束内部元素 */
}

.cbn-swiper .swiper-wrapper {
  display: flex; /* Ensure it is a flex container */
  align-items: stretch;
}

.cbn-swiper .swiper-slide {
  height: auto; /* 让卡片自适应高度 */
  display: flex;
}

.cbn-swiper .cbn-card {
  width: 100%;
}
.cbn-banner {
  height: 330px;
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 10%, rgba(249, 115, 22, 0.18) 0%, transparent 55%),
    url("../images/alshou.png") center center no-repeat;
  background-size: cover, cover;
  position: relative;
  overflow: hidden;
}

.cbn-banner .header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 20, 0.75);
  z-index: 1;
}

.cbn-banner .container {
  position: relative;
  z-index: 2;
}

.cbn-banner h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.8px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fb923c 0%, #f97316 50%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cbn-banner p {
  font-size: 18px;
  color: var(--text-secondary, #94a3b8);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 列表区域 */
.cbn-section {
  padding: 80px 0 100px;
  background:
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
    var(--bg-color, #0b0e14);
}

.cbn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* 卡片 */
.cbn-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  color: white;
}

.cbn-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cbn-card-cover {
  width: 100%;
  height: 200px; /* 固定高度，避免 slide 宽度异常时图片被撑爆 */
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.cbn-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.cbn-card:hover .cbn-card-cover img {
  transform: scale(1.05);
}

.cbn-card-body {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cbn-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: white;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.cbn-card:hover .cbn-card-title {
  color: #3b82f6; /* 品牌蓝 */
}

.cbn-card-date {
  font-size: 13px;
  color: #94a3b8; /* text-secondary */
  margin-bottom: 16px;
}

.cbn-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cbn-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cbn-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
}

.cbn-tag-muted {
  color: #64748b;
}

.cbn-card-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s, transform 0.3s;
}

.cbn-card-arrow svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.cbn-card:hover .cbn-card-arrow {
  background: #3b82f6;
  transform: translateX(4px);
}

/* 空状态 & 加载 */
.cbn-empty,
.cbn-detail-loading,
.cbn-detail-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary, #94a3b8);
}

.cbn-detail-error h2 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 24px;
}

/* 分页 */
.cbn-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
}

.cbn-page-btn {
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.cbn-page-btn:hover:not(:disabled) {
  background: var(--cbn-accent);
  border-color: var(--cbn-accent);
}

.cbn-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cbn-pagination-info {
  color: var(--text-secondary, #94a3b8);
  font-size: 14px;
}

/* 详情页 */
.cbn-detail-section {
  padding: 60px 0 100px;
  background: var(--bg-color, #0b0e14);
}

.cbn-detail {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px;
}

.cbn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #94a3b8);
  font-size: 14px;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.cbn-back-link svg {
  width: 18px;
  height: 18px;
}

.cbn-back-link:hover {
  color: var(--cbn-accent);
}

.cbn-detail-header h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 16px;
}

.cbn-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.cbn-detail-meta time {
  font-size: 14px;
  color: var(--text-secondary, #94a3b8);
}

.cbn-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cbn-detail-tags .cbn-tag {
  border-color: rgba(249, 115, 22, 0.3);
  color: #fb923c;
  background: var(--cbn-accent-soft);
}

.cbn-detail-cover {
  margin-bottom: 32px;
  border-radius: 16px;
  overflow: hidden;
}

.cbn-detail-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.cbn-detail-content {
  background: transparent;
  border-radius: 16px;
  padding: 0;
  color: #d1d5db; /* 调整正文文字颜色以适应深色背景 */
  line-height: 1.8;
  word-break: break-word;
}

.cbn-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.cbn-detail-content p {
  margin-bottom: 1.5em;
  color: #cbd5e1;
}

.cbn-detail-content h1,
.cbn-detail-content h2,
.cbn-detail-content h3,
.cbn-detail-content h4 {
  color: #fff;
  margin: 1.5em 0 0.8em;
}


/* 响应式 */
@media (max-width: 1200px) {
  .cbn-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .cbn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .cbn-banner h1 {
    font-size: 42px;
  }
}

@media (max-width: 600px) {
  .cbn-grid {
    grid-template-columns: 1fr;
  }

  .cbn-banner h1 {
    font-size: 32px;
  }

  .cbn-detail-header h1 {
    font-size: 26px;
  }

  .cbn-detail-content {
    padding: 20px;
  }
}
