/* Mavis Brand UI for 脱永军博客 — supplementary styles */

.wp-site-blocks {
  background: var(--brand-bg);
}

/* Header refinement */
.wp-block-template-part header,
.wp-block-template-part > .wp-block-group {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--brand-border);
  padding-top: 18px !important;
  padding-bottom: 18px !important;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Site title */
.wp-block-site-title {
  font-size: 19px !important;
  letter-spacing: 0.02em;
}
.wp-block-site-title a {
  color: var(--brand-primary) !important;
  text-decoration: none !important;
}

/* Navigation items */
.wp-block-navigation .wp-block-navigation-item__content {
  font-size: 15px;
  padding: 8px 14px !important;
  border-radius: var(--brand-radius);
  transition: all 0.15s;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
  background: rgba(11, 42, 74, 0.05);
  color: var(--brand-primary) !important;
}

/* Footer 整体样式重写 */
.wp-block-template-part footer,
footer.wp-block-template-part {
  background: var(--brand-primary) !important;
  color: white;
  padding: 64px 0 32px !important;
  margin-top: 80px !important;
}

footer.wp-block-template-part p,
footer.wp-block-template-part a,
footer.wp-block-template-part h1,
footer.wp-block-template-part h2,
footer.wp-block-template-part h3,
footer.wp-block-template-part h4 {
  color: white !important;
}

/* 文章卡片的标题 */
.wp-block-post-title {
  font-size: 28px !important;
  line-height: 1.35 !important;
  margin: 16px 0 12px !important;
}
.wp-block-post-title a {
  color: var(--brand-primary) !important;
  text-decoration: none !important;
}
.wp-block-post-title a:hover {
  color: var(--brand-gold) !important;
}

/* 元数据(分类/日期) */
.wp-block-post-terms a,
.wp-block-post-date a {
  font-size: 13px !important;
  color: var(--brand-text-soft) !important;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wp-block-post-terms a:hover,
.wp-block-post-date a:hover {
  color: var(--brand-gold) !important;
}

/* 文章正文 */
.entry-content h2 {
  font-size: 28px !important;
  margin-top: 48px !important;
  margin-bottom: 16px !important;
  padding-top: 24px;
  border-top: 1px solid var(--brand-border);
}
.entry-content h3 {
  font-size: 22px !important;
  margin-top: 36px !important;
  margin-bottom: 12px !important;
  color: var(--brand-primary-light) !important;
}

/* 引导文章 */
.wp-block-post-featured-image {
  border-radius: var(--brand-radius-lg) !important;
  overflow: hidden;
  margin-bottom: 20px;
}
.wp-block-post-featured-image img {
  border-radius: var(--brand-radius-lg) !important;
  transition: transform 0.3s ease;
}
.wp-block-post-featured-image:hover img {
  transform: scale(1.02);
}

/* CTA 按钮 hover 提升 */
.wp-block-button__link {
  transition: all 0.2s ease !important;
}

/* 隐藏 WordPress 默认 footer 文字 */
footer.wp-block-template-part .has-small-font-size {
  /* 默认隐藏所有 small 文字 — 我们用自己的 footer */
  display: none !important;
}

/* 文章列表主页 */
.wp-block-query .wp-block-post-template {
  list-style: none !important;
  padding: 0 !important;
}

/* 突出首页重点文章 */
.wp-block-query.alignwide > .wp-block-query-pagination {
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--brand-border);
}

/* === 新版 footer (一行式) === */
.mavis-custom-footer {
  padding: 48px 24px 24px !important;
}
.mavis-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  color: white;
}
.mavis-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.mavis-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}
.mavis-footer-logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}
.mavis-footer-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.mavis-footer-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mavis-footer-nav a {
  font-size: 14px;
  color: rgba(255,255,255,0.85) !important;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.15s;
}
.mavis-footer-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #E8D9A8 !important;
}
.mavis-footer-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px !important;
  background: #C9A961 !important;
  color: #0B2A4A !important;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none !important;
  letter-spacing: 0.02em;
  transition: all 0.2s;
}
.mavis-footer-cta:hover {
  background: #d4b674 !important;
  transform: translateY(-1px);
  color: #0B2A4A !important;
}
.mavis-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 12px;
}
.mavis-footer-tag {
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4) !important;
}

@media (max-width: 768px) {
  .mavis-footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .mavis-footer-cta { width: 100%; justify-content: center; }
  .mavis-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* === Page 全宽 hero: 强制拉满 viewport === */
.page .mavis-page-hero,
.page-template-default .mavis-page-hero,
body.page .mavis-page-hero,
body.page-template-default .mavis-page-hero {
  width: calc(100vw - 0px) !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box !important;
}

/* === 隐藏 page 自动 title(我们 hero 里已经有) === */
body.page .entry-header,
body.page .wp-block-post-title,
body.page header.entry-header,
body.page h1.wp-block-post-title,
.page h1.wp-block-post-title {
  display: none !important;
}

/* === Page hero 内的 h1 / p 强制样式(覆盖 block theme 默认) === */
.mavis-page-hero h1 {
  font-family: "Noto Serif SC", "Source Han Serif SC", serif !important;
  font-size: clamp(36px, 4.5vw, 56px) !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 16px !important;
  text-wrap: balance !important;
}
.mavis-page-hero p {
  color: rgba(255,255,255,0.82) !important;
  font-size: 17px !important;
  line-height: 1.7 !important;
  margin: 0 0 16px !important;
}
.mavis-page-hero .mavis-breadcrumb a,
.mavis-page-hero .mavis-breadcrumb span {
  color: rgba(255,255,255,0.6) !important;
}
.mavis-page-hero .mavis-breadcrumb a:hover {
  color: #E8D9A8 !important;
}

/* === 移动端 nav 修复:防止换行 === */
@media (max-width: 1024px) {
  .wp-block-site-title { font-size: 16px !important; }
  .wp-block-navigation .wp-block-navigation-item__content {
    font-size: 13px !important;
    padding: 6px 8px !important;
  }
}

/* === Hero h1 字号响应式 === */
.mavis-hero h1 {
  font-size: clamp(36px, 4.5vw, 60px) !important;
}
.mavis-hero-stat-num {
  font-size: clamp(28px, 3vw, 40px) !important;
}
.mavis-stats-bar-num {
  font-size: clamp(28px, 3.2vw, 44px) !important;
}

/* === Footer v2: 3-row 一行式 + 52trz 品牌 === */
.mavis-custom-footer {
  background: #0B2A4A !important;
  color: rgba(255,255,255,0.85) !important;
  padding: 32px 24px 24px !important;
  border-top: 3px solid #C9A961 !important;
}
.mavis-footer-wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mavis-footer-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.mavis-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mavis-footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.mavis-footer-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #C9A961;
  color: #0B2A4A;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  font-family: "Inter", sans-serif;
}
.mavis-footer-logo-text {
  letter-spacing: 0.01em;
}
.mavis-footer-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}
.mavis-footer-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.mavis-footer-nav a {
  color: rgba(255,255,255,0.8) !important;
  font-size: 14px;
  text-decoration: none !important;
  transition: color 0.2s;
}
.mavis-footer-nav a:hover {
  color: #C9A961 !important;
}
.mavis-footer-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px !important;
  background: #C9A961 !important;
  color: #0B2A4A !important;
  border-radius: 4px;
  font-weight: 500 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  letter-spacing: 0.02em;
  transition: all 0.2s;
}
.mavis-footer-cta:hover {
  background: #d4b674 !important;
  transform: translateY(-1px);
}
.mavis-footer-row2 {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mavis-footer-row2-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.mavis-footer-sub {
  color: rgba(255,255,255,0.75) !important;
  font-size: 13px;
  text-decoration: none !important;
  transition: color 0.2s;
  white-space: nowrap;
}
.mavis-footer-sub:hover {
  color: #C9A961 !important;
}
.mavis-footer-row3 {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.mavis-footer-row3 .mavis-footer-contact a {
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
}
.mavis-footer-row3 .mavis-footer-contact a:hover {
  color: #C9A961 !important;
}
.mavis-footer-copy {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 768px) {
  .mavis-custom-footer { padding: 24px 18px 18px !important; }
  .mavis-footer-row1 { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mavis-footer-row2 { gap: 10px; }
  .mavis-footer-row2 .mavis-footer-sub { font-size: 12px; }
  .mavis-footer-row3 { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mavis-footer-copy { margin-left: 0; }
}
