/* ========================================
   高科电力企业官网 - 公共样式
   包含：变量、重置、工具类、导航栏、页脚、按钮、通用组件
   ======================================== */

/* ==================== 基础设置 ==================== */
:root {
  /* 主色调 - 环保科技蓝 */
  --primary-dark: #0a1e2e;
  --primary-blue: #0d3b66;
  --tech-blue: #0052A3;
  --tech-blue-light: #0077c8;
  --tech-blue-dark: #003d7a;

  /* 辅助色 */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* 点缀色 - 环保绿 */
  --eco-green: #00A878;
  --eco-green-light: #10b989;
  --eco-green-dark: #059669;
  --accent-gold: #00A878;
  --accent-orange: #10b989;
  --accent-gold-light: #34d399;

  /* 渐变 - 蓝绿环保渐变 */
  --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  --gradient-tech: linear-gradient(135deg, var(--tech-blue-dark) 0%, var(--tech-blue) 50%, var(--eco-green) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(10, 30, 46, 0.95) 0%, rgba(13, 59, 102, 0.85) 100%);

  /* 字体 */
  --font-cn: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* 间距 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* 圆角 */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(0, 168, 120, 0.3);

  /* 过渡 */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* 容器宽度 */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
}

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

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

body {
  font-family: var(--font-cn);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* ==================== 工具类 ==================== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-lg {
  max-width: var(--container-2xl);
}

.section {
  padding: var(--spacing-3xl) 0;
}

.section-lg {
  padding: 5rem 0;
}

/* 滚动动画初始状态 */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="fade-up"] {
  transform: translateY(40px);
}

[data-aos="fade-down"] {
  transform: translateY(-40px);
}

[data-aos="fade-left"] {
  transform: translateX(40px);
}

[data-aos="fade-right"] {
  transform: translateX(-40px);
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
}

/* ==================== 按钮样式 ==================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 1rem 2rem;
  background: var(--gradient-tech);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 1rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.625rem 1.25rem;
  background: var(--gradient-tech);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
}

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

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 var(--spacing-xl);
  max-width: var(--container-2xl);
  margin: 0 auto;
}

/* Logo区域 */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.navbar-logo-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
  /* 白色底衬，保证蓝色 logo 在深色导航栏上清晰显示 */
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 4px;
  box-sizing: border-box;
}

.navbar-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
}

.navbar-logo-text span {
  color: var(--accent-gold);
}

/* 导航菜单 */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
}

.navbar-link {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: var(--spacing-sm) 0;
  transition: color var(--transition-fast);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width var(--transition-normal);
}

.navbar-link:hover,
.navbar-link.active {
  color: var(--white);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

/* 导航右侧操作区 */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

/* 移动端菜单按钮 */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--spacing-sm);
  cursor: pointer;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition-fast);
}

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

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

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

/* 移动端菜单 */
.navbar-menu-mobile {
  display: none !important;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(10px);
  padding: var(--spacing-xl);
  flex-direction: column;
  gap: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-menu-mobile.active {
  display: flex !important;
}

.navbar-menu-mobile .navbar-link {
  font-size: 1.125rem;
  padding: var(--spacing-md) 0;
}

/* ==================== 页脚 ==================== */
.footer {
  background: var(--primary-dark);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-3xl);
  margin-bottom: var(--spacing-3xl);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.footer-logo-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  /* 白色底衬，保证蓝色 logo 在深色页脚上清晰显示 */
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 4px;
  box-sizing: border-box;
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--spacing-lg);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.footer-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
}

.footer-bottom {
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.footer-icp {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.footer-icp a {
  color: inherit;
  transition: color var(--transition-fast);
}

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

/* ==================== 回到顶部按钮 ==================== */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-tech);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: 999;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* ==================== 底部悬浮条 ==================== */
.floating-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md) var(--spacing-xl);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-2xl);
  z-index: 998;
}

.floating-bar-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.floating-bar-item:hover {
  color: var(--accent-gold);
}

.floating-bar-item svg {
  width: 20px;
  height: 20px;
}

.floating-bar-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
}

/* ==================== Section Header（通用） ==================== */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-tag {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--tech-blue);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--spacing-md);
}

.section-title span {
  color: var(--tech-blue);
}

.section-desc {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== 底部CTA（通用） ==================== */
.cta {
  background: var(--gradient-tech);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 50%, rgba(0, 168, 120, 0.2) 0%, transparent 35%);
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--spacing-3xl) 0;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.cta-desc {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--spacing-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn-primary {
  background: var(--white);
  color: var(--tech-blue);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta .btn-primary:hover {
  background: var(--accent-gold);
  color: var(--white);
}

/* ==================== Page Hero（通用） ==================== */
.page-hero {
  background: var(--gradient-primary);
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(0, 82, 163, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(0, 168, 120, 0.25) 0%, transparent 40%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.page-hero-desc {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== 响应式设计 ==================== */

/* 大屏幕 (1440px+) */
@media (min-width: 1440px) {
  .section-title {
    font-size: 3rem;
  }
}

/* 平板 (1024px - 1439px) */
@media (max-width: 1439px) {
  .container {
    max-width: var(--container-lg);
  }
}

/* 小平板 (768px - 1023px) */
@media (max-width: 1023px) {
  .navbar-menu {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-actions {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
  }

  .section-title {
    font-size: 2rem;
  }
}

/* 手机 (< 768px) */
@media (max-width: 767px) {
  :root {
    font-size: 15px;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }

  .navbar-container {
    height: 70px;
    padding: 0 var(--spacing-md);
  }

  .navbar-logo-text {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-desc {
    font-size: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .floating-bar {
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-md);
  }

  .floating-bar-item {
    font-size: 0.8125rem;
  }

  .back-to-top {
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .page-hero {
    padding: 120px 0 60px;
  }

  .page-hero-title {
    font-size: 2rem;
  }

  .page-hero-desc {
    font-size: 1rem;
  }
}

/* 超小屏幕 (< 480px) */
@media (max-width: 479px) {
  .section-title {
    font-size: 1.5rem;
  }
}

/* ==================== 打印样式 ==================== */
@media print {
  .navbar,
  .floating-bar,
  .back-to-top {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}
