/* styles/main.css */
:root {
  --primary-color: #2c6e49; /* 一个科技感绿色 */
  --background-color: #f0f2f5;
  --card-background-color: #ffffff;
  --text-color: #333333;
  --text-secondary-color: #555555;
  --border-color: #e0e0e0;
  --font-family-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html {
  font-family: var(--font-family-sans);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  color: var(--primary-color);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  flex-grow: 1; /* Makes container take available space */
}

/* Navigation Styles */
nav {
    /* background-color: var(--primary-color); */ /* Old dark background */
    background-color: var(--card-background-color); /* 改为浅色背景 */
    padding: 0.8rem 0; /* 调整导航栏整体上下内边距 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.06); /* 更微妙的阴影 */
    position: sticky; /* 让导航栏在滚动时固定在顶部 */
    top: 0;
    z-index: 1000; /* 确保在最上层 */
    border-bottom: 1px solid var(--border-color); /* 底部细线增加质感 */
}
.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px; /* 确保导航栏有个最小高度 */
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 40px;
  margin-right: 12px;
  vertical-align: middle;
}
.brand-name {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--primary-color);
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
nav li {
    /* margin-left: 1.5rem; */ /* Old spacing */
    margin-left: 2.5rem; /* 增大链接间距 */
}
nav li:first-child {
    margin-left: 0; /* 第一个链接项通常不需要左边距 */
}
nav li a {
    /* color: white; */ /* Old color for dark background */
    color: var(--text-secondary-color); /* 默认链接颜色改为次要文字颜色 */
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 0.3rem; /* 增加链接自身的垂直和少量水平内边距 */
    position: relative; /* 为了伪元素 ::after */
    transition: color 0.2s ease;
}
nav li a:hover {
    color: var(--primary-color); /* 悬停时变为主色 */
    text-decoration: none;
}

nav li a.active {
    color: var(--primary-color); /* 激活状态颜色为主色 */
    font-weight: 600; /* 可以比普通悬停更粗一点 */
    /* border-bottom: 3px solid var(--primary-color); */ /* Old active style */
}

/* 使用 ::after 创建下划线动画效果 */
nav li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* 下划线粗细 */
    bottom: 0; /* 定位在文字底部 */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}
nav li a:hover::after,
nav li a.active::after {
    width: 100%; /* 悬停或激活时，下划线展开 */
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #e9ecef;
    color: var(--text-secondary-color);
    margin-top: auto; /* Pushes footer to the bottom if content is short */
}

/* Form Input Focus Styles */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 110, 73, 0.2); /* Subtle focus ring */
  outline: none; /* Remove default browser outline if custom one is good */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Custom Scrollbar Styles (WebKit) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--background-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
  border: 2px solid var(--background-color); /* Creates padding around thumb */
}
::-webkit-scrollbar-thumb:hover {
  background-color: #1e4d32; /* Darker primary on hover */
}

/* Text Block for Readability */
.text-block {
  max-width: 65ch;
  margin-left: auto; /* Center if not full width */
  margin-right: auto; /* Center if not full width */
}

/* Dashboard specific styles */
#devicePanel { /* 这个ID现在是外层容器 */
    display: flex; /* 使用 Flexbox 进行左右布局 */
    gap: 20px; /* 列表和详情之间的间距 */
    background-color: var(--card-background-color); /* 保持原有背景 */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-height: 450px; /* 整体最小高度 */
    align-items: flex-start; /* 确保子元素顶部对齐 */
}

#deviceListContainer {
    flex: 1; /* 占据可用空间的1份 */
    min-width: 200px; /* 最小宽度，防止被过度挤压 */
    max-height: 400px; /* 列表区域最大高度，超出则滚动 */
    overflow-y: auto;
    padding-right: 10px; /* 给滚动条留出空间，或美化滚动条 */
    border-right: 1px solid var(--border-color); /* 视觉分隔线 */
}

#deviceDetailsArea {
    flex: 2; /* 占据可用空间的2份，更宽 */
    min-width: 300px;
    max-height: 400px; /* 详情区域最大高度，超出则滚动 */
    overflow-y: auto;
    padding-left: 10px;
}

/* 设备列表项优化 */
#deviceListContainer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#deviceListContainer li {
    padding: 10px 8px; /* 增加垂直和水平内边距 */
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex; /* 使用flex布局状态指示器和文字 */
    align-items: center;
    justify-content: space-between; /* 让状态指示器靠右 */
}

#deviceListContainer li:last-child {
    border-bottom: none;
}

#deviceListContainer li:hover {
    background-color: #f0f8ff; /* 淡蓝色悬停效果 */
}

#deviceListContainer li.active {
    background-color: #e6f2ff; /* 更明显的选中背景 */
    font-weight: bold;
    border-left: 3px solid var(--primary-color); /* 添加左边框作为强调 */
    padding-left: 5px; /* 调整内边距以适应边框 */
}
#deviceListContainer li .device-name {
    font-size: 0.95rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 10px; /* 与设备名称的间距 */
    display: inline-block; /* 确保能显示 */
}
.status-online { background-color: var(--primary-color); }
.status-offline { background-color: #aaa; }
.status-error { background-color: #e74c3c; }


/* 设备详情区域优化 */
#deviceDetailsArea h4 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px; /* 增加标题下的间距 */
    margin-bottom: 18px; /* 增加标题和第一项详情的间距 */
}
#deviceDetailsArea p {
    margin: 10px 0; /* 增加段落间的垂直间距 */
    font-size: 0.9rem;
    line-height: 1.6; /* 略微增加行高 */
}
#deviceDetailsArea p strong {
    display: inline-block;
    width: 90px; /* 对齐标签 */
    color: var(--text-secondary-color);
}

/* 响应式调整: 如果屏幕过小，则列表和详情垂直堆叠 */
@media (max-width: 860px) { /* 调整这个断点以适应您的布局 */
    #devicePanel {
        flex-direction: column; /* 垂直堆叠 */
        min-height: auto; /* 高度自动 */
    }
    #deviceListContainer, #deviceDetailsArea {
        flex: none; /* 取消flex比例 */
        width: 100%; /* 占据全部宽度 */
        max-height: 300px; /* 限制各自高度 */
        border-right: none; /* 移除垂直分隔线 */
        padding-right: 0;
        padding-left: 0;
    }
    #deviceListContainer {
        margin-bottom: 20px; /* 列表和详情之间的垂直间距 */
        border-bottom: 1px solid var(--border-color); /* 分隔线 */
    }
    #deviceDetailsArea {
        border-top: none; /* 移除多余的上边框 */
    }
}

/* Testimonials Section Styles */
.testimonials {
    padding: 3rem 0;
    /* background-color: var(--background-color); */ /* Optional: keep same as page or slight variation */
}
.testimonials h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color); /* Match other section titles */
    margin-bottom: 3rem;
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.testimonial-item {
    background-color: var(--card-background-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    border-left: 5px solid var(--primary-color); /* 左侧强调线 */
    display: flex;
    flex-direction: column; /* text-align: center; */ /* Avatar and text might need different alignments */
}
.testimonial-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ced4da;
    color: var(--text-secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem; /* Increased font size for Unicode icon */
    margin: 0 auto 1.5rem auto; /* Center the avatar */
}
.testimonial-item blockquote {
    margin: 0 0 1rem 0; /* Reset browser default blockquote margins */
    flex-grow: 1; /* Allow blockquote to take space */
}
.testimonial-item blockquote p {
    font-style: italic;
    color: var(--text-secondary-color);
    margin-bottom: 1rem;
    line-height: 1.8;
    position: relative;
    padding-left: 30px; /* 为引号留出空间 */
}
.testimonial-item blockquote p::before { /* CSS生成的引号 */
    content: '“';
    font-size: 3em;
    font-family: 'Georgia', serif; /* A font with nice quotes */
    color: var(--primary-color);
    opacity: 0.5;
    position: absolute;
    left: -5px;
    top: -0.3em; /* Adjust for vertical alignment */
    line-height: 1;
}
.testimonial-item footer {
    text-align: right;
    font-weight: bold;
    color: var(--text-color);
    margin-top: auto; /* Push footer to bottom if item is flex column */
    background-color: transparent !important; /* Override global footer style if any */
    padding: 0 !important; /* Override global footer style if any */
}

/* Partners Section Styles */
.partners {
    padding: 2rem 0 3rem 0; /* 页脚前的间距 */
    text-align: center;
}
.partners h3 {
    text-align:center;
    color: var(--text-secondary-color); 
    margin-bottom: 2rem; /* Increased margin */ 
    font-weight: normal;
}
.partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem; /* Increased gap for better spacing */
}
.partner-logos span {
    color: #999; /* 模拟logo的灰色, slightly darker */
    font-size: 0.9rem;
    border: 1px solid #ddd; /* Lighter border */
    padding: 12px 25px; /* Adjusted padding */
    border-radius: 6px; /* Slightly more rounded */
    background-color: var(--card-background-color);
}

.hero-logo {
    height: 64px;
    margin-bottom: 1.2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.footer-logo {
    height: 40px;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.mission-logo {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 24px rgba(44,110,73,0.10);
    border: 1.5px solid var(--border-color);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.15rem;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(44,110,73,0.06);
}
.cta-button:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(44,110,73,0.18);
    text-decoration: none;
}
.hero-slogan {
    font-size: 1.25rem;
    color: var(--primary-color);
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
    margin-top: -0.5rem;
}
.feature-desc {
    font-size: 0.98rem;
    color: var(--text-secondary-color);
    line-height: 1.7;
    margin-top: 0.7rem;
}
.feature-image {
    transition: transform 0.25s cubic-bezier(.4,1.4,.6,1), filter 0.25s;
}
.feature-item:hover .feature-image {
    transform: scale(1.06);
    filter: brightness(1.05) contrast(1.08) saturate(1.1);
    box-shadow: 0 6px 18px rgba(44,110,73,0.10);
}
.mission-hr {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    margin: 0.5rem 0 1.2rem 0;
}
.mission-subtitle {
    color: var(--text-secondary-color);
    font-size: 1.08rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.mission-team-label {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
} 