/* ========================================
   家晖科技官网 - 共享样式
   ======================================== */

/* CSS 变量 */
:root {
  /* 主色调 - 科技风 */
  --primary: #00a8ff;
  --primary-dark: #0080cc;
  --primary-light: #33bbff;
  --accent: #00d4aa;
  --accent-dark: #00b090;

  /* 中性色 */
  --bg-dark: #0a1628;
  --bg-darker: #060d18;
  --bg-light: #ffffff;
  --bg-gray: #f5f7fa;
  --bg-glass: rgba(255, 255, 255, 0.08);
  --bg-glass-hover: rgba(255, 255, 255, 0.12);

  /* 文字色 */
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-light: #ffffff;
  --text-muted: #94a3b8;

  /* 边框 */
  --border-light: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(0, 212, 170, 0.3);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 30px rgba(0, 168, 255, 0.3);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* 过渡 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* 字体 */
  --font-primary: 'Space Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-gray);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul, ol {
  list-style: none;
}

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

/* ========================================
   导航栏
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  box-shadow: var(--shadow-md);
}

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

.navbar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  font-weight: 700;
}

.navbar-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-item {
  position: relative;
  padding: 12px 20px;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.navbar-item:hover {
  background: var(--bg-glass);
}

.navbar-item.active {
  color: var(--primary);
  background: rgba(0, 168, 255, 0.1);
}

/* 下拉菜单 */
.navbar-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 220px;
  padding: 12px 0;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.navbar-item:hover .navbar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.navbar-dropdown-item {
  display: block;
  padding: 12px 24px;
  color: var(--text-light);
  font-size: 14px;
  transition: var(--transition-fast);
}

.navbar-dropdown-item:hover {
  background: var(--bg-glass);
  color: var(--primary);
}

/* 移动端菜单按钮 */
.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(20px);
  padding: 20px;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-item {
  display: block;
  padding: 16px 20px;
  color: var(--text-light);
  font-size: 16px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu-submenu {
  padding-left: 20px;
}

.mobile-menu-subitem {
  display: block;
  padding: 12px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ========================================
   轮播图组件
   ======================================== */
.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.carousel-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(10, 22, 40, 0.8) 0%,
    rgba(10, 22, 40, 0.4) 50%,
    rgba(0, 168, 255, 0.1) 100%
  );
}

.carousel-slide-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.carousel-slide-tag {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(0, 168, 255, 0.2);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 24px;
  width: fit-content;
}

.carousel-slide-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
  margin-bottom: 20px;
}

.carousel-slide-subtitle {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 32px;
}

.carousel-slide-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 轮播图指示器 */
.carousel-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 20;
}

.carousel-indicator {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-indicator.active {
  background: var(--primary);
  width: 60px;
}

/* 轮播图箭头 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 20;
}

.carousel-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.carousel-arrow.prev {
  left: 30px;
}

.carousel-arrow.next {
  right: 30px;
}

/* 轮播图底部信息条 */
.carousel-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 0 40px;
  z-index: 15;
}

.carousel-bottom-stat {
  text-align: center;
}

.carousel-bottom-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.carousel-bottom-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(0, 168, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 168, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* ========================================
   卡片样式
   ======================================== */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
}

.card-glass:hover {
  background: var(--bg-glass-hover);
  border-color: var(--primary);
}

/* ========================================
   页面容器
   ======================================== */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   页脚
   ======================================== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

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

.footer-brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.footer-brand-text {
  font-size: 24px;
  font-weight: 700;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: var(--transition-fast);
}

.footer-social-link:hover {
  background: var(--primary);
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

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

.footer-copyright {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal-link {
  color: var(--text-muted);
  font-size: 13px;
  transition: var(--transition-fast);
}

.footer-legal-link:hover {
  color: var(--primary);
}

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

@media (max-width: 992px) {
  .navbar {
    padding: 0 24px;
  }

  .navbar-menu {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .carousel-slide-content {
    padding: 0 40px;
  }

  .carousel-bottom-bar {
    gap: 30px;
    padding: 0 20px;
  }

  .carousel-arrow {
    display: none;
  }

  .page-container {
    padding: 0 24px;
  }

  .section {
    padding: 80px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-contact-item {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .navbar {
    height: 64px;
  }

  .mobile-menu {
    top: 64px;
  }

  .carousel-bottom-bar {
    display: none;
  }

  .carousel-indicators {
    bottom: 20px;
  }

  .carousel-slide-content {
    padding: 0 24px;
  }

  .section {
    padding: 60px 0;
  }

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

  .footer {
    padding: 60px 0 20px;
  }

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

@media (max-width: 480px) {
  .carousel-slide-tag {
    padding: 6px 14px;
    font-size: 11px;
  }

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

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slide-in {
  animation: slideInLeft 0.8s ease forwards;
}

/* 延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ========================================
   工具类
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

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

.w-full { width: 100%; }
.h-full { height: 100%; }

.relative { position: relative; }
.absolute { position: absolute; }

.overflow-hidden { overflow: hidden; }

/* 玻璃态效果 */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
}

/* 渐变文字 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
