/* ==================== layout.css ==================== */
/* 顶部信息栏 */
.topbar {
  background: var(--primary-dark);
  color: var(--on-dark);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 16px;
}

/* 导航 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  width: 80%;
  margin: 0 auto;
}
.logo {
  display: inline-flex;
  align-items: center;
  height: 52px;
  flex: 0 0 auto;
}
.logo img {
  height: 100%;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: right;
  gap: 36px;
  flex: 1;
  margin-right: 60px;
}
.nav-links > a {
  font-family:
    "PingFang SC", "Microsoft YaHei", "Heiti SC", "SimHei", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  transition: color 0.2s;
  white-space: nowrap;
  position: relative;
  padding: 6px 0;
}
.nav-links > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links > a:hover {
  color: var(--primary);
}
.nav-links > a:hover::after {
  transform: scaleX(1);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.lang-switch {
  display: flex;
  gap: 6px;
  background: var(--primary-light);
  padding: 4px;
  border-radius: 99px;
}
.lang-switch button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 5px 10px;
  border-radius: 99px;
  color: var(--muted);
  transition: 0.2s;
}
.lang-switch button.on {
  background: var(--primary);
  color: #fff;
}
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.burger span {
  width: 22px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: 0.3s;
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  background: #fff;
  border-top: 1px solid var(--border);
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu a {
  display: block;
  padding: 13px 22px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.mobile-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.mobile-menu .lang-row {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  justify-content: center;
}

/* 服务下拉 */
.nav-item-service {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.service-link {
  font-family:
    "PingFang SC", "Microsoft YaHei", "Heiti SC", "SimHei", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  transition: color 0.2s;
  white-space: nowrap;
  position: relative;
  padding: 6px 0;
}
.service-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.service-link:hover {
  color: var(--primary);
}
.service-link:hover::after {
  transform: scaleX(1);
}
.service-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  border-radius: 50%;
  transition:
    transform 0.25s ease,
    color 0.2s ease,
    background 0.2s ease;
  padding: 0;
}
.service-toggle:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.nav-item-service.open .service-toggle {
  transform: rotate(180deg);
  color: var(--primary);
}
.service-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(176, 31, 45, 0.16);
  padding: 20px;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  z-index: 999;
}
.service-dropdown.open {
  display: grid;
  animation: dropDownAnim 0.25s ease forwards;
}
@keyframes dropDownAnim {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.service-drop-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) / 2);
  overflow: hidden;
  transition: 0.22s ease;
}
.service-drop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.service-drop-card .img-placeholder {
  height: 110px;
  background: var(--primary-light);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
}
.service-drop-card .text-wrap {
  padding: 12px;
}
.service-drop-card h4 {
  font-size: 15px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.service-drop-card p {
  font-size: 13px;
  color: var(--muted);
}

/* 页脚 */
footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--on-dark);
  padding: 64px 0 24px;
  margin-top: 0;
  position: relative;
  z-index: 2;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  text-align: center;
}
.foot-grid h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 1rem;
}
.foot-grid a {
  display: block;
  font-size: 0.88rem;
  color: var(--on-dark);
  margin-bottom: 10px;
  opacity: 0.9;
}
.foot-grid a:hover {
  opacity: 1;
  text-decoration: underline;
}
.foot-brand p {
  font-size: 0.9rem;
  opacity: 0.85;
  max-width: 320px;
  margin: 14px 0 16px;
}
.foot-brand .logo {
  height: 46px;
}
.foot-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
}

/* 悬浮 WhatsApp */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
}
.wa-float:hover {
  transform: scale(1.08);
}

/* ===== 响应式（导航部分） ===== */
@media (max-width: 1100px) {
  .nav-links {
    gap: 24px;
    margin-right: 20px;
  }
  .nav-inner {
    padding: 14px 24px;
  }
}
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .burger {
    display: flex;
  }
  .grid-3,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  .navbar {
    position: relative;
  }
  .service-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    padding: 0;
    grid-template-columns: 1fr;
    transform: none;
  }
  .service-dropdown.open {
    animation: none;
  }
}
@media (max-width: 520px) {
  .nav-inner {
    padding: 12px 16px;
  }
  .logo {
    height: 40px;
  }
  footer {
    padding: 40px 0 20px;
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .foot-grid h4 {
    margin-bottom: 10px;
  }
  .foot-grid a {
    display: inline-block;
    margin: 0 8px 8px 0;
  }
  .foot-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    font-size: 0.8rem;
  }
  .foot-bottom > span:last-child {
    display: flex;
    gap: 12px;
    margin-left: 0;
  }
  .foot-bottom button {
    margin-left: 0 !important;
  }
}
