/* ==========================================
   AegisHut - Components Stylesheet
   ========================================== */

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-lg);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-secondary);
}

/* Navigation Dropdown Menu */
.nav-item-with-dropdown {
  position: relative;
}

.nav-item-with-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-arrow {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-item-with-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: var(--spacing-lg);
  min-width: 800px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  margin-top: 10px;
  z-index: 100;
}

.nav-item-with-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 0;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.dropdown-category {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: var(--color-text);
  padding: 0 0 var(--spacing-xs) 0;
  margin-bottom: var(--spacing-sm);
  display: block;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.dropdown-category:hover {
  color: var(--color-primary);
}

.dropdown-item {
  font-size: 0.875rem;
  color: var(--color-text);
  padding: 6px 0;
  display: block;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.dropdown-item:hover {
  color: var(--color-primary);
}

/* 简单下拉菜单 (About等) */
.dropdown-menu-simple {
  min-width: 200px;
  padding: var(--spacing-sm);
}

.dropdown-menu-simple .dropdown-item {
  padding: var(--spacing-sm);
  border-radius: 4px;
}

.dropdown-menu-simple .dropdown-item:hover {
  background: var(--color-bg-light);
}

.search-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.search-icon:hover {
  opacity: 0.7;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 25px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a; /* 深色背景，避免切换时闪烁紫色 */
  color: white;
  text-align: center;
  overflow: hidden;
}

/* 背景视频 */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
  opacity: 0;
  animation: fadeInVideo 0.8s ease-in forwards;
}

/* 视频淡入动画 */
@keyframes fadeInVideo {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* 视频遮罩层 */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 var(--spacing-md);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Product Card */
.product-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ffffff;  /* 白色背景 */
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* 改为contain，图片完整显示不裁剪 */
  transition: opacity var(--transition-normal);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.product-image img:first-child {
  opacity: 1;
  z-index: 1;
}

.product-image img:nth-child(2) {
  opacity: 0;
  z-index: 2;
}

.product-card:hover .product-image img:first-child {
  opacity: 0;
}

.product-card:hover .product-image img:nth-child(2) {
  opacity: 1;
}

.product-info {
  padding: var(--spacing-md);
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0;
}

/* Blog Card */
.blog-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.blog-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-light);
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-content {
  padding: var(--spacing-md);
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.blog-excerpt {
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
}

.pagination-link,
.pagination-current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pagination-link:hover {
  background: var(--color-bg-light);
  border-color: var(--color-secondary);
}

.pagination-current {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Filter Buttons */
.filter-container {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--spacing-xs) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Footer */
.footer {
  background: var(--color-bg-light);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
}

.footer-section p,
.footer-section a {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--color-text);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* Contact Info */
.contact-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.contact-info img {
  width: 20px;
  height: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-primary);
  color: white;
  border-radius: 4px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* CTA Container */
.cta-container {
  text-align: center;
  margin-top: 80px;
  padding: var(--spacing-lg) 0;
  clear: both;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.about-content {
  max-width: 600px;
}

.about-content p {
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
  color: var(--color-text-light);
}

.about-content .btn {
  margin-top: var(--spacing-md);
  display: inline-block;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

.lang-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

.lang-link:hover,
.lang-link.active {
  color: var(--color-primary);
}

.lang-separator {
  color: var(--color-border);
  font-size: 14px;
}
