/* ==========================================
   公共样式 - 所有页面共享
   引入顺序：style.css（公共）→ 页面独有 css
   页面独有 css 文件名与 html 文件名一致，
   如：index.html → css/index.css，about.html → css/about.css
   ========================================== */

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 底部 */
.top-bar {
  background: #f5f5f5;
  font-size: 12px;
  color: #666;
  padding: 15px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: #00a651;
}

.top-item {
  margin-left: 15px;
}

/* 顶部导航 */
.header {
  background: #fff;
  border-top: 4px solid #00a651;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 86px;
}

.logo a {
  display: block;
}

.logo a img {
  width: 292px;
}

.logo a h1 {
  font-size: 20px;
  color: #2c3e50;
  line-height: 1.2;
  font-weight: 700;
}

.logo a span {
  font-size: 10px;
  color: #7f8c8d;
  letter-spacing: 0.5px;
}

.nav ul {
  display: flex;
  list-style: none;
}

.nav li {
  margin-left: 32px;
}

.nav a {
  display: block;
  padding: 31px 0;
  font-size: 15px;
  color: #555;
  position: relative;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav li.active a,
.nav a:hover {
  color: #00a651;
}

.nav li.active a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #00a651;
}

/* 汉堡菜单按钮（桌面端隐藏） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #2c3e50;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 公共标题 */
.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  color: #333;
  font-weight: normal;
  margin-bottom: 12px;
}

.section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: #00a651;
  margin: 12px auto 0;
}

.section-subtitle {
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* 子页面标题（div 结构） */
div.section-title {
  text-align: center;
  margin-bottom: 45px;
}

div.section-title h3 {
  font-size: 30px;
  color: #333;
  font-weight: normal;
}

div.section-title span {
  font-size: 12px;
  color: #999;
  letter-spacing: 3px;
  text-transform: uppercase;
}

div.section-title p {
  font-size: 14px;
  color: #888;
  margin-top: 8px;
}

div.section-title::after {
  margin-top: 15px;
}

/* 案例网格（首页 / 案例页共用） */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.case-item {
  background: #fff;
}

.case-img {
  overflow: hidden;
}

.case-img img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.5s;
}

.case-item:hover .case-img img {
  transform: scale(1.05);
}

.case-item h4 {
  font-size: 16px;
  color: #333;
  font-weight: normal;
  margin: 15px 15px 5px;
}

.case-item p {
  font-size: 13px;
  color: #999;
  margin: 0 15px 15px;
}

/* 子页面横幅 */
.page-banner {
  height: 280px;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("https://images.unsplash.com/photo-1497366216548-37526070297c?w=1920&q=80") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.page-banner h2 {
  font-size: 36px;
  font-weight: normal;
  margin-bottom: 10px;
}

.page-banner p {
  font-size: 14px;
  opacity: 0.9;
}

.breadcrumb {
  background: #f9f9f9;
  padding: 12px 0;
  font-size: 13px;
  color: #666;
}

.breadcrumb a {
  color: #666;
}

.breadcrumb a:hover {
  color: #00a651;
}

/* 表单控件（首页 / 联系页共用） */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  font-size: 13px;
  color: #555;
  outline: none;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00a651;
}

.contact-form textarea {
  height: 120px;
  resize: vertical;
}

.contact-form button {
  padding: 8px 28px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  font-size: 13px;
  transition: all 0.3s;
}

.contact-form button:hover {
  background: #00a651;
  color: #fff;
  border-color: #00a651;
}

/* 通用按钮 */
.btn {
  display: inline-block;
  padding: 11px 30px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  line-height: 1.4;
}

.btn-primary {
  background: #00a651;
  border-color: #00a651;
  color: #fff;
}

.btn-primary:hover {
  background: #008f45;
  border-color: #008f45;
}

.btn-block {
  display: block;
  width: 100%;
}

/* 页脚 */
.footer {
  background: #222;
  color: #888;
  font-size: 12px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 40px;
  padding: 60px 0 40px;
  text-align: left;
}

.footer-grid h4 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 20px;
  font-weight: normal;
}

.footer-grid p,
.footer-grid a,
.footer-grid li {
  font-size: 13px;
  color: #aaa;
  line-height: 1.8;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: #00a651;
}

.footer-qr img {
  width: 100px;
  height: 100px;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: #888;
}

/* 右侧悬浮工具栏 */
.float-tool {
  position: fixed;
  right: 0;
  top: 60%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.float-tool .float-item {
  width: 56px;
  height: 56px;
  background: #00a651;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  gap: 5px;
  transition: background 0.3s;
  border-radius: 3px;
}

.float-tool .float-item:hover {
  background: #008f45;
}

.float-tool .float-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 2px;
}

.float-tool .float-label {
  font-size: 10px;
  line-height: 1;
}

.phone-number {
  margin-left: 5px;
}

.phone-tooltip .fa-phone-alt {
  font-size: 14px;
}

/* 电话项 hover 向左展开号码 */
.float-tool .phone-item {
  position: relative;
}

.float-tool .phone-tooltip {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  background: #00a651;
  color: #fff;
  font-size: 10x;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.float-tool .phone-item:hover .phone-tooltip {
  width: auto;
  padding: 8px 14px;
  opacity: 1;
  border-radius: 3px;
}

/* 悬浮二维码弹层 */
.float-tool .qr-popup {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
  text-align: center;
  display: none;
}

.float-tool .qr-popup img {
  width: 100%;
  margin-bottom: 6px;
}

.float-tool .qr-popup p {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.float-tool .qr-trigger:hover .qr-popup {
  display: block;
}

/* 联系 CTA */
.cta-banner {
  background: #1a1d21;
  color: #fff;
  text-align: center;
  padding: 42px 0;
}

.cta-banner p {
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.cta-banner .highlight {
  color: #00a651;
}

.cta-banner .en {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

/* 联系我们 */
.contact .section-title {
  text-align: left;
  font-size: 20px;
  margin-bottom: 30px;
}

.contact .section-title .en {
  font-size: 11px;
  color: #999;
}

.contact .section-title::after {
  margin: 10px 0 0;
}

.contact-content {
  display: flex;
  gap: 80px;
}

.contact-content .contact-info {
  flex: 1;
}

.contact-content .contact-info h3 {
  font-size: 17px;
  color: #333;
  margin-bottom: 22px;
  font-weight: normal;
}

.contact-content .contact-info p {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}

.contact-content .contact-form {
  flex: 1;
}

/* 响应式 */

/* 平板/窄桌面：压缩导航间距与字号，避免链接换行 */
@media (max-width: 1200px) and (min-width: 993px) {
  .nav li {
    margin-left: 20px;
  }

  .nav a {
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  .header-inner {
    height: 76px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: none;
  }

  .nav.open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
  }

  .nav li {
    margin-left: 0;
  }

  .nav a {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f5;
  }

  .nav li.active a::after {
    display: none;
  }

  .nav li.active a {
    color: #00a651;
    background: #f2faf6;
  }

  .top-bar .container {
    flex-direction: column;
    gap: 5px;
  }

  .top-item {
    margin-left: 0px;
    margin-right: 10px;
  }

  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-info,
  .contact-form {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .page-banner {
    height: 220px;
    width: 100%;
  }

  .page-banner h2 {
    font-size: 28px;
  }

  .contact-content {
    flex-direction: column;
    gap: 30px;
  }

  .contact .section-title {
    text-align: center;
  }

  .contact .section-title::after {
    margin: 10px auto 0;
  }

  .logo a img {
    width: 226px;
  }
}

@media (max-width: 576px) {
  .section {
    padding: 45px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .float-tool {
    top: auto;
    bottom: 80px;
    transform: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner p {
    font-size: 16px;
  }
}

@media (max-width: 375px) {
  .header-inner {
    height: 62px;
  }

  .logo a img {
    width: 168px;
  }
}