/**
 * 新版网站主样式文件
 * 参考 siyi.biz 设计风格
 */

/* ========================================
   变量定义
   ======================================== */
:root {
  --color-primary: #0066cc;
  --color-primary-dark: #0052a3;
  --color-bg-dark: rgba(0, 0, 0, 0.85);
  --color-text-light: #ffffff;
  --color-text-dark: #333333;
  --color-text-gray: #999999;
  --transition-speed: 0.3s;
  --navbar-height: 70px;
  --container-max-width: 1400px;
}

/* ========================================
   基础重置
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text-dark);
  line-height: 1.6;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* ========================================
   顶部导航栏
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: var(--color-bg-dark);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: background-color var(--transition-speed);
}

.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.95);
}

.navbar-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text-light);
  font-size: 1.5rem;
  font-weight: 600;
}

.navbar-logo img {
  height: 40px;
  margin-right: 10px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.navbar-menu-item {
  position: relative;
}

.navbar-menu-link {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color var(--transition-speed);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-menu-link:hover {
  color: var(--color-primary);
}

.navbar-menu-link.has-dropdown::after {
  content: '▼';
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(0, 0, 0, 0.95);
  min-width: 200px;
  padding: 1rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-speed);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.navbar-menu-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu-item {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--color-text-light);
  text-decoration: none;
  transition: background-color var(--transition-speed);
}

.dropdown-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color var(--transition-speed);
}

.lang-switcher:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-purchase {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color var(--transition-speed);
}

.btn-purchase:hover {
  background-color: var(--color-primary-dark);
}

/* 移动端菜单按钮 */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========================================
   Hero轮播区域
   ======================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  margin-top: var(--navbar-height);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 4rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
  color: var(--color-text-light);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-btn {
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-speed);
}

.hero-btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.hero-btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.hero-btn-secondary {
  background-color: transparent;
  color: var(--color-text-light);
  border: 2px solid var(--color-text-light);
}

.hero-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hero-nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

.hero-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.hero-nav-dot.active {
  background-color: var(--color-text-light);
}

/* ========================================
   产品展示区域
   ======================================== */
.products-section {
  padding: 5rem 2rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-text-dark);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: #f5f5f5;
}

.product-card-content {
  padding: 1.5rem;
}

.product-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
}

.product-card-description {
  color: var(--color-text-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}

.btn-doc {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
  text-align: center;
}

.product-card-actions .btn-doc {
  flex: 1 1 120px;
  min-width: 0;
}

.btn-doc:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.product-card:hover .btn-doc {
  background-color: var(--color-primary-dark);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: #1a1a1a;
  color: var(--color-text-light);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.footer-links a:hover {
  color: var(--color-text-light);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background-color: var(--color-bg-dark);
    flex-direction: column;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-speed);
  }

  .navbar-menu.active {
    transform: translateX(0);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-content {
    padding: 0 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-btn {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   工具类
   ======================================== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
