/* ============================================
   拓威百顺达 - 企业官网共享样式
   风格：简约大气
   ============================================ */

/* ===== 重置与基础 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #0a2540;
  --color-blue: #1565d8;
  --color-blue-light: #3b82f6;
  --color-accent: #ff6b35;
  --color-accent-dark: #e85a28;
  --color-bg: #f7f9fc;
  --color-white: #ffffff;
  --color-text: #1a1a2e;
  --color-text-light: #6b7280;
  --color-border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(10, 37, 64, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 72px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

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

/* ===== 通用容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.bg-light {
  background: var(--color-bg);
}

.bg-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.text-center {
  text-align: center;
}

/* ===== 标题样式 ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
}

.section-header .subtitle {
  margin-top: 16px;
  font-size: 17px;
  color: var(--color-text-light);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.bg-dark .section-header h2 {
  color: var(--color-white);
}

.bg-dark .section-header .subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== 按钮样式 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn-blue {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn-blue:hover {
  background: #1146b0;
  transform: translateY(-2px);
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-blue), var(--color-primary));
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-logo .logo-img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.nav-logo .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo .logo-text .name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

.nav-logo .logo-text .sub {
  font-size: 11px;
  color: var(--color-text-light);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a {
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-menu a:hover {
  color: var(--color-blue);
  background: rgba(21, 101, 216, 0.06);
}

.nav-menu a.active {
  color: var(--color-blue);
  font-weight: 600;
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.nav-cta {
  margin-left: 12px;
}

.nav-login {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-left: 8px;
}

.nav-login svg {
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-login:hover {
  color: var(--color-blue);
  border-color: var(--color-blue);
  background: rgba(21, 101, 216, 0.06);
}

.nav-login:hover svg {
  transform: translateX(2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
  border-radius: 2px;
}

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

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

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

/* ===== 页面Banner (非首页) ===== */
.page-banner {
  margin-top: var(--header-height);
  padding: 80px 0 64px;
  background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 50%, #1565d8 100%);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 107, 53, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.page-banner h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.page-banner .breadcrumb {
  font-size: 14px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.page-banner .breadcrumb a:hover {
  color: var(--color-accent);
}

/* ===== 卡片样式 ===== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(21, 101, 216, 0.2);
}

/* ===== 页脚 ===== */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-col .footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-col .footer-logo .name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-white);
}

.footer-col .footer-desc {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--color-accent);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-icp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-icp a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-icp a:hover {
  color: var(--color-accent);
}

.icp-divider {
  color: rgba(255, 255, 255, 0.3);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

/* ===== 动画 ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

  .section-sm {
    padding: 32px 0;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .section-header .subtitle {
    font-size: 15px;
  }

  .section-header {
    margin-bottom: 36px;
  }

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

  .page-banner {
    padding: 48px 0 40px;
  }

  /* 手机端：菜单直接显示为页眉下方的横向滚动条，无需点击展开 */
  .nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 44px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 6px rgba(10, 37, 64, 0.05);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
    gap: 2px;
    z-index: 998;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-menu::-webkit-scrollbar {
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    flex-shrink: 0;
    width: auto;
    padding: 8px 13px;
    border-bottom: none;
    border-radius: var(--radius-sm);
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
  }

  .nav-menu a.active {
    color: var(--color-blue);
    background: rgba(21, 101, 216, 0.1);
  }

  .nav-menu a.active::after {
    display: none;
  }

  .nav-cta {
    margin: 0;
    padding: 8px 16px;
    font-size: 13px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
  }

  .nav-login {
    margin: 0;
    padding: 7px 10px;
    font-size: 13px;
    gap: 4px;
    flex-shrink: 0;
  }

  .nav-login svg {
    width: 14px;
    height: 14px;
  }

  .nav-lang {
    margin: 0;
    padding: 7px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* 菜单栏改为常显，隐藏汉堡按钮 */
  .nav-toggle {
    display: none;
  }

  /* 页面内容下移，为常显菜单栏留出空间 */
  body .hero,
  body .page-banner {
    margin-top: calc(var(--header-height) + 44px);
  }

  /* 手机端：页眉 logo 名称与副标题横向一行排列 */
  .nav-logo .logo-text {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
  }

  .nav-logo .logo-text .name {
    font-size: 15px;
    white-space: nowrap;
  }

  .nav-logo .logo-text .sub {
    font-size: 10px;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }

  .nav-logo .logo-img {
    height: 36px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-icp {
    flex-direction: column;
    gap: 4px;
  }

  .icp-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 60px;
  }

  .container {
    padding: 0 14px;
  }

  .section {
    padding: 36px 0;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .section-header .subtitle {
    font-size: 14px;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .page-banner h1 {
    font-size: 24px;
  }

  .page-banner {
    padding: 40px 0 32px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  /* 页眉：小屏也完整显示 logo 名称 + 副标题（横向一行） */
  .nav-logo {
    gap: 8px;
    min-width: 0;
  }

  .nav-logo .logo-img {
    height: 30px;
  }

  .nav-logo .logo-text {
    gap: 5px;
  }

  .nav-logo .logo-text .name {
    font-size: 13px;
    white-space: nowrap;
  }

  .nav-logo .logo-text .sub {
    display: inline;
    font-size: 8px;
    letter-spacing: 0.3px;
    white-space: nowrap;
  }

  .footer {
    padding: 40px 0 0;
  }

  .footer-col h4 {
    font-size: 15px;
  }

  .footer-col .footer-desc {
    font-size: 13px;
  }
}

/* ===== 超小屏（iPhone SE / 320-380px）：页眉完整显示，内容不被截断 ===== */
@media (max-width: 380px) {
  .nav-logo {
    gap: 6px;
  }

  .nav-logo .logo-img {
    height: 26px;
  }

  .nav-logo .logo-text .name {
    font-size: 12px;
  }

  .nav-logo .logo-text .sub {
    font-size: 7px;
    letter-spacing: 0;
  }

  .nav-toggle {
    padding: 6px;
  }

  .nav-toggle span {
    width: 20px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 13px;
  }

  /* 超小屏：常显菜单栏字号与间距进一步压缩，保证完整可点 */
  .nav-menu {
    height: 42px;
    padding: 0 8px;
    gap: 0;
  }

  .nav-menu a {
    padding: 7px 10px;
    font-size: 13px;
  }

  .nav-cta {
    padding: 7px 12px;
    font-size: 12px;
  }

  .nav-login {
    padding: 6px 8px;
    font-size: 12px;
  }

  .nav-lang {
    padding: 6px 9px;
    font-size: 12px;
  }

  body .hero,
  body .page-banner {
    margin-top: calc(var(--header-height) + 42px);
  }
}
