/*
Theme Name: 承沛轴承企业官网
Theme URI: https://hnchengpei.com/en/chengpei-bearing-theme
Author: 洛阳承沛轴承科技有限公司
Author URI: https://hnchengpei.com
Description: 承沛轴承企业官网主题是一款专为精密轴承、机械制造及工业装备类企业打造的 WordPress 企业官网主题。内置首屏图片轮播、产品中心分类标签、行业应用展示、企业简介、荣誉资质、新闻资讯及在线留言表单等模块，布局简洁大气，适合制造业、重工业及 B2B 工业企业展示公司实力与产品矩阵。
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hnchengpei
Tags: one-column, two-columns, grid-layout, custom-menu, custom-logo, featured-images, footer-widgets, threaded-comments, theme-options, translation-ready, full-width-template
*/

/* =========================================================
   0. 变量与基础重置 Variables & Reset
   ========================================================= */
:root {
  --color-primary: #0a3d62;
  --color-primary-dark: #061a2e;
  --color-primary-deep: #0a2e52;
  --color-accent: #c8151b;
  --color-accent-light: #e2231a;
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-bg-soft: #f8fafc;
  --max-width: 1280px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.7;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
}

/* =========================================================
   1. 顶部导航 Header
   ========================================================= */
.site-topbar {
  background: var(--color-primary-deep);
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.site-topbar .container {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-topbar .topbar-contact span { margin-left: 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #eef1f5;
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding .logo-badge {
  width: 44px; height: 44px;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.site-branding .site-title {
  font-size: 19px; font-weight: 700; color: var(--color-primary);
  letter-spacing: .5px;
  line-height: 1.2;
}
.site-branding .site-title span { color: var(--color-accent); margin-left: 4px; }
.site-branding .site-description {
  font-size: 11px; letter-spacing: 2px; color: #94a3b8;
}

.main-navigation ul {
  display: flex;
  gap: 40px;
}
.main-navigation a {
  font-size: 15px;
  font-weight: 500;
  color: #334155;
  padding: 6px 0;
  position: relative;
  transition: color .25s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--color-accent);
}
.header-hotline {
  display: flex; align-items: center; gap: 10px;
}
.header-hotline .icon {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(10,61,98,.1); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.header-hotline .label { font-size: 11px; color: #94a3b8; }
.header-hotline .number { font-size: 16px; font-weight: 700; color: var(--color-primary); }

.menu-toggle {
  display: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  width: 42px; height: 42px;
  border-radius: 6px;
  align-items: center; justify-content: center;
}

@media (max-width: 1024px) {
  .main-navigation, .header-hotline, .site-topbar { display: none; }
  .menu-toggle { display: flex; }
}

.mobile-menu {
  display: none;
  border-top: 1px solid #eef1f5;
  background: #fff;
  padding: 10px 24px 20px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { display: flex; flex-direction: column; }
.mobile-menu a { display: block; padding: 12px 4px; font-size: 15px; font-weight: 500; border-bottom: 1px solid #f1f5f9; }

/* =========================================================
   2. 首屏 Hero（纯图轮播，无标题文字）
   ========================================================= */
.hero-slider {
  position: relative;
  height: 92vh;
  min-height: 560px;
  overflow: hidden;
  background: #0a1f33;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.05) 60%);
}
.hero-dots {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; z-index: 5;
}
.hero-dots button {
  width: 28px; height: 6px; border-radius: 999px; border: none;
  background: rgba(255,255,255,.5); transition: all .3s;
}
.hero-dots button.is-active { width: 40px; background: #fff; }

/* =========================================================
   3. 通用 Section 标题
   ========================================================= */
.section { padding: 96px 0; }
.section--soft { background: var(--color-bg-soft); }
.section-heading { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-heading .eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 4px; color: rgba(200,21,27,.7);
}
.section-heading.light .eyebrow { color: rgba(255,255,255,.5); }
.section-heading h2 {
  margin-top: 8px; font-size: 30px; font-weight: 700; color: var(--color-primary); letter-spacing: 1px;
}
.section-heading.light h2 { color: #fff; }
.section-heading .bar { display: block; width: 56px; height: 3px; background: var(--color-accent); margin: 16px auto 0; }
.section-heading p { margin-top: 16px; color: var(--color-text-light); font-size: 15px; }
.section-heading.light p { color: rgba(255,255,255,.7); }

/* =========================================================
   4. 核心优势 Advantages
   ========================================================= */
.advantages-wrap { position: relative; z-index: 5; margin-top: -72px; }
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #e2e8f0;
  gap: 1px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15,23,42,.12);
}
.advantage-card {
  background: #fff; padding: 36px 28px; transition: all .3s;
}
.advantage-card:hover { background: var(--color-primary); color: #fff; }
.advantage-card .icon {
  width: 48px; height: 48px; border-radius: 999px; background: rgba(10,61,98,.1);
  color: var(--color-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.advantage-card:hover .icon { background: rgba(255,255,255,.15); color: #fff; }
.advantage-card h3 { font-size: 16px; font-weight: 700; color: var(--color-primary); margin-bottom: 10px; }
.advantage-card:hover h3 { color: #fff; }
.advantage-card p { font-size: 14px; color: var(--color-text-light); }
.advantage-card:hover p { color: rgba(255,255,255,.8); }

@media (max-width: 900px) {
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   5. 产品中心 Products Tabs
   ========================================================= */
.tabs-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 44px; }
.tabs-nav button {
  border: 1px solid #e2e8f0; background: #fff; color: #475569;
  padding: 10px 26px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: all .25s;
}
.tabs-nav button.is-active {
  background: var(--color-primary); border-color: var(--color-primary); color: #fff;
  box-shadow: 0 10px 25px rgba(10,61,98,.2);
}
.product-grid, .tab-panel .product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.product-card {
  background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.08); transition: all .3s; position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 20px 35px rgba(15,23,42,.14); }
.product-card .thumb { height: 220px; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .thumb img { transform: scale(1.1); }
.product-card .body { padding: 20px; }
.product-card .body h3 { font-size: 16px; font-weight: 700; color: var(--color-primary); }
.product-card .body p { margin-top: 8px; font-size: 13.5px; color: var(--color-text-light); }

@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } }

.products-cta { text-align: center; margin-top: 48px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--color-primary);
  color: var(--color-primary); padding: 13px 34px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all .25s;
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* =========================================================
   6. 行业应用 Applications
   ========================================================= */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app-card {
  position: relative; height: 290px; border-radius: 6px; overflow: hidden; display: block;
  box-shadow: 0 10px 25px rgba(15,23,42,.1);
}
.app-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.app-card:hover img { transform: scale(1.1); }
.app-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,26,46,.95), rgba(6,26,46,.35) 55%, transparent);
}
.app-card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; z-index: 2; }
.app-card .info h3 { color: #fff; font-size: 20px; font-weight: 700; }
.app-card .info .bar { display: block; width: 32px; height: 2px; background: var(--color-accent); margin: 10px 0; }
.app-card .info p {
  color: rgba(255,255,255,.88); font-size: 13.5px; max-height: 0; opacity: 0; overflow: hidden; transition: all .4s;
}
.app-card:hover .info p { max-height: 160px; opacity: 1; }

@media (max-width: 1024px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .app-grid { grid-template-columns: 1fr; } }

/* =========================================================
   7. 关于我们 About
   ========================================================= */
.about-section { background: var(--color-primary-deep); color: #fff; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-grid h3 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.about-grid p { color: rgba(255,255,255,.75); font-size: 14.5px; margin-bottom: 16px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.12); }
.about-stats .num { font-size: 34px; font-weight: 700; }
.about-stats .num span { color: var(--color-accent-light); font-size: 18px; margin-left: 2px; }
.about-stats .label { margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.6); }
.about-photo { position: relative; }
.about-photo img { border-radius: 6px; height: 420px; width: 100%; object-fit: cover; box-shadow: 0 25px 50px rgba(0,0,0,.35); }
.about-photo .badge {
  position: absolute; left: -24px; bottom: -24px; background: var(--color-accent);
  color: #fff; padding: 20px; border-radius: 6px; width: 200px; box-shadow: 0 20px 35px rgba(0,0,0,.25);
}
.about-photo .badge strong { display: block; font-size: 26px; }
.about-photo .badge small { font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,.8); }

.honors { margin-top: 80px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 40px; }
.honors .tip { text-align: center; font-size: 12px; letter-spacing: 3px; color: rgba(255,255,255,.5); margin-bottom: 24px; }
.honors-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.honors-grid div {
  height: 96px; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; background: rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; padding: 10px;
  color: rgba(255,255,255,.8); transition: all .25s;
}
.honors-grid div:hover { background: rgba(255,255,255,.1); border-color: rgba(226,35,26,.6); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .honors-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .honors-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   8. 新闻资讯 News
   ========================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.news-card {
  background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,.08);
  transition: all .3s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: 0 20px 35px rgba(15,23,42,.14); }
.news-card .thumb { position: relative; height: 190px; overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .thumb img { transform: scale(1.1); }
.news-card .date-badge {
  position: absolute; left: 0; bottom: 0; background: var(--color-primary); color: #fff; padding: 8px 16px;
}
.news-card .date-badge .d { font-size: 18px; font-weight: 700; line-height: 1; }
.news-card .date-badge .y { font-size: 11px; color: rgba(255,255,255,.7); }
.news-card .body { padding: 22px; }
.news-card .body h3 { font-size: 16px; font-weight: 700; color: var(--color-primary); }
.news-card:hover .body h3 { color: var(--color-accent); }
.news-card .body p { margin-top: 10px; font-size: 13.5px; color: var(--color-text-light); }
.news-card .more { margin-top: 14px; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--color-accent); }

@media (max-width: 1024px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

/* =========================================================
   9. 联系我们 Contact
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 40px; }
.contact-info-item {
  display: flex; gap: 16px; border: 1px solid #eef1f5; border-radius: 6px; padding: 16px; margin-bottom: 16px;
}
.contact-info-item .icon {
  width: 40px; height: 40px; border-radius: 999px; background: rgba(10,61,98,.1); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-info-item .label { font-size: 12px; color: #94a3b8; }
.contact-info-item .value { font-size: 14px; font-weight: 600; color: #334155; margin-top: 2px; }

.contact-map { height: 200px; border-radius: 6px; background: #e7edf3; margin-bottom: 24px; position: relative; overflow: hidden; }
.contact-map .tag {
  position: absolute; left: 20px; top: 20px; background: rgba(255,255,255,.95); padding: 8px 16px; border-radius: 4px;
  font-size: 12px; color: #475569; box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 4px; padding: 13px 16px; font-size: 14px; font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--color-primary); }
.btn-solid {
  display: inline-flex; align-items: center; gap: 8px; background: var(--color-primary); color: #fff;
  border: none; padding: 14px 34px; border-radius: 4px; font-size: 14px; font-weight: 600; transition: background .25s;
}
.btn-solid:hover { background: var(--color-accent); }
.form-success {
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; border-radius: 6px; padding: 40px; text-align: center; font-weight: 600;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
}

/* =========================================================
   10. 页脚 Footer
   ========================================================= */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,.65); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.footer-brand .logo-badge { width: 40px; height: 40px; border-radius: 6px; background: var(--color-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.footer-brand strong { color: #fff; font-size: 16px; display: block; }
.footer-brand small { color: rgba(255,255,255,.4); letter-spacing: 1px; font-size: 11px; }
.footer-col h4 { color: #fff; font-size: 14px; letter-spacing: 2px; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 12px; font-size: 13.5px; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: 12px; color: rgba(255,255,255,.4); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* =========================================================
   11. 内页通用（文章、页面、404、搜索）
   ========================================================= */
.page-banner { background: var(--color-primary-deep); color: #fff; padding: 80px 0 48px; text-align: center; }
.page-banner h1 { font-size: 28px; font-weight: 700; }
.page-banner .crumbs { margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.6); }
.inner-content { padding: 72px 0; }
.entry-content { max-width: 860px; margin: 0 auto; }
.entry-content img { border-radius: 6px; margin: 20px 0; }
.entry-meta { color: #94a3b8; font-size: 13px; margin-bottom: 24px; }
.post-list { max-width: 860px; margin: 0 auto; display: grid; gap: 28px; }
.post-list article { display: grid; grid-template-columns: 220px 1fr; gap: 24px; border-bottom: 1px solid #eef1f5; padding-bottom: 28px; }
.post-list article .thumb { border-radius: 6px; overflow: hidden; height: 140px; }
.post-list article .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list article h2 { font-size: 18px; font-weight: 700; color: var(--color-primary); }
.post-list article h2 a:hover { color: var(--color-accent); }
.post-list article p { margin-top: 8px; color: var(--color-text-light); font-size: 14px; }
@media (max-width: 640px) { .post-list article { grid-template-columns: 1fr; } }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  border: 1px solid #e2e8f0; border-radius: 4px; font-size: 13.5px;
}
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.widget-area { max-width: 860px; margin: 40px auto 0; }
.widget { border: 1px solid #eef1f5; border-radius: 6px; padding: 24px; margin-bottom: 20px; }
.widget h2.widget-title { font-size: 15px; font-weight: 700; color: var(--color-primary); margin-bottom: 14px; }

.search-no-results { text-align: center; padding: 60px 0; color: var(--color-text-light); }

.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-respond input, .comment-respond textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 4px; padding: 12px; font-family: inherit; }
