/* 柒颜首页 */
:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --secondary: #4caf50;
  --accent: #8bc34a;
  --light: #f1f8e9;
  --dark: #212529;
  --text: #333;
  --text-light: #6c757d;
  --white: #fff;
  --success: #28a745;
  --warning: #ffc107;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background-color: var(--light);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 导航栏样式 */
nav {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.logo i {
  margin-right: 0.5rem;
  color: var(--accent);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 2rem;
}

nav ul li a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

nav ul li a:hover {
  color: var(--primary);
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav ul li a:hover::after {
  width: 100%;
}

/* 头部Banner */
.hero-banner {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("../../images/柒颜大图.jpg") center/cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 10rem 1rem 8rem;
  margin-top: 60px;
  position: relative;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-banner h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-banner p {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: var(--primary);
}

/* 关于我们 */
.about-section {
  padding: 5rem 1rem;
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--dark);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 1rem auto;
  border-radius: 2px;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
}

/* 核心业务 */
.services-section {
  padding: 5rem 1rem;
  background: var(--light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  border-top: 4px solid var(--accent);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.service-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.service-link i {
  margin-left: 0.5rem;
  transition: var(--transition);
}

.service-link:hover i {
  transform: translateX(5px);
}

/* 产品展示 */
.products-section {
  padding: 5rem 1rem;
  background: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.product-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.product-content {
  padding: 1.5rem;
}

.product-card h3 {
  color: var(--dark);
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
}

.product-card p {
  color: var(--text-light);
  margin-bottom: 1.2rem;
}

/* 数据仪表盘 */
.dashboard-section {
  padding: 5rem 1rem;
  background: var(--light);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.data-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.data-card:hover {
  transform: translateY(-5px);
}

.data-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.data-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.data-unit {
  color: var(--text-light);
  font-size: 0.9rem;
}

.progress-bar {
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  margin-top: 1rem;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 4px;
}

/* 控制系统 */
.control-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.control-item {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.control-item:hover {
  transform: translateY(-5px);
}

.control-item h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin: 1rem 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.status {
  font-weight: 500;
}

.status.on {
  color: var(--primary);
}

.status.off {
  color: #f44336;
}

/* 图表容器 */
.chart-container {
  height: 400px;
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin: 3rem auto;
  max-width: 1200px;
}

/* 页脚 */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 1rem 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-about p {
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-links h3::after,
.footer-contact h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--accent);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--white);
  opacity: 0.8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  padding-left: 5px;
}

.footer-contact p {
  margin-bottom: 0.8rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 0.5rem;
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--white);
  text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .hero-banner h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    transition: var(--transition);
  }

  nav ul.active {
    left: 0;
  }

  nav ul li {
    margin: 1rem 0;
  }

  .hero-banner {
    padding: 4rem 1rem 2rem;
  }

  .hero-banner h1 {
    font-size: 2.2rem;
  }

  .hero-banner p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .services-grid,
  .products-grid,
  .dashboard-grid,
  .control-panel {
    grid-template-columns: 1fr;
  }

  .chart-container {
    padding: 1rem;
    height: 300px;
  }
}
