/* ==========================================================================
   JOFR 静态模板 · 自定义样式
   本文件包含两类内容：1) 工具类无法表达的状态样式  2) 滚动淡入动效
   可自由修改，不会影响 css/style.css（编译产物）。
   ========================================================================== */

/* 0. 隐藏属性优先（行业切换面板、移动端菜单都依赖它） */
[hidden] {
  display: none !important;
}

/* 1. 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 2. 导航栏滚动后的状态：半透明 + 毛玻璃 + 下边框 */
#site-header.is-scrolled {
  border-bottom-color: var(--border);
  background-color: rgba(14, 26, 48, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* 3. 行业应用分类按钮：默认态 / 选中态 */
.ind-tab {
  border-color: var(--border);
  background-color: var(--card);
}
.ind-tab .ind-tab-icon {
  border-color: var(--border);
  background-color: var(--secondary);
  color: var(--muted-foreground);
}
.ind-tab .ind-tab-label {
  color: var(--muted-foreground);
}
.ind-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 107, 255, 0.4);
}
.ind-tab:hover .ind-tab-label {
  color: var(--foreground);
}
.ind-tab.is-active {
  border-color: var(--brass);
  background-color: rgba(46, 107, 255, 0.1);
  box-shadow: 0 0 30px -12px rgba(46, 107, 255, 0.65);
  transform: none;
}
.ind-tab.is-active .ind-tab-icon {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.ind-tab.is-active .ind-tab-label {
  color: var(--foreground);
}

/* 4. 滚动进入视口淡入（由 js/main.js 添加 .is-visible） */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* 5. 移动端抽屉图标切换 */
#nav-icon-close[hidden],
#nav-icon-open[hidden] {
  display: none !important;
}

/* 6. 尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-marquee {
    animation: none !important;
  }
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 7. 新闻栏目页：分类筛选按钮 */
.news-tab {
  border-color: var(--border);
  color: var(--muted-foreground);
  background-color: transparent;
  transition:
    border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-tab:hover {
  border-color: rgba(46, 107, 255, 0.4);
  color: var(--foreground);
}
.news-tab.is-active {
  border-color: rgba(46, 107, 255, 0.6);
  background-color: rgba(46, 107, 255, 0.1);
  color: var(--brass);
}

/* 8. 后台富文本正文：给原生标签补样式（{$info.content} 直接输出到这里） */
.article-content > :first-child {
  margin-top: 0;
}
.article-content p {
  margin: 1.25rem 0;
  font-size: 0.9375rem;
  line-height: 2;
  color: rgba(238, 242, 250, 0.75);
}
.article-content h2 {
  margin: 2.75rem 0 1rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--foreground);
}
.article-content h3 {
  margin: 2rem 0 0.75rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}
.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
  list-style: none;
}
.article-content li {
  position: relative;
  margin: 0.75rem 0;
  font-size: 0.9375rem;
  line-height: 2;
  color: rgba(238, 242, 250, 0.75);
}
.article-content li::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--brass);
}
.article-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 2px solid rgba(46, 107, 255, 0.7);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--card);
  font-family: "Noto Serif SC", serif;
  font-size: 1rem;
  line-height: 2;
  color: rgba(238, 242, 250, 0.85);
}
.article-content img {
  margin: 2rem 0;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}
.article-content a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 767px) {
  .article-content h2 {
    font-size: 1.2rem;
  }
  .article-content p,
  .article-content li {
    font-size: 0.9rem;
    line-height: 1.95;
  }
}

/* 9. 新闻栏目页：分页按钮（由 js/main.js 动态生成） */
.news-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: transparent;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-page-btn:hover:not(:disabled) {
  border-color: rgba(46, 107, 255, 0.5);
  color: var(--brass);
}
.news-page-btn.is-active {
  border-color: var(--brass);
  background-color: var(--brass);
  color: #0e1a30;
  font-weight: 500;
}
.news-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
