/*
Theme Name: 中科宏钛
Description: 中科宏钛官网经典主题，配合宏钛站点组件使用。
Version: 1.6.3
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: hongtai
*/

/* Direct Elementor wrappers otherwise constrain the original sticky navigation. */
:where(.ht-view:not(.elementor-editor-active)) .elementor:where(:has(> .ht-page)),
:where(.ht-view:not(.elementor-editor-active)) .ht-page:where(.e-con),
:where(.ht-view:not(.elementor-editor-active) .ht-page) > .e-con-inner,
:where(.ht-view:not(.elementor-editor-active) .ht-page) .ht-block,
:where(.ht-view:not(.elementor-editor-active) .ht-page .ht-block) > .elementor-widget-container {
    display: contents;
}

/* Elementor resets all widget figure margins with four class selectors. Restore the
   three original rules that intentionally use non-zero figure margins. */
.ht-page .elementor-widget.ht-block .prose > * + figure {
    margin-top: 1.2em;
}
@media (max-width: 980px) {
    .ht-page .elementor-widget.ht-block figure.tl-img {
        margin: 18px 0 0 clamp(24px, 4vw, 56px);
    }
}
@media (max-width: 900px) {
    .ht-page .elementor-widget.ht-block figure.about-media { margin-left: 14px; }
}
@media (max-width: 640px) {
    .ht-page .elementor-widget.ht-block figure.tl-img { margin-left: 0; }
}
.ht-page .ht-block a.dock-btn {
    box-shadow: 0 10px 28px -8px rgba(22,24,28,.32);
}
.ht-page .ht-block a.pmini:hover {
    box-shadow: 0 26px 50px -30px rgba(22,24,28,.35);
}
.admin-bar.ht-view .site-header {
    top: var(--wp-admin--admin-bar--height, 32px);
}
.admin-bar.ht-view :is(.subnav, .news-filter) {
    scroll-margin-top: var(--wp-admin--admin-bar--height, 32px);
}
@media (max-width: 600px) {
    .admin-bar.ht-view .site-header { top: 0; }
}

.ht-system .banner { background: var(--ink-2); }
.ht-system .banner-in { width: 100%; }
.ht-system .ht-search-form { display: flex; align-items: stretch; max-width: 42em; margin: 20px 0; }
.ht-search-form input { min-width: 0; flex: 1; border: 1px solid var(--line); padding: .7em 1em; background: #fff; color: var(--ink); }
.ht-search-form input:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.ht-search-form .btn { flex: none; }
.ht-system-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 24px; }
.ht-system-links a:not(.btn), .ht-system .current { color: var(--red); }
.ht-system .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ht-search-heading { margin-top: 36px; }
.ht-results { margin: 20px 0; padding: 0; list-style: none; }
.ht-results li { padding: 20px 0; border-top: 1px solid var(--line); }
.ht-result-type { color: var(--steel); font-size: 14px; }
.ht-results h3 { margin: 4px 0; }
.ht-results h3 a:hover, .ht-results h3 a:focus-visible { color: var(--red); }
.ht-results p { max-width: 62em; }
.ht-system .nav-links { display: flex; flex-wrap: wrap; gap: 18px; }

.tel-tag { margin-left: .6em; font-family: var(--font); font-style: normal; font-weight: 400; font-size: 13px; letter-spacing: .08em; opacity: .7; white-space: nowrap; }
.footer-contact .tel-tag { align-self: center; }
.footer-contact .tel-tag, .d-contact .tel-tag { margin-left: 0; }
.header-tel, .d-contact, .cta-tel, .footer-contact, .c-tels, .dock-tip, .btn--call b {
    font-variant-numeric: tabular-nums;
}
.header-tel--2 { gap: 14px; font-size: 17px; font-weight: 500; letter-spacing: .04em; }
.header-tel--2 .ico { font-size: 19px; }
.header-tel--2 .ht-nums {
    display: grid;
    justify-items: end;
    row-gap: 3px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,.28);
    line-height: 1.2;
}
.is-solid .header-tel--2 .ht-nums, .is-hover .header-tel--2 .ht-nums { border-left-color: var(--line); }
.header-tel--2 a { display: flex; align-items: baseline; gap: 9px; transition: opacity .2s; }
.header-tel--2 .tel-tag { margin: 0; font-size: 13px; letter-spacing: .06em; opacity: .8; }
.header-tel--2 a:hover { opacity: .7; }
.cta-tel--2 small { margin-bottom: 4px; }
.cta-tel--2 a { display: flex; flex-wrap: wrap; align-items: baseline; white-space: nowrap; }
.ht-annotated-number { display: inline-flex; align-items: baseline; white-space: nowrap; }
.cta-tel--2 b { font-size: clamp(24px,2.4vw,32px); line-height: 1.28; }
.dock-tip--2 { flex-direction: column; align-items: flex-start; justify-content: center; font-size: 15px; line-height: 1.25; }
.c-tels { display: grid; justify-items: start; }
.c-tels a.big { display: flex; flex-wrap: wrap; align-items: baseline; white-space: nowrap; font-size: clamp(26px,2.6vw,34px); }
.c-tels .tel-tag { font-size: 14px; }
@media (max-width: 760px) {
    .footer-contact.ht-dual-contact > * { padding-block: 6px; }
    .d-contact.ht-dual-contact > a { padding-block: 3px; margin-block: -3px; }
    .cta-tel--2 { flex-basis: 100%; }
    .cta-tel--2 a { padding-block: 6px; }
    .c-tels a.big { padding-block: 4px; }
}

/* 一、产品页「技术参数」：同一版块里放多张表；右侧说明栏跟随滚动 */
.pd-cols .table-scroll ~ .table-scroll{margin-top:44px}
@media (min-width:981px){
  #spec .pd-note{position:sticky;top:227px}   /* 227 = 页头 72 + 页内导航 131 + 24 */
}

/* 二、首页「成本优势」版块 */
.home-cost{position:relative;overflow:hidden}
.home-cost::before{content:"";position:absolute;top:0;bottom:0;left:-6%;width:34%;background:rgba(255,255,255,.025);transform:skewX(-21deg);pointer-events:none}
.cost-grid{position:relative;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(40px,6vw,104px);align-items:center}
.cost-copy .sec-head{margin-bottom:26px}
.cost-lead{font-size:clamp(30px,3.2vw,46px);font-weight:700;line-height:1.3;letter-spacing:.02em;color:#fff}
.cost-copy .sec-desc{margin-top:20px;max-width:30em}
.cost-copy .btn{margin-top:34px}

.cost-item + .cost-item{margin-top:44px;padding-top:40px;border-top:1px solid rgba(255,255,255,.12)}
.cost-item-h{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px}
.cost-item-h h3{font-size:22px;font-weight:600;color:#fff;line-height:1.4}
.cost-item-h h3 small{display:block;margin-top:2px;font:500 15px/1.5 var(--num);letter-spacing:.04em;color:rgba(255,255,255,.5)}
.cost-save{display:flex;align-items:baseline;gap:10px;white-space:nowrap;color:#fff}
.cost-save small{font-size:15px;color:rgba(255,255,255,.62)}
.cost-save b{font:600 clamp(48px,4.6vw,68px)/1 var(--num);letter-spacing:.01em;font-variant-numeric:tabular-nums}
.cost-save i{font:600 26px/1 var(--num);font-style:normal;color:#D5474C}

.cost-bar{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:16px;margin:0}
.cost-bar + .cost-bar{margin-top:12px}
.cost-bar dt{font-size:15px;color:rgba(255,255,255,.62)}
.cost-bar--ht dt{color:#fff;font-weight:600}
.cost-bar dd{position:relative;margin:0;padding-right:82px}   /* 右侧留给数值；两条的轨道等长，长度才可比 */
.cost-bar dd i{display:block;width:calc(var(--p)*100%);height:22px;background:rgba(255,255,255,.2);
  clip-path:polygon(0 0,100% 0,calc(100% - 9px) 100%,0 100%);
  transform:scaleX(0);transform-origin:left center;transition:transform 1.2s var(--ease)}
/* 宏钛这一条：实色到降幅下限，浅色一段是降幅范围 */
.cost-bar--ht dd i{background:linear-gradient(90deg,var(--red) 0,var(--red) var(--solid),rgba(163,42,46,.42) var(--solid),rgba(163,42,46,.42) 100%);transition-delay:.18s}
.cost-bar dd span{position:absolute;top:50%;left:calc((100% - 82px)*var(--p,1) + 14px);transform:translateY(-50%);font:500 17px/1 var(--num);letter-spacing:.02em;color:rgba(255,255,255,.62);font-variant-numeric:tabular-nums}
.cost-bar--ht dd span{color:#fff}
.cost-bars.is-in .cost-bar dd i{transform:scaleX(1)}
html:not(.js) .cost-bar dd i{transform:none}
@media (prefers-reduced-motion:reduce){.cost-bar dd i{transition:none;transform:none}}
.cost-note{margin-top:30px;font-size:13px;line-height:1.8;color:rgba(255,255,255,.45)}

@media (max-width:980px){
  .cost-grid{grid-template-columns:1fr;gap:44px}
}
@media (max-width:640px){
  .cost-copy .btn{margin-top:26px}
  .cost-item + .cost-item{margin-top:34px;padding-top:30px}
  .cost-item-h h3{font-size:19px}
  .cost-save small{font-size:13px}
  .cost-save b{font-size:44px}
  .cost-save i{font-size:20px}
  .cost-bar{grid-template-columns:1fr;gap:6px}
  .cost-bar + .cost-bar{margin-top:14px}
  .cost-bar dt{font-size:13px}
  .cost-bar dd{padding-right:72px}
  .cost-bar dd i{height:16px}
  .cost-bar dd span{font-size:15px;left:calc((100% - 72px)*var(--p,1) + 12px)}
}

/* Keep long readings and their units together when the mobile value column has room. */
@media (max-width:640px){
  #spec .spec th[scope="row"] + td:last-child:not(.zh){letter-spacing:normal}
}
