/*
 * 会小弟全站设计系统 v1.1.0
 * 藏蓝 #1a2744 · 琥珀金 #d4a254 · 暖白 #f7f5f2
 */

/* ---------- 全局基础 ---------- */
a {
  transition: color .2s ease;
}

:focus-visible {
  outline: 2px solid #d4a254;
  outline-offset: 2px;
}

/* 顶级区块之间不留默认块间距，页头/主体/页脚无缝衔接 */
.wp-site-blocks > header,
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-group,
.wp-site-blocks > .wp-block-cover {
  margin-block-start: 0;
}

/* ---------- 吸顶页头 ---------- */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
}

.hxd-header {
  box-shadow: 0 1px 0 rgba(212, 162, 84, .35), 0 6px 20px rgba(15, 24, 41, .25);
}

.hxd-header-tagline {
  color: rgba(247, 245, 242, .62) !important;
}

/* 导航链接 hover 金色 + 下划线动效 */
.hxd-header .wp-block-navigation a {
  text-decoration: none;
  position: relative;
}

.hxd-header .wp-block-navigation a:hover {
  color: #d4a254;
}

.hxd-header .wp-block-navigation .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  border-bottom: 2px solid #d4a254;
  transition: transform .25s ease;
}

.hxd-header .wp-block-navigation .wp-block-navigation-item__content:hover::after {
  transform: scaleX(1);
}

/* 移动端汉堡按钮颜色与间距 */
.hxd-header .wp-block-navigation__responsive-container-open,
.hxd-header .wp-block-navigation__responsive-container-close {
  color: #f7f5f2;
}

/* 弹出菜单：左对齐、加大字号与行距（覆盖桌面 right 对齐的继承；
   core 用 --navigation-layout-* 变量控制对齐，需在容器上改写） */
.hxd-header .wp-block-navigation__responsive-container.is-menu-open {
  padding: 4.5rem 2rem 2rem;
  --navigation-layout-justification-setting: flex-start;
  --navigation-layout-justify: flex-start;
  --navigation-layout-align: flex-start;
}

.hxd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  align-items: flex-start;
  justify-content: flex-start;
}

.hxd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  font-size: 1.2rem;
  padding: 0.4rem 0;
}

/* 移动端隐藏页头咨询按钮与副标题，避免拥挤
   （WP 布局引擎的 is-layout-flex 内联样式晚于本文件加载，需 !important） */
@media (max-width: 781px) {
  .wp-block-buttons.hxd-header-cta { display: none !important; }
}

@media (max-width: 600px) {
  p.hxd-header-tagline { display: none !important; }
}

/* ---------- 卡片体系 ---------- */
.hxd-card {
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.hxd-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(26, 39, 68, .14);
}

.hxd-card figure {
  overflow: hidden;
  margin-bottom: 0;
}

.hxd-card figure img {
  display: block;
  width: 100%;
  transition: transform .45s ease;
}

.hxd-card:hover figure img {
  transform: scale(1.05);
}

.hxd-card h3 a {
  text-decoration: none;
  color: inherit;
}

.hxd-card h3 a:hover {
  color: #d4a254;
}

/* 静态信息卡（无图）：细边 + hover 提亮 */
.hxd-tile {
  border: 1px solid rgba(26, 39, 68, .08);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.hxd-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 162, 84, .55);
  box-shadow: 0 10px 24px rgba(26, 39, 68, .10);
}

/* ---------- 按钮 ---------- */
.wp-block-button__link {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 39, 68, .22);
}

/* ---------- 列表页（新闻/案例）特色图 hover ---------- */
.wp-block-post-featured-image {
  overflow: hidden;
}

.wp-block-post-featured-image img {
  transition: transform .45s ease, box-shadow .3s ease;
}

.wp-block-post-featured-image:hover img {
  transform: scale(1.04);
}

/* ---------- 新闻页分类列表 → 胶囊标签 ---------- */
.wp-block-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  list-style: none;
  padding-left: 0;
}

.wp-block-categories li {
  margin: 0;
  padding: .32rem .95rem;
  border: 1px solid rgba(26, 39, 68, .16);
  border-radius: 999px;
  font-size: .85rem;
  color: #6b7280;
  transition: all .2s ease;
}

.wp-block-categories li a {
  color: #1a2744;
  text-decoration: none;
}

.wp-block-categories li:hover {
  background: #1a2744;
  border-color: #1a2744;
  color: rgba(255, 255, 255, .75);
}

.wp-block-categories li:hover a {
  color: #fff;
}

/* ---------- 页脚 ---------- */
.hxd-footer {
  border-top: 3px solid #d4a254;
}

.hxd-footer ul {
  list-style: none;
  padding-left: 0;
}

.hxd-footer a {
  text-decoration: none;
}

.hxd-footer a:hover {
  color: #d4a254 !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hxd-footer-desc,
.hxd-footer-meta {
  color: rgba(247, 245, 242, .68) !important;
}

.hxd-footer-label {
  color: rgba(247, 245, 242, .45) !important;
  letter-spacing: .08em;
}

/* ---------- 文章页上一篇/下一篇 ---------- */
.hxd-postnav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hxd-postnav a {
  text-decoration: none;
}

.hxd-postnav a:hover {
  color: #d4a254;
}

/* ---------- 数据条数字下的金色短线 ---------- */
.hxd-stat h2::after {
  content: "";
  display: block;
  width: 28px;
  border-bottom: 3px solid #d4a254;
  margin: .55rem auto 0;
  border-radius: 2px;
}

/* ---------- 服务流程编号 ---------- */
.hxd-step-num {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(212, 162, 84, .95);
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .hxd-card,
  .hxd-card figure img,
  .hxd-tile,
  .wp-block-button__link,
  .wp-block-post-featured-image img {
    transition: none;
  }

  .hxd-card:hover,
  .hxd-tile:hover,
  .wp-block-button__link:hover {
    transform: none;
  }

  .hxd-card:hover figure img,
  .wp-block-post-featured-image:hover img {
    transform: none;
  }
}
