/* Energy Tech Product Theme Styles */
/* 从 product-ems.html 模板提取的样式，供所有产品页面使用 */

/* Energy Tech Theme Variables */
:root {
  --energy-green: #2E8B57;
  --energy-blue: #87CEEB;
  --energy-yellow: #FFD700;
  --energy-light-bg: #F0FFF4;
  --energy-dark-text: #1A3320;
  --energy-border: #C6E6C6;
  --energy-accent: #3D7A57;
}

/* Energy Backgrounds */
.energy-light-background {
  background-color: var(--energy-light-bg);
}

.energy-background {
  background-color: var(--energy-green);
  color: white;
}

.energy-tech-specs {
  background: linear-gradient(135deg, var(--energy-light-bg) 0%, #ffffff 100%);
  padding-top: 2rem; /* 进一步减少上方空白 */
  padding-bottom: 3.5rem; /* 适当的下方空白 */
}

.energy-cta-section {
  background: linear-gradient(135deg, var(--energy-green) 0%, var(--energy-accent) 100%);
  color: white;
  text-align: center;
  padding: 50px 0;
  margin: 0;
  width: 100%;
}

/* Energy Typography */
.energy-heading {
  color: var(--energy-dark-text);
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.energy-subtitle {
  color: var(--energy-accent);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.energy-subheading {
  color: var(--energy-green);
  font-weight: 600;
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 4px solid var(--energy-yellow);
}

/* Energy Cards and Components */
.energy-detail-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 30px rgba(46, 139, 87, 0.08);
  border: 1px solid var(--energy-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.energy-detail-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(46, 139, 87, 0.12);
}

/* Energy Features Grid */
.energy-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.energy-feature-card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  border: 1px solid var(--energy-border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.energy-feature-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--energy-green) 0%, var(--energy-blue) 100%);
}

.energy-feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(46, 139, 87, 0.15);
}

.energy-feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--energy-light-bg) 0%, #ffffff 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 2px solid var(--energy-border);
}

.energy-icon {
  font-size: 28px;
  color: var(--energy-green);
}

.energy-feature-card h4 {
  color: var(--energy-dark-text);
  margin-bottom: 15px;
  font-weight: 600;
}

.energy-feature-card p {
  color: #666;
  line-height: 1.6;
}

/* Energy Advantages List */
.energy-advantages-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.energy-advantage-item {
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: white;
  border-radius: 16px;
  border: 2px solid var(--energy-border);
  box-shadow: 0 6px 20px rgba(46, 139, 87, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.energy-advantage-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(46, 139, 87, 0.15);
  border-color: var(--energy-green);
}

.energy-advantage-item:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--energy-green), var(--energy-accent));
  border-radius: 6px 0 0 6px;
}

/* Removed number styling as numbers are no longer used */
/* .energy-advantage-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--energy-green) 0%, var(--energy-accent) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 20px;
  box-shadow: 0 6px 15px rgba(46, 139, 87, 0.3);
  position: relative;
  z-index: 1;
}

.energy-advantage-number:after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg, var(--energy-green) 0%, var(--energy-accent) 100%);
  border-radius: 50%;
  opacity: 0.3;
  z-index: -1;
  animation: pulse 2s infinite;
} */

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.3;
  }
}

.energy-advantage-content h4 {
  color: var(--energy-dark-text);
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.3rem;
  position: relative;
  padding-left: 15px;
}

.energy-advantage-content h4:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--energy-yellow);
  border-radius: 50%;
}

.energy-advantage-content p {
  color: #555;
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 0;
}

/* Energy Specs Table */
.energy-specs-table {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(46, 139, 87, 0.08);
  border: 1px solid var(--energy-border);
}

.energy-specs-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.energy-specs-table th {
  background: linear-gradient(135deg, var(--energy-green) 0%, var(--energy-accent) 100%);
  color: white;
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  border-bottom: 3px solid var(--energy-yellow);
}

.energy-specs-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--energy-border);
  vertical-align: top;
}

.energy-specs-table tbody tr {
  transition: background-color 0.2s ease;
}

.energy-specs-table tbody tr:hover {
  background-color: var(--energy-light-bg);
}

.energy-specs-table tbody tr:nth-child(even) {
  background-color: rgba(240, 255, 244, 0.3);
}

/* Energy CTA Section */
.energy-cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.energy-cta-title {
  color: white;
  margin-bottom: 20px;
  font-size: 2.5rem;
  font-weight: 700;
}

.energy-cta-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Energy Buttons */
.btn-energy-primary {
  background: linear-gradient(135deg, var(--energy-yellow) 0%, #FFC107 100%);
  color: var(--energy-dark-text);
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-energy-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
  color: var(--energy-dark-text);
  background: linear-gradient(135deg, #FFC107 0%, var(--energy-yellow) 100%);
}

.btn-energy-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-energy-secondary:hover {
  background: white;
  color: var(--energy-green);
  transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .energy-features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .energy-advantages-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .energy-cta-title {
    font-size: 2rem;
  }

  .energy-detail-card {
    padding: 20px;
  }

  .energy-advantage-item {
    text-align: center;
  }

   /* Removed number styling for responsive as numbers are no longer used */
   /* .energy-advantage-number {
     margin: 0 auto 15px;
   } */

   .energy-tech-specs {
     padding-top: 1.5rem;
     padding-bottom: 2.5rem;
   }
 }

/* Animation for Energy Content */
.energy-content p {
  line-height: 1.8;
  margin-bottom: 15px;
  color: var(--energy-dark-text);
}

/* Energy Hero Section */
.energy-hero-section {
  background: linear-gradient(135deg, var(--energy-light-bg) 0%, #ffffff 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.energy-hero-section:before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--energy-blue) 0%, transparent 70%);
  opacity: 0.1;
  border-radius: 50%;
}

.energy-hero-section:after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--energy-green) 0%, transparent 70%);
  opacity: 0.05;
  border-radius: 50%;
}

/* Energy Breadcrumbs */
.breadcrumbs {
  margin-bottom: 30px;
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--energy-accent);
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--energy-green);
}

.breadcrumbs .current {
  color: var(--energy-dark-text);
  font-weight: 500;
}

.breadcrumbs i {
  color: var(--energy-border);
  margin: 0 8px;
}

/* Energy Badges */
.product-badge-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

.badge-energy {
  background: linear-gradient(135deg, var(--energy-green) 0%, var(--energy-accent) 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
}

.badge-tech {
  background: linear-gradient(135deg, var(--energy-blue) 0%, #5DADE2 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
}

.product-code {
  color: var(--energy-dark-text);
  font-size: 0.9rem;
  font-weight: 600;
  padding-left: 15px;
  border-left: 2px solid var(--energy-border);
}

/* Product Hero Content */
.product-hero-title {
  color: var(--energy-dark-text);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  position: relative;
}

.product-hero-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--energy-yellow) 0%, var(--energy-green) 100%);
  border-radius: 2px;
}

.product-hero-subtitle {
  color: var(--energy-accent);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 25px;
  line-height: 1.5;
}

.product-hero-description p {
  color: #666;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 30px;
}

.product-hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* Energy System Visualization */
.product-visualization {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.energy-system-visual {
  position: relative;
  width: 350px;
  height: 350px;
  margin: 0 auto;
}

.system-node {
  position: absolute;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(46, 139, 87, 0.1);
  border: 2px solid var(--energy-border);
  transition: all 0.3s ease;
}

.system-node:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(46, 139, 87, 0.15);
  border-color: var(--energy-green);
}

.system-node i {
  font-size: 28px;
  margin-bottom: 8px;
}

.system-node span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--energy-dark-text);
}

/* Node positions */
.node-grid { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.node-pv { top: 20%; left: 20%; }
.node-wind { top: 20%; left: 80%; }
.node-storage { top: 80%; left: 20%; }
.node-load { top: 80%; left: 80%; }
.node-ems { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Node colors */
.node-grid i { color: var(--energy-green); }
.node-pv i { color: #FFA500; }
.node-wind i { color: var(--energy-blue); }
.node-storage i { color: #9B59B6; }
.node-load i { color: #E74C3C; }
.node-ems i { color: var(--energy-yellow); }

/* Connection lines */
.system-connection {
  position: absolute;
  background: var(--energy-border);
  height: 2px;
  border-radius: 1px;
  z-index: -1;
}

/* Core Advantages Section */
.core-advantages {
  padding: 60px 0 40px;
}

.advantage-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(46, 139, 87, 0.08);
  border: 1px solid var(--energy-border);
  height: 100%;
  transition: all 0.3s ease;
}

.advantage-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(46, 139, 87, 0.12);
  border-color: var(--energy-green);
}

.advantage-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--energy-light-bg) 0%, #ffffff 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  border: 2px solid var(--energy-border);
}

.advantage-icon i {
  font-size: 32px;
  color: var(--energy-green);
}

.advantage-card h4 {
  color: var(--energy-dark-text);
  margin-bottom: 15px;
  font-weight: 600;
}

.advantage-card p {
  color: #666;
  line-height: 1.6;
}

/* Header Styling Updates for Energy Theme */
.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(46, 139, 87, 0.1);
  border-bottom: 1px solid var(--energy-border);
}

.navmenu a.active,
.navmenu a:hover {
  color: var(--energy-green) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--energy-green) 0%, var(--energy-accent) 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--energy-accent) 0%, var(--energy-green) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.2);
  color: white;
}

/* Footer Styling Updates */
.footer {
  background: var(--energy-dark-text);
  color: rgba(255, 255, 255, 0.8);
  border-top: 4px solid var(--energy-green);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--energy-yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.company-tagline {
  color: var(--energy-yellow);
}

/* Energy Product Gallery */
.energy-product-gallery {
  margin-top: 20px;
}

.gallery-main {
  margin-bottom: 20px;
}

.main-image .product-image-placeholder {
  transition: all 0.3s ease;
}

.main-image .product-image-placeholder:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(46, 139, 87, 0.15);
  border-color: var(--energy-green);
}

.main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  max-width: 550px; /* 增加到550px以容纳4个缩略图 */
  margin-left: auto;
  margin-right: auto;
}

/* 当只有1-4个缩略图时，确保它们在同一行 */
.gallery-thumbs:has(.thumbnail:nth-child(4)):not(:has(.thumbnail:nth-child(5))) {
  flex-wrap: nowrap;
}

.gallery-thumbs:has(.thumbnail:nth-child(3)):not(:has(.thumbnail:nth-child(4))) {
  flex-wrap: nowrap;
}

.gallery-thumbs:has(.thumbnail:nth-child(2)):not(:has(.thumbnail:nth-child(3))) {
  flex-wrap: nowrap;
}

/* 当只有一个缩略图时隐藏整个gallery-thumbs容器 */
.gallery-thumbs:has(.thumbnail:only-child) {
  display: none;
}

/* 特殊情况：如果需要显示单个缩略图（用于调试或特殊需求） */
.gallery-thumbs.show-single-thumb:has(.thumbnail:only-child) {
  display: flex;
  flex-wrap: nowrap;
}

.thumbnail {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--energy-border);
  transition: all 0.3s ease;
  position: relative;
  flex: 0 0 auto; /* 不增长，不收缩，自动宽度 */
  min-width: 100px; /* 最小宽度 */
  max-width: 120px; /* 最大宽度 */
}

.thumbnail:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.1);
  border-color: var(--energy-green);
}

.thumbnail.active {
  border-color: var(--energy-green);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.2);
}

.thumbnail.active:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--energy-green) 0%, var(--energy-blue) 100%);
  z-index: 1;
}

.thumbnail img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  text-align: center;
  padding: 15px;
  background: rgba(240, 255, 244, 0.5);
  border-radius: 8px;
  border-left: 4px solid var(--energy-yellow);
  margin-top: 10px;
}

.gallery-caption p {
  color: var(--energy-dark-text);
  margin: 0;
  font-style: italic;
  line-height: 1.6;
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
  .gallery-thumbs {
    gap: 10px;
    max-width: 350px;
  }
  
  /* 在移动端，调整缩略图宽度以适应更多缩略图 */
  .thumbnail {
    flex: 0 0 calc(50% - 5px); /* 2列布局，考虑gap */
    min-width: unset; /* 覆盖桌面端的最小宽度 */
    max-width: unset; /* 覆盖桌面端的最大宽度 */
  }
  
  /* 在移动端，确保不超过2列布局 */
  .gallery-thumbs {
    flex-wrap: wrap;
  }
  
  /* 在移动端也保持单缩略图隐藏 */
  .gallery-thumbs:has(.thumbnail:only-child) {
    display: none;
  }
  
  .thumbnail img {
    height: 70px;
  }
}