:root {
  --red: #ff6600;
  --red-dark: #e55a00;
  --dark: #1a1a1a;
  --gray: #666;
  --border: #e8e8e8;
  --white: #fff;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--dark); background: #f2f3f5; }
a { text-decoration: none; color: inherit; }
img { width: 100%; display: block; object-fit: cover; }

/* Header */
.site-header { background: var(--white); color: var(--dark); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(0,0,0,.06); }
.site-header .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; height: 62px; }
.logo { font-size: 20px; font-weight: 800; color: var(--red); white-space: nowrap; letter-spacing: -.5px; }
.nav { display: flex; gap: 0; flex-wrap: nowrap; flex-shrink: 0; }
.nav a, .nav-more-toggle { color: #444; padding: 6px 10px; border-radius: var(--radius); font-size: 14px; transition: all .2s; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--red); background: rgba(255,102,0,.07); }
.search-box { display: flex; }

/* ── Language Switcher（下拉菜单）──────────────────────────────────────────── */
.lang-switcher { position: relative; margin-left: auto; flex-shrink: 0; }
.lang-current {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 8px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--dark); white-space: nowrap; transition: border-color .2s, color .2s;
}
.lang-current:hover { border-color: var(--red); color: var(--red); }
.lang-flag { font-size: 14px; line-height: 1; }
.lang-code { font-size: 12px; letter-spacing: .3px; }
.lang-name { font-size: 13px; }
.lang-arrow { font-size: 10px; color: var(--gray); transition: transform .2s; }
.lang-switcher:hover .lang-arrow,
.lang-switcher:focus-within .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.12); list-style: none; min-width: 140px;
  z-index: 200; padding: 4px 0;
  /* 注意：移除 overflow:hidden，让下方的 ::before 透明桥能露出去；
     菜单本身是普通圆角矩形，没有需要裁切的内容。 */
}
/* 悬停桥：在按钮与下拉的 6px 视觉缝隙处放一个透明命中区，
   防止鼠标从按钮移到下拉时穿过空白导致 hover 中断、下拉闪退。 */
.lang-dropdown::before {
  content: ''; position: absolute; left: 0; right: 0;
  top: -6px; height: 6px; background: transparent;
}
.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown { display: block; }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; font-size: 13px; color: var(--dark); transition: background .15s;
}
.lang-option:hover { background: #f5f5f5; color: var(--red); }
.lang-option.active { color: var(--red); font-weight: 700; background: #fff8f5; }
.search-box input { padding: 7px 12px; border: 1.5px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 14px; width: 160px; min-width: 0; outline: none; transition: border-color .2s; background: #fafafa; }
.search-box input:focus { border-color: var(--red); background: var(--white); }
.search-box button { padding: 7px 16px; background: var(--red); color: var(--white); border: none; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 14px; font-weight: 600; transition: background .2s; }
.search-box button:hover { background: var(--red-dark); }

/* Layout */
.main-container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.content-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-top: 16px; }
.content-main { min-width: 0; }

/* Carousel */
.banner-section { border-radius: var(--radius); overflow: hidden; }
.carousel { position: relative; aspect-ratio: 16/6; background: #000; border-radius: var(--radius); overflow: hidden; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.carousel-slide.active { opacity: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 24px 20px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: var(--white); }
.carousel-tag { background: var(--red); color: var(--white); font-size: 12px; padding: 2px 8px; border-radius: 3px; margin-bottom: 8px; display: inline-block; }
.carousel-caption h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.carousel-caption p { font-size: 14px; opacity: .85; }
.carousel-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .2s; }
.dot.active { background: var(--white); width: 20px; border-radius: 4px; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.4); color: var(--white); border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.carousel-btn:hover { background: rgba(0,0,0,.7); }
.prev { left: 12px; }
.next { right: 12px; }

/* Section */
.news-section { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 700; }
.section-title span { border-left: 4px solid var(--red); padding-left: 10px; }
.more-link { font-size: 13px; color: var(--gray); }
.more-link:hover { color: var(--red); }

/* News Card */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.news-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: box-shadow .2s; background: var(--white); }
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.news-card-img { overflow: hidden; position: relative; display: block; }
.news-card-img img { height: 160px; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-card-img img { transform: scale(1.03); }
.news-card-type-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 3px; font-weight: 600; }
.news-card-body { padding: 12px; }
.news-card-body h3 { font-size: 14px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-body h3:hover { color: var(--red); }
.news-card-sub { font-size: 12px; color: var(--gray); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-meta { display: flex; gap: 10px; font-size: 12px; color: #999; flex-wrap: wrap; }
/* 无图卡片：内容区收紧上下间距，给类型徽标合理摆位 */
.news-card-noimg .news-card-body { padding: 14px 14px 12px; }
.news-card-noimg .news-card-body .article-type-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 3px; font-weight: 600; margin-bottom: 6px; }
.news-card-noimg .news-card-body h3 { -webkit-line-clamp: 3; }   /* 没图就多放一行标题 */
.news-small-noimg img { display: none; }
.news-card-text { display: flex; flex-direction: row; }
.news-card-text-placeholder { flex-shrink: 0; width: 120px; height: 160px; background: linear-gradient(135deg, #f0f0f0 0%, #e4e4e4 100%); display: flex; align-items: center; justify-content: center; }
.news-card-text-placeholder svg { width: 36px; height: 36px; color: #bbb; opacity: .6; }
.news-card-text .news-card-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.news-card-text .news-card-sub { -webkit-line-clamp: 3; }

/* Sidebar */
.sidebar-sticky { position: sticky; top: 78px; }
.sidebar-widget { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.widget-title { font-size: 16px; font-weight: 700; border-left: 4px solid var(--red); padding-left: 10px; margin-bottom: 12px; }
.widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.widget-header .widget-title { margin-bottom: 0; }
.widget-more { font-size: 12px; color: var(--gray, #6b7280); text-decoration: none; flex-shrink: 0; }
.widget-more:hover { color: var(--red); }
[dir="rtl"] .widget-more { font-size: 12px; }
.sidebar-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar-item:last-child { border-bottom: none; }
.rank { width: 20px; height: 20px; border-radius: 3px; background: #ddd; color: var(--gray); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.rank-top { background: var(--red); color: var(--white); }

/* News Small */
.news-small { display: flex; gap: 8px; flex: 1; min-width: 0; }
.news-small img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.news-small-body { flex: 1; min-width: 0; }
.news-small-title { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.news-small:hover .news-small-title { color: var(--red); }
.news-small-meta { font-size: 11px; color: #999; }

/* Article Detail */
.article-detail { background: var(--white); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.article-tags-top { margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.topic-tag { background: #fff3ec; color: var(--red); font-size: 12px; padding: 2px 8px; border-radius: 3px; border: 1px solid #ffd5b5; }
.article-title { font-size: 26px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.article-subtitle { font-size: 16px; color: var(--gray); line-height: 1.6; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: #999; flex-wrap: wrap; margin-bottom: 24px; }
.meta-author strong { color: var(--dark); }
.article-content { font-size: 16px; line-height: 1.9; color: #333; }
.article-content p { margin-bottom: 16px; }
/* 正文内链：覆盖全局 a { color: inherit; text-decoration: none }，让自动内链 / 手工链可见可辨识 */
.article-content a { color: var(--red); text-decoration: none; border-bottom: 1px solid rgba(255,102,0,.35); transition: color .15s, border-color .15s; }
.article-content a:hover { color: #e25b00; border-bottom-color: var(--red); }
.article-copyright { margin-top: 24px; padding: 14px 16px; background: #fafafa; border-left: 3px solid var(--red, #e85d00); border-radius: 4px; font-size: 13px; line-height: 1.7; color: #6b7280; white-space: pre-line; }
.article-copyright::first-line { font-weight: 600; color: #374151; }
[dir="rtl"] .article-copyright { border-left: none; border-right: 3px solid var(--red, #e85d00); text-align: right; }

/* 文章详情页 — 作者简介卡片 */
.article-author-card { display: flex; gap: 14px; margin-top: 16px; padding: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.author-card-avatar { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #f3f4f6; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #6b7280; }
.author-card-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-card-avatar-fallback { font-size: 22px; font-weight: 600; color: #9ca3af; }
.author-card-body { flex: 1; min-width: 0; }
.author-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.author-card-name { font-size: 15px; font-weight: 700; color: #111827; text-decoration: none; }
.author-card-name:hover { color: var(--red, #e85d00); }
.author-card-level { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 500; }
.author-card-level.lv-normal { background: #f3f4f6; color: #6b7280; }
.author-card-level.lv-expert { background: #dbeafe; color: #2563eb; }
.author-card-level.lv-pro    { background: #dcfce7; color: #16a34a; }
.author-card-title { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.author-card-specialty { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.author-card-tag { font-size: 11px; color: #3b82f6; background: #eff6ff; padding: 1px 6px; border-radius: 3px; }
.author-card-bio { font-size: 13px; line-height: 1.65; color: #4b5563; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[dir="rtl"] .article-author-card { direction: rtl; text-align: right; }
@media (max-width: 640px){ .article-author-card { padding: 12px; gap: 10px; } .author-card-avatar { width: 44px; height: 44px; } }
.article-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.tag-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag-label { font-size: 13px; color: var(--gray); white-space: nowrap; }
.brand-tag { background: #f0f4ff; color: #3366cc; font-size: 12px; padding: 3px 10px; border-radius: 3px; border: 1px solid #ccd9ff; }
.brand-tag:hover { background: #3366cc; color: var(--white); }
.topic-tag-link { font-size: 13px; color: var(--gray); }
.topic-tag-link:hover { color: var(--red); }

/* Car Recommend */
.car-recommend { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.car-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 4px; }
.car-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s; }
.car-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.car-card-img { position: relative; }
.car-card-img img { height: 140px; object-fit: cover; }
.car-tag { position: absolute; top: 8px; left: 8px; background: var(--red); color: var(--white); font-size: 11px; padding: 2px 8px; border-radius: 3px; }
.car-card-body { padding: 12px; }
.car-brand { font-size: 11px; color: #999; margin-bottom: 4px; }
.car-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.car-price { font-size: 16px; color: var(--red); font-weight: 700; margin-bottom: 10px; }
.car-btn { display: block; text-align: center; background: var(--red); color: var(--white); padding: 7px; border-radius: var(--radius); font-size: 13px; transition: background .2s; }
.car-btn:hover { background: var(--red-dark); }

/* Breadcrumb */
.breadcrumb { padding: 10px 0; margin-bottom: 12px; }
.breadcrumb-list { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; }
.breadcrumb-item a { color: var(--gray); transition: color .2s; }
.breadcrumb-item a:hover { color: var(--red); }
.breadcrumb-item.active span { color: var(--dark); font-weight: 500; }
.breadcrumb-sep { color: #ccc; padding: 0 4px; user-select: none; }

/* Footer */
.site-footer { background: #222; color: rgba(255,255,255,.55); margin-top: 40px; padding: 28px 0; border-top: 3px solid var(--red); }
.site-footer .container { max-width: 1200px; margin: 0 auto; padding: 0 16px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.6); }
.footer-links a:hover { color: var(--white); }
.copyright { font-size: 12px; }

/* Search Page */
.search-top-box { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.search-page-form { margin-bottom: 14px; }
.search-page-input-wrap { display: flex; }
.search-page-input { flex: 1; padding: 11px 16px; border: 2px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 16px; outline: none; transition: border-color .2s; background: var(--white); }
.search-page-input:focus { border-color: var(--red); }
.search-page-btn { padding: 11px 28px; background: var(--red); color: var(--white); border: none; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; cursor: pointer; transition: background .2s; white-space: nowrap; }
.search-page-btn:hover { background: var(--red-dark); }
.search-tags-area { display: flex; flex-direction: column; gap: 8px; }
.search-tag-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-tag-label { font-size: 13px; color: var(--gray); white-space: nowrap; flex-shrink: 0; }
.search-tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.search-tag { font-size: 12px; padding: 3px 12px; border-radius: 12px; transition: all .2s; cursor: pointer; }
.hot-tag { background: #fff3ec; color: var(--red); border: 1px solid #ffd5b5; }
.hot-tag:hover { background: var(--red); color: var(--white); }
.frequent-tag { background: #f5f5f5; color: #555; border: 1px solid var(--border); }
.frequent-tag:hover { background: var(--dark); color: var(--white); border-color: var(--dark); }
.search-result-header { font-size: 14px; color: var(--gray); margin-bottom: 14px; padding: 10px 14px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-result-header em { color: var(--red); font-style: normal; font-weight: 600; }
.search-result-header strong { color: var(--dark); font-size: 15px; }
.empty-state { text-align: center; padding: 60px 0; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-tip { color: var(--gray); font-size: 15px; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; padding-bottom: 8px; flex-wrap: wrap; }
.page-btn, .page-num { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: var(--radius); font-size: 14px; border: 1px solid var(--border); background: var(--white); color: var(--dark); transition: all .2s; }
.page-num { min-width: 36px; padding: 0 10px; }
.page-btn:hover:not(.disabled), .page-num:hover:not(.active) { border-color: var(--red); color: var(--red); }
.page-num.active { background: var(--red); color: var(--white); border-color: var(--red); cursor: default; }
.page-btn.disabled { color: #ccc; border-color: var(--border); cursor: not-allowed; pointer-events: none; }
.page-ellipsis { color: #bbb; padding: 0 2px; line-height: 36px; }

/* Author meta link */
.meta-author-link { color: inherit; font-weight: 600; transition: color .2s; }
.meta-author-link:hover { color: var(--red); }

/* Author Hero */
.author-hero { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; margin-bottom: 20px; }
.author-hero-inner { display: flex; gap: 28px; align-items: flex-start; }
.author-avatar-wrap { flex-shrink: 0; }
.author-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.10); }
.author-info { flex: 1; min-width: 0; }
.author-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.author-name { font-size: 26px; font-weight: 800; }
.author-title-badge { background: #fff3ec; color: var(--red); font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid #ffd5b5; white-space: nowrap; }
.author-bio { font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 14px; }
.author-specialty { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.specialty-tag { background: #f0f4ff; color: #3366cc; font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid #ccd9ff; }
.author-stats { display: flex; align-items: center; gap: 20px; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--red); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* Author Articles Section */
.author-articles-section { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.article-count-badge { font-size: 13px; color: var(--gray); background: #f5f5f5; padding: 3px 10px; border-radius: 12px; }

/* Recommended Authors */
.recommended-authors-section { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.recommended-authors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 4px; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow .2s, border-color .2s; cursor: pointer; }
.author-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); border-color: var(--red); }
.author-card-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); margin-bottom: 10px; transition: border-color .2s; }
.author-card:hover .author-card-avatar { border-color: var(--red); }
.author-card-info { flex: 1; }
.author-card-name { display: block; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.author-card-title { display: block; font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.author-card-tags { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.specialty-tag-sm { background: #f5f5f5; color: #555; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.author-card-btn { display: inline-block; font-size: 12px; color: var(--red); border: 1px solid var(--red); padding: 4px 14px; border-radius: var(--radius); transition: all .2s; margin-top: auto; }
.author-card:hover .author-card-btn { background: var(--red); color: var(--white); }

/* Brand Hero */
.brand-section { margin-top: 16px; }
.brand-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); background: var(--dark); }
.brand-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(4px) brightness(.35); }
.brand-hero-content { position: relative; display: flex; gap: 28px; align-items: center; padding: 32px; }
.brand-hero-logo { flex-shrink: 0; width: 180px; height: 110px; border-radius: var(--radius); overflow: hidden; border: 2px solid rgba(255,255,255,.15); box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.brand-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-hero-info { flex: 1; color: var(--white); }
.brand-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
/* 收窄到 hero 容器内：原全局 .brand-name { color: white } 会污染 brands 列表（白卡上白字看不见） */
.brand-hero .brand-name, .brand-hero-info .brand-name { font-size: 28px; font-weight: 800; color: var(--white); }
.brand-hero .brand-en-name, .brand-hero-info .brand-en-name { font-size: 15px; color: rgba(255,255,255,.6); font-weight: 500; }
.brand-type-badge { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; white-space: nowrap; }
.brand-type-new   { background: rgba(255,102,0,.2); color: #ffaa66; border: 1px solid rgba(255,102,0,.4); }
.brand-type-trad  { background: rgba(51,102,204,.2); color: #88aaff; border: 1px solid rgba(51,102,204,.4); }
.brand-type-joint { background: rgba(34,197,94,.15); color: #6ee7a0; border: 1px solid rgba(34,197,94,.3); }
.brand-meta-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.brand-meta-item { font-size: 13px; color: rgba(255,255,255,.7); }
.brand-desc { font-size: 14px; color: rgba(255,255,255,.8); line-height: 1.8; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.brand-models { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-models-label { font-size: 13px; color: rgba(255,255,255,.6); white-space: nowrap; }
.brand-model-chip { background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); font-size: 12px; padding: 4px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); }

/* Brand Articles Section */
.brand-articles-section { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }

/* Other Brands (brand page bottom) */
.other-brands-section { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.brand-cards-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 4px; }
.brand-card-item { display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; background: var(--white); }
.brand-card-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); border-color: var(--red); }
.brand-card-img { height: 90px; overflow: hidden; background: #f5f5f5; }
.brand-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.brand-card-item:hover .brand-card-img img { transform: scale(1.05); }
.brand-card-body { padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; }
.brand-card-name { font-size: 13px; font-weight: 700; color: var(--dark); }
.brand-card-type { font-size: 11px; padding: 2px 6px; border-radius: 8px; }
.brand-type-new.brand-card-type   { background: #fff3ec; color: var(--red); border: 1px solid #ffd5b5; }
.brand-type-trad.brand-card-type  { background: #f0f4ff; color: #3366cc; border: 1px solid #ccd9ff; }
.brand-type-joint.brand-card-type { background: #f0faf4; color: #1a7a45; border: 1px solid #b3e6c8; }

/* Homepage brand links (logo + name) */
.brand-text-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin-top: 4px; }
.brand-text-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, background .2s; text-decoration: none; }
.brand-text-item:hover { border-color: var(--red); background: #fff8f5; }
.brand-text-logo { width: 44px; height: 44px; object-fit: contain; display: block; }
.brand-text-logo-empty { background: #f5f5f5; border-radius: 6px; }
.brand-text-name { font-size: 13px; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.brand-text-item:hover .brand-text-name { color: var(--red); }
/* legacy .brand-text-type 等已不再用（首页改 logo 展示），保留 brand-type-* 通用 badge 给 brand-card.ejs 等地方 */

/* Responsive */
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar-sticky { position: static; }
  .car-grid { grid-template-columns: repeat(3, 1fr); }
  .recommended-authors-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-cards-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-text-grid { grid-template-columns: repeat(5, 1fr); }
  .brand-hero-content { flex-direction: column; }
  .brand-hero-logo { width: 100%; height: 160px; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .car-grid { grid-template-columns: 1fr; }
  .nav { display: none !important; }
  .article-title { font-size: 20px; }
  .author-hero-inner { flex-direction: column; align-items: center; text-align: center; }
  .author-name-row { justify-content: center; }
  .author-specialty { justify-content: center; }
  .author-stats { justify-content: center; }
  .recommended-authors-grid { grid-template-columns: repeat(2, 1fr); }
  .author-avatar { width: 88px; height: 88px; }
  .brand-cards-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-text-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-meta-row { gap: 10px; }
}

/* ── RTL 支持（阿拉伯文）────────────────────────────────────────────────────── */
[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', -apple-system, 'PingFang SC', sans-serif;
}

/* Header 容器方向：dir="rtl" 已让 flex row 自动右起左流，不要再用 row-reverse 把它翻回 LTR */
/* .lang-switcher 保留 margin-left:auto（基础规则即可）—— 在 RTL row 里它会把元素推到左端，正好是语言切换器的目标位置 */
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
/* search-box：基础规则是 flex row，dir=rtl 会自动右起左流；不再额外 row-reverse */
[dir="rtl"] .search-box input {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-right: 1.5px solid var(--border);
  border-left: none;
}
[dir="rtl"] .search-box button {
  border-radius: var(--radius) 0 0 var(--radius);
}
[dir="rtl"] .search-page-input-wrap { flex-direction: row-reverse; }
[dir="rtl"] .search-page-input {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-right: 2px solid var(--border);
  border-left: none;
}
[dir="rtl"] .search-page-btn {
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Section 标题左边框 → 右边框 */
[dir="rtl"] .section-title span {
  border-left: none;
  border-right: 4px solid var(--red);
  padding-left: 0;
  padding-right: 10px;
}
[dir="rtl"] .widget-title {
  border-left: none;
  border-right: 4px solid var(--red);
  padding-left: 0;
  padding-right: 10px;
}

/* Flex 容器镜像 */
[dir="rtl"] .brand-hero-content { flex-direction: row-reverse; }
[dir="rtl"] .author-hero-inner  { flex-direction: row-reverse; }
[dir="rtl"] .author-name-row    { flex-direction: row-reverse; }
[dir="rtl"] .author-stats       { flex-direction: row-reverse; }
[dir="rtl"] .author-specialty   { flex-direction: row-reverse; }
[dir="rtl"] .brand-name-row     { flex-direction: row-reverse; }
[dir="rtl"] .brand-meta-row     { flex-direction: row-reverse; }
[dir="rtl"] .brand-models       { flex-direction: row-reverse; }
[dir="rtl"] .news-card-meta     { flex-direction: row-reverse; }
[dir="rtl"] .sidebar-item       { flex-direction: row-reverse; }
[dir="rtl"] .news-small         { flex-direction: row-reverse; }
[dir="rtl"] .tag-group          { flex-direction: row-reverse; }
[dir="rtl"] .article-tags-top   { flex-direction: row-reverse; }
[dir="rtl"] .article-meta       { flex-direction: row-reverse; }
[dir="rtl"] .article-footer     { align-items: flex-end; }
[dir="rtl"] .search-tag-row     { flex-direction: row-reverse; }
[dir="rtl"] .footer-links       { flex-direction: row-reverse; }
[dir="rtl"] .brand-card-body    { flex-direction: row-reverse; }

/* 文章内容文本方向 */
[dir="rtl"] .article-content { text-align: right; }

/* 面包屑分隔符镜像 */
[dir="rtl"] .breadcrumb-sep { transform: scaleX(-1); display: inline-block; }

/* 轮播按钮位置互换 */
[dir="rtl"] .carousel-btn.prev { left: auto; right: 12px; }
[dir="rtl"] .carousel-btn.next { right: auto; left: 12px; }
[dir="rtl"] .carousel-dots { right: auto; left: 16px; }

/* 汽车标签位置 */
[dir="rtl"] .car-tag { left: auto; right: 8px; }

/* 品牌 hero logo 在右侧 */
[dir="rtl"] .brand-hero-content { flex-direction: row-reverse; }

/* 作者卡片文本居中保持不变，无需镜像 */

/* 分页按钮 */
[dir="rtl"] .pagination { flex-direction: row-reverse; }

/* ── 首页顶部：轮播 + 热门话题 ──────────────────────────────────────────────── */
.banner-topics-layout { display: grid; grid-template-columns: 1fr 220px; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.banner-area { min-width: 0; }
.banner-area .carousel { aspect-ratio: 16/7; }
.topics-sidebar { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.topics-sidebar-inner { padding: 16px; height: 100%; display: flex; flex-direction: column; }
.topics-list { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.topic-entry { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 6px; transition: background .15s; }
.topic-entry:hover { background: #fff8f5; }
.topic-entry-num { width: 20px; height: 20px; border-radius: 3px; background: #eee; color: var(--gray); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topic-entry:nth-child(-n+3) .topic-entry-num { background: var(--red); color: var(--white); }
.topic-entry-name { font-size: 14px; font-weight: 500; color: var(--dark); }
.topic-entry:hover .topic-entry-name { color: var(--red); }

/* ── 快讯 ────────────────────────────────────────────────────────────────────── */
.flash-section { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.flash-list { display: flex; flex-direction: column; gap: 0; }
.flash-item { border-bottom: 1px solid var(--border); }
.flash-item:last-child { border-bottom: none; }
.flash-item-link { display: flex; align-items: center; gap: 10px; padding: 9px 4px; transition: background .15s; border-radius: 4px; }
.flash-item-link:hover { background: #fff8f5; }
.flash-badge { background: var(--red); color: var(--white); font-size: 11px; padding: 1px 7px; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.flash-title { flex: 1; font-size: 14px; color: var(--dark); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.flash-item-link:hover .flash-title { color: var(--red); }
.flash-meta { display: flex; gap: 8px; font-size: 12px; color: #999; white-space: nowrap; flex-shrink: 0; }

/* ── 文章类型标签 ─────────────────────────────────────────────────────────────── */
.article-type-badge { font-size: 11px; padding: 2px 8px; border-radius: 3px; font-weight: 600; }
.article-type-flash  { background: #fff3ec; color: var(--red); border: 1px solid #ffd5b5; }
.article-type-review { background: #f0f4ff; color: #3366cc; border: 1px solid #ccd9ff; }
.article-type-video  { background: #f0faf4; color: #1a7a45; border: 1px solid #b3e6c8; }

/* ── 热门车型网格 ─────────────────────────────────────────────────────────────── */
.car-models-section { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.car-models-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 4px; }
.car-model-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; background: var(--white); }
.car-model-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); border-color: var(--red); }
.car-model-card-link { display: block; }
.car-model-img { position: relative; height: 110px; overflow: hidden; background: #f5f5f5; }
.car-model-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.car-model-card:hover .car-model-img img { transform: scale(1.04); }
.car-model-energy { position: absolute; top: 6px; right: 6px; font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 600; }
.car-energy-bev  { background: #e8f5e9; color: #2e7d32; }
.car-energy-phev { background: #e3f2fd; color: #1565c0; }
.car-energy-erev { background: #fff3e0; color: #e65100; }
.car-model-body { padding: 8px 10px; }
.car-model-brand { font-size: 11px; color: #999; margin-bottom: 2px; }
.car-model-name { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.car-model-card:hover .car-model-name { color: var(--red); }
.car-model-price { font-size: 12px; color: var(--red); font-weight: 700; }

/* ── 热门标签侧边栏 ───────────────────────────────────────────────────────────── */
.hot-tags-widget { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.hot-tags-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hot-tag-item { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: #f5f5f5; color: #555; border: 1px solid var(--border); transition: all .2s; }
.hot-tag-item:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ── 话题/频道标签（详情页）────────────────────────────────────────────────────── */
.topic-badge { background: #fff3ec; color: var(--red); font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid #ffd5b5; transition: all .2s; }
.topic-badge:hover { background: var(--red); color: var(--white); }
.channel-badge { background: #f0f4ff; color: #3366cc; font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid #ccd9ff; transition: all .2s; }
.channel-badge:hover { background: #3366cc; color: var(--white); }
.car-model-badge { background: #f0faf4; color: #1a7a45; font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid #b3e6c8; transition: all .2s; }
.car-model-badge:hover { background: #1a7a45; color: var(--white); }

/* ── 评论区 ──────────────────────────────────────────────────────────────────── */
.comment-section { background: var(--white); border-radius: var(--radius); padding: 24px; margin-top: 16px; box-shadow: var(--shadow); }
.comment-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.comment-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comment-avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.comment-avatar-text { color: var(--white); font-size: 15px; font-weight: 700; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-size: 14px; font-weight: 600; color: var(--dark); }
.comment-time { font-size: 12px; color: #999; }
.comment-pending-badge { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #fef3c7; color: #92400e; font-weight: 600; }
.comment-pending { background: #fffbeb; border-left: 3px solid #fbbf24; padding-left: 12px; }
.comment-pending .comment-content { color: #6b7280; font-style: italic; }
.comment-content { font-size: 14px; color: #444; line-height: 1.7; margin-bottom: 8px; }
.comment-reply-btn { font-size: 12px; color: var(--gray); background: none; border: none; cursor: pointer; padding: 0; transition: color .2s; }
.comment-reply-btn:hover { color: var(--red); }
.comment-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 0; }
.comment-reply { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.comment-reply:last-child { border-bottom: none; }

/* 评论表单 */
.comment-form-wrap { border-top: 1px solid var(--border); padding-top: 20px; }
.comment-form-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.comment-form-reply-hint { display: flex; align-items: center; gap: 8px; background: #fff8f5; border: 1px solid #ffd5b5; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: var(--red); }
.reply-cancel-btn { background: none; border: none; cursor: pointer; color: #999; font-size: 14px; margin-left: auto; }
.reply-cancel-btn:hover { color: var(--red); }
.comment-form-row { margin-bottom: 12px; }
.comment-input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; transition: border-color .2s; }
.comment-input:focus { border-color: var(--red); }
.comment-textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; resize: vertical; transition: border-color .2s; font-family: inherit; }
.comment-textarea:focus { border-color: var(--red); }
.comment-submit-btn { padding: 10px 28px; background: var(--red); color: var(--white); border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; }
.comment-submit-btn:hover { background: var(--red-dark); }

/* ── 话题/频道页 ─────────────────────────────────────────────────────────────── */
.topic-hero { background: var(--white); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 20px; box-shadow: var(--shadow); border-left: 4px solid var(--red); }
.topic-hero-inner { display: flex; flex-direction: column; gap: 8px; }
.topic-hero-name { font-size: 28px; font-weight: 800; color: var(--dark); }
.topic-hero-desc { font-size: 14px; color: var(--gray); line-height: 1.7; }
.topic-hero-stats { margin-top: 4px; }
.topic-articles-section { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.other-topics-section { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.topic-chip { font-size: 13px; padding: 6px 16px; border-radius: 20px; background: #f5f5f5; color: #555; border: 1px solid var(--border); transition: all .2s; }
.topic-chip:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ── 响应式新增 ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .banner-topics-layout { grid-template-columns: 1fr; }
  .topics-sidebar { display: none; }
  .car-models-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .car-models-grid { grid-template-columns: repeat(2, 1fr); }
  .flash-meta { display: none; }
  .topic-hero { padding: 20px; }
  .topic-hero-name { font-size: 22px; }
}

/* ── RTL 新增 ────────────────────────────────────────────────────────────────── */
[dir="rtl"] .banner-topics-layout { direction: rtl; }
[dir="rtl"] .topic-hero { border-left: none; border-right: 4px solid var(--red); }
[dir="rtl"] .flash-item-link { flex-direction: row-reverse; }
[dir="rtl"] .flash-meta { flex-direction: row-reverse; }
[dir="rtl"] .comment-replies { padding-left: 0; padding-right: 16px; border-left: none; border-right: 2px solid var(--border); }
[dir="rtl"] .comment-item { flex-direction: row-reverse; }
[dir="rtl"] .comment-header { flex-direction: row-reverse; }
[dir="rtl"] .comment-form-reply-hint { flex-direction: row-reverse; }
[dir="rtl"] .reply-cancel-btn { margin-left: 0; margin-right: auto; }
[dir="rtl"] .topics-list { direction: rtl; }
[dir="rtl"] .topic-entry { flex-direction: row-reverse; }
[dir="rtl"] .hot-tags-list { flex-direction: row-reverse; }

/* 视觉隐藏（屏幕阅读器/搜索引擎可见）— 用于 SEO H1 等场景 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}