/* 遂宁妇联前台 - 自定义组件类
 *
 * 模板大量使用 font-display / pattern-bg / seal-tag /
 * seal-tag-outline / accent-bar / card-hover / ornament-divider / gradient-hero /
 * nav-item / nav-item.active 等自定义类，但 tailwind.min.css 是仅含工具类 +
 * preflight 的精简构建，main.css 也没有这些组件类定义，导致栏目高亮、置顶
 * 印章标签、品牌字体、404 装饰背景等视觉元素全部失效。
 *
 * 因 tailwind.config.js 的 plugins 数组未注册 @tailwindcss/typography
 * （生产构建不含 .prose 规则，富文本排版退化为浏览器默认），
 * 在此文件统一以原生 CSS 补齐自定义组件类与 .prose 富文本排版，避免引入
 * Tailwind 插件依赖（项目约束：Tailwind 3 已锁定，禁止额外插件运行时）。
 *
 * 该文件由 base.html 在 tailwind.min.css 之后加载，所有规则不使用 Tailwind 指令，
 * 直接用原生 CSS + CSS 变量（与 tailwind.config.js 颜色对齐）。
 *
 * 顶部「基础层」区块（[x-cloak]/body font/:focus-visible）在
 * base.html 通过 tailwind.min.css + components.css 两次请求加载，保持"基础
 * 在前组件在后"的覆盖顺序。
 */

/* ── 基础层（基础在前组件在后）── */

/*
 * [x-cloak] 全局隐藏（Alpine.js 官方配套）
 * Alpine.js 用 defer 加载，加载完成前所有 x-show 元素默认可见，会导致子菜单
 * 在初始化前以展开态闪现（FOUC），轮播暂停图标两个 SVG 同时显示。
 * UOS Chromium 69-80 弱设备闪烁尤其明显。[x-cloak]{display:none!important}
 * 是 Alpine 官方要求的配套样式，与 x-show 配合使用：加载后 Alpine 自动移除
 * x-cloak 属性，元素恢复显示。
 */
[x-cloak] {
  display: none !important;
}

/* 基础重置 */
body {
  font-family: "Microsoft YaHei", "微软雅黑", SimSun, sans-serif;
}

/* UOS Chromium 老内核（69-83）<button> 原生底色问题：
   tailwind.min.css 的 preflight 对 button 设 -webkit-appearance: button。
   modern Chromium 能以 background-color: transparent 覆盖原生按钮底色，但 UOS
   老内核的 appearance:button 会强制原生 button-face 底色（浅灰），忽略 transparent，
   致所有无 bg-* 类的 <button> 显示灰底（主导航下拉触发器栏目项、首页 tab 切换
   "新闻资讯/区县动态"等本应透出父容器底色，却变灰）。实测单靠 appearance:none 不足以
   完全压制原生底色，须显式 background-color: transparent 兜底。有 bg-* 类的 button
   （如搜索按钮 bg-white/bg-brand）因类选择器 specificity(0,1,0) 高于元素选择器(0,0,1)，
   仍正常显示自有背景，不受影响。modern 无此问题，以下声明对 modern 无副作用。 */
button {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
}

/*
 * 焦点可见性（无障碍 — GB/T 37668-2019 一级标配 / SC 2.4.7 Focus Visible AA）
 *
 * 双轨分叉兜底：:focus-visible 选择器仅 Chromium 86+ / 新 Firefox·Safari 支持，
 * 本前台须适配 UOS Chromium 69-83 —— 该内核不识别 :focus-visible（整条规则被丢弃），
 * 又没有「鼠标点击不画 outline」的启发式，鼠标点 <a>/<button> 即触发 :focus 画出
 * 浏览器默认黑色 outline。用 @supports selector(:focus-visible) 分两路：
 * 支持的浏览器走 :focus-visible（鼠标点击不画框、键盘画品牌环）；不支持的旧浏览器
 * （UOS Chromium 69-83）:focus 置 none，鼠标点击同样不画框。产品取舍：公众门户
 * 键盘用户占比极低，UOS 优先视觉无框，牺牲该内核键盘焦点可见性（GB/T 37668 推荐
 * 性非强制；现代分支不受影响，键盘 Tab 焦点环仍保留）。@supports 条件里未知
 * selector() 函数按规范求值 false，故 @supports not selector(...) 块恰在旧内核生效。
 *
 * 焦点环分色：通用可聚焦元素（input/textarea/select/summary 等）用深荷叶青，浅色
 * 背景对比度充足、呼应荷花文化、降低红色占比；链接/按钮等交互元素用品牌红，
 * 键盘聚焦画红环即满足「不只靠颜色区分可交互」（SC 1.4.1 非颜色指示；
 * 正文 .prose 链接另有下划线，鼠标 hover 变色与 opacity 变化作补充指示）。
 * components.css 在 base.html 之后加载，:root 变量可用。
 */
@supports selector(:focus-visible) {
  :focus {
    outline: none;
  }
  :focus-visible {
    outline: 2px solid var(--snfl-lotus-dark, #3d6b4d);
    outline-offset: 2px;
  }
  a:focus-visible,
  button:focus-visible,
  [role="button"]:focus-visible,
  [tabindex]:focus-visible {
    outline: 2px solid var(--snfl-brand, #c2185b);
    outline-offset: 2px;
    border-radius: 2px;
  }
}
@supports not selector(:focus-visible) {
  /* UOS Chromium 69-83 等 :focus-visible 缺失内核：鼠标点击与键盘 Tab 均不画框，
     换取视觉无框（产品取舍见上方块注释）。现代浏览器分支键盘焦点可见性不受影响。 */
  :focus {
    outline: none;
  }
}

/* ── 组件层（components.css 原内容）────────────────────────────── */

:root {
  /* 与 tailwind.config.js theme.extend.colors 对齐，供原生 CSS 复用 */
  --snfl-brand: #c2185b;
  --snfl-brand-dark: #9c1249;
  --snfl-brand-light: #fce4ec;
  --snfl-vermilion: #9d2933;
  --snfl-vermilion-dark: #6d1a23;
  --snfl-vermilion-light: #fdf2f4;
  --snfl-lotus: #5a8b6b;
  --snfl-lotus-dark: #3d6b4d;
  --snfl-lotus-light: #e8f0ea;
  --snfl-wave: #e6eef2;
  --snfl-accent: #c9526b;
  --snfl-accent-light: #f8d7df;
  --snfl-gold: #c8a55b;
  --snfl-gold-light: #f0e2bd;
  --snfl-gold-dark: #9a7d3d;
  --snfl-ink: #1a1a1a;
  --snfl-ink-soft: #5a5a5a;
  --snfl-ink-muted: #6b6b6b;
  --snfl-rice: #faf7f2;
  --snfl-cloud: #ffffff;
  --snfl-border: #ebe5dc;
}

/* ── font-display：品牌展示字体（标题、印章、栏目名等）──────────────
 * 模板中 font-display 与 font-bold / text-2xl 等工具类组合使用，
 * 此类仅负责 font-family；权重 / 字号由 Tailwind 工具类提供。
 */
.font-display {
  font-family: "Source Han Serif SC", "Noto Serif SC", "思源宋体",
               STSong, STZhongsong, "SimSun", "宋体", serif;
  letter-spacing: 0.02em;
}

/* ── pattern-bg：传统纹样装饰背景（无外部资源，纯 CSS 绘制）──────────
 * 用于轮播图占位、404 装饰层、卡片空图占位等。不依赖图片资源，
 * 用 repeating 渐变模拟中式回形纹/祥云纹的低密度纹理。
 */
.pattern-bg {
  background-color: var(--snfl-rice);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 18px,
      rgba(90, 139, 107, 0.05) 18px,
      rgba(90, 139, 107, 0.05) 19px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 18px,
      rgba(201, 165, 91, 0.05) 18px,
      rgba(201, 165, 91, 0.05) 19px
    );
}

/* ── seal-tag / seal-tag-outline：印章风格标签 ──────────────────
 * 焦点 / 置顶等小角标，呼应妇联官方印章视觉。
 * seal-tag：朱红实心；seal-tag-outline：朱红描边白底（次级语义）。
 */
.seal-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background-color: var(--snfl-brand);
  border: 1px solid var(--snfl-brand);
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.seal-tag-outline {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--snfl-brand);
  background-color: var(--snfl-cloud);
  border: 1px solid var(--snfl-brand);
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* ── accent-bar：列表项左侧荷叶青装饰条 ─────────────────────────
 * 用于首页"妇联动态"等列表项 hover 时强调当前条目，
 * 通过 ::before 在左侧绘制 3px 荷叶青竖线，与遂宁荷花文化呼应。
 */
.accent-bar {
  position: relative;
}
.accent-bar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background-color: var(--snfl-lotus);
  border-radius: 2px;
  transition: height 0.2s ease;
}
.accent-bar:hover::before {
  height: 60%;
}

/* ── card-hover：卡片悬浮动效 ────────────────────────────────
 * 卡片悬停的克制反馈：去圆角、去彩色大阴影，仅以中性灰微阴影 + 轻微上浮
 * 暗示可点击，保持政府网站端庄基调。与 Tailwind 工具类组合使用。
 */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.08);
}

/* ── ornament-divider：装饰性分隔符 ──────────────────────────
 * 用于首页"展示板报"下方等分隔区域，中央带菱形装饰元素呼应中式风格。
 */
.ornament-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--snfl-border) 20%,
    var(--snfl-border) 80%,
    transparent
  );
}
.ornament-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background-color: var(--snfl-gold);
  border: 1px solid var(--snfl-gold-dark);
}

/* ── gradient-hero：英雄区/404 大背景渐变 ─────────────────────
 * 用于 404 页面右侧装饰区，朱红 → 金色斜向渐变营造视觉重量。
 */
.gradient-hero {
  background: linear-gradient(135deg, var(--snfl-brand) 0%, var(--snfl-brand-dark) 50%, var(--snfl-gold-dark) 100%);
}

/* ── gradient-stately：主旋律端庄渐变 ────────────────────────
 * 首页专题图无运营数据时的主旋律底图：朱印红同色相明度渐变，
 * 不含金色暖调，避免"活动海报/营销 Banner"观感，契合政府严肃基调。
 * 与 gradient-hero 区分：后者含金色用于 404 装饰，本类纯朱红用于主旋律宣传。
 */
.gradient-stately {
  background: linear-gradient(135deg, var(--snfl-vermilion) 0%, var(--snfl-vermilion-dark) 100%);
}

/* ── nav-item / nav-item.active：导航栏栏目项 ─────────────────
 * 当前 header.html 已对 active 态用 Tailwind 工具类覆盖（border-b-3 bg-brand-light/50 等），
 * 此处补齐 nav-item 本身的视觉基线，确保未来扩展栏目时 hover/active 视觉一致。
 * 列表项本身无 padding（padding 在内部 <a> 上）；active 通过工具类增强。
 *
 * 等宽分配：flex: 1 1 0% 让所有一级栏目项在 <ul> 主轴上平均占满可用宽度，
 * 配合 min-width: 0 允许内容宽度超过配额时仍可压缩，避免某一项文字偏长顶歪整行。
 * 这样无论栏目数量是 8/9/10，都自动等分导航栏宽度，不会出现左对齐右侧留白。
 * 直接子级 <a>/<button> 强制文字与箭头居中，与等宽格子视觉对齐；
 * 子菜单内的二级 <a> 不是直接子级，保持左对齐不受影响。
 */
.nav-item {
  flex: 1 1 0%;
  min-width: 0;
}
.nav-item > a,
.nav-item > button {
  text-align: center;
  justify-content: center;
  /* UOS 老内核防御：栏目项（尤其 button 下拉触发器）显式透明背景 + 无边框，
     防止残留原生按钮底色/边框盖住 nav 红条。modern 本就透明无边框，此声明无副作用。 */
  background-color: transparent;
  border: 0;
}
.nav-item.active > a {
  font-weight: 600;
}

/* ── .prose 富文本排版 ────────────────────────────────────
 * tailwind.config.js 未注册 @tailwindcss/typography 插件，但 article_detail.html
 * 与 single_page.html 用 class="prose" 包裹文章正文。若不补齐样式，浏览器默认
 * 排版会让正文标题与正文段落视觉不分层。此处补齐等保可接受的中文阅读排版。
 * 参考 @tailwindcss/typography 的中文优化版：行高 1.75、段落间距、标题字重渐增。
 */
.prose {
  color: var(--snfl-ink);
  line-height: 1.75;
  font-size: 16px;
  max-width: 100%;
}
/* 文章正文字号档位（A-/A/A+ 工具条局部作用域）：只缩 .prose 容器，
 * 内部 h2/h3/h4/段落间距 全用 em，随 font-size 等比缩放；
 * 不影响页面其他区域（导航/侧栏/页内标题），符合行业 CMS"只缩正文"惯例。 */
.prose[data-prose-size="sm"] { font-size: 14px; }
.prose[data-prose-size="md"] { font-size: 16px; }
.prose[data-prose-size="lg"] { font-size: 20px; }
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose figure,
.prose pre,
.prose table {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}
/* 已移除 .prose h1 样式——html_sanitize.ALLOWED_TAGS 不再含 h1，
   正文富文本不会出现 <h1>；页面级 <h1> 由 article_detail.html / single_page.html
   的 <header> 内渲染，非 .prose 容器内，无需此样式。保留 .prose h2/h3/h4/h5/h6
   作为编辑器"标题2/3/4/5"的视觉映射（编辑器侧"标题1"映射到 <h2>）。 */
.prose h2 {
  font-size: 1.5em;
  font-weight: 700;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.35;
  color: var(--snfl-ink);
}
.prose h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  line-height: 1.4;
  color: var(--snfl-ink);
}
.prose h4 {
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  color: var(--snfl-ink);
}
.prose a {
  color: var(--snfl-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose a:hover {
  color: var(--snfl-brand-dark);
}
.prose strong {
  font-weight: 600;
  color: var(--snfl-ink);
}
.prose ul {
  padding-left: 1.5em;
  list-style-type: disc;
}
.prose ol {
  padding-left: 1.5em;
  list-style-type: decimal;
}
.prose li {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}
.prose blockquote {
  padding-left: 1em;
  border-left: 3px solid var(--snfl-brand);
  color: var(--snfl-ink-soft);
  font-style: italic;
}
.prose img {
  /* display: inline-block —— 关键修复，勿改回 block/默认：
   * Tailwind preflight（tailwind.min.css）把 img 全局设为 display:block，块级
   * 图片不受父级 text-align 影响——运营在 wangEditor 里对图片点「居中」，序列化
   * 产物是 <p style="text-align: center;"><img></p>（text-align 只对 inline
   * 内容生效），编辑器内 img 是 inline 显示居中，前台 img 被 preflight 块级化后
   * 变成左对齐，表现为"保存发布后格式丢失"。inline-block 让图片回归行内流，
   * text-align: center/right 重新生效；inline-block 同时避免 inline 的基线降部
   * 空隙。图片带内联 style="display:block; margin:auto"（另一种居中机制，见
   * html_sanitize 放行 display 的注释）时内联样式优先级更高，不受影响。 */
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/* 富文本内嵌视频：wangEditor 5 video 元素序列化为
   <div data-w-e-type="video" data-w-e-is-void><video controls><source/></video></div>，
   <video>/<source>/data-w-e-type 均经 html_sanitize 白名单保留。
   - .prose video：响应式 + 圆角，与 .prose img 一致（全局 preflight 仅给 max-width/
     height，缺圆角与块级间距）；
   - .prose [data-w-e-type="video"]：外层 div 补段落级上下间距，避免视频与正文紧贴。
   注意：wangEditor 给 <video> 输出 width="auto" height="auto" 这类非法属性值，
   浏览器忽略，实际尺寸由此处 max-width:100% + 原生比例决定。
   display:block + margin:auto：运营用 editVideoSize/预设菜单设了较小 width 时，
   video 在文章内居中显示（width=100% 或未设时居中无副作用）。 */
.prose [data-w-e-type="video"] {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}
.prose video {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
}
.prose figure {
  margin-left: 0;
  margin-right: 0;
}
.prose figcaption {
  font-size: 0.875em;
  color: var(--snfl-ink-muted);
  text-align: center;
  margin-top: 0.4em;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
.prose thead {
  background-color: var(--snfl-brand-light);
}
.prose th,
.prose td {
  padding: 0.5em 0.75em;
  border: 1px solid var(--snfl-border);
  text-align: left;
}
.prose code {
  font-family: "Source Code Pro", "Consolas", "Monaco", monospace;
  font-size: 0.9em;
  padding: 0.15em 0.35em;
  background-color: var(--snfl-brand-light);
  border-radius: 3px;
  color: var(--snfl-brand-dark);
}
.prose pre {
  padding: 1em;
  background-color: var(--snfl-rice);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.6;
}
.prose pre code {
  padding: 0;
  background-color: transparent;
  color: var(--snfl-ink);
}
.prose hr {
  margin-top: 2em;
  margin-bottom: 2em;
  border: 0;
  border-top: 1px solid var(--snfl-border);
}

/* 链接交互指示：正文 .prose a 与页脚 .footer-link-list a:hover 各自有独立
   下划线规则（见对应选择器），普通导航/品牌链接靠 hover 变色 + opacity 变化
   指示可交互，不强制全局下划线（SC 1.4.1 不要求链接必须加下划线，仅要求
   不只靠颜色区分——正文链接已有下划线、导航有 hover 变色，均满足）。
   键盘焦点环策略（SC 2.4.7）见文件顶部基础层 @supports 分叉。 */
a:hover {
  text-decoration: none;
}

/* ── 遂宁本土文化装饰元素 ──────────────────────────────────
 * 莲瓣分隔符（lotus-divider）：呼应遂宁"中国荷花之乡""圣莲岛"文化 IP，
 * 取代通用菱形分隔，用于首页区块过渡。中央 5 瓣莲瓣 SVG + 金色花蕊，
 * 玫红描边与主色呼应。
 */
.lotus-divider {
  position: relative;
  height: 28px;
  background: linear-gradient(
    to right,
    transparent,
    var(--snfl-border) 15%,
    var(--snfl-border) 85%,
    transparent
  );
  background-size: 100% 1px;
  background-position: center;
  background-repeat: no-repeat;
}
.lotus-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background-color: var(--snfl-rice);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='%235a8b6b' stroke-width='1.2' stroke-linejoin='round'%3E%3Cpath d='M15 4 C13 8 13 12 15 14 C17 12 17 8 15 4 Z'/%3E%3Cpath d='M15 14 C10.5 12 8 10 6 12 C8 14.5 11.5 15.5 15 14 Z'/%3E%3Cpath d='M15 14 C19.5 12 22 10 24 12 C22 14.5 18.5 15.5 15 14 Z'/%3E%3Cpath d='M15 14 C9.5 15 6 17.5 7.5 21 C11 20 14 17.5 15 14 Z'/%3E%3Cpath d='M15 14 C20.5 15 24 17.5 22.5 21 C19 20 16 17.5 15 14 Z'/%3E%3Ccircle cx='15' cy='14' r='1.6' fill='%23c8a55b' stroke='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ── 涪江水波带（wave-divider）：遂宁涪江穿城地理意象 ──
 * 用于 Banner 下方等区块过渡，荷叶青双线波纹（呼应"荷叶+涪江"双意象）。
 * 极简细线，不喧宾夺主。
 */
.wave-divider {
  height: 14px;
  background-color: transparent;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' fill='none' stroke='%235a8b6b' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M0 5 Q15 1 30 5 T60 5 T90 5 T120 5'/%3E%3Cpath d='M0 10 Q15 6 30 10 T60 10 T90 10 T120 10' opacity='0.45'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 120px 14px;
}

/* ── 全站顶部轮播横幅（site-hero-banner）────────────────────
 * 位于品牌信息条与主导航之间，承载写死的 2 张主题宣传图轮播。
 * 容器固定高度让内部 <img object-cover> 居中铺满；红色 background-color
 * 作首张图加载前过渡兜底。桌面 360px，移动端降到 220px。
 */
.site-hero-banner {
  background-color: #b91c3c;
  height: 360px;
}

@media (max-width: 768px) {
  .site-hero-banner {
    height: 220px;
  }
}

/* 轮播左右切换箭头：纯白色箭头，无蒙版背景，垂直居中贴两侧；
 * hover 放大 + 投影作交互反馈（不靠颜色、不加底色）。箭头加 drop-shadow
 * 保证在浅色图区域也可见。 */
.site-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  border: 0;
  background-color: transparent;
  transition: transform 0.2s;
  cursor: pointer;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

.site-hero-arrow:hover {
  transform: translateY(-50%) scale(1.18);
}

.site-hero-arrow--prev { left: 14px; }
.site-hero-arrow--next { right: 14px; }

@media (max-width: 768px) {
  .site-hero-arrow {
    width: 36px;
    height: 36px;
  }
  .site-hero-arrow--prev { left: 8px; }
  .site-hero-arrow--next { right: 8px; }
}

.site-topbar {
  background-color: #cc2124;
  font-size: 13px;
}

/* 顶部品牌信息条：logo（视觉锚点）+ 站名/英文双行 + 四自精神。
 * logo 加大压住版面；中文站名与英文辅注纵向双行，层级清晰；
 * 四自标语用竖分隔线隔开，弱化为主标识的补充。 */
.site-topbar__inner {
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-topbar__brand {
  gap: 14px;
  color: #fff;
  align-items: center;
}

.site-topbar__logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.22));
}

/* 站名文字组：中文上行、英文下行纵向堆叠。 */
.site-topbar__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.site-topbar__name-cn {
  font-family: "STZhongsong", "SimSun", "宋体", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
}

/* 英文辅注：小字、大写、宽字距，淡白作中文的注脚。 */
.site-topbar__name-en {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

/* 四自精神标语：竖分隔线隔开放最右，宽字距呼应妇联理念。 */
.site-topbar__spirit {
  font-size: 13px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  padding-left: 16px;
  margin-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.38);
}

/* 搜索按钮：去边框、纯白线图标，克制不抢品牌区视觉。 */
/* 信息条常驻搜索框：半透明白底圆角胶囊，在深红信息条上显白、协调不突兀。
 * 内嵌灰色搜索图标 + 透明输入（白字）+ 朱红提交按钮，整体融入红/白/朱红体系。 */
.site-topbar__search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 38px;
  width: 280px;
  max-width: 32vw;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  padding: 0 5px 0 14px;
  background-color: rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s, background-color 0.2s;
}

.site-topbar__search:focus-within {
  border-color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.24);
}

.site-topbar__search-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.site-topbar__search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #fff;
  padding: 4px 0;
}

.site-topbar__search-input:focus {
  outline: none;
}

.site-topbar__search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* 搜索提交按钮：朱红底白字，与主导航同色，呼应网站主色。 */
.site-topbar__search-submit {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 9999px;
  background-color: #c52734;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.site-topbar__search-submit:hover {
  background-color: var(--snfl-vermilion-dark, #6d1a23);
}

/* 移动端：信息条常驻搜索框在窄屏隐藏，改由大横幅右上角的搜索按钮触发滑出面板。 */
@media (max-width: 768px) {
  .site-topbar__search {
    display: none;
  }
}

.site-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: translateY(-2px);
  pointer-events: none;
}

.site-hero-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--hero-gap, 8px);
  text-align: center;
}

.site-hero-logo {
  width: var(--hero-logo-size, 68px);
  height: var(--hero-logo-size, 68px);
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

.site-hero-title {
  margin: 0;
  color: #fff;
  font-family: "STZhongsong", "SimSun", "宋体", serif;
  font-size: var(--hero-title-size, 40px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: var(--hero-title-spacing, 0.04em);
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.site-hero-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: "STZhongsong", "SimSun", "宋体", serif;
  font-size: var(--hero-subtitle-size, 14px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: var(--hero-subtitle-spacing, 0.16em);
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.26);
}

@media (max-width: 768px) {
  .site-hero-overlay {
    transform: translateY(0);
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-hero-lockup {
    gap: var(--hero-gap, 5px);
  }

  .site-hero-logo {
    width: var(--hero-logo-size, 42px);
    height: var(--hero-logo-size, 42px);
  }

  .site-hero-title {
    font-size: var(--hero-title-size, 22px);
    letter-spacing: var(--hero-title-spacing, 0.02em);
    white-space: normal;
    text-align: center;
  }

  .site-hero-subtitle {
    font-size: var(--hero-subtitle-size, 11px);
    letter-spacing: var(--hero-subtitle-spacing, 0.1em);
    text-align: center;
  }
}

/* 顶部品牌信息条移动端：四自标语与英文辅注在小屏隐藏避免挤压，logo/站名缩小。 */
@media (max-width: 768px) {
  .site-topbar__inner {
    min-height: 56px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .site-topbar__brand {
    gap: 9px;
  }

  .site-topbar__logo {
    width: 34px;
    height: 34px;
  }

  .site-topbar__name-cn {
    font-size: 16px;
    letter-spacing: 0.02em;
  }

  /* 窄屏隐藏英文辅注与四自标语，logo+中文站名独占一行保持可读。 */
  .site-topbar__name-en,
  .site-topbar__spirit {
    display: none;
  }
}

/* ── 印章式栏目标题条（seal-title-bar）：区块标题左右装饰竖条 ──
 * 用于资讯三栏等次级标题；同时是首页「服务大厅 / 事业成就展播 / 巾帼风采」
 * 蓝湖装饰图加载失败时 onerror 注入的兜底装饰，与标题鎏金字色同色系渐变。
 */
.seal-title-bar {
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: linear-gradient(
    to bottom,
    #c8a55b 0%,
    #9a7d3d 100%
  );
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.6em;
  flex-shrink: 0;
}

/* ── 页脚（site-footer）：三列分区布局专属样式 ──────────────
 * 模板：includes/footer.html。配色沿用 :root 品牌令牌，不引入新色。
 * .footer-col-title 列标题：左荷叶青竖条 + 加粗主色文字。
 * .footer-link-list 友链两列网格，金色圆点起项。
 * .footer-correct-btn 网站纠错朱红描边按钮（国办发〔2017〕47号入口易达要求）。
 * .footer-visit 访问量米色卡片，数字加粗。
 */
.footer-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--snfl-ink);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  padding-left: 0.625rem;
  border-left: 3px solid var(--snfl-lotus);
}

.footer-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}
.footer-link-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--snfl-ink-soft);
  transition: color 0.2s;
}
.footer-link-list a:hover {
  color: var(--snfl-lotus-dark);
}
.footer-link-list .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--snfl-gold);
  flex-shrink: 0;
}

.footer-correct-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--snfl-vermilion);
  border-radius: 4px;
  background-color: var(--snfl-vermilion-light);
  color: var(--snfl-vermilion-dark);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.footer-correct-btn:hover {
  background-color: var(--snfl-vermilion);
  color: #fff;
}

.footer-visit {
  padding: 0.625rem 0.75rem;
  background-color: var(--snfl-rice);
  border: 1px solid var(--snfl-border);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--snfl-ink-soft);
}

/* ── 首页展播轮播（事业成就展播 / 巾帼风采）────────────────────
 * 标题：与服务大厅同一蓝湖还原体系，左右装饰图（.service-hall-deco）+
 * 橙→红渐变标题字（.showcase-heading__title--lanhu）。
 * 封面：padding-bottom 16:9 占位（不用 aspect-ratio，UOS Chromium 69-80
 * 不支持会导致长图撑开板块）；img 绝对定位 + object-fit:cover。
 */
.showcase-heading {
  text-align: center;
  position: relative;
}

.showcase-heading__title {
  margin: 0;
  display: inline-block;
  /* 鎏金实色：与浅暖米色通栏底图协调，庄重典雅。深金而非亮金，保证浅底上可读。 */
  color: #9a7d3d;
  /* 浅暖底上鎏金对比度偏弱，加极淡投影把字「托」起来，增强可读不改色相。 */
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .showcase-heading__title {
    font-size: 2rem;
  }
}

/* ── 蓝湖 group_15 标题还原：橙→红 180° 渐变剪裁文字（text_24）──────────
 * 对应蓝湖设计稿「服务大厅 / 巾帼风采」等区块大标题：Alimama ShuHeiTi-Bold
 * 48px 粗体 + linear-gradient(180deg, #ffb750 → #eb582d) 文字剪裁。
 * 项目未内置阿里妈妈数黑体，用粗黑体栈近似；渐变不支持时回退实色 #eb582d。
 */
.showcase-heading__title--lanhu {
  /* 回退色：不支持 background-clip:text 的浏览器（UOS Chromium<80 不稳）走实色朱红，保证可读。 */
  color: #eb582d;
  background-image: linear-gradient(180deg, #ffb750 0%, #eb582d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* 阿里妈妈数黑体为免费商用但项目未内置，用系统粗黑体栈近似其厚重方正感。 */
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC",
               "Noto Sans SC", "思源黑体", sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  text-shadow: none;
}

@supports not (-webkit-background-clip: text) {
  .showcase-heading__title--lanhu {
    -webkit-text-fill-color: #eb582d;
  }
}

@media (min-width: 768px) {
  .showcase-heading__title--lanhu {
    font-size: 2.5rem;
  }
}

/* ── 蓝湖板块大标题组合（lanhu-title）────────────────────────────
 * 模板：components/lanhu_section_title.html（服务大厅 / 事业成就展播 / 巾帼风采共用）。
 * 结构（对齐 UI 稿间距）：左弧线(同一弧线图 scaleX(-1) 镜像，尾端伸到金柱飘带
 * 下方、被飘带压盖) → 金柱飘带(与标题字近乎相贴) → 标题字(右上角红瓣点缀悬出，
 * 不与末字重叠) → 右弧线。弧线 flex 可收缩（245px → 40px），窄屏自动压缩，
 * 标题字与金柱飘带保持原尺寸不缩。间距用各元素 margin 分别控制，不用容器 gap。
 */
.lanhu-title {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.lanhu-title__arc {
  flex: 0 1 auto;
  width: 245px;
  min-width: 40px;
  height: auto;
  object-fit: contain;
}

/* 左弧线镜像后尾端负边距伸到金柱飘带下方，形成飘带压盖弧线的层叠。 */
.lanhu-title__arc--left {
  transform: scaleX(-1);
  margin-right: -1.1rem;
}

/* 金柱飘带（原图 52×74）：等比缩到 3/4，且整体上移自身一半高度，使其
 * 底边落在右弧线的垂直中线上。align-items:center 下 emblem 中点本就对齐
 * 弧线中线（两者同处容器中线），transform:translateY(-50%) 再上移半身，
 * 底边即贴弧线中线。transform 不入流，不扰动 flex 行内布局，桌面/移动端
 * 按 % 自动适配，无需分断点。 */
.lanhu-title__emblem {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 29px;
  height: 42px;
  transform: translateY(-38%);
  margin-right: 0.2rem;
  object-fit: contain;
}

.lanhu-title__text {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

/* 红瓣点缀（原图 47×29）：悬出标题字右上，左缘在末字外侧、压右弧线淡尾上方。 */
.lanhu-title__ornament {
  position: absolute;
  top: -0.25rem;
  right: -2.05rem;
  width: 1.75rem;
  height: auto;
  pointer-events: none;
}

@media (min-width: 768px) {
  .lanhu-title__arc--left {
    margin-right: -2rem;
  }
  .lanhu-title__emblem {
    width: 39px;
    height: 56px;
    margin-right: 0.3rem;
  }
  .lanhu-title__text {
    margin-right: 0.75rem;
  }
  .lanhu-title__ornament {
    top: -0.4rem;
    right: -2.9rem;
    width: 2.4rem;
  }
}

/* 轮播槽：左右各留「箭头宽 + 与卡片间距」，箭头落在槽内，不叠压卡片。
 * 卡片本身是百分比宽（移动 1/2、桌面 1/4），随视口伸缩，不是固定 px。 */
.showcase-carousel {
  /* 箭头 2rem + 与卡片间距 1.25rem */
  padding-left: 3.25rem;
  padding-right: 3.25rem;
}

@media (min-width: 768px) {
  .showcase-carousel {
    /* 桌面再拉开一点：箭头 2rem + 间距 1.75rem */
    padding-left: 3.75rem;
    padding-right: 3.75rem;
  }
}

.showcase-carousel__viewport {
  width: 100%;
  /* 底部留白容纳卡片 hover 阴影(下溢 ~8px)，同时收紧与「查看更多」的间距
   *（原模板 pb-10=40px 偏大）。覆盖模板 pb-2。 */
  padding-bottom: 0.75rem;
}

/* 卡片间距收紧到设计稿的 16px：track 负 margin + 卡片 padding 用 0.5rem，
 * 缝隙 = 2×0.5rem = 1rem(16px)，对齐设计稿 box_11 的 margin-left:16px。
 * 覆盖模板里的 -mx-3 / px-3（24px 缝隙偏松）。 */
.showcase-carousel .flex[class*="-mx-"] {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.showcase-carousel .flex[class*="-mx-"] > * {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* 两板块（事业成就展播 / 巾帼风采）纵向间距：模板 py-8 单边 2rem，
 * 双板块叠加纵向缝 4rem(64px) 偏大。覆盖为单边 1.75rem，缝缩到 3.5rem，
 * 与设计稿 group_25 距上内容留白更协调；首尾仍由外层 py-4 兜底。 */
.showcase-section {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

/* 封面槽：height:0 + padding-bottom 兼容旧内核；溢出裁切。
 * 设计稿封面 280×170 ≈ 60.7%（近 5:3），非 16:9；用 60.71% 对齐设计稿。 */
.showcase-card__media {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 60.71%;
  overflow: hidden;
  background-color: var(--snfl-rice);
}
/* 封面黑色蒙层：对齐设计稿 image-wrapper_2 的 rgba(0,0,0,0.25)，
 * 让中央白色播放键在任意封面底色上都清晰可辨。pointer-events:none 不挡点击。 */
.showcase-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.showcase-card__img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.showcase-card__placeholder {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--snfl-ink-muted);
}

/* 固定文字区：标题约 2 行 + 日期 1 行，超长省略。
 * 对齐设计稿 text-group_26：距左 12px、距上 12px；标题日期间距 10px。
 * 覆盖模板 px-3 pt-3 pb-4 / mt-1.5。
 * min-height 按标题满 2 行兜底（48px 标题 + 10px 间距 + 22px 日期），
 * 标题仅 1 行时也撑满同高，避免同排卡片因标题行数不同而高度参差。 */
.showcase-card__body {
  box-sizing: border-box;
  overflow: hidden;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  min-height: 5rem; /* 80px：2 行标题(48) + 间距(10) + 日期行(22) */
}
.showcase-card__date {
  margin-top: 0.625rem; /* 10px 对齐设计稿 text_61 margin-top:10px，覆盖模板 mt-1.5(6px) */
  line-height: 1.4;
  font-size: 1rem; /* 16px 对齐设计稿 text_61，覆盖模板 text-xs(12px) */
  color: #666;
}

/* 卡片本体：对齐设计稿 box_10~14 —— 纯白底 + 暖橙阴影 rgba(250,211,165,0.6)，
 * 覆盖模板 bg-cloud(米色)/shadow-sm。hover 加深暖橙阴影呼应。 */
.showcase-card {
  background-color: #fff;
  box-shadow: 0 4px 4px 0 rgba(250, 211, 165, 0.6);
}
.showcase-card:hover {
  box-shadow: 0 6px 12px 0 rgba(250, 211, 165, 0.7);
}

.showcase-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  max-height: 3em;
  word-break: break-word;
  font-size: 1rem; /* 16px 对齐设计稿 text_60，覆盖模板 text-sm(14px) */
  font-weight: 500; /* PingFang SC-Medium */
  color: #333;
}

/* 左右翻页：竖向半透明灰方 + 白箭头；贴在预留槽外侧，与卡片视口分离 */
.showcase-nav-btn {
  width: 2rem;
  height: 3.25rem;
  background-color: rgba(120, 120, 120, 0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.showcase-nav-btn--prev {
  left: 0;
}

.showcase-nav-btn--next {
  right: 0;
}

.showcase-nav-btn:hover:not(:disabled) {
  background-color: rgba(100, 100, 100, 0.55);
}

.showcase-nav-btn:disabled {
  cursor: not-allowed;
}

/* ── 首页动态 Tab 选中态（新闻资讯 / 区县动态）────────────────────
 * 对齐设计稿：选中项为橙金渐变填充字（#ffb750→#eb582d），未选中深灰；
 * 用 background-clip:text 把渐变裁到字形，-webkit-text-fill-color 透明出底色。
 * 与展播/巾帼风采/服务大厅标题同色系，保持首页暖色主调一致。
 */
.tab-gradient-active {
  background-image: linear-gradient(180deg, #ffb750 0%, #eb582d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ── 「查看更多 / 更多」入口（朱红文字 + 朱红箭头）──────────────────
 * 对齐设计稿 image-text_29 等：朱红字 + 16px 朱红右箭头图标，
 * 替换原 «» 符号，与首页暖色系一致。箭头 inline 随字基线对齐。
 */
.more-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}
.more-link-arrow__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ── 首页二级资讯三栏（周三播报 / 两纲看台 / 妇女与法律）──────────
 * 对齐设计稿 group_16~21：黑色加粗标题 + 三栏列表，每个列表项是
 * 独立的带 1px 浅边框小框（371×50 @设计稿），行间留白约 18px，
 * 非整块卡片盒包裹、也非无缝叠放。行内文字 14px、日期 14px 灰。
 */
.info-trio-col {
  min-width: 0;
}
.info-trio-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.info-trio-item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #fff;
  /* 行间留白 16px */
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.info-trio-item:last-child {
  margin-bottom: 0;
}
.info-trio-item:hover {
  border-color: rgba(235, 88, 45, 0.4);
  box-shadow: 0 2px 6px 0 rgba(250, 211, 165, 0.5);
}
.info-trio-item > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* 设计稿行高 50px、左 padding 15px；缩放后取近似。覆盖模板 px-3 */
  padding: 0.75rem 0.75rem;
  line-height: 1.4;
}
.info-trio-item h4 {
  font-size: 0.875rem; /* 14px 对齐设计稿 */
}
.info-trio-item a > span:last-child {
  font-size: 0.875rem; /* 日期 14px 对齐设计稿，覆盖模板 text-xs(12px) */
  color: #666;
  flex-shrink: 0;
}
.info-trio-item--empty {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #fff;
  margin-bottom: 1rem;
}

/* ── 首页服务大厅卡片（service-hall-card）────────────────────────
 * 对齐设计稿：上排 3 等分；下排 2 张与上排单卡同宽并居中。
 * 无底图时奶油底占位；有 background_image 时不铺底色、三星区不加色块，
 * 避免盖住运营上传的装饰图。
 */
.service-hall-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
.service-hall-row:last-child {
  margin-bottom: 0;
}
.service-hall-row--3,
.service-hall-row--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .service-hall-row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* 下排：单卡宽度 = (100% - 2×gap) / 3，与上排一格同宽；整组水平居中 */
  .service-hall-row--2 {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
  }
  .service-hall-row--2 > .service-hall-card {
    flex: 0 0 calc((100% - 2rem) / 3);
    width: calc((100% - 2rem) / 3);
    max-width: calc((100% - 2rem) / 3);
  }
}

.service-hall-card {
  position: relative;
  display: block;
  /* 移动单列满宽取紧凑高度；桌面占满宽度，按 ~2.7:1 配比（见 md 断点），整体留白收紧 */
  min-height: 7.5rem;
  overflow: hidden;
  border: 1.5px solid var(--snfl-vermilion-dark);
  border-radius: 8px;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 1px 2px rgba(109, 26, 35, 0.08);
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  box-sizing: border-box;
}

/* 仅无装饰底图时铺奶油占位；有图时保持透明，底图 cover 铺满 */
.service-hall-card:not(.service-hall-card--has-bg) {
  background-color: var(--snfl-rice);
}

.service-hall-card:hover,
.service-hall-card:focus {
  box-shadow: 0 4px 12px rgba(109, 26, 35, 0.16);
  border-color: var(--snfl-vermilion);
  text-decoration: none;
}

.service-hall-card:focus {
  outline: 2px solid var(--snfl-vermilion);
  outline-offset: 2px;
}

.service-hall-card__body {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

.service-hall-card__label {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--snfl-vermilion);
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  transition: color 0.2s;
}

@media (min-width: 768px) {
  .service-hall-card {
    min-height: 8.75rem;
  }
  .service-hall-card__label {
    font-size: 1.25rem;
  }
}

.service-hall-card:hover .service-hall-card__label,
.service-hall-card:focus .service-hall-card__label {
  color: var(--snfl-vermilion-dark);
}

/* 左线 + 三星 + 右线，中间不加色块，有底图时不会出现奶油色条 */
.service-hall-card__divider {
  display: flex;
  align-items: center;
  width: 72%;
  max-width: 11rem;
  margin-top: 0.375rem;
}

.service-hall-card__rule {
  flex: 1 1 auto;
  display: block;
  height: 1px;
  min-width: 0;
  background-color: var(--snfl-vermilion);
  opacity: 0.55;
}

.service-hall-card__stars {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0 0.35rem;
  background-color: transparent;
}

.service-hall-card__star {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  margin: 0 0.12rem;
  background-color: var(--snfl-vermilion);
  transform: rotate(45deg);
}

html.no-flex-gap .service-hall-row--2 > .service-hall-card + .service-hall-card {
  margin-left: 1rem;
}
html.no-flex-gap .service-hall-card__divider > .service-hall-card__stars {
  margin-left: 0.35rem;
  margin-right: 0.35rem;
}
html.no-flex-gap .service-hall-card__stars > * + * {
  margin-left: 0.12rem;
}

/* ── Chrome 83（统信 UOS Chromium）及更早兼容兜底 ──────────────────
 * 1) flexbox 的 gap：Chrome 84+ 才支持（grid/multicol 的 gap 66+ 已支持，不受影响）。
 *    @supports (gap:1px) 在 83 仍返回 true（因 grid/multicol 早已支持），无法用于
 *    检测 flex gap，故 base.html 头部脚本实测检测后给 <html> 加 .no-flex-gap，
 *    此处用相邻兄弟选择器 margin 模拟间距。已知取舍：flex-wrap 换行容器
 *    （如 .ai-chat-feedback）行首元素会带边距略偏，不影响可用性；前台菜单/
 *    浮标/卡片均为单行不受影响。
 * 2) inset 简写：Chrome 87+ 才支持。@supports not (inset) 检测可靠，展开为
 *    四向 longhand。Tailwind .inset-0 同为简写（.inset-x-0/.inset-y-0 已是
 *    longhand 不受影响），一并兜底。
 * 3) aspect-ratio（88+）失效时，首页图卡靠 <img width/height> 固有比例自动
 *    撑高容器（img 为 w-full h-full 非绝对定位），无需 padding-top 兜底——
 *    该技巧反而会让 img h-full 塌陷为 0，故明确不做。
 * 现代浏览器（84+/87+）以下兜底均不生效，零副作用。
 * ──────────────────────────────────────────────────────────────── */

/* Tailwind gap-N：水平方向（默认 row / inline-flex）用 margin-left */
html.no-flex-gap .flex.gap-1 > * + *,
html.no-flex-gap .inline-flex.gap-1 > * + * { margin-left: 0.25rem; }
html.no-flex-gap .flex.gap-2 > * + *,
html.no-flex-gap .inline-flex.gap-2 > * + * { margin-left: 0.5rem; }
html.no-flex-gap .flex.gap-3 > * + *,
html.no-flex-gap .inline-flex.gap-3 > * + * { margin-left: 0.75rem; }
html.no-flex-gap .flex.gap-4 > * + *,
html.no-flex-gap .inline-flex.gap-4 > * + * { margin-left: 1rem; }
html.no-flex-gap .flex.gap-6 > * + *,
html.no-flex-gap .inline-flex.gap-6 > * + * { margin-left: 1.5rem; }
html.no-flex-gap .flex.gap-8 > * + *,
html.no-flex-gap .inline-flex.gap-8 > * + * { margin-left: 2rem; }

/* gap-N 在 flex-col 容器：覆盖为 margin-top（垂直方向）*/
html.no-flex-gap .flex.flex-col.gap-1 > * + * { margin-left: 0; margin-top: 0.25rem; }
html.no-flex-gap .flex.flex-col.gap-2 > * + * { margin-left: 0; margin-top: 0.5rem; }
html.no-flex-gap .flex.flex-col.gap-3 > * + * { margin-left: 0; margin-top: 0.75rem; }
html.no-flex-gap .flex.flex-col.gap-4 > * + * { margin-left: 0; margin-top: 1rem; }
html.no-flex-gap .flex.flex-col.gap-6 > * + * { margin-left: 0; margin-top: 1.5rem; }
html.no-flex-gap .flex.flex-col.gap-8 > * + * { margin-left: 0; margin-top: 2rem; }

/* gap-x-N（column-gap）：水平间距，margin-left */
html.no-flex-gap .flex.gap-x-3 > * + *,
html.no-flex-gap .inline-flex.gap-x-3 > * + * { margin-left: 0.75rem; }
html.no-flex-gap .flex.gap-x-4 > * + *,
html.no-flex-gap .inline-flex.gap-x-4 > * + * { margin-left: 1rem; }

/* gap-y-N（row-gap）：垂直间距，margin-top */
html.no-flex-gap .flex.gap-y-1 > * + *,
html.no-flex-gap .inline-flex.gap-y-1 > * + * { margin-top: 0.25rem; }

/* 自定义组件类的原生 flex gap —— components.css 与 chat_widget.html 内联 style */
/* Banner logo + 标题（水平；桌面 10px / 移动 @media 8px）*/
/* gap 已改 var(--hero-gap) 驱动，polyfill margin 同步读该变量保持 UOS 间距跟随 */
html.no-flex-gap .site-hero-lockup > * + * { margin-left: var(--hero-gap, 10px); }
@media (max-width: 768px) {
  html.no-flex-gap .site-hero-lockup > * + * { margin-left: var(--hero-gap, 8px); }
}
/* 页脚友链圆点 + 文字（inline-flex，0.375rem）*/
html.no-flex-gap .footer-link-list a > * + * { margin-left: 0.375rem; }
/* 页脚纠错按钮图标 + 文字（flex，0.5rem）*/
html.no-flex-gap .footer-correct-btn > * + * { margin-left: 0.5rem; }
/* 首页「更多」入口：朱红文字 + 右箭头（inline-flex，0.125rem）*/
html.no-flex-gap .more-link-arrow > * + * { margin-left: 0.125rem; }
/* 首页信息条列表项：圆点 + 标题（flex，0.5rem）*/
html.no-flex-gap .info-trio-item > a > * + * { margin-left: 0.5rem; }
/* AI 客服浮标容器：4 个 FAB 垂直堆叠（flex-col，12px）—— 用户报告的浮标间距问题 */
html.no-flex-gap .ai-chat-widget > * + * { margin-top: 12px; }
/* 对话框头部头像 + 名称（flex，10px）*/
html.no-flex-gap .ai-chat-header-info > * + * { margin-left: 10px; }
/* 打字指示器三点（inline-flex，5px）*/
html.no-flex-gap .ai-chat-typing > * + * { margin-left: 5px; }
/* 反馈按钮组（flex + flex-wrap，8px；换行首元素带左边距，已知取舍）*/
html.no-flex-gap .ai-chat-feedback > * + * { margin-left: 8px; }
/* 微信卡片二维码 + 文字（flex-col，8px）与卡片标题（flex-col，2px）*/
html.no-flex-gap .wechat-card > * + * { margin-top: 8px; }
html.no-flex-gap .wechat-card figcaption > * + * { margin-top: 2px; }

/* inset 简写 → 四向 longhand（@supports 可靠检测，仅 87 以下生效）*/
@supports not (inset: 0px) {
  /* Tailwind .inset-0 编译为 inset:0 简写（87+），83 失效；.inset-x-0/.inset-y-0 已是 longhead 不受影响 */
  .inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
  /* Banner 文字遮罩层（absolute inset:0，每页首屏）*/
  .site-hero-overlay { top: 0; right: 0; bottom: 0; left: 0; }
  /* AI 对话框背景遮罩（fixed inset:0）*/
  .ai-chat-overlay { top: 0; right: 0; bottom: 0; left: 0; }
  /* 首页风采轮播卡片封面黑色蒙层（absolute inset:0）*/
  .showcase-card__media::after { top: 0; right: 0; bottom: 0; left: 0; }
}
