/* V25: conservative font sizing + button visibility safety
   Goal: keep H1/H2/banner scale, reduce normal text 1px, make every button readable on hover. */
:root{
  --fg-v25-blue:#005BAC;
  --fg-v25-blue-hover:#004C95;
  --fg-v25-text:#1f2937;
  --fg-v25-sub:#667085;
  --fg-v25-muted:#7b8494;
  --fg-v25-line:#e5eaf0;
}
html,body{font-family:"PingFang SC","Microsoft YaHei","Noto Sans SC","Segoe UI",Arial,sans-serif!important;-webkit-font-smoothing:antialiased!important;text-rendering:optimizeLegibility!important;}
body{font-size:14.5px!important;line-height:1.72!important;font-weight:400!important;letter-spacing:0!important;color:var(--fg-v25-text)!important;}
/* Navigation and small UI text */
.navbar,.nav-links a,.navbar a,.nav-consult-btn,.top-bar,.top-bar a,.top-bar span{font-size:14px!important;line-height:1.5!important;letter-spacing:0!important;}
.nav-links a{font-weight:400!important;color:#273142!important;}
.nav-links a.active,.nav-links a:hover{color:var(--fg-v25-blue)!important;}
.logo{font-size:21px!important;font-weight:600!important;letter-spacing:-.01em!important;}
/* Do not shrink H1/H2/banner titles, only keep sane weights */
h1,h2,.section-title,.page-banner h1,.hero-section h1,.ai-hero h1,.article-title,.case-title{font-weight:540!important;letter-spacing:-.025em!important;}
.page-banner h1,.hero-section h1,.ai-hero h1{color:#fff!important;}
/* Reduce all non-H1/H2 copy by about 1px */
p,li,dd,dt,td,th,
.section-desc,.section-header p,.service-card p,.feature-item p,.case-card p,.news-card p,.pricing-card p,
.article-content,.article-content p,.article-content li,.news-detail-content,.news-detail-content p,.news-detail-content li,
.case-content,.case-content p,.case-content li,.case-detail-content,.case-detail-content p,.case-detail-content li,
.fg-detail-content,.fg-detail-content p,.fg-v9-news-main p,.fg-v18-card p,.ai-card p,.ai-product p,.ai-price-card p,
.footer p,.footer li,.footer a,.legacy-article,.legacy-article p{
  font-size:14px!important;
  line-height:1.78!important;
  font-weight:400!important;
  letter-spacing:0!important;
  color:var(--fg-v25-sub)!important;
}
/* Mid-level headings: clear but not heavy */
h3,h4,h5,h6,.service-card h3,.feature-item h4,.case-card h3,.case-card-body h3,.news-card h3,.news-card-body h3,.pricing-card h3,.fg-v18-card h3,.ai-card h3,.ai-product h3,.ai-price-card h3,.footer h4{
  color:#1d2433!important;
  font-size:18px!important;
  line-height:1.42!important;
  font-weight:500!important;
  letter-spacing:-.01em!important;
}
.article-content h2,.case-content h2,.fg-detail-content h2{font-weight:540!important;color:#1d2433!important;}
.article-content h3,.case-content h3,.fg-detail-content h3{font-size:18px!important;font-weight:500!important;color:#1d2433!important;}
.section-label,.ai-kicker,.news-card-date,.article-meta,.case-meta,.fg-v9-news-meta,.pagination a,.filter-tab,.filter-tabs a,.filter-tabs button{font-size:13px!important;font-weight:500!important;}
/* Dark backgrounds must keep readable light text, excluding explicit white buttons */
.hero-section,.page-banner,.footer,.cta-section,.stats-section,.fg-blue-cta,.ai-hero,.ai-dark,.ai-stats,.section-dark,.dark-section{color:#fff!important;}
.hero-section h1,.hero-section h2,.hero-section h3,.hero-section p,.hero-section span:not(.logo-mark),
.page-banner h1,.page-banner h2,.page-banner h3,.page-banner p,.page-banner span,
.footer h1,.footer h2,.footer h3,.footer h4,.footer p,.footer li,.footer a,
.cta-section h1,.cta-section h2,.cta-section h3,.cta-section p,.cta-section span,
.fg-blue-cta h1,.fg-blue-cta h2,.fg-blue-cta h3,.fg-blue-cta p,.fg-blue-cta span,
.stats-section h1,.stats-section h2,.stats-section h3,.stats-section p,.stats-section span,
.ai-hero h1,.ai-hero h2,.ai-hero h3,.ai-hero p,.ai-hero span,.ai-hero li,
.ai-dark h1,.ai-dark h2,.ai-dark h3,.ai-dark h4,.ai-dark p,.ai-dark span,.ai-dark li,.ai-dark a:not(.btn):not(.fg-cta-btn){color:rgba(255,255,255,.86)!important;}
.hero-section h1,.page-banner h1,.cta-section h2,.fg-blue-cta h2,.stats-section .stat-number,.ai-hero h1,.ai-dark h2{color:#fff!important;}
.ai-hero h1 em,.hero-section h1 em{color:#5fb0ff!important;}
/* Button baseline */
.btn,.button,a.btn,button.btn,.nav-consult-btn,.filter-tab,.filter-tabs a,.filter-tabs button,.pagination a,.fg-cta-btn,.contact-modal-submit,button[type="submit"],a[class*="btn"],button[class*="btn"]{
  font-size:14px!important;
  font-weight:500!important;
  line-height:1.2!important;
  letter-spacing:0!important;
  text-decoration:none!important;
  transition:background-color .22s ease,border-color .22s ease,color .22s ease,box-shadow .22s ease,transform .22s ease!important;
}
/* Filled blue buttons: always white text */
.nav-consult-btn,.btn-primary,.btn.btn-primary,.contact-modal-submit,button[type="submit"],
.filter-tab.active,.filter-tabs a.active,.filter-tabs button.active,.pagination li.thisclass a,
.fg-v9-case-visit,a[style*="background:var(--primary)"],a[style*="background: var(--primary)"],a[style*="background:#0057B3"],a[style*="background: #0057B3"],a[style*="background:#005BAC"],a[style*="background: #005BAC"]{
  background:var(--fg-v25-blue)!important;
  border-color:var(--fg-v25-blue)!important;
  color:#fff!important;
}
.nav-consult-btn:hover,.btn-primary:hover,.btn.btn-primary:hover,.contact-modal-submit:hover,button[type="submit"]:hover,
.filter-tab.active:hover,.filter-tabs a.active:hover,.filter-tabs button.active:hover,.pagination li.thisclass a:hover,.fg-v9-case-visit:hover{
  background:var(--fg-v25-blue-hover)!important;
  border-color:var(--fg-v25-blue-hover)!important;
  color:#fff!important;
}
/* White buttons on dark backgrounds: always blue text, including AI hero */
.btn-white,.btn.btn-white,.hero-section .btn-white,.ai-hero .btn-white,.cta-section .btn-white,.fg-blue-cta .fg-cta-btn:not(.ghost),
a.btn-white,button.btn-white{
  background:#fff!important;
  border-color:#fff!important;
  color:var(--fg-v25-blue)!important;
}
.btn-white *,.btn.btn-white *,.hero-section .btn-white *,.ai-hero .btn-white *,.cta-section .btn-white *,.fg-blue-cta .fg-cta-btn:not(.ghost) *{color:inherit!important;}
.btn-white:hover,.btn.btn-white:hover,.hero-section .btn-white:hover,.ai-hero .btn-white:hover,.cta-section .btn-white:hover,.fg-blue-cta .fg-cta-btn:not(.ghost):hover{
  background:#f3f8ff!important;
  border-color:#f3f8ff!important;
  color:#004C95!important;
}
/* Outline tabs/buttons: readable normal + blue/white hover */
.filter-tab,.filter-tabs a,.filter-tabs button,.btn-outline,.btn.btn-outline,a.btn-outline,button.btn-outline,.fg-cta-btn.ghost{
  background:transparent!important;
  border:1px solid var(--fg-v25-blue)!important;
  color:var(--fg-v25-blue)!important;
}
.filter-tab:hover,.filter-tabs a:hover,.filter-tabs button:hover,.btn-outline:hover,.btn.btn-outline:hover,a.btn-outline:hover,button.btn-outline:hover{
  background:var(--fg-v25-blue)!important;
  border-color:var(--fg-v25-blue)!important;
  color:#fff!important;
}
.fg-cta-btn.ghost{border-color:rgba(255,255,255,.65)!important;color:#fff!important;background:transparent!important;}
.fg-cta-btn.ghost:hover{background:rgba(255,255,255,.14)!important;border-color:#fff!important;color:#fff!important;}
/* Force child text visibility in all buttons */
.btn *,.button *,a.btn *,button.btn *,.nav-consult-btn *,.filter-tab *,.filter-tabs a *,.filter-tabs button *,.pagination a *,.fg-cta-btn *,.contact-modal-submit *{color:inherit!important;}
/* Pagination non-active */
.pagination a{color:var(--fg-v25-blue)!important;background:#fff!important;border-color:var(--fg-v25-line)!important;}
.pagination a:hover{color:#fff!important;background:var(--fg-v25-blue)!important;border-color:var(--fg-v25-blue)!important;}
.pagination li.thisclass a{color:#fff!important;background:var(--fg-v25-blue)!important;border-color:var(--fg-v25-blue)!important;}
/* Card hover remains light but not noisy */
.service-card:hover,.case-card:hover,.news-card:hover,.pricing-card:hover,.fg-v18-card:hover,.ai-card:hover{transform:translateY(-3px)!important;box-shadow:0 16px 38px rgba(15,23,42,.08)!important;border-color:#c9d8ea!important;}
@media(max-width:768px){
  body{font-size:14px!important;line-height:1.72!important;}
  .nav-links a,.navbar a,.mobile-menu a{font-size:14px!important;}
  p,li,.article-content p,.case-content p,.news-detail-content p{font-size:14px!important;line-height:1.76!important;}
  h3,.service-card h3,.case-card h3,.news-card h3,.ai-card h3{font-size:17px!important;}
}
