/**
 * 免费商用字体方案（本地 + 官方 CDN）
 * - 英文展示：Outfit（SIL OFL 1.1，本地托管）
 * - 中文/正文：MiSans 小米字体（免费商用，官方 CDN 按需子集）
 * - 不引用 Google Fonts
 * - 图标字体（Glyphicons 等）不在此覆盖
 *
 * 许可备忘：
 * - Outfit: https://github.com/Outfitio/Outfit-Fonts (OFL-1.1)
 * - MiSans: https://hyperos.mi.com/font （小米免费商用授权）
 */

/* ========== Outfit：英文标题 / 数字 / Latin UI ========== */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/outfit/outfit-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/outfit/outfit-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit/outfit-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/outfit/outfit-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/outfit/outfit-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-sans:
    "MiSans",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    system-ui,
    sans-serif;

  --font-display:
    "MiSans",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    system-ui,
    sans-serif;

  --font-latin:
    "Outfit",
    "MiSans",
    system-ui,
    sans-serif;

  --pl-sans: var(--font-sans);
  --pl-display: var(--font-display);
  --pl-latin: var(--font-latin);
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-sans) !important;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.pl-home,
body.pl-page,
.pl-wrap,
.pl-navbar,
.pl-hero,
.pl-works,
.pl-newsfeed,
.pl-insight,
.pl-cta,
.pl-footer,
.pl-news,
.pl-detail,
.pl-cases,
.pl-article,
.pl-pro,
.contents,
.foot_list,
.copyright,
.list_news,
.navbar,
.container,
.container-fluid {
  font-family: var(--font-sans) !important;
}

body,
th,
td {
  font-family: var(--font-sans) !important;
}

/* 覆盖旧站 opensans / Arial 硬编码 */
.navbar-default .navbar-nav > li > a,
.nav_small > li > a,
.product_desc,
.index_news li a,
.index_contact,
.page a,
.page a:hover,
.page a:focus,
.page .current,
.pagelist,
.pagelist a,
.pagelist li {
  font-family: var(--font-latin) !important;
}

.contents_title,
.left_h1,
.product_h1,
.product_title,
.list_box h2 {
  font-family: var(--font-display) !important;
}

/* 英文大标题 / 数字 / 英文标签走 Outfit */
.pl-hero__en,
.pl-head__en,
.pl-strip__num,
.pl-strip__num .pl-count,
.pl-count,
.pl-marquee__track,
.pl-navbar__tel strong,
.pl-cap__idx,
.pl-insight__idx,
.pl-work__meta span,
.pl-latin {
  font-family: var(--font-latin) !important;
}

/* 中文主标题走 MiSans，略收紧字距更有设计感 */
.pl-hero__title,
.pl-head__zh,
.pl-head__zh a,
.pl-cta__title,
.pl-pagehero__title,
.pl-article__title,
h1, h2, h3 {
  font-family: var(--font-display) !important;
  letter-spacing: 0.04em;
}

.pl-hero__en {
  letter-spacing: -0.035em !important;
  font-weight: 800 !important;
}

.pl-hero__title {
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
}

.pl-hero__desc {
  font-weight: 400 !important;
  letter-spacing: 0.02em;
}

/* 保留 Glyphicons 图标字体，不被全局覆盖 */
.glyphicon {
  font-family: "Glyphicons Halflings" !important;
}

/* 顶部右侧：图二效果 —— 电话+国旗同一行，搜索框在下一行 */
header {
  padding-top: 10px !important;
  padding-bottom: 0 !important;
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 0;
}
.header-logo {
  flex: 1 1 auto;
  min-width: 0;
}
.header-logo .logo,
#logo .logo {
  display: block;
  margin: 0 !important;
  max-height: 70px;
  width: auto;
  max-width: 100%;
}
.header-aside,
#topsearch {
  flex: 0 0 auto;
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 0;
  overflow: visible;
}
/* 第一行：电话 + 国旗 */
.header-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  line-height: 1;
}
.header-tel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
  line-height: 1;
  min-width: 0;
}
.header-tel__icon {
  height: 18px;
  width: auto;
  flex-shrink: 0;
}
.header-tel__num {
  font-family: var(--font-latin) !important;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  letter-spacing: 0;
  white-space: nowrap;
}
.header-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.header-lang img {
  height: 14px;
  width: auto;
  display: block;
}
/* 第二行：搜索框（略宽于上行内容） */
#topsearch .search_group,
.header-aside .search_group {
  margin: 0 !important;
  float: none !important;
  width: 100%;
  display: table;
}
#topsearch .search_group input.form-control,
.header-aside .search_group input.form-control {
  padding: 5px 10px !important;
  height: 32px !important;
  font-size: 13px;
}
#topsearch #submit_search,
.header-aside #submit_search {
  font-size: 15px;
  padding: 5px 10px;
  line-height: 22px;
}
@media screen and (min-width: 769px) {
  header .navbar {
    margin-top: 12px !important;
  }
}
@media screen and (max-width: 768px) {
  .header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .header-logo .logo,
  #logo .logo {
    margin: 0 auto !important;
    max-height: 56px;
  }
  .header-aside,
  #topsearch {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}
