/*
Theme Name: X Download Center Theme
Theme URI: https://example.com/
Author: X
Author URI: https://example.com/
Description: 半静态官网主题，适用于下载中心、新闻资讯与 FAQ 风格内容展示。支持后台修改首页首屏、首页第二/第三屏、下载中心文案与按钮链接，并可在启用时自动接管首页与内容页。
Version: 1.1.7
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: x-download-center-theme
*/

:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-soft: #fbfbfb;
  --text: #141414;
  --muted: #666666;
  --line: rgba(17, 17, 17, 0.06);
  --line-strong: rgba(17, 17, 17, 0.1);
  --primary: #f34a3f;
  --primary-dark: #e33f34;
  --shadow: 0 12px 40px rgba(17, 17, 17, 0.06);
  --shadow-soft: 0 4px 20px rgba(17, 17, 17, 0.04);
  --radius: 22px;
  --radius-sm: 16px;
  --container: 1200px;
  --hero: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; }

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  background: #000;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
}
.skip-link:focus {
  left: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 246, 246, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.site-header__inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.branding {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.branding__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff625a 0%, #ed473c 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(243, 74, 63, 0.28);
  overflow: hidden;
  flex: 0 0 auto;
}
.branding__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.branding__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.branding__title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.branding__tagline {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-nav__toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  cursor: pointer;
}
.site-nav__toggle span,
.site-nav__toggle::before,
.site-nav__toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 999px;
  content: "";
  transition: transform .25s ease, opacity .25s ease;
}
.site-nav__toggle span { margin-top: 7px; }
.site-nav__toggle::before { transform: translateY(-4px); }
.site-nav__toggle::after { transform: translateY(4px); }
.site-nav.is-open .site-nav__toggle::before { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .site-nav__toggle::after { transform: translateY(0) rotate(-45deg); }
.site-nav.is-open .site-nav__toggle span { opacity: 0; }

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.site-nav__menu li { list-style: none; }
.site-nav__menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #242424;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a,
.site-nav__menu .current_page_item > a {
  background: rgba(243, 74, 63, 0.09);
  color: var(--primary);
}

.hero {
  padding: 74px 0 34px;
}
.hero__wrap {
  width: min(calc(100% - 16px), var(--hero));
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.84) 0%, rgba(255,255,255,0.94) 100%);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
  border-radius: 36px;
  padding: 64px 44px 42px;
}
.hero__eyebrow,
.section-heading__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(243, 74, 63, 0.08);
  color: #be463d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.hero__title-cn {
  margin: 28px 0 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: .98;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.05em;
}
.hero__title-en {
  margin: 12px 0 0;
  font-size: clamp(38px, 7vw, 86px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -0.06em;
}
.hero__desc {
  width: min(100%, 700px);
  margin: 28px auto 0;
  font-size: clamp(16px, 2vw, 24px);
  color: #555;
}
.hero__actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 18px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn--primary {
  background: linear-gradient(180deg, #f85348 0%, #ef4539 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(243, 74, 63, 0.24);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #ff6158 0%, #eb4639 100%);
}
.btn--secondary {
  background: rgba(255,255,255,0.88);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.btn--secondary:hover {
  border-color: rgba(17, 17, 17, 0.12);
}

.feature-strip {
  width: min(calc(100% - 24px), 860px);
  margin: 26px auto 0;
  padding: 20px 12px 0;
}
.feature-strip__list {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.feature-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #757575;
}
.feature-strip__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6258 0%, #ee4d42 100%);
  box-shadow: 0 3px 10px rgba(243,74,63,.22);
}

.home-section,
.page-section {
  padding: 72px 0;
}
.section-heading {
  text-align: center;
  margin-bottom: 42px;
}
.section-heading__eyebrow {
  margin-bottom: 18px;
}
.section-heading__title {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}
.section-heading__desc {
  width: min(100%, 620px);
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  padding: 28px 28px 24px;
  min-height: 220px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,1);
}
.card > a {
  display: block;
  color: inherit;
}
.card__title {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.card__excerpt,
.card__meta {
  color: var(--muted);
  font-size: 16px;
}
.card__meta {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.card__meta::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.post-list {
  display: grid;
  gap: 20px;
}
.post-row {
  padding: 26px 28px;
  background: rgba(255,255,255,0.88);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.9);
}
.post-row__title {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.post-row__excerpt {
  margin-top: 14px;
  color: var(--muted);
}
.post-row__meta {
  margin-top: 14px;
  color: #8b8b8b;
  font-size: 14px;
}

.download-shell {
  display: grid;
  gap: 24px;
}
.download-lead {
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.download-card {
  padding: 34px 30px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.94);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.download-card__platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 14px;
  background: rgba(243, 74, 63, 0.08);
  color: #be463d;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.download-card__title {
  margin: 18px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.download-card__desc {
  color: var(--muted);
  margin-bottom: 20px;
}
.download-card__meta {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  color: #555;
  font-size: 15px;
}
.download-card__meta strong {
  color: var(--text);
}
.download-note {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.94);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  padding: 30px;
}
.download-note h2,
.download-note h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.download-note p,
.download-note li,
.entry-content p,
.entry-content li {
  color: #595959;
}
.download-note ul,
.entry-content ul,
.entry-content ol {
  padding-left: 20px;
}

.entry-hero {
  padding: 56px 0 18px;
}
.entry-hero__inner {
  width: min(calc(100% - 16px), 860px);
  margin: 0 auto;
  text-align: center;
}
.entry-hero__eyebrow {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(243, 74, 63, 0.08);
  color: #be463d;
  font-weight: 700;
  font-size: 13px;
}
.entry-hero__title {
  margin: 20px 0 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .96;
  letter-spacing: -0.06em;
}
.entry-hero__desc {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: 18px;
  color: var(--muted);
}

.entry-wrap {
  width: min(calc(100% - 40px), 920px);
  margin: 0 auto;
}
.entry-card {
  padding: 36px 34px;
  background: rgba(255,255,255,0.88);
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.94);
}
.entry-header {
  margin-bottom: 26px;
}
.entry-title {
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: .98;
  letter-spacing: -0.06em;
}
.entry-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}
.entry-content {
  font-size: 17px;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 30px 0 12px;
}
.entry-content h2 { font-size: clamp(28px, 4vw, 40px); }
.entry-content h3 { font-size: clamp(24px, 3vw, 32px); }
.entry-content h4 { font-size: clamp(20px, 3vw, 26px); }
.entry-content a { color: var(--primary); }
.entry-content blockquote {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  background: rgba(243,74,63,.04);
  border-radius: 16px;
}

.pagination {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pagination .page-numbers {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}
.pagination .current,
.pagination .page-numbers:hover {
  background: rgba(243,74,63,.1);
  color: var(--primary);
}

.site-footer {
  margin-top: 60px;
  padding: 28px 0 40px;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #7d7d7d;
  font-size: 14px;
}
.site-footer__menu {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 48px 22px;
  background: rgba(255,255,255,0.85);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: var(--shadow-soft);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

@media (max-width: 1100px) {
  .card__title { font-size: 24px; }
}

@media (max-width: 900px) {
  .site-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 20px;
    min-width: 220px;
    padding: 10px;
    border-radius: 22px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  }
  .site-nav.is-open .site-nav__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .site-nav__menu a {
    min-height: 46px;
    justify-content: flex-start;
  }
  .hero__wrap { padding: 50px 24px 34px; border-radius: 28px; }
  .card-grid,
  .download-grid { grid-template-columns: 1fr; }
  .entry-card { padding: 28px 22px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .site-header__inner { min-height: 78px; }
  .branding__title { font-size: 18px; }
  .branding__tagline { display: none; }
  .hero { padding-top: 42px; }
  .hero__title-cn { margin-top: 24px; }
  .hero__desc { margin-top: 20px; font-size: 16px; }
  .btn { width: 100%; min-height: 54px; font-size: 17px; }
  .hero__actions { gap: 12px; }
  .feature-strip__list { justify-content: flex-start; }
  .home-section,
  .page-section { padding: 54px 0; }
  .card { padding: 24px 20px; min-height: 180px; }
  .card__title { font-size: 22px; }
  .section-heading__desc { font-size: 16px; }
  .download-card { padding: 28px 22px; }
  .download-note { padding: 24px 22px; }
  .entry-wrap { width: min(calc(100% - 28px), 920px); }
}


body.home {
  background: #ffffff;
}

.hero--homepage {
  padding: 86px 0 72px;
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
}

.hero__wrap--plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 24px 0 12px;
}

body.home .hero__desc {
  color: #5b5b5b;
}

body.home .site-footer {
  border-top: 0;
  background: #ffffff;
}

@media (max-width: 768px) {
  .hero--homepage {
    min-height: auto;
    padding: 56px 0 40px;
  }

  .hero__wrap--plain {
    padding: 12px 0 0;
  }
}


.front-page-editor-content.is-empty{display:none;}
.front-page-editor-content{padding:0;}

.front-page-editor-content.is-empty{display:none;}
.front-page-editor-content{padding:0;}
.xdt-editor-content.is-empty{display:none;}
.xdt-editor-content{padding:0;}
