/* ============================================
   惠丰索具 - 全局样式
   ============================================ */

/* CSS变量 */
:root {
  --primary: #003D7A;
  --accent: #FF6B00;
  --white: #FFFFFF;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --bg-light: #F5F5F5;
  --border: #E0E0E0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,61,122,0.15);
  --radius: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }

/* ---- 通用组件 ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 48px;
}
.section-header { text-align: center; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all 200ms ease-out;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 2px solid var(--accent);
}
.btn-primary:hover {
  background: #e65c00;
  border-color: #e65c00;
  box-shadow: 0 4px 12px rgba(255,107,0,0.35);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-primary-dark {
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
}
.btn-primary-dark:hover {
  background: #002d5a;
  border-color: #002d5a;
  box-shadow: 0 4px 12px rgba(0,61,122,0.35);
  transform: translateY(-2px);
}

/* ---- 导航栏 ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 128px;
  background: linear-gradient(135deg, #38BDF8 0%, #7DD3FC 45%, #BAE6FD 100%);
  z-index: 1000;
  box-shadow: 0 4px 24px rgba(6,182,212,0.25);
  transition: background var(--transition);
}
.navbar.scrolled { background: linear-gradient(135deg, rgba(56,189,248,0.97) 0%, rgba(125,211,252,0.97) 45%, rgba(186,230,253,0.97) 100%); backdrop-filter: blur(8px); }
.navbar .container {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  padding: 0 48px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0369a1;
  text-decoration: none;
  margin-left: 60px;
}
.navbar-logo .logo-img {
  height: 96px;
  width: auto;
  max-width: 360px;
  display: block;
}
/* Logo 默认隐藏，等 JS 设完 src 后才显示（避免老 logo 闪烁） */
img[data-ci-logo] { opacity: 0; transition: opacity .25s ease; }
img[data-ci-logo].logo-loaded { opacity: 1; }
/* 保留旧样式以防引用（已弃用） */
.navbar-logo .logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  flex-shrink: 0;
  overflow: hidden;
}
.navbar-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.navbar-logo .logo-icon.has-logo {
  background: transparent;
}
.navbar-logo .logo-text {
  display: none;
}
.navbar-logo .logo-zh {
  font-size: 18px;
  font-weight: 700;
}
.navbar-logo .logo-en {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.nav-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-menu a {
  color: #0369a1;
  font-size: 15px;
  padding: 6px 16px;
  border-radius: var(--radius);
  transition: all 200ms ease-out;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  line-height: 1.35;
}
.nav-menu a .nav-zh,
.nav-contact-btn .nav-zh { display: none; }
.nav-menu a .nav-en {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 1;
  text-transform: uppercase;
}
.nav-menu a:hover .nav-en,
.nav-menu a.active .nav-en {
  opacity: 1;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: #0369a1;
  background: rgba(3,41,77,0.08);
}
.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-contact-btn {
  background: var(--accent);
  color: var(--white) !important;
  padding: 6px 20px !important;
  border-radius: var(--radius);
  font-weight: 600;
  margin-left: 4px;
}
.nav-contact-btn .nav-en { opacity: 0.8 !important; }
.nav-contact-btn:hover {
  background: #e65c00 !important;
}
/* 社交媒体按钮预留区 */
.nav-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 40px;
}
/* 社交媒体图标链接 */
.nav-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: background 200ms ease, transform 200ms ease;
  text-decoration: none;
}
.nav-social-link:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.08);
}
.nav-social-link svg {
  width: 18px;
  height: 18px;
  fill: white;
  opacity: 0.88;
  transition: opacity 200ms ease;
}
.nav-social-link:hover svg {
  opacity: 1;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #0369a1;
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* 移动端导航 */
.nav-mobile {
  display: none;
  position: fixed;
  top: 96px; left: 0; right: 0;
  background: linear-gradient(180deg, #7DD3FC 0%, #BAE6FD 100%);
  padding: 12px 0;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(6,182,212,0.2);
  flex-direction: column;
}
.nav-mobile a {
  display: block;
  padding: 14px 24px;
  color: #0369a1;
  font-size: 15px;
  border-bottom: 1px solid rgba(3,41,77,0.08);
}
.nav-mobile a small {
  font-size: 11px;
  opacity: 0.5;
  margin-left: 6px;
  text-transform: uppercase;
}
.nav-mobile a:hover { background: rgba(3,41,77,0.06); color: #0369a1; }
.nav-mobile.open { display: flex; }

/* ---- Footer ---- */
.footer {
  position: relative;
  background: linear-gradient(160deg, #06B6D4 0%, #0EA5E9 40%, #67E8F9 100%);
  color: #042C53;
  padding: 80px 0 0;
  overflow: hidden;
}
/* 装饰光斑 */
.footer::after {
  content: '';
  position: absolute;
  top: -80px; right: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(3,41,77,0.12);
}
.footer-brand .logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-brand .footer-logo-img {
  height: 96px;
  width: auto;
  max-width: 360px;
  display: block;
}
.footer-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: white;
}
.footer-brand .brand-name { display: none; }
.footer-brand p { font-size: 14px; line-height: 1.35; color: #0369a1; opacity: 0.75; white-space: pre-wrap; word-break: break-word; margin: 0; }
.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: #0c447c;
  font-size: 14px;
  transition: color 200ms;
}
.footer-col ul li a:hover { color: #0369a1; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #0369a1;
}
.footer-contact-item .icon { 
  color: #0369a1;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}
.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: #0369a1;
  opacity: 0.5;
}

/* ---- 卡片通用 ---- */
.card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ---- 面包屑 ---- */
.breadcrumb {
  background: #fff;
  padding: 14px 0;
  font-size: 14px;
  color: #888;
  margin-top: 160px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ---- 页面英雄区（非首页） ---- */
.page-hero {
  background: #fff;
  color: var(--primary);
  padding: 88px 0;
  margin-top: 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: 40px; font-weight: 700; margin-bottom: 12px; color: var(--primary); }
.page-hero h1 .hero-en { display: block; font-size: 16px; font-weight: 400; color: #999; margin-top: 6px; letter-spacing: 1px; text-transform: uppercase; }
.page-hero p { font-size: 16px; color: #555; opacity: 1; line-height: 1.8; }
.page-hero p .hero-en-sub { display: block; font-size: 14px; color: #aaa; margin-top: 2px; }

/* ---- 悬浮咨询按钮 ---- */
.float-consult {
  position: fixed;
  right: 24px;
  bottom: 80px;
  background: var(--accent);
  color: white;
  border-radius: 50px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(255,107,0,0.4);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  cursor: pointer;
}
.float-consult:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 8px 28px rgba(255,107,0,0.5);
}
.float-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,61,122,0.3);
  z-index: 900;
  transition: all var(--transition);
  cursor: pointer;
  opacity: 0;
}
.float-top.show { opacity: 1; }
.float-top:hover { background: #002d5a; transform: translateY(-2px); }

/* ---- 询盘弹窗 ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: white;
  border-radius: 8px;
  padding: 40px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(20px);
  transition: transform 0.3s;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-box h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.modal-box p { font-size: 14px; color: #888; margin-bottom: 24px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: #555; }
.modal-box { position: relative; }

/* ---- 表单样式 ---- */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-group label .req { color: var(--accent); margin-left: 2px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  transition: border-color 200ms;
  background: white;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 200ms;
  margin-top: 8px;
}
.form-submit:hover { background: #e65c00; transform: translateY(-2px); }
.success-tip {
  text-align: center;
  padding: 24px 0;
  display: none;
}
.success-tip .icon { font-size: 48px; margin-bottom: 12px; }
.success-tip h4 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.success-tip p { font-size: 14px; color: #888; }

/* ---- 响应式 ---- */
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .navbar { height: 96px; }
  .navbar-logo { flex-shrink: 0; }
  .navbar-logo .logo-img { height: auto; max-height: 48px; width: auto; max-width: 60vw; }
  .navbar .container { padding: 0 12px; }
  .nav-menu, .nav-contact-btn { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-title { font-size: 26px; }
  .section-subtitle { font-size: 14px; margin-bottom: 32px; }
  .page-hero h1 { font-size: 28px; }
  .container { padding: 0 16px; }
  .btn { padding: 10px 20px; font-size: 14px; }
  .form-row { grid-template-columns: 1fr; }
  .float-consult .consult-text { display: none; }
  .float-consult { padding: 14px; border-radius: 50%; }

  /* 弹窗移动端适配 */
  .modal-box { padding: 28px 20px; width: 94%; }
  .modal-box h3 { font-size: 20px; }
  .modal-close { top: 12px; right: 16px; font-size: 22px; }

  /* 面包屑移动端 */
  .breadcrumb { padding: 12px 0; font-size: 13px; margin-top: 140px; }
  .breadcrumb span { margin: 0 4px; }
}
