/*
 * 臻安科技前台设计系统
 * 覆盖文章、归档、搜索、404 与 Elementor 页面；不修改内容数据或业务链接。
 */

:root {
  --za-ink: #102b3c;
  --za-ink-soft: #536976;
  --za-navy: #0a3044;
  --za-navy-deep: #072536;
  --za-teal: #0f9d87;
  --za-teal-dark: #087866;
  --za-sky: #eaf7f5;
  --za-mist: #f5f8f8;
  --za-line: #dbe7e5;
  --za-white: #ffffff;
  --za-shadow: 0 18px 45px rgba(10, 48, 68, .10);
  --za-shadow-hover: 0 24px 58px rgba(10, 48, 68, .16);
  --za-radius: 20px;
  --za-radius-sm: 12px;
  --za-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--za-ink);
  background:
    radial-gradient(circle at 100% -12%, rgba(39, 185, 158, .10), transparent 31rem),
    linear-gradient(180deg, #f9fbfb 0, var(--za-mist) 34rem, #fff 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--za-teal-dark); text-decoration: none; }
a:hover { color: var(--za-navy); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(15, 157, 135, .42);
  outline-offset: 3px;
}
img, video, iframe { max-width: 100%; height: auto; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 9px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--za-navy);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* ===== 通用顶部与底部 ===== */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 231, 229, .85);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(var(--za-container), calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
}
.site-branding { min-width: 0; }
.site-branding .custom-logo-link { display: inline-flex; align-items: center; }
.site-branding .custom-logo { display: block; width: auto; max-height: 48px; }
.site-title { font-size: 18px; font-weight: 750; line-height: 1.35; letter-spacing: -.02em; }
.site-title a { color: var(--za-navy); }
.site-description { margin: 2px 0 0; color: var(--za-ink-soft); font-size: 12px; }
.site-navigation .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--za-ink);
  font-size: 14px;
  font-weight: 650;
  transition: color .2s ease, background-color .2s ease;
}
.site-navigation a:hover { color: var(--za-teal-dark); background: var(--za-sky); }
.site-shell { min-height: min(680px, 70vh); }
.site-footer { color: #d8e8e9; background: var(--za-navy-deep); }
.site-footer__inner { width: min(var(--za-container), calc(100% - 48px)); margin: 0 auto; padding: 26px 0; }
.site-footer .menu { justify-content: center; }
.site-footer a { color: #c4ece4; }
.site-footer a:hover { color: #fff; background: rgba(255,255,255,.09); }

/* Elementor 页面自己含有导航和页脚。避免叠加主题的空白外壳。 */
body.elementor-page > .site-header,
body.elementor-page > .site-footer { display: none; }
body.elementor-page .site-shell { min-height: 0; }

/* ===== 文章、归档与搜索 ===== */
.site-main--article,
.content-listing,
.error-page {
  width: min(var(--za-container), calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 92px) 0;
}
.page-header { margin-bottom: 30px; }
.page-header--article,
.page-header--listing {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 62px);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(125deg, #0a3044 0%, #0d5866 54%, #0f9d87 130%);
  box-shadow: var(--za-shadow);
}
.page-header--article::after,
.page-header--listing::after {
  position: absolute;
  right: -65px;
  bottom: -110px;
  width: 250px;
  height: 250px;
  border: 42px solid rgba(255,255,255,.10);
  border-radius: 50%;
  content: "";
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--za-teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.page-header .eyebrow { color: #b8f1e5; }
.page-header .eyebrow::before { width: 22px; height: 2px; background: currentColor; content: ""; }
.entry-title { margin: 0; color: var(--za-navy); font-size: clamp(28px, 4vw, 48px); font-weight: 780; line-height: 1.22; letter-spacing: -.045em; }
.page-header .entry-title { position: relative; z-index: 1; max-width: 820px; color: #fff; }
.archive-description { position: relative; z-index: 1; max-width: 700px; margin: 14px 0 0; color: rgba(255,255,255,.82); }

.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--za-line);
  border-radius: var(--za-radius);
  background: var(--za-white);
  box-shadow: 0 8px 24px rgba(10, 48, 68, .055);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover { border-color: rgba(15,157,135,.35); box-shadow: var(--za-shadow-hover); transform: translateY(-5px); }
.post-card__media { display: block; overflow: hidden; aspect-ratio: 16 / 8.4; background: var(--za-sky); }
.post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-card__media img { transform: scale(1.045); }
.post-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 28px; }
.post-card__label {
  display: inline-block;
  margin-bottom: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  color: var(--za-teal-dark);
  background: var(--za-sky);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}
.post-card .entry-title { font-size: clamp(20px, 2.25vw, 26px); letter-spacing: -.03em; }
.post-card .entry-title a { color: var(--za-navy); }
.post-card .entry-title a:hover { color: var(--za-teal-dark); }
.entry-summary { margin-top: 12px; color: var(--za-ink-soft); font-size: 15px; line-height: 1.75; }
.entry-summary p { margin: 0; }
.text-link, .button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-weight: 750;
  line-height: 1.25;
}
.text-link { color: var(--za-teal-dark); }
.text-link span, .button-link span { transition: transform .2s ease; }
.text-link:hover span, .button-link:hover span { transform: translateX(4px); }
.button-link {
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  background: var(--za-teal);
  box-shadow: 0 8px 18px rgba(15, 157, 135, .22);
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.button-link:hover { color: #fff; background: var(--za-teal-dark); box-shadow: 0 12px 25px rgba(15, 157, 135, .30); transform: translateY(-2px); }
.pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 38px; }
.pagination a { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border: 1px solid var(--za-line); border-radius: 10px; color: var(--za-navy); background: #fff; font-weight: 700; transition: all .2s ease; }
.pagination a:hover { border-color: var(--za-teal); color: #fff; background: var(--za-teal); }
.nav-next { margin-left: auto; }
.empty-state { grid-column: 1 / -1; padding: 64px 24px; border: 1px dashed #abc9c4; border-radius: var(--za-radius); text-align: center; background: rgba(255,255,255,.7); }
.empty-state__icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; color: var(--za-teal-dark); background: var(--za-sky); font-size: 34px; line-height: 1; }
.empty-state h2 { margin: 0; color: var(--za-navy); font-size: 22px; }
.empty-state p { margin: 8px 0 0; color: var(--za-ink-soft); }
.empty-state .button-link { margin-top: 20px; }

.article-content { width: min(790px, 100%); margin: 0 auto; }
.article-frame {
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--za-line);
  border-radius: var(--za-radius);
  background: #fff;
  box-shadow: var(--za-shadow);
  color: #254252;
  font-size: 17px;
}
.article-frame > :first-child { margin-top: 0; }
.article-frame > :last-child { margin-bottom: 0; }
.article-frame h1, .article-frame h2, .article-frame h3, .article-frame h4 { color: var(--za-navy); line-height: 1.3; }
.article-frame h2 { margin-top: 2em; font-size: 1.55em; }
.article-frame h3 { margin-top: 1.7em; font-size: 1.23em; }
.article-frame p, .article-frame li { line-height: 1.9; }
.article-frame a { border-bottom: 1px solid rgba(15, 157, 135, .35); font-weight: 650; }
.article-frame blockquote { margin: 1.8em 0; padding: 16px 20px; border-left: 4px solid var(--za-teal); border-radius: 0 12px 12px 0; background: var(--za-sky); color: var(--za-navy); }
.article-frame img { border-radius: 12px; }
.post-tags { display: flex; width: min(790px, 100%); margin: 24px auto 0; }
.tag-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--za-ink-soft); font-size: 14px; }
.tag-links a { padding: 4px 10px; border-radius: 99px; color: var(--za-teal-dark); background: var(--za-sky); font-weight: 650; }

/* ===== 评论 ===== */
.comments-area { width: min(790px, 100%); margin: 42px auto 0; padding: clamp(26px, 4vw, 42px); border: 1px solid var(--za-line); border-radius: var(--za-radius); background: #fff; box-shadow: 0 10px 28px rgba(10,48,68,.05); }
.comments-title, .comment-reply-title { margin: 0 0 20px; color: var(--za-navy); font-size: 22px; }
.comment-list { display: grid; gap: 14px; margin: 0 0 32px; padding: 0; list-style: none; }
.comment-body { padding: 18px; border-radius: 12px; background: var(--za-mist); }
.comment-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.comment-author { color: var(--za-navy); font-weight: 750; }
.comment-metadata { color: var(--za-ink-soft); font-size: 13px; }
.comment-content > :last-child { margin-bottom: 0; }
.no-comments { margin: 0 0 28px; color: var(--za-ink-soft); }
.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comment-form p { margin: 0; }
.comment-form-comment, .form-submit { grid-column: 1 / -1; }
.comment-form label { display: block; margin-bottom: 7px; color: var(--za-navy); font-size: 14px; font-weight: 700; }
.comment-form label span { color: #d65252; }
.comment-form input:not(.submit), .comment-form textarea {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #cbdedb;
  border-radius: 9px;
  color: var(--za-ink);
  background: #fff;
  font: inherit;
  line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.comment-form textarea { min-height: 128px; resize: vertical; }
.comment-form input:not(.submit):focus, .comment-form textarea:focus { border-color: var(--za-teal); box-shadow: 0 0 0 3px rgba(15,157,135,.13); outline: 0; }
.submit { min-height: 46px; padding: 10px 18px; border: 0; border-radius: 9px; color: #fff; background: var(--za-teal); font: inherit; font-weight: 750; cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.submit:hover { background: var(--za-teal-dark); transform: translateY(-1px); }

/* ===== 404 ===== */
.error-page { display: grid; min-height: min(680px, 75vh); place-items: center; }
.error-card { position: relative; width: min(700px, 100%); overflow: hidden; padding: clamp(46px, 8vw, 82px); border-radius: 28px; text-align: center; color: #fff; background: linear-gradient(140deg, #092f44, #0b5660); box-shadow: var(--za-shadow-hover); }
.error-card::before, .error-card::after { position: absolute; border: 1px solid rgba(183,239,227,.22); border-radius: 50%; content: ""; }
.error-card::before { top: -130px; left: -110px; width: 300px; height: 300px; }
.error-card::after { right: -150px; bottom: -180px; width: 370px; height: 370px; }
.error-card > * { position: relative; z-index: 1; }
.error-code { display: block; margin-bottom: 8px; color: rgba(196, 247, 236, .19); font-size: clamp(86px, 18vw, 154px); font-weight: 850; line-height: .85; letter-spacing: -.08em; }
.error-card .eyebrow { color: #b8f1e5; }
.error-card .entry-title { color: #fff; font-size: clamp(26px, 5vw, 42px); }
.error-card p { max-width: 440px; margin: 15px auto 0; color: rgba(255,255,255,.76); }
.error-card .button-link { margin-top: 26px; background: #fff; color: var(--za-teal-dark); box-shadow: none; }
.error-card .button-link:hover { color: var(--za-navy); background: #e3faf5; }

/* ===== Elementor 内容页 ===== */
.site-main--elementor { width: 100%; margin: 0; padding: 0; }
.site-main--elementor .elementor-content { width: 100%; }
.site-main--elementor .elementor { width: min(var(--za-container), calc(100% - 48px)); margin: 0 auto; padding: 24px 0 0; color: var(--za-ink); }
.elementor, .elementor * { font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif; }
.elementor a { transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.elementor img.e-image-base, .elementor .elementor-image { display: block; max-width: 100%; height: auto; }

/* 每个 Elementor 页面最顶部均是 logo + 三个入口。 */
.site-main--elementor .elementor > .e-con:first-child {
  display: flex;
  align-items: center;
  min-height: 78px;
  margin-bottom: 20px;
  padding: 10px 22px;
  border: 1px solid var(--za-line);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 26px rgba(10,48,68,.06);
}
.site-main--elementor .elementor > .e-con:first-child > .e-con { min-width: 0; }
.site-main--elementor .elementor > .e-con:first-child img { width: auto; max-height: 52px; object-fit: contain; }
.site-main--elementor .elementor > .e-con:first-child h2,
.site-main--elementor .elementor > .e-con:first-child .e-heading-base { color: var(--za-ink); font-size: 16px; font-weight: 720; line-height: 1.3; }
.site-main--elementor .elementor > .e-con:first-child h2 a,
.site-main--elementor .elementor > .e-con:first-child .e-heading-link-base { display: inline-flex; padding: 9px 13px; border-radius: 8px; color: var(--za-ink); }
.site-main--elementor .elementor > .e-con:first-child h2 a:hover,
.site-main--elementor .elementor > .e-con:first-child .e-heading-link-base:hover { color: var(--za-teal-dark); background: var(--za-sky); }

/* 内容区域的阅读性、下载链接与行动按钮。 */
.site-main--elementor .elementor-widget-text-editor { color: #294756; line-height: 1.9; }
.site-main--elementor .elementor-widget-text-editor h1,
.site-main--elementor .elementor-widget-text-editor h2,
.site-main--elementor .elementor-widget-text-editor h3 { color: var(--za-navy); line-height: 1.42; }
.site-main--elementor .elementor-widget-text-editor h3 { font-size: clamp(20px, 2.4vw, 26px); }
.site-main--elementor .elementor-widget-text-editor p { margin-block: 0 1em; }
.site-main--elementor .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.site-main--elementor .elementor-widget-e-heading h2,
.site-main--elementor .elementor-widget-e-heading .e-heading-base { color: var(--za-navy); line-height: 1.4; }
.site-main--elementor .elementor-widget-e-heading h2 a { color: var(--za-teal-dark); }
.site-main--elementor .elementor-widget-e-heading h2 a:hover { color: var(--za-navy); }
.site-main--elementor .elementor-button,
.site-main--elementor .e-button-base > a,
.site-main--elementor .e-button-base a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--za-teal), #0b7d8b);
  box-shadow: 0 10px 20px rgba(15,157,135,.22);
  font-weight: 750;
}
.site-main--elementor .elementor-button:hover,
.site-main--elementor .e-button-base > a:hover,
.site-main--elementor .e-button-base a:hover { color: #fff; box-shadow: 0 14px 28px rgba(15,157,135,.30); transform: translateY(-2px); }

/* 页面底部的备案、隐私和条款区域。 */
.site-main--elementor .elementor > .e-con:last-child,
.site-main--elementor .elementor > .e-con:nth-last-child(2) {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4e6e8;
  background: var(--za-navy-deep);
}
.site-main--elementor .elementor > .e-con:last-child { padding: 0 24px 20px; border-radius: 0 0 16px 16px; }
.site-main--elementor .elementor > .e-con:nth-last-child(2) { padding: 20px 24px 0; }
.site-main--elementor .elementor > .e-con:nth-last-child(2) > .e-con { flex: 0 1 25%; min-width: 0; }
.site-main--elementor .elementor > .e-con:nth-last-child(2) > .e-con:nth-child(1) { text-align: end; }
.site-main--elementor .elementor > .e-con:nth-last-child(2) > .e-con:nth-child(2) { flex-basis: 50%; text-align: center; }
.site-main--elementor .elementor > .e-con:nth-last-child(2) > .e-con:nth-child(3) { text-align: start; }
.site-main--elementor .elementor > .e-con:last-child > .e-con { flex: 0 1 50%; min-width: 0; text-align: center; }
.site-main--elementor .elementor > .e-con:last-child p,
.site-main--elementor .elementor > .e-con:nth-last-child(2) p { margin: 0; font-size: 14px; line-height: 1.6; }
.site-main--elementor .elementor > .e-con:last-child a,
.site-main--elementor .elementor > .e-con:nth-last-child(2) a { color: #bceee4; }

/* ===== 断点 ===== */
@media (max-width: 900px) {
  .site-header__inner, .site-footer__inner, .site-main--article, .content-listing, .error-page, .site-main--elementor .elementor { width: min(var(--za-container), calc(100% - 32px)); }
  .post-grid { gap: 18px; }
  .post-card__body { padding: 22px; }
  .site-main--elementor .elementor > .e-con:first-child { padding-inline: 16px; }
  .site-main--elementor .elementor-widget-text-editor { font-size: 16px !important; }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .site-header__inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; min-height: 0; padding: 14px 0; }
  .site-navigation, .site-navigation .menu { width: 100%; }
  .site-navigation .menu { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .site-navigation a { min-height: 38px; padding: 7px 10px; white-space: nowrap; }
  .site-main--article, .content-listing, .error-page { padding: 34px 0 46px; }
  .page-header--article, .page-header--listing { padding: 30px 24px; border-radius: 18px; }
  .page-header--article::after, .page-header--listing::after { right: -110px; bottom: -135px; width: 220px; height: 220px; border-width: 32px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card__body { padding: 22px; }
  .post-card .entry-title { font-size: 21px; }
  .pagination { margin-top: 28px; }
  .pagination a { min-height: 42px; padding: 8px 12px; font-size: 14px; }
  .article-frame { padding: 26px 20px; border-radius: 16px; font-size: 16px; }
  .comments-area { margin-top: 30px; padding: 24px 18px; border-radius: 16px; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form-comment, .form-submit { grid-column: auto; }
  .comment-meta { align-items: flex-start; flex-direction: column; gap: 1px; }
  .error-page { min-height: 520px; }
  .error-card { padding: 48px 24px; border-radius: 20px; }
  .error-code { font-size: 94px; }

  .site-main--elementor .elementor { width: min(var(--za-container), calc(100% - 24px)); padding-top: 12px; }
  .site-main--elementor .elementor > .e-con:first-child { align-items: center; flex-wrap: wrap !important; justify-content: center; gap: 8px 4px; min-height: auto; margin-bottom: 12px; padding: 11px 8px; border-radius: 12px; }
  .site-main--elementor .elementor > .e-con:first-child > .e-con { width: auto !important; padding: 0 !important; }
  .site-main--elementor .elementor > .e-con:first-child > .e-con:first-child { width: 100% !important; text-align: center; }
  .site-main--elementor .elementor > .e-con:first-child img { max-height: 42px; margin: 0 auto; }
  .site-main--elementor .elementor > .e-con:first-child h2,
  .site-main--elementor .elementor > .e-con:first-child .e-heading-base { font-size: 14px; }
  .site-main--elementor .elementor > .e-con:first-child h2 a,
  .site-main--elementor .elementor > .e-con:first-child .e-heading-link-base { padding: 7px 8px; }
  .site-main--elementor .elementor > .e-con:not(:first-child):not(:last-child):not(:nth-last-child(2)) { flex-wrap: wrap !important; }
  .site-main--elementor .elementor > .e-con:not(:first-child):not(:last-child):not(:nth-last-child(2)) > .e-con { width: 100% !important; max-width: 100% !important; }
  .site-main--elementor .elementor-widget-text-editor { padding: 20px 16px !important; font-size: 15.5px !important; line-height: 1.82 !important; }
  .site-main--elementor .elementor-widget-e-heading h2,
  .site-main--elementor .elementor-widget-e-heading .e-heading-base { font-size: 19px; }
  .site-main--elementor .elementor-button,
  .site-main--elementor .e-button-base > a,
  .site-main--elementor .e-button-base a { width: min(100%, 320px); }
  .site-main--elementor .elementor > .e-con:last-child,
  .site-main--elementor .elementor > .e-con:nth-last-child(2) { align-items: center; flex-direction: column !important; gap: 8px; padding: 15px 12px; text-align: center; }
  .site-main--elementor .elementor > .e-con:last-child > .e-con,
  .site-main--elementor .elementor > .e-con:nth-last-child(2) > .e-con { width: 100% !important; padding: 0; text-align: center; }
  .site-main--elementor .elementor > .e-con:nth-last-child(2) > .e-con:nth-child(n) { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
