/* 弘毅养正 - 统一头部样式 */

/* 确保body无外边距 */
body {
  margin: 0 !important;
  padding: 0 !important;
}

/* 顶部信息栏 */
.topbar {
  background: #0f766e !important;
  color: #fff;
  font-size: 13px;
  margin: 0 !important;
  border: none !important;
  display: block !important;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  gap: 16px;
}
.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
}
.topbar-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.95;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar-right a {
  padding: 4px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.topbar-right a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.top-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.top-phone-btn:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.30);
  transform: translateY(-1px);
}

.top-phone-btn:active {
  transform: translateY(0);
}

.top-phone-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.95;
}

.top-phone-text {
  line-height: 1;
}
/* 导航头部 */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 12px 0;
}
.header-block { display: flex; align-items: center; }
.logo-block { flex-shrink: 0; }
.site-logo { width: auto; height: auto; max-height: 80px; object-fit: contain; }
.info-block { flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; }
.service-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.service-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.contact-block { flex-shrink: 0; flex-direction: column; align-items: flex-end; }
.contact-hotline { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.hotline-label { font-size: 13px; color: var(--text-3); }
.hotline-number { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -0.01em; }
.contact-tip {
  font-size: 12px;
  color: #fff;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 4px;
}

.header-nav { background: #0f766e; position: relative; z-index: 1000; overflow: visible; }
.nav-list { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.nav-list li { position: relative; }
.nav-list > li > a {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li > a.active { color: #fff; }
.nav-list > li > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.nav-list > li > a:hover::after,
.nav-list > li > a.active::after { transform: translateX(-50%) scaleX(1); }

.nav-list .has-dropdown > a { padding-right: 34px; }
.nav-list .has-dropdown > a::before {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: 0.9;
}
.nav-list .dropdown {
  display: none;
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%) translateY(0);
  background: #fff;
  min-width: 170px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  overflow: hidden;
  padding: 8px 0;
  z-index: 1200;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-list .has-dropdown:hover .dropdown,
.nav-list .has-dropdown:focus-within .dropdown { display: block; }
.nav-list .dropdown a {
  display: block;
  color: var(--text);
  padding: 10px 18px;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, padding 0.2s ease;
}
.nav-list .dropdown a:hover {
  background: var(--primary-light);
  color: var(--primary);
  padding-left: 22px;
}

/* 汉堡菜单按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  border: none;
  position: relative;
  z-index: 10000;
}
.hamburger-line { display: block; width: 20px; height: 2px; background: #333; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.hamburger.active .hamburger-line:nth-child(1),
.hamburger.open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active .hamburger-line:nth-child(2),
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3),
.hamburger.open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* 移动端菜单 */
#mobileMenu.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}
#mobileMenu.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#mobileMenu .mobile-menu-panel {
  width: min(86vw, 380px);
  height: 100%;
  max-height: 100vh;
  background: #fff;
  border-radius: 0;
  box-shadow: -18px 0 60px rgba(15, 23, 42, 0.22);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 64px 14px calc(16px + env(safe-area-inset-bottom));
  transform: translateX(110%);
  transition: transform 0.28s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

#mobileMenu.mobile-menu.open .mobile-menu-panel {
  transform: translateX(0);
}

/* 移动端关闭按钮 */
.mobile-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #0f172a;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}
.mobile-close-btn:active {
  transform: scale(0.98);
  background: rgba(241, 245, 249, 1);
  border-color: rgba(203, 213, 225, 1);
}

/* 移动端导航项 */
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin: 8px 0;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  min-height: 46px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  background: #f8fafc;
}
.mobile-nav-link:active { 
  background: #eef2ff;
  border-color: #e0e7ff;
  color: #0f172a;
  transform: scale(0.99);
}

/* 移动端箭头 */
.mobile-nav-arrow {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  transition: transform 0.3s;
}
.mobile-nav-toggle.active .mobile-nav-arrow {
  transform: rotate(180deg);
}

/* 移动端子菜单 */
.mobile-nav-group {
  border-bottom: none;
}
.mobile-sub-menu {
  display: none;
  background: transparent;
  padding: 0 4px 6px;
}
.mobile-sub-menu.open {
  display: block;
}
.mobile-sub-link {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.78);
  border: 1px solid #eef2f7;
  border-radius: 12px;
  min-height: 42px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  font-weight: 600;
  margin: 8px 0 0;
  background: #fff;
}
.mobile-sub-link:last-child {
  border-bottom: none;
}
.mobile-sub-link:active {
  background: var(--primary-light);
  border-color: rgba(27, 139, 90, 0.25);
  color: var(--primary);
  transform: scale(0.99);
}

/* 移动端底部按钮 */
.mobile-cta { 
  padding: 14px; 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  margin: auto 0 0;
  background: #ffffff;
  border-top: none;
  border-radius: 16px;
  box-shadow: none;
  border: 1px solid #eef2f7;
}
.mobile-phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #1B8B5A;
  background: #f0faf5;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.mobile-phone-btn:active {
  background: #e0f5ec;
}
.mobile-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1B8B5A, #2AA670);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(27,139,90,0.25);
  transition: all 0.2s;
}
.mobile-cta-btn:active {
  background: linear-gradient(135deg, #147048, #1B8B5A);
}

/* 响应式 - 头部 */
@media (max-width: 1100px) {
  .site-logo { height: 72px; }
  .nav-list > li > a { padding: 12px 14px; font-size: 14px; }
}

@media (max-width: 1024px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
  .header-top { gap: 16px; padding: 0; height: 60px; }
  .logo-block { height: 100%; line-height: 0; }
  .site-logo { height: 100%; max-height: 100%; }
  .info-block, .contact-block { display: none; }
  .hamburger { margin-left: auto; }
}

@media (max-width: 768px) {
  .topbar { display: none !important; }
  .header-top { height: 54px; }
  .mobile-nav-link { padding: 16px 20px; font-size: 15px; }
  .mobile-sub-link { padding: 12px 20px 12px 40px; font-size: 14px; }
}
