/*
Theme: App SEO Theme Nova (Fixed)
*/

:root{
  --brand:#f138a8;
  --brand-2:#a663cc;
  --accent:#ffcc4d;

  --text:#1a1a1a;
  --bg:#fff;
  --muted:#6b7280;
  --soft:#f3f5f7;

  --header-h:80px;
  --header-bg:var(--brand);
  --header-link:#fff;
  --header-border:transparent;

  --wrap:min(1100px,92%);
  --wrap-lg:min(1280px,94%);
  --wrap-xl:min(1400px,92%);

  --h2-grad-a:#de3e9f;
  --h2-grad-b:#e954a6;
  --h2-grad-c:#f68f77;
  --h2-grad-d:#eaf477;
  --h2-tip:3%;
  --h2-skew:-6deg;
  --h2-pad-y:12px;
  --h2-pad-x:0px;
  --h2-text:#fff;

  --h3-accent:#ff8a00;
  --footer-sep:rgba(255,255,255,.18);
}

*{ box-sizing:border-box; }
html{ font-size:16px; }
body{
  margin:0;
  color:var(--text);
  background:var(--bg);
  font:1.2rem system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
}
img{ max-width:100%; display:block; height:auto; }

/* 统一上/中/下容器边界 */
.container,
.header-inner,
.footer-wrap,
.site-footer .footer-bottom{
  width:var(--wrap);
  margin-inline:auto;
}
@media (min-width:1024px){
  .container,
  .header-inner,
  .footer-wrap,
  .site-footer .footer-bottom{ width:var(--wrap-lg); }
}
@media (min-width:1440px){
  .container,
  .header-inner,
  .footer-wrap,
  .site-footer .footer-bottom{ width:var(--wrap-xl); }
}

.section{ padding:1rem; }

/* Header */
.site-header.sticky{
  position:fixed;
  inset:0 0 auto;
  z-index:1200;
  background:var(--header-bg);
  border-bottom:3px solid var(--header-border);
  color:#fff;
  height:var(--header-h);
}
.header-inner{
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  overflow:visible;
}

.brand{ display:flex; align-items:center; gap:10px; min-width:0; }
.brand .custom-logo{ height:54px; width:auto; }
.brand .brand-text{
  color:#fff;
  font-weight:700;
  font-size:24px;
  letter-spacing:.2px;
  text-decoration:none;
  white-space:nowrap;
}

.site-nav .menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:18px;
  align-items:center;
}

.site-header a,
.site-header .menu a{
  color:var(--header-link);
  text-decoration:none;
}
.site-nav .menu a:hover,
.site-nav .menu li.current-menu-item > a{
  text-decoration:underline;
  font-weight:600;
}

/* nav-ico：文本+svg 垂直居中 */
.site-nav .menu a:not(.btn-download){
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1;
  padding-block:10px;
}

.site-nav .menu a.btn-download{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  color:var(--brand);
  font-weight:600;
}
.site-nav .menu a.btn-download:hover{ filter:brightness(.95); }

.hamburger{
  display:none;
  background:none;
  border:0;
  width:44px;
  height:44px;
  margin:0;
  padding:0;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
@media (max-width:1024px){
  .site-nav{ display:none; }
  .hamburger{ display:inline-flex; }
}

/* Header / Drawer SVG 统一尺寸 */
.site-header .menu svg,
.site-header .hamburger svg,
#mobile-drawer .drawer-menu svg{
  width:20px !important;
  height:20px !important;
  min-width:20px;
  min-height:20px;
  max-width:20px;
  max-height:20px;
  display:block;
  flex:0 0 20px;
  box-sizing:content-box;
  stroke-width:1.6;
  fill:currentColor !important;
  stroke:currentColor !important;
}

/* Mobile Drawer */
#mobile-drawer .drawer-backdrop{
  position:fixed;
  left:0; right:0;
  top:var(--header-h); bottom:0;
  background:rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s;
  z-index:1100;
}
.drawer-open #mobile-drawer .drawer-backdrop{
  opacity:1;
  pointer-events:auto;
}
#mobile-drawer .drawer-panel{
  position:fixed;
  top:var(--header-h);
  left:50%;
  width:min(1100px,100%);
  transform:translate(-50%,-8px);
  background:#000;
  color:#fff;
  border-radius:0 0 12px 12px;
  box-shadow:0 6px 24px rgba(0,0,0,.35);
  max-height:50vh;
  overflow:auto;
  opacity:0;
  pointer-events:none;
  z-index:1101;
  transition:transform .4s,opacity .4s;
}
.drawer-open #mobile-drawer .drawer-panel{
  opacity:1;
  pointer-events:auto;
  transform:translate(-50%,0);
}
#mobile-drawer .drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 16px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
#mobile-drawer .drawer-close{
  font-size:26px;
  line-height:1;
  background:transparent;
  border:0;
  color:#fff;
  cursor:pointer;
}
#mobile-drawer .drawer-menu{
  list-style:none;
  margin:0;
  padding:8px 0;
}
#mobile-drawer .drawer-menu li{
  border-bottom:1px solid rgba(255,255,255,.1);
}
#mobile-drawer .drawer-menu a{
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1;
  padding:14px 16px;
  color:#fff;
  text-decoration:none;
}
#mobile-drawer .drawer-menu a:hover{ background:rgba(255,255,255,.08); }
#mobile-drawer .drawer-menu li.current-menu-item > a{
  background:rgba(255,255,255,.12);
  font-weight:600;
}
#mobile-drawer .drawer-menu a.btn-download{
  background:#fff;
  color:#111;
  margin:8px 12px;
  border-radius:10px;
}
#mobile-drawer .drawer-menu a.btn-download:hover{
  background:#f3f5f7;
  color:#111;
}

/* Hero */
.hero .hero-img{
  display:block;
  margin:16px auto 0;
  width:clamp(80px,22vw,160px);
  height:auto;
  max-width:100%;
  object-fit:contain;
}
@media (min-width:1024px){
  .hero .hero-img{ width:clamp(100px,18vw,200px); }
}

/* Footer */
.footer-widgets{
  background:#6e0039;
  color:#e5e7eb;
  padding:24px 0;
}
.footer-wrap{
  --logo-h:80px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
  align-items:start;
}
.footer-logo{ height:var(--logo-h); width:auto; }
.footer-desc{
  margin:8px 0 0;
  font-size:18px;
  line-height:1.4;
  color:#c7cbd1;
}
@media (min-width:768px){
  .footer-left{ display:flex; align-items:center; gap:14px; min-height:var(--logo-h); }
  .footer-desc{ margin:0; flex:1 1 auto; min-width:0; white-space:normal; overflow:visible; text-overflow:clip; max-width:none; }
}
.footer-left > a{ display:inline-flex; align-items:center; flex:0 0 auto; }

.footer-right h3{ margin:0 0 6px; font-size:14px; letter-spacing:.3px; color:#fff; }
.footer-right .links-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px 28px;
  list-style:none;
  margin:0;
  padding:0;
  align-content:center;
}
.footer-right .links-grid a{ color:#e5e7eb; text-decoration:none; font-size:14px; line-height:1.2; }
.footer-right .links-grid a:hover{ text-decoration:underline; }
.footer-right .links-grid .li-sitemap{
  position:absolute !important;
  width:1px; height:1px;
  margin:-1px; padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  clip-path:inset(100%);
  white-space:nowrap;
  border:0;
}
@media (max-width:768px){
  .footer-wrap{ grid-template-columns:1fr; gap:16px; text-align:center; }
  .footer-left{ display:grid; justify-items:center; }
  .footer-right .links-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 16px; justify-items:center; }
  .footer-right .links-grid a{ font-size:13px; }
}

.site-footer{
  background:var(--brand);
  color:#fff;
  border-top:1px solid var(--footer-sep);
}
.site-footer .footer-bottom{ padding:14px 0; text-align:center; font-size:14px; }
.site-footer a{ color:#fff; text-decoration:none; }
.site-footer a:hover{ text-decoration:underline; }

/* Back to top */
.backTop{
  position:fixed;
  right:18px;
  bottom:18px;
  width:40px;
  height:40px;
  border-radius:999px;
  background:var(--brand);
  color:#fff;
  border:0;
  cursor:pointer;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  transition:transform .2s,opacity .2s;
  z-index:1300;
}
.backTop.show{ display:flex; opacity:1; }
.backTop:hover{ transform:translateY(-2px); }
@media (prefers-reduced-motion:reduce){
  .backTop{ transition:none; }
}

/* Main spacing */
.entry .entry-title{ text-align:center; margin:0 0 12px; }
.site-header.sticky + #mobile-drawer + .header-spacer,
.site-header.sticky + .header-spacer{ display:block; height:var(--header-h); }
main.container.section{ padding-top:12px; }
.entry [id]{ scroll-margin-top:calc(var(--header-h) + 10px); }

/* section-box：贴齐左右边界 */
.section-box,
.section-box.boxed-soft,
.section-box.boxed-neutral{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;

  margin:22px 0;
}
.section-box > :first-child{ margin-top:0; }
.section-box > :last-child{ margin-bottom:0; }
.section-box + .section-box{ margin-top:24px; }

/* 文本换行兜底：h1/h2/h3/*/
.entry .entry-content :is(h1,h2,h3){
  align-content:center;
  text-align:center;
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}
.entry .entry-content p{ 
  margin:5px 0 5px;
 text-align:left;
  line-height:1.75;
}
.entry .entry-content :is(h1,h2,h3){ margin:26px 0 14px; line-height:1.25; text-wrap:balance; }

/* H2 */
.entry .entry-content h2,
.entry .entry-content h2 *{
  white-space:normal !important;
  word-break:normal;
  overflow-wrap:anywhere;
}
.entry .entry-content h2{
  position:relative;
  z-index:0;
  display:block;
  max-width:100%;
  margin:15px 0 15px;
  padding:var(--h2-pad-y) var(--h2-pad-x);
  color:var(--h2-text);
  font-weight:800;
  font-size:clamp(22px,2.2vw + 12px,30px);
  line-height:1.25;
  background:none !important;
  border:0 !important;
  box-shadow:none !important;
}
.entry .entry-content h2::before{
  content:"";
  position:absolute;
  inset:0;
  margin-inline:0;
  z-index:-1;
  transform:skewX(var(--h2-skew));
  background:linear-gradient(135deg,var(--h2-grad-a) 0%,var(--h2-grad-b) 30%,var(--h2-grad-c) 65%,var(--h2-grad-d) 100%);
  clip-path:polygon(var(--h2-tip) 0%,calc(100% - var(--h2-tip)) 0%,100% 50%,calc(100% - var(--h2-tip)) 100%,var(--h2-tip) 100%,0% 50%);
}

/* H3：图标算入整体宽度，过长自动换行且整体居中 */
.entry .entry-content .section-box h3,
.section-box h3{
  background:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
}

.entry .entry-content h3,
.section-box h3{
  position:relative;
  display:block;
  margin:10px auto 10px;
  max-width:100%;
  color:var(--h3-accent);
  font-weight:800;
  font-size:clamp(18px,1.6vw + 10px,22px);
  line-height:1.2;
  text-align:center !important;
}

/* 图标 inline-block => 参与行宽计算 */
.entry .entry-content h3::before,
.section-box h3::before{
  content:"";
  display:inline-block;
  vertical-align:middle;
  width:0; height:0;
  border-top:.48em solid transparent;
  border-bottom:.48em solid transparent;
  border-right:.62em solid currentColor;
  margin-right:.55em;
  transform:translateY(.02em);
}
.entry .entry-content h3::after,
.section-box h3::after{
  content:"";
  display:inline-block;
  vertical-align:middle;
  width:0; height:0;
  border-top:.48em solid transparent;
  border-bottom:.48em solid transparent;
  border-left:.62em solid currentColor;
  margin-left:.55em;
  transform:translateY(.02em);
}
@media (max-width:420px){
  .entry .entry-content h3,
  .section-box h3{
    font-size:clamp(17px,4.2vw,20px);
    margin:20px auto 10px;
  }
  .entry .entry-content h3::before,
  .section-box h3::before,
  .entry .entry-content h3::after,
  .section-box h3::after{
    border-top:.42em solid transparent;
    border-bottom:.42em solid transparent;
  }
}

/* App template tweaks */
.page-template-page-app .site-header.sticky + #mobile-drawer + .header-spacer,
.page-template-page-app .site-header.sticky + .header-spacer{
  height:calc(var(--header-h) - 22px);
}
.page-template-page-app .hero{ padding-top:4px; }
.page-template-page-app .hero-head{ margin-top:0; }
.page-template-page-app .hero-title{ margin:8px 0 10px; line-height:1.2; }
.page-template-page-app .hero-sub{ margin-top:8px; }
.page-template-page-app main.container.section{ padding-top:2rem; }
.page-template-page-app .entry .entry-title{
  display:block !important;
  text-align:center;
  margin:6px 0 12px;
  line-height:1.18;
  font-weight:800;
  font-size:clamp(28px, 4vw, 40px);
}
