/**
 * HK Securities - Common Styles
 * 香港证券金融网站 - 公共样式
 * 用于头部、尾部、基础组件等可复用样式
 */

/* ==================== CSS Variables / 变量定义 ==================== */
:root {
  /* 主题色 */
  --hk-primary: #d4a20d;
  --hk-primary-light: #ffce3c;
  --hk-primary-dark: #b8890b;
  
  /* 背景色 */
  --hk-bg-dark: #191825;
  --hk-bg-darker: #141518;
  --hk-bg-card: rgba(255, 255, 255, 0.02);
  
  /* 文字色 */
  --hk-text-white: #ffffff;
  --hk-text-gray: #9ca3af;
  --hk-text-muted: rgba(255, 255, 255, 0.6);
  
  /* 边框色 */
  --hk-border-light: rgba(255, 255, 255, 0.1);
  --hk-border-dark: rgba(255, 255, 255, 0.05);
  
  /* 涨跌色 */
  --hk-up: #4cff9c;
  --hk-down: #f0174b;
  
  /* 字体 */
  --hk-font-primary: 'Catamaran', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* 间距 */
  --hk-spacing-xs: 8px;
  --hk-spacing-sm: 16px;
  --hk-spacing-md: 24px;
  --hk-spacing-lg: 40px;
  --hk-spacing-xl: 60px;
  
  /* 圆角 */
  --hk-radius-sm: 4px;
  --hk-radius-md: 8px;
  --hk-radius-lg: 16px;
  --hk-radius-xl: 24px;
  --hk-radius-full: 50%;
  
  /* 过渡 */
  --hk-transition-fast: 0.2s ease;
  --hk-transition-normal: 0.3s ease;
  --hk-transition-slow: 0.5s ease;
  
  /* 阴影 */
  --hk-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --hk-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --hk-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--hk-font-primary);
  font-weight: 400;
  color: var(--hk-text-white);
  background: var(--hk-bg-dark);
  overflow-x: hidden;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--hk-transition-normal);
}

a:hover {
  color: var(--hk-primary);
}

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

button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ==================== Layout / 布局 ==================== */
.hk-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.hk-section {
  position: relative;
  padding: 80px 0;
}

.hk-section--dark {
  background: var(--hk-bg-dark);
}

.hk-section--darker {
  background: var(--hk-bg-darker);
}

.hk-section__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.03;
  pointer-events: none;
}

/* ==================== Typography / 排版 ==================== */
.hk-title {
  font-weight: 700;
  line-height: 1.2;
  color: var(--hk-text-white);
}

.hk-title--xl {
  font-size: 50px;
}

.hk-title--lg {
  font-size: 42px;
}

.hk-title--md {
  font-size: 28px;
}

.hk-title--sm {
  font-size: 20px;
}

.hk-text {
  color: var(--hk-text-gray);
  line-height: 1.7;
}

.hk-text--sm {
  font-size: 14px;
}

.hk-text--md {
  font-size: 16px;
}

.hk-tagline {
  display: inline-block;
  background: rgba(212, 162, 13, 0.15);
  color: var(--hk-primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: var(--hk-radius-sm);
  margin-bottom: 20px;
}

/* ==================== Buttons / 按钮 ==================== */
.hk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--hk-font-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 18px 35px;
  border-radius: 0;
  transition: all var(--hk-transition-normal);
  cursor: pointer;
}

.hk-btn--primary {
  background: var(--hk-primary);
  color: var(--hk-text-white);
}

.hk-btn--primary:hover {
  background: transparent;
  color: var(--hk-text-white);
  box-shadow: inset 0 0 0 2px var(--hk-primary);
}

.hk-btn--outline {
  background: transparent;
  color: var(--hk-text-white);
  box-shadow: inset 0 0 0 2px var(--hk-primary);
}

.hk-btn--outline:hover {
  background: var(--hk-primary);
}

.hk-btn--circle {
  width: 55px;
  height: 55px;
  padding: 0;
  border-radius: var(--hk-radius-full);
}

/* ==================== Header / 头部导航 ==================== */
.hk-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 0 60px;
  background: transparent;
  transition: all var(--hk-transition-normal);
}

.hk-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--hk-border-light);
}

.hk-header--scrolled {
  position: fixed;
  background: rgba(26, 26, 46, 0.98);
  backdrop-filter: blur(10px);
}

.hk-header--scrolled::after {
  background-color: var(--hk-border-dark);
}

.hk-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Logo */
.hk-header__logo {
  position: relative;
  display: block;
  margin-right: 125px;
}

.hk-header__logo::after {
  content: '';
  position: absolute;
  top: 25px;
  bottom: 25px;
  right: -75px;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.15);
}

.hk-header__logo img {
  height: 70px;
}

/* Navigation */
.hk-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
}

.hk-nav__menu {
  display: flex;
  align-items: center;
  gap: 0;
}

.hk-nav__item {
  position: relative;
  padding: 36px 0;
  margin-left: 80px;
}

.hk-nav__item:first-child {
  margin-left: 0;
}

.hk-nav__link {
  color: var(--hk-text-white);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all var(--hk-transition-slow);
}

.hk-nav__link::before {
  content: '';
  height: 1px;
  background-color: var(--hk-primary);
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--hk-transition-slow);
}

.hk-nav__item:hover .hk-nav__link::before,
.hk-nav__item--active .hk-nav__link::before {
  transform: scaleX(1);
}

.hk-nav__link i {
  font-size: 12px;
}

/* Dropdown */
.hk-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #1e1e28;
  border: 1px solid var(--hk-border-light);
  min-width: 220px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--hk-transition-slow);
  z-index: 99;
}

.hk-nav__item:hover .hk-nav__dropdown {
  opacity: 1;
  visibility: visible;
}

.hk-nav__dropdown-item {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hk-nav__dropdown-item:first-child {
  border-top: none;
}

.hk-nav__dropdown-link {
  display: block;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.15s;
  line-height: 30px;
}

.hk-nav__dropdown-item:first-child .hk-nav__dropdown-link {
  border-radius: var(--hk-radius-md) var(--hk-radius-md) 0 0;
}

.hk-nav__dropdown-item:last-child .hk-nav__dropdown-link {
  border-radius: 0 0 var(--hk-radius-md) var(--hk-radius-md);
}

.hk-nav__dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Header Right */
.hk-header__actions {
  display: flex;
  align-items: center;
  padding: 26.5px 0;
  margin-left: auto;
}

.hk-header__contact {
  display: flex;
  align-items: center;
}

.hk-header__contact-icon {
  width: 53px;
  height: 53px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--hk-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--hk-transition-slow);
}

.hk-header__contact-icon:hover {
  background-color: var(--hk-text-white);
}

.hk-header__contact-icon i {
  font-size: 25px;
  color: var(--hk-text-white);
  transition: all var(--hk-transition-slow);
}

.hk-header__contact-icon:hover i {
  color: var(--hk-primary);
}

.hk-header__contact-info {
  margin-left: 20px;
}

.hk-header__contact-label {
  font-size: 14px;
  line-height: 26px;
  opacity: 0.6;
  color: var(--hk-text-white);
  font-weight: 500;
  margin: 0;
}

.hk-header__contact-number {
  font-size: 18px;
  line-height: 21px;
  font-weight: 500;
  margin: 0;
}

.hk-header__contact-number a {
  color: var(--hk-text-white);
}

.hk-header__contact-number a:hover {
  color: var(--hk-primary);
}

/* Search */
.hk-header__search {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14.5px 0;
  margin-left: 90px;
}

.hk-header__search::before {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -40px;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.15);
}

.hk-header__search-btn {
  font-size: 24px;
  color: var(--hk-text-white);
  transition: all var(--hk-transition-slow);
}

.hk-header__search-btn:hover {
  color: var(--hk-primary);
}

/* ==================== Footer / 页脚 ==================== */
.hk-footer {
  background: var(--hk-bg-dark);
  padding: 20px 0 0;
  position: relative;
}

.hk-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 10px;
  margin-top: 50px;
}

.hk-footer__brand {
  flex: 0 0 100%;
  max-width: 450px;
}

@media (min-width: 992px) {
  .hk-footer__brand {
    flex: 0 0 40%;
  }
}

.hk-footer__logo {
  margin-bottom: 30px;
}

.hk-footer__logo img {
  width: 100px;
}

.hk-footer__cta-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--hk-text-white);
  margin-bottom: 24px;
  line-height: 1.2;
}

.hk-footer__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--hk-primary);
  color: var(--hk-text-white);
  padding: 16px 28px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--hk-transition-normal);
}

.hk-footer__cta-btn:hover {
  background: var(--hk-primary-dark);
  color: var(--hk-text-white);
}

.hk-footer__cta-btn .icon-box {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--hk-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hk-footer__links {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 30px;
  border-radius: var(--hk-radius-lg);
}

.hk-footer__links-group {
  min-width: 150px;
}

.hk-footer__links-title {
  color: var(--hk-text-white);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hk-footer__links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hk-footer__links-list a {
  color: var(--hk-text-gray);
  font-size: 14px;
  transition: color var(--hk-transition-normal);
}

.hk-footer__links-list a:hover {
  color: var(--hk-primary);
}

.hk-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--hk-border-light);
}

.hk-footer__copyright {
  color: var(--hk-text-gray);
  font-size: 14px;
}

.hk-footer__copyright a {
  color: var(--hk-primary);
}

.hk-footer__social {
  display: flex;
  gap: 12px;
}

.hk-footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--hk-radius-full);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hk-text-white);
  transition: all var(--hk-transition-normal);
}

.hk-footer__social-link:hover {
  background: var(--hk-primary);
  color: var(--hk-text-white);
}

/* ==================== Scroll to Top / 返回顶部 ==================== */
.hk-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: var(--hk-radius-full);
  background: var(--hk-primary);
  color: var(--hk-text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--hk-transition-normal);
  z-index: 999;
  cursor: pointer;
}

.hk-scroll-top--visible {
  opacity: 1;
  visibility: visible;
}

.hk-scroll-top:hover {
  background: var(--hk-primary-dark);
  transform: translateY(-5px);
}

/* ==================== Preloader / 加载动画 ==================== */
.hk-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hk-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.hk-preloader--hidden {
  opacity: 0;
  visibility: hidden;
}

.hk-preloader__spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--hk-border-light);
  border-top-color: var(--hk-primary);
  border-radius: var(--hk-radius-full);
  animation: hk-spin 1s linear infinite;
}

@keyframes hk-spin {
  to { transform: rotate(360deg); }
}

/* ==================== Utilities / 工具类 ==================== */
.hk-text-primary { color: var(--hk-primary); }
.hk-text-white { color: var(--hk-text-white); }
.hk-text-gray { color: var(--hk-text-gray); }
.hk-text-up { color: var(--hk-up); }
.hk-text-down { color: var(--hk-down); }

.hk-bg-dark { background: var(--hk-bg-dark); }
.hk-bg-darker { background: var(--hk-bg-darker); }
.hk-bg-primary { background: var(--hk-primary); }

.hk-mt-sm { margin-top: var(--hk-spacing-sm); }
.hk-mt-md { margin-top: var(--hk-spacing-md); }
.hk-mt-lg { margin-top: var(--hk-spacing-lg); }
.hk-mt-xl { margin-top: var(--hk-spacing-xl); }

.hk-mb-sm { margin-bottom: var(--hk-spacing-sm); }
.hk-mb-md { margin-bottom: var(--hk-spacing-md); }
.hk-mb-lg { margin-bottom: var(--hk-spacing-lg); }
.hk-mb-xl { margin-bottom: var(--hk-spacing-xl); }

.hk-flex { display: flex; }
.hk-flex-col { flex-direction: column; }
.hk-flex-wrap { flex-wrap: wrap; }
.hk-items-center { align-items: center; }
.hk-justify-center { justify-content: center; }
.hk-justify-between { justify-content: space-between; }
.hk-gap-sm { gap: var(--hk-spacing-sm); }
.hk-gap-md { gap: var(--hk-spacing-md); }
.hk-gap-lg { gap: var(--hk-spacing-lg); }

.hk-grid {
  display: grid;
  gap: 24px;
}

.hk-grid--2 { grid-template-columns: repeat(2, 1fr); }
.hk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hk-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ==================== Responsive / 响应式 ==================== */
@media (max-width: 1200px) {
  .hk-header {
    padding: 0 40px;
  }
  
  .hk-nav__item {
    margin-left: 40px;
  }
  
  .hk-header__logo {
    margin-right: 80px;
  }
  
  .hk-header__logo::after {
    right: -40px;
  }
  
  .hk-title--xl {
    font-size: 42px;
  }
  
  .hk-title--lg {
    font-size: 36px;
  }
}

@media (max-width: 991px) {
  .hk-header {
    padding: 0 30px;
  }
  
  .hk-header__inner {
    justify-content: center;
  }
  
  .hk-header__logo {
    margin-right: 0;
  }
  
  .hk-header__logo::after {
    display: none;
  }
  
  .hk-nav__menu,
  .hk-header__actions {
    display: none;
  }
  
  .hk-section {
    padding: 60px 0;
  }
  
  .hk-title--xl {
    font-size: 36px;
  }
  
  .hk-title--lg {
    font-size: 30px;
  }
  
  .hk-grid--3,
  .hk-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hk-footer__brand {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hk-container {
    padding: 0 16px;
  }
  
  .hk-header {
    padding: 0 20px;
  }
  
  .hk-section {
    padding: 50px 0;
  }
  
  .hk-title--xl {
    font-size: 30px;
  }
  
  .hk-title--lg {
    font-size: 26px;
  }
  
  .hk-title--md {
    font-size: 22px;
  }
  
  .hk-btn {
    padding: 15px 28px;
  }
  
  .hk-grid--2,
  .hk-grid--3,
  .hk-grid--4 {
    grid-template-columns: 1fr;
  }
  
  .hk-footer__inner {
    flex-direction: column;
    gap: 30px;
  }
  
  .hk-footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .hk-title--xl {
    font-size: 26px;
  }
  
  .hk-title--lg {
    font-size: 22px;
  }
}

/* ==================== 语言切换 ==================== */
.hk-lang-switch {
  position: relative;
  margin-right: 12px;
}
.hk-lang-switch__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hk-text-gray);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.hk-lang-switch__btn:hover {
  color: var(--hk-primary);
  border-color: rgba(208,177,76,0.3);
  background: rgba(208,177,76,0.06);
}
.hk-lang-switch__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #1e1e28;
  border: 1px solid var(--hk-border-light);
  border-radius: 10px;
  padding: 6px 0;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.hk-lang-switch__dropdown--open {
  display: block;
}
.hk-lang-switch__option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.hk-lang-switch__option:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.hk-lang-switch__option--active {
  color: var(--hk-primary);
  font-weight: 600;
}
/* 移动端语言切换 */
.hk-mobile-menu__lang {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--hk-border-light);
  margin-top: 8px;
}
.hk-mobile-menu__lang-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--hk-border-light);
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.hk-mobile-menu__lang-btn:hover,
.hk-mobile-menu__lang-btn--active {
  border-color: var(--hk-primary);
  color: var(--hk-primary);
  background: rgba(212,162,13,0.08);
}

/* ==================== 主题切换按钮（与仪表盘语言按钮风格统一） ==================== */
.hk-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dash-text-dim, var(--hk-text-gray));
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.hk-theme-toggle:hover {
  color: var(--dash-text, var(--hk-text-white));
  border-color: rgba(208,177,76,0.3);
  background: rgba(208,177,76,0.06);
}

