/*
Theme Name: 汇正铝艺
Theme URI: https://www.workbuddy.cn
Description: 长沙汇正铝艺有限公司企业官网 WordPress 主题 —— 铝艺围栏、铝艺庭院大门。灰色工业质感企业站模板。
Version: 1.0.0
Author: WorkBuddy
Author URI: https://www.workbuddy.cn
Tags: gray, corporate, aluminum, fencing, custom-post-type, responsive, accessibility-ready
Text Domain: huizheng-aluminum
Domain Path: /languages
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
*/

/* =========================================================
   汇正铝艺 · 灰色企业主题
   设计基调：冷灰金属质感，沉稳、专业、工业风
   ========================================================= */

:root {
  --hz-gray-900: #1f242b;   /* 最深背景 */
  --hz-gray-800: #2c333d;   /* 深色块 */
  --hz-gray-700: #3a424d;
  --hz-gray-600: #4d5663;   /* 主色 / 标题 */
  --hz-gray-500: #6b7480;   /* 次主色 */
  --hz-gray-400: #9aa3ad;
  --hz-gray-300: #c4cad1;
  --hz-gray-200: #e3e7eb;
  --hz-gray-100: #f2f4f7;   /* 浅灰背景 */
  --hz-gray-50:  #f8fafc;
  --hz-accent:   #7d8794;   /* 金属灰点缀 */
  --hz-line:     #dfe3e8;
  --hz-text:     #333a42;
  --hz-text-soft:#5a636e;
  --hz-white:    #ffffff;
  --hz-radius:   6px;
  --hz-shadow:   0 6px 22px rgba(31,36,43,.08);
  --hz-shadow-lg:0 12px 40px rgba(31,36,43,.14);
  --hz-maxw:     1200px;
  --hz-font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--hz-font);
  color: var(--hz-text);
  background: var(--hz-white);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hz-gray-600); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--hz-gray-900); }

h1, h2, h3, h4, h5, h6 { color: var(--hz-gray-800); line-height: 1.35; font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 1.2em; }

.container { width: 100%; max-width: var(--hz-maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 布局辅助 ---------- */
.section { padding: 64px 0; }
.section--gray { background: var(--hz-gray-100); }
.section--dark { background: var(--hz-gray-900); color: #d7dce2; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section-title { text-align: center; margin-bottom: 14px; position: relative; padding-bottom: 16px; }
.section-title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 56px; height: 3px; background: var(--hz-gray-500); border-radius: 3px;
}
.section-sub { text-align: center; color: var(--hz-text-soft); margin-bottom: 40px; font-size: 15px; }

.btn {
  display: inline-block; padding: 12px 30px; background: var(--hz-gray-600);
  color: #fff; border-radius: var(--hz-radius); font-size: 15px; letter-spacing: 1px;
  border: 1px solid var(--hz-gray-600); transition: all .25s ease; cursor: pointer;
}
.btn:hover { background: var(--hz-gray-800); border-color: var(--hz-gray-800); color: #fff; }
.btn--ghost { background: transparent; color: var(--hz-gray-700); border-color: var(--hz-gray-300); }
.btn--ghost:hover { background: var(--hz-gray-100); color: var(--hz-gray-800); border-color: var(--hz-gray-400); }
.btn--light { background: #fff; color: var(--hz-gray-800); border-color: #fff; }
.btn--light:hover { background: var(--hz-gray-100); }

/* =========================================================
   顶部工具条
   ========================================================= */
.topbar { background: var(--hz-gray-900); color: #b9c0c9; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 42px; flex-wrap: wrap; gap: 10px; }
.topbar a { color: #b9c0c9; }
.topbar a:hover { color: #fff; }
.topbar__info span { margin-right: 18px; }
.topbar__info i { font-style: normal; color: var(--hz-gray-400); }

/* =========================================================
   站点头部 / 导航
   ========================================================= */
.site-header { background: #fff; border-bottom: 1px solid var(--hz-line); position: sticky; top: 0; z-index: 99; box-shadow: 0 2px 10px rgba(31,36,43,.04); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 78px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 46px; height: 46px; background: linear-gradient(135deg, var(--hz-gray-600), var(--hz-gray-800)); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 20px; }
.brand__name { font-size: 18px; font-weight: 700; color: var(--hz-gray-800); line-height: 1.1; }
.brand__name a { color: inherit; text-decoration: none; }
.brand__slogan { font-size: 12px; color: var(--hz-text-soft); letter-spacing: 1px; }

.main-nav { margin-left: auto; flex: 1 1 auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 9px 11px; color: var(--hz-gray-700); font-size: 14px; font-weight: 500;
  border-radius: 4px; position: relative; white-space: nowrap;
}
.main-nav a:hover, .main-nav li.current-menu-item > a, .main-nav li.current_page_item > a {
  color: #fff; background: var(--hz-gray-600);
}
.main-nav li ul { /* 二级菜单 */
  position: absolute; top: 100%; left: 0; background: #fff; min-width: 180px;
  box-shadow: var(--hz-shadow); border-radius: 6px; padding: 6px 0; display: none; z-index: 100;
}
.main-nav li:hover > ul { display: block; }
.main-nav li ul a { color: var(--hz-gray-700); }
.main-nav li ul a:hover { background: var(--hz-gray-100); color: var(--hz-gray-900); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--hz-gray-700); margin: 5px 0; transition: .3s; }

/* =========================================================
   首页 Hero / 轮播
   ========================================================= */
.hero { position: relative; background: var(--hz-gray-800); color: #fff; overflow: hidden; }
.hero__slide { min-height: 520px; display: flex; align-items: center; position: relative; }
.hero__slide::before { content:""; position:absolute; inset:0; background: linear-gradient(120deg, rgba(31,36,43,.92), rgba(31,36,43,.55)); }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__inner { position: relative; z-index: 2; max-width: 640px; }
.hero__inner h1 { color: #fff; font-size: 40px; margin-bottom: 18px; }
.hero__inner p { color: #cfd5dc; font-size: 17px; margin-bottom: 28px; }
.hero__dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero__dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; }
.hero__dots button.active { background: #fff; width: 26px; border-radius: 6px; }

/* =========================================================
   首页区块：特色栅格
   ========================================================= */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card { background: #fff; border: 1px solid var(--hz-line); border-radius: var(--hz-radius); padding: 32px 26px; box-shadow: var(--hz-shadow); transition: transform .3s ease, box-shadow .3s ease; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--hz-shadow-lg); }
.feature-card__icon { width: 52px; height: 52px; border-radius: 12px; background: var(--hz-gray-100); color: var(--hz-gray-600); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px; }
.feature-card h3 { font-size: 18px; }
.feature-card p { color: var(--hz-text-soft); font-size: 14px; }

/* 产品 / 案例卡片 */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: #fff; border: 1px solid var(--hz-line); border-radius: var(--hz-radius); overflow: hidden; box-shadow: var(--hz-shadow); transition: transform .3s ease, box-shadow .3s ease; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--hz-shadow-lg); }
.post-card__thumb { aspect-ratio: 4/3; background: var(--hz-gray-100); overflow: hidden; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.06); }
.post-card__body { padding: 20px 22px; }
.post-card__cat { font-size: 12px; color: var(--hz-gray-500); letter-spacing: 1px; text-transform: uppercase; }
.post-card__title { font-size: 17px; margin: 6px 0 10px; }
.post-card__title a { color: var(--hz-gray-800); }
.post-card__excerpt { color: var(--hz-text-soft); font-size: 14px; margin: 0; }
.post-card__meta { font-size: 13px; color: var(--hz-gray-400); margin-top: 14px; border-top: 1px solid var(--hz-line); padding-top: 12px; }

/* 数据条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat__num { font-size: 40px; font-weight: 800; color: var(--hz-gray-700); }
.stat__label { color: var(--hz-text-soft); font-size: 14px; }

/* CTA 联系 */
.cta-band { background: linear-gradient(120deg, var(--hz-gray-700), var(--hz-gray-900)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfd5dc; }

/* =========================================================
   面包屑 / 内页头部
   ========================================================= */
.page-hero { background: var(--hz-gray-800); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; font-size: 30px; margin: 0 0 8px; }
.page-hero .breadcrumb { font-size: 13px; color: #aeb6bf; }
.page-hero .breadcrumb a { color: #cfd5dc; }

.breadcrumb { font-size: 13px; color: var(--hz-gray-400); margin-bottom: 8px; }
.breadcrumb a { color: var(--hz-gray-500); }

/* =========================================================
   内容布局（侧栏）
   ========================================================= */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.home-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.sidebar { background: var(--hz-gray-100); border: 1px solid var(--hz-line); border-radius: var(--hz-radius); padding: 24px; }
.widget { margin-bottom: 28px; }
.widget:last-child { margin-bottom: 0; }
.widget__title { font-size: 16px; margin-bottom: 14px; padding-left: 12px; border-left: 3px solid var(--hz-gray-500); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px dashed var(--hz-line); }
.widget ul li a { color: var(--hz-text-soft); }
.widget ul li a:hover { color: var(--hz-gray-800); }

/* 文章正文 */
.entry-content { color: var(--hz-text); }
.entry-content img { border-radius: var(--hz-radius); margin: 18px 0; }
.entry-meta { color: var(--hz-gray-400); font-size: 13px; margin-bottom: 18px; }
.entry-title { font-size: 28px; }

/* 分页 */
.pagination { text-align: center; margin-top: 40px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid var(--hz-line); border-radius: 4px; color: var(--hz-gray-600); }
.pagination .current, .pagination a:hover { background: var(--hz-gray-600); color: #fff; border-color: var(--hz-gray-600); }

/* =========================================================
   公司介绍 / 关于
   ========================================================= */
.about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-intro__img { aspect-ratio: 4/3; background: var(--hz-gray-100); border-radius: var(--hz-radius); overflow: hidden; }
.about-intro__img img { width: 100%; height: 100%; object-fit: cover; }

/* 优势列表 */
.adv-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.adv-item { display: flex; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--hz-line); border-radius: var(--hz-radius); }
.adv-item__no { font-size: 26px; font-weight: 800; color: var(--hz-gray-300); line-height: 1; }
.adv-item h4 { margin: 0 0 6px; font-size: 16px; }
.adv-item p { margin: 0; font-size: 14px; color: var(--hz-text-soft); }

/* =========================================================
   常见问题 FAQ（手风琴）
   ========================================================= */
.faq-item { border: 1px solid var(--hz-line); border-radius: var(--hz-radius); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item__q { padding: 18px 22px; cursor: pointer; font-weight: 600; color: var(--hz-gray-800); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item__q .ic { transition: transform .3s ease; color: var(--hz-gray-500); font-size: 20px; }
.faq-item.open .faq-item__q .ic { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item__a-inner { padding: 0 22px 18px; color: var(--hz-text-soft); font-size: 14px; }

/* =========================================================
   企业历程 时间线
   ========================================================= */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding-left: 30px; }
.timeline::before { content:""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--hz-gray-300); }
.timeline__item { position: relative; padding: 0 0 34px 30px; }
.timeline__item::before { content:""; position: absolute; left: -30px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--hz-gray-600); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--hz-gray-300); }
.timeline__year { font-size: 20px; font-weight: 800; color: var(--hz-gray-700); }
.timeline__title { font-weight: 700; color: var(--hz-gray-800); margin: 4px 0 6px; }
.timeline__desc { color: var(--hz-text-soft); font-size: 14px; }

/* =========================================================
   企业荣誉
   ========================================================= */
.honor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.honor-card { background: #fff; border: 1px solid var(--hz-line); border-radius: var(--hz-radius); padding: 28px; text-align: center; box-shadow: var(--hz-shadow); }
.honor-card__badge { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%; background: var(--hz-gray-100); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--hz-gray-600); }
.honor-card h4 { margin: 0 0 6px; }
.honor-card p { font-size: 13px; color: var(--hz-text-soft); margin: 0; }

/* =========================================================
   联系我们
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info__item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-info__ic { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--hz-gray-100); color: var(--hz-gray-600); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.contact-info__item h4 { margin: 0 0 2px; font-size: 15px; }
.contact-info__item p { margin: 0; color: var(--hz-text-soft); font-size: 14px; }
.map-box { aspect-ratio: 16/9; background: var(--hz-gray-100); border-radius: var(--hz-radius); overflow: hidden; border: 1px solid var(--hz-line); display:flex; align-items:center; justify-content:center; color: var(--hz-gray-400); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--hz-gray-700); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hz-line); border-radius: var(--hz-radius);
  font-family: inherit; font-size: 14px; color: var(--hz-text); background: #fff; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--hz-gray-500); }
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 13px; color: var(--hz-gray-400); margin-top: 8px; }

/* =========================================================
   站点底部
   ========================================================= */
.site-footer { background: var(--hz-gray-900); color: #aeb6bf; padding: 52px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content:""; position: absolute; left: 0; bottom: 0; width: 32px; height: 2px; background: var(--hz-gray-500); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { padding: 6px 0; }
.footer-col ul li a { color: #aeb6bf; }
.footer-col ul li a:hover { color: #fff; }
.footer-col p { font-size: 14px; color: #9aa3ad; }
.footer-brand .brand__name { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding: 18px 0; font-size: 13px; text-align: center; color: #8b939d; }
.footer-bottom a { color: #aeb6bf; }

/* =========================================================
   返回顶部
   ========================================================= */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--hz-gray-700); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: .3s; z-index: 90; box-shadow: var(--hz-shadow); }
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--hz-gray-900); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1100px) {
  .brand__slogan { display: none; }
  .main-nav { width: 100%; margin-left: 0; margin-top: 6px; }
  .main-nav ul { justify-content: center; }
  .feature-grid, .card-grid, .honor-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .home-split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-intro, .contact-grid { grid-template-columns: 1fr; }
  .adv-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .site-header .container { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li ul { position: static; box-shadow: none; padding-left: 16px; display: none; }
  .main-nav li:hover > ul { display: none; }
  .main-nav li.open > ul { display: block; }
  .hero__inner h1 { font-size: 28px; }
  .feature-grid, .card-grid, .honor-grid, .stats, .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
