@import url('/static/fonts/iconfont.css');
/* 阿甘同学官网 · PC 基础样式（占位，后续由装修体系覆盖） */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333; background: #fff; line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
a { color: #c8102e; text-decoration: none; }
a:hover { opacity: .85; }

/* 顶部横向菜单（数据驱动：CSS 变量由 layout 注入，可被装修器实时覆盖） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg, #ffffff);
  color: var(--nav-color, #1a1a1a);
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}
.header-inner { display: flex; align-items: center; height: 70px; gap: 28px; }
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--nav-color, #1a1a1a);
  font-size: 22px;
  font-weight: 800;
  padding: 6px 0;
  border-radius: 6px;
  background: var(--nav-logo-bg, transparent);
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.logo-img { display: block; max-height: 44px; max-width: 220px; object-fit: contain; }
.logo-text { display: block; line-height: 1.2; }
.top-nav { display: flex; gap: var(--hdr-gap, 6px); flex: 1; }
.nav-item { position: relative; }
.nav-item > a {
  display: block;
  padding: 0 18px;
  line-height: 70px;
  color: var(--nav-color, #1a1a1a);
  font-size: var(--nav-font-size, 15px);
  font-weight: 500;
  position: relative;
  transition: color .2s, background .2s;
}
.nav-item > a span { position: relative; display: inline-block; }
.nav-item > a span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #c8102e;
  transition: width .25s ease;
}
.nav-item:hover > a { color: #c8102e; }
.nav-item:hover > a span::after { width: 100%; }
.nav-sub {
  display: none;
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  min-width: 150px;
  padding: 6px 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 20;
}
.nav-item:hover .nav-sub { display: block; animation: navSubIn .18s ease; }
@keyframes navSubIn { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.nav-sub a { display: block; padding: 10px 18px; color: #333; font-size: 14px; transition: .15s; white-space: nowrap; }
.nav-sub a:hover { background: #fff5f6; color: #c8102e; }
.header-actions { flex-shrink: 0; }
.ag-member-box { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.ag-member-box > a {
  color: #c8102e;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  transition: .15s;
}
.ag-member-box > a:hover { background: #fff5f6; }
.ag-member-box .ag-hi { color: var(--nav-color, #1a1a1a); font-weight: 600; }

/* 导航宽度：限定 / 通栏 */
.nav-width-full .container { max-width: none; padding-left: 32px; padding-right: 32px; }

/* 导航布局：Logo 居左 + 菜单右（默认） */
.nav-layout-left .top-nav { justify-content: flex-start; }
/* Logo 居左 + 菜单居中 */
.nav-layout-split .top-nav { justify-content: center; }
/* Logo 居中 + 菜单在下 */
.nav-layout-center .header-inner { flex-direction: column; height: auto; padding-top: 16px; padding-bottom: 12px; gap: 8px; }
.nav-layout-center .logo { font-size: 26px; margin-bottom: 2px; }
.nav-layout-center .top-nav { justify-content: center; flex: none; flex-wrap: wrap; }
.nav-layout-center .nav-item > a { line-height: 44px; }
.nav-layout-center .header-actions { position: absolute; top: 16px; right: 32px; }

/* 主区域：不自带上下内边距——装修组件的间距统一由组件自身的
   spc_margin_top / spc_margin_bottom（装修面板「间距」）控制，
   否则每个页面首尾都会多出 24px 白条（组件"看起来自动带边距"的根源） */
.site-main { min-height: 60vh; padding: 0; }
.site-footer { background: #222; color: #bbb; padding: 28px 0; font-size: 13px; text-align: center; }
.site-footer p { margin: 4px 0; }
.copyright { margin-top: 12px; color: #777; }

/* 装修组件 */
/* 统一内容组件宽度：与"最新资讯"等保持一致（限定 1200px 居中）。
   Base.php 渲染时每个组件都被 <section class="wg-block"> 包裹，
   因此在这里统一约束宽度，所有内容组件自动对齐，无需逐个声明。 */
.wg-block { max-width: 1200px; margin: 0 auto; }
/* 通栏/特殊组件豁免（页头 banner、区块标题、留白等不需要限宽） */
.wg-page-banner,
.wg-section-title,
.wg-spacer,
.wg-tabbar,
.wg-nav-group { max-width: none; }
/* 全屏通栏：任何组件开启「全屏通栏」后突破 1200px 限制，铺满视口 */
.wg-block.wg-fullscreen {
  max-width: none;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
/* 通栏时内部根类（自带 max-width:1200px 的组件）也必须突破，否则外层撑满、内容仍锁 1200px；
   垂直 padding 一并清零：通栏=铺满视口，组件自带 padding:XXpx 0 会在页首/页尾挤出白条
   （间距统一走装修面板 spc_margin_top/bottom） */
.wg-block.wg-fullscreen > * {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* 装修器 iframe 内选中态（公开访问不受影响，仅在 .wg-selected 时显示描边） */
.wg-block { position: relative; }
.wg-block.wg-selected { outline: 2px solid var(--admin-btn, #4c6ef5); outline-offset: -2px; }
.wg-block.wg-selected::after {
  content: ''; position: absolute; left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(76,110,245,.06); pointer-events: none;
}
.wg-section-title { text-align: center; margin: 36px 0 18px; }
.wg-section-title h2 { font-size: 26px; margin: 0; color: #c8102e; }
.wg-section-sub { color: #999; font-size: 13px; letter-spacing: 2px; }
.wg-richtext { max-width: 1200px; margin: 0 auto; padding: 16px; }
.wg-img-single img { display: block; max-width: 100%; margin: 0 auto; }
.wg-article-list { max-width: 1200px; margin: 0 auto; padding: 16px; }
.wg-article-list ul { list-style: none; padding: 0; margin: 0; }
.wg-article-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; }
.wg-date { color: #999; font-size: 13px; }
.wg-empty { color: #999; }

/* 列表 / 详情 */
.page-h1 { font-size: 28px; color: #c8102e; border-left: 4px solid #c8102e; padding-left: 12px; }
.news-list { list-style: none; padding: 0; }
.news-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #eee; }
.news-item .date { color: #999; }
.video-grid, .store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.video-card, .store-card { border: 1px solid #eee; border-radius: 6px; overflow: hidden; padding: 12px; }
.video-card img, .video-ph { width: 100%; height: 160px; object-fit: cover; background: #f2f2f2; }
.video-card h3, .store-card h3 { font-size: 15px; margin: 8px 0; }
.store-card .addr, .store-card .phone { color: #666; font-size: 13px; margin: 4px 0; }
.store-search { margin: 16px 0; display: flex; gap: 8px; }
.store-search input { flex: 1; max-width: 360px; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 3px; }
.store-search button { padding: 8px 18px; border: none; background: #c8102e; color: #fff; border-radius: 3px; cursor: pointer; }
.detail-title { font-size: 28px; color: #c8102e; }
.detail-meta { color: #999; font-size: 13px; margin-bottom: 16px; }
.pager { margin: 20px 0; text-align: center; }
.error-page { text-align: center; padding: 80px 0; }
.err-code { font-size: 72px; color: #c8102e; margin: 0; }
.err-back { display: inline-block; margin-top: 16px; padding: 8px 22px; background: #c8102e; color: #fff; border-radius: 4px; }
.empty-tip { text-align: center; color: #999; padding: 40px; }

/* 自由画布 free_box（绝对定位多元素容器） */
.wg-free-box { position: relative; box-sizing: border-box; overflow: hidden; isolation: isolate; }
.wg-free-box .fb-node { position: absolute; box-sizing: border-box; overflow: visible; }
.wg-free-box .fb-node p { margin: 0; }
.wg-free-box .fb-node img,
.wg-free-box .fb-node video { display: block; max-width: 100%; }
.wg-free-box .fb-shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,.10); }
.wg-free-box .fb-shadow-md { box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.wg-free-box .fb-shadow-lg { box-shadow: 0 14px 40px rgba(0,0,0,.20); }
.wg-free-box .fb-node.fb-node-shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.wg-free-box .fb-node.fb-node-shadow-md { box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.wg-free-box .fb-node.fb-node-shadow-lg { box-shadow: 0 12px 32px rgba(0,0,0,.22); }
