/* ===========================================
   Header Component Styles - 现代化响应式版本
   KUNZZ HOLDINGS Website Header Navigation
   使用 clamp() 和 rem/vw/vh 单位实现响应式设计
   =========================================== */

/* 导航栏 - 现代化响应式 */
.header-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    padding: 0 80px 0 70px;
    font-size: clamp(12px, 1vw + 0.5rem, 16px);
    background-color: #2F2F2F;
    color: white;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box; /* ✅ 让 padding 不撑大 */
    transition: transform 0.3s ease-in-out;
}  

/* 导航栏内部容器 */
.header-logo-section {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 52px;
    width: auto;
}

.header-company-name {
    font-family: 'Inter', sans-serif;
    font-size: clamp(10px, 1.2vw, 13px);
    font-weight: bold;
    line-height: 140%;
}

.header-nav-links {
    height: 80px;
    font-family: 'Inter', sans-serif;
    font-weight: lighter;
    display: flex;
    gap: 30px; /* 减少项间距 */
    font-size: clamp(12px, 0.8vw + 0.3rem, 16px);
    margin-left: 36px; /* 这里控制 .nav-links 左侧的偏移量 */
}

/* 每个导航项的样式 */
.header-nav-links a {
    color: white;
    text-decoration: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px; /* 添加左右 padding，便于在悬停时变宽 */
    transition: all 0.3s ease; /* 添加过渡效果 */
    white-space: nowrap; /* 防止文字换行 */
}

.header-nav-item {
    position: relative;
}

/* 当前页高亮 */
.header-nav-links a.active {
    background-color: #FF5C00;
    color: white;
    padding: 0 40px;
}

/* 鼠标悬停时 */
.header-nav-links a:hover {
    background-color: #FF5C00;
    color: white;
    padding: 0 40px; /* 在鼠标悬停时增大 padding，使得区域变宽 */
    text-decoration: none;
}

.header-right-section {
    width: 221px;
    height: 26px;
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 26px 0 28px 0;
}


/* ===========================================
   Login Button & Dropdown Styles
   =========================================== */

.header-login-dropdown {
    position: relative;
}

.header-login-btn {
    width: 100px;
    height: 26px;
    background-color: #ff5c00;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1px 25px;
    font-size: clamp(12px, 0.7vw + 0.5rem, 16px);
    cursor: pointer;
    display: inline-block; /* 让 <a> 看起来像按钮 */
    text-align: center;     /* 让文字居中 */
    text-decoration: none;  /* 移除下划线 */
    line-height: 26px;
}

.header-login-btn:hover {
    background-color: #d87b00;
    border-color: #d87b00; /* 悬停时边框颜色也改变 */
}

/* 登录下拉菜单样式 */
.header-login-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0px;
    width: 120px; /* 固定宽度 */
    background: #2F2F2F;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    overflow: hidden;
    z-index: 1000;
}

.header-login-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-login-dropdown-item {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.2s ease;
    border: none;
    width: 100%;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.header-login-dropdown-item:hover {
    background-color: #FF5C00;
    color: white;
}

.header-login-dropdown-item:first-child {
    border-bottom: 0px solid #444;
}

/* ===========================================
   Language Switch Styles
   =========================================== */

.header-language-switch {
    position: relative
}

.header-language-switch .header-lang {
    width: 100px;
    height: 26px;
    background-color: transparent;
    color: white;
    border: 1px solid #ff5c00;
    border-radius: 25px;
    padding: 1px 25px;
    font-size: clamp(12px, 0.7vw + 0.5rem, 16px);
    cursor: pointer;
    display: inline-block; /* 让 <a> 看起来像按钮 */
    text-align: center;     /* 让文字居中 */
    text-decoration: none;  /* 移除下划线 */
    line-height: 26px;
}

.header-language-switch .header-lang:hover {
    background-color: #ff5c00;
    color: white;
    border-color: #ff5c00;
}

.header-language-switch .header-icon {
    width: 24px;
    height: 24px;
    margin-right: 5px;
    vertical-align: middle;
}

/* 语言切换下拉菜单样式 */
.header-language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: -20px;
    width: 120px; /* 固定宽度 */
    background: #2F2F2F;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    overflow: hidden;
    z-index: 1000;
}

.header-language-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-language-dropdown-item {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.2s ease;
    border: none;
    width: 100%;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.header-language-dropdown-item:hover {
    background-color: #FF5C00;
    color: white;
}

.header-language-dropdown-item:not(:last-child) {
    border-bottom: 1px solid #444;
}

/* ===========================================
   Navigation State Styles
   =========================================== */

.header-nav-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.header-nav {
    transition: transform 0.3s ease-in-out;
}

@media (max-width: 1280px) {
  .header-navbar {
    height: 50px;
    padding: 0 42px 0 44px;
  } 

  .header-logo {
    height: 38px;
    width: auto;
  }

  .header-company-name {
    font-size: 8px;
  }

  .header-nav-links {
    height: 50px;
    gap: 20px;
    margin-left: clamp(10px, 12vw, 90px);
    font-size: 12px;
  }

  .header-nav-links a {
    padding: 0 4px;
  }

  .header-nav-links a.active {
    padding: 0 30px;
  }

  .header-nav-links a:hover {
    padding: 0 30px;
  }

  .header-nav-dropdown-menu {
    top: 84%;
  }

  .header-nav-dropdown-item {
    padding: 6px 12px !important;
    font-size: 10px;
  }

  .header-login-btn {
    width: 60px;
    height: 18px;
    border-radius: 17px;
    padding: 0px 12px;
    font-size: 10px;
    line-height: 11px;
    margin-left: 85px;
    margin-right: -20px;
  }

  .header-login-dropdown-menu {
    left: 85px;
    width: 80px;
    top: 80%;
  }

  .header-login-dropdown-item {
    padding: 6px 12px;
    font-size: 10px;
  }

  .header-language-switch .header-lang {
    width: 60px;
    height: 18px;
    border-radius: 17px;
    padding: 0px 12px;
    font-size: 10px;
    line-height: 1px;
    margin-left: 30px;
    margin-right: -20px;
  }

  .header-language-switch .header-icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
  }

  .header-language-dropdown-menu {
    right: -40px;
    width: 80px;
    top: 80%;
  }

  .header-language-dropdown-item {
    padding: 6px 12px;
    font-size: 10px;
  }

  .header-right-section {
    width: 200px;
    gap: 0px;
  }
}

/* ===========================================
   Brand Dropdown Menu Styles
   =========================================== */

/* 导航栏旗下品牌下拉菜单 */
.header-nav-item.header-nav-dropdown {
    position: relative;
}

.header-nav-dropdown-trigger {
    color: white;
    text-decoration: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.header-nav-dropdown-trigger:hover {
    background-color: #FF5C00;
    color: white;
    padding: 0 40px;
}

.header-nav-dropdown-menu {
    position: absolute;
    top: 90%;
    left: 0;
    min-width: 220px;
    background: #2F2F2F;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    overflow: hidden;
    z-index: 1000;
}

.header-nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav-dropdown-item {
    display: block;
    padding: 10px 16px !important;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #444;
    text-align: left !important;
    justify-content: flex-start !important;
}

.header-nav-dropdown-item:last-child {
    border-bottom: none;
}

.header-nav-dropdown-item:hover {
    background-color: #FF5C00;
    color: white;
}

/* ===========================================
   Mobile Menu Styles
   =========================================== */

/* 汉堡菜单按钮，默认隐藏 */
.header-hamburger {
    display: none;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: clamp(0.25rem, 0.5vw, 0.375rem) 0;
}

.header-mobile-login {
    display: none;
}

.header-desktop-login {
    display: inline-block;
}

/* ===========================================
   Page Indicator Styles
   =========================================== */

/* 左侧页面指示器样式 */
.header-page-indicator {
    position: fixed;
    left: clamp(1rem, 1.56vw, 1.875rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 0.63vw, 0.75rem);
    padding: clamp(0.75rem, 0.5vw, 1rem) clamp(0.4rem, 0.8vw, 0.6rem);
    background: rgba(50, 50, 50, 0.3);
    border-radius: clamp(1.25rem, 2.5vw, 1.75rem);
    backdrop-filter: blur(clamp(0.6rem, 1.2vw, 0.8rem)) saturate(160%);
    -webkit-backdrop-filter: blur(clamp(0.6rem, 1.2vw, 0.8rem)) saturate(160%);
    border: clamp(0.05rem, 0.1vw, 0.08rem) solid rgba(255, 255, 255, 0.15); /* 轻微边框提升质感 */
    opacity: 0.5;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.header-page-dot {
    width: clamp(0.1rem, 0.2vw, 0.15rem);
    height: clamp(0.1rem, 0.2vw, 0.15rem);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    border: clamp(0.1rem, 0.2vw, 0.15rem) solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.header-page-dot:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.3);
}

.header-page-dot.active {
    width: clamp(0.1rem, 0.2vw, 0.15rem);
    height: clamp(1.25rem, 2.5vw, 1.5rem);
    border-radius: clamp(0.3rem, 0.6vw, 0.4rem);
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
}

.header-page-dot.active:hover {
    transform: scale(1.12);
}

/* ===========================================
   移动端响应式设计 - 使用 clamp() 实现
   =========================================== */

/* 移动端导航菜单样式 - 当屏幕宽度小于 768px 时显示 */
@media (max-width: 768px) {
  /* 导航菜单改为侧边栏 */
  .header-nav-links {
    display: flex;
    position: fixed;
    top: clamp(2.5rem, 8vh, 3rem);
    left: 0;
    margin-top: 0;
    margin-left: 0;
    width: 100%;
    height: 40vh;
    background-color: #2F2F2F;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: clamp(1rem, 3vw, 1.5rem) clamp(2rem, 5vw, 2.5rem);
    box-sizing: border-box;
    gap: clamp(1.5rem, 4vw, 2rem);
    z-index: 1000;
    transform: translateY(-160%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  }

  .header-nav-links.active {
    display: flex;
    transform: translateY(0);
  }

  .header-nav-item {
    width: 100%;
  }

  /* right-section 宽度自适应，内容靠右排列 */
  .header-right-section {
    width: auto;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(0.6rem, 1.5vw, 0.8rem);
  }

  /* hamburger 靠右边显示 */
  .header-hamburger {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: clamp(0.25rem, 0.5vw, 0.375rem) 0;
  }

  .header-nav-links a {
    padding: clamp(0.4rem, 1vw, 0.6rem) 0 clamp(0.4rem, 1vw, 0.6rem) clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    text-align: left;
    width: 100%;
    border-bottom: clamp(0.05rem, 0.1vw, 0.08rem) solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
    justify-content: center;
    box-sizing: border-box;
    align-items: stretch;
  }

  .header-nav-links a:hover {
    background-color: transparent;
    color: white;
    padding: clamp(0.4rem, 1vw, 0.6rem) 0 clamp(0.4rem, 1vw, 0.6rem) clamp(0.5rem, 1.5vw, 0.75rem);
  }

  .header-nav-links a.active {
    background-color: transparent;
    color: white;
    padding: clamp(0.4rem, 1vw, 0.6rem) 0 clamp(0.4rem, 1vw, 0.6rem) clamp(0.5rem, 1.5vw, 0.75rem);
  }

  /* login 按钮放在菜单底部，样式微调 */
  .header-nav-links .header-login-btn {
    width: clamp(5rem, 12vw, 6.25rem);
    height: clamp(1rem, 2.5vw, 1.25rem);
    padding: 0 clamp(0.4rem, 1vw, 0.6rem) clamp(1.5rem, 4vw, 2rem) clamp(0.4rem, 1vw, 0.6rem);
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    margin-top: auto;
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: clamp(1rem, 2.5vw, 1.25rem);
    text-align: center;
    line-height: clamp(1.5rem, 4vw, 2rem);
  }

  .header-nav-links .header-login-btn:hover {
    background-color: #d87b00;
    padding: 0 clamp(0.4rem, 1vw, 0.6rem) clamp(1.5rem, 4vw, 2rem) clamp(0.4rem, 1vw, 0.6rem);
    line-height: clamp(1.5rem, 4vw, 2rem);
  }

  /* Hide page indicator on mobile */
  .header-page-indicator {
    display: none;
  }
}

/* ===========================================
   Performance Optimizations
   =========================================== */

/* 让 transform/opacity 动画更流畅 */
.animate-on-scroll,
.header-navbar,
.header-nav-links,
.header-nav-dropdown-menu,
.header-login-dropdown-menu,
.header-language-dropdown-menu,
.header-page-indicator,
.social-icon {
  will-change: transform, opacity;
  transform: translateZ(0);
}
