/* ==========================================================
   layout.css · 顶部通栏 / 导航栏 / 页脚 / 悬浮工具栏
   ========================================================== */

/* ---------------- 顶部通栏 ---------------- */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-dark);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  position: relative;
  z-index: 80;
}
.topbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__left { display: flex; align-items: center; gap: 14px; }
.topbar__date { color: rgba(255, 255, 255, .5); }
.topbar__right { display: flex; align-items: center; gap: 18px; }
.topbar__right a { color: rgba(255, 255, 255, .78); }
.topbar__right a:hover { color: #fff; }
.topbar__tel { color: var(--c-tech); font-weight: 600; }
.topbar__sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .2); }

/* ---------------- 导航栏 ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--header-h);
  background: #fff;
  transition: box-shadow var(--dur) var(--ease);
}
.header.is-stuck { box-shadow: var(--sh-header); }
.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo img { height: 48px; width: auto; }
.logo__text { font-size: 24px; font-weight: 700; letter-spacing: 1px; color: var(--t-main); }
.logo__text span { color: var(--c-primary); }

.nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.nav__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0;
}
.nav__item { position: relative; flex: 0 0 auto; }
.nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: var(--header-h);
  padding: 0 clamp(6px, .85vw, 11px);
  font-size: clamp(13.5px, 1.08vw, 15px);
  font-weight: 500;
  color: var(--t-main);
  position: relative;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: color var(--dur) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover { color: var(--c-primary); }
.nav__link:hover::after,
.nav__item.is-active > .nav__link::after { transform: scaleX(1); }
.nav__item.is-active > .nav__link { color: var(--c-primary); font-weight: 600; }
.nav__caret { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.nav__item:hover .nav__caret { transform: rotate(180deg); }

/* 下拉菜单 */
.nav__dropdown {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 176px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(15, 23, 42, .14);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  transition-delay: 0s;
}
.nav__item:hover .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: .2s;
}
.nav__dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  color: var(--t-main);
  white-space: nowrap;
}
.nav__dropdown a:hover { background: var(--c-primary-light); color: var(--c-primary); }
.nav__dropdown .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-primary); flex: none; }

.header__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.header__tel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary);
  font-family: var(--font-num);
}

/* 中屏（1024-1279）：收起顶部电话，保证导航文字完整展开、不被压缩换行 */
@media (min-width: 1024px) and (max-width: 1279px) {
  .header__tel { display: none; }
  .logo img { height: 44px; }
}

/* 汉堡按钮 */
.burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px;
  width: 22px; height: 2px;
  background: var(--t-main);
  border-radius: 2px;
  transition: all var(--dur) var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); background: var(--c-primary); }
.burger.is-open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); background: var(--c-primary); }

/* 移动端侧滑面板 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.drawer.is-open { display: block; }
.drawer__mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 380px);
  background: #fff;
  display: flex;
  flex-direction: column;
  animation: slideIn .35s var(--ease-out);
  box-shadow: -8px 0 40px rgba(15, 23, 42, .16);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer__head {
  height: var(--header-h-mobile);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #eef1f6;
}
.drawer__close { font-size: 28px; color: var(--t-sub); line-height: 1; }
.drawer__body { flex: 1; overflow-y: auto; padding: 12px 20px 20px; }
.drawer__foot { padding: 16px 20px 24px; border-top: 1px solid #eef1f6; }
.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--t-main);
  border-bottom: 1px solid #f4f6fa;
  opacity: 0;
  transform: translateX(24px);
  animation: drawerItem .4s var(--ease-out) forwards;
}
@keyframes drawerItem { to { opacity: 1; transform: none; } }
.drawer__sub { display: none; padding: 4px 0 10px 14px; }
.drawer__sub.is-open { display: block; }
.drawer__sub a {
  display: block;
  padding: 10px 4px;
  font-size: 15px;
  font-weight: 400;
  color: var(--t-sub);
}
.drawer__sub a:hover { color: var(--c-primary); }
.drawer__link .plus { color: var(--c-primary); font-size: 20px; transition: transform var(--dur) var(--ease); }
.drawer__link.is-open .plus { transform: rotate(45deg); }

/* ---------------- 页脚 ---------------- */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  padding-top: var(--sp-6);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: var(--sp-5);
}
.footer__logo { height: 46px; width: auto; margin-bottom: 18px; }
.footer__intro { line-height: 1.85; color: rgba(255, 255, 255, .6); margin-bottom: 20px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .7);
  transition: all var(--dur) var(--ease);
}
.socials a:hover { background: var(--c-primary); color: #fff; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

.footer__title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}
.footer__list li { margin-bottom: 12px; }
.footer__list a { color: rgba(255, 255, 255, .68); }
.footer__list a:hover { color: #fff; padding-left: 4px; }
.footer__contact li {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  line-height: 1.7;
}
.footer__contact svg { width: 16px; height: 16px; margin-top: 4px; flex: none; color: var(--c-primary); }

.qrcode {
  width: 108px;
  padding: 8px;
  background: #fff;
  border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease);
  cursor: pointer;
}
.qrcode:hover { transform: scale(1.12); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 20px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
}
.footer__bottom a { color: rgba(255, 255, 255, .55); }
.footer__bottom a:hover { color: #fff; }
.footer__links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------------- 悬浮工具栏 ---------------- */
.floating {
  position: fixed;
  right: 24px;
  bottom: 120px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.floating__btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--sh-float);
  position: relative;
  transition: all var(--dur) var(--ease);
}
.floating__btn svg { width: 22px; height: 22px; }
.floating__btn:hover { transform: scale(1.1); background: var(--c-primary-dark); }
.floating__btn--white { background: #fff; color: var(--c-primary); box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.floating__btn--top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}
.floating__btn--top.is-show { opacity: 1; visibility: visible; transform: none; }

.floating__pop {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 10px 32px rgba(15, 23, 42, .16);
  padding: 14px;
  white-space: nowrap;
  color: var(--t-main);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur) var(--ease);
}
.floating__item { position: relative; }
.floating__item:hover .floating__pop { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.floating__pop img { width: 120px; height: 120px; }

/* 移动端底部固定栏 */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, .1);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.mobile-bar__inner { display: flex; gap: 10px; }
.mobile-bar .btn { flex: 1; height: 44px; font-size: 15px; }

/* ---------------- 主内容占位（避免 sticky 遮挡） ---------------- */
.main { min-height: 60vh; }
