/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #fff;
    color: #1d1d1f;
    line-height: 1.5;
}

/* 导航栏样式 */
header {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav {
    width: 100%;
}

.nav-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 44px;
}

.logo {
    font-size: 21px;
    font-weight: 600;
    margin-right: 30px;
}

.nav-links {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-links li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #1d1d1f;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* 下拉菜单样式 - 添加淡入淡出效果 */
.dropdown-content {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 0 0 10px 10px;
    z-index: 1;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content,
.search-dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    color: #1d1d1f;
    padding: 8px 20px;
    text-decoration: none;
    display: block;
    font-size: 12px;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f5f5f7;
}

/* 搜索面板样式 */
.search-panel {
    width: 300px;
    padding: 15px;
    right: 0;
    left: auto;
}

.search-panel form {
    display: flex;
    align-items: center;
    position: relative;
}

.search-panel input {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border: 1px solid #d2d2d7;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.search-panel button {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #1d1d1f;
}

/* 主内容区样式 */
main {
    padding-top: 50px;
}

.hero {
    text-align: center;
    padding: 80px 22px;
    max-width: 980px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.07143;
}

.hero p {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
    color: #86868b;
    line-height: 1.10722;
}

.cta-link {
    display: inline-block;
    margin-top: 20px;
    color: #0066cc;
    font-size: 21px;
    text-decoration: none;
}

.cta-link i {
    font-size: 16px;
    margin-left: 8px;
    transition: transform 0.3s;
}

.cta-link:hover i {
    transform: translateX(4px);
}

/* 卡片区域样式 */
.news-section, .innovation-section {
    max-width: 980px;
    margin: 60px auto;
    padding: 0 22px;
}

.news-section h2, .innovation-section h2 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.card {
    background-color: #f5f5f7;
    border-radius: 18px;
    padding: 30px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.card .date {
    color: #86868b;
    font-size: 14px;
    margin-bottom: 15px;
}

.card .desc {
    color: #515154;
    font-size: 16px;
    line-height: 1.5;
}

/* 页脚样式 */
footer {
    background-color: #f5f5f7;
    padding: 20px 0;
    text-align: center;
    margin-top: 60px;
}

footer p {
    font-size: 12px;
    color: #86868b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }
    
    .hero p {
        font-size: 20px;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .nav-links li:not(.search-dropdown) {
        display: none;
    }
    
    .search-dropdown {
        margin-left: auto;
    }
    
    .search-panel {
        width: 280px;
        right: -70px;
    }
}
/* 搜索面板稳定性增强 */
.search-panel {
    width: 300px;
    padding: 15px;
    right: 0;
    left: auto;
    pointer-events: auto; /* 确保可以交互 */
}

.search-panel form {
    display: flex;
    align-items: center;
    position: relative;
    pointer-events: auto; /* 确保可以交互 */
}

.search-panel input {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border: 1px solid #d2d2d7;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    pointer-events: auto; /* 确保可以交互 */
}

.search-panel button {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #1d1d1f;
    pointer-events: auto; /* 确保可以交互 */
}

/* 确保下拉内容可以交互 */
.dropdown-content {
    pointer-events: auto;
}
/* 搜索结果页特定样式 */
.search-results {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.search-header {
    margin-bottom: 30px;
}

.search-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}

.search-header p {
    color: #86868b;
    font-size: 14px;
}

.result-card {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #d2d2d7;
}

.result-card h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.3;
}

.result-card h2 a {
    color: #1a73e8;
    text-decoration: none;
}

.result-card h2 a:hover {
    text-decoration: underline;
}

.result-card .url {
    color: #0d652d;
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-all;
}

.result-card .date {
    color: #86868b;
    font-size: 14px;
    margin-bottom: 5px;
}

.result-card .snippet {
    color: #515154;
    font-size: 16px;
    line-height: 1.5;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.pagination a:hover, .pagination a.active {
    background-color: #f5f5f7;
}

.pagination a i {
    font-size: 12px;
}
/* 确保搜索面板初始状态不可见 */
.search-dropdown .dropdown-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

/* 激活状态下的搜索面板 */
.search-dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* 搜索面板样式 - 保持淡入淡出效果 */
.search-dropdown .dropdown-content {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.search-panel {
    pointer-events: auto;
}
.logo-link {
    color: inherit;       /* 继承父元素颜色，通常是黑色 */
    text-decoration: none; /* 去掉下划线 */
    font-weight: 600;      /* 保持加粗 */
    font-size: 21px;       /* 保持字体大小 */
}

.logo-link:hover {
    opacity: 0.8;          /* 鼠标悬停时淡入效果，可选 */
}
/* 确保搜索面板在输入时保持可见 */
.search-dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  display: block !important;
}

/* 防止移动设备上的意外关闭 */
@media (max-width: 768px) {
  .search-panel {
    right: -50px;
    width: 280px;
  }
  
  .search-dropdown.active .dropdown-content {
    transition-delay: 0.1s;
  }
}
/* 汉堡按钮只在小屏显示 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #1d1d1f;
}

/* 手机竖屏：最大宽度768px下生效 */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;       /* 默认隐藏菜单 */
    flex-direction: column;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    position: absolute;
    top: 44px;           /* 高度为导航栏高度 */
    left: 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1000;
  }

  /* 展开状态时显示菜单 */
  .nav-links.open {
    display: flex;
    max-height: 500px; /* 根据内容调大 */
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    padding: 12px 20px;
    font-size: 14px;
    display: block;
  }

  /* 下拉菜单改为点击展开，而非悬停 */
  .dropdown-content {
    position: static;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  /* 子菜单展开 */
  .dropdown.open > .dropdown-content {
    max-height: 500px; /* 根据内容调整 */
    padding: 8px 0;
  }

  /* 取消鼠标悬停的显示方式 */
  .dropdown:hover > .dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
}


/* 侧边导航栏样式 - 苹果风格 */
main {
  width: 100%;
  max-width: 100% !important;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.main-with-sidenav {
  display: flex;
  width: 100%;
  max-width: 100% !important;
  margin: 0;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 20px;
}

.side-nav {
  width: 170px;
  flex-shrink: 0;
  background-color: #fafafa;
  padding: 0;
}

.side-nav:first-child {
  border-right: 1px solid #d2d2d7;
}

.side-nav:last-child {
  border-left: 1px solid #d2d2d7;
}

.side-nav .nav-section {
  padding: 0;
  border-bottom: 1px solid #d2d2d7;
}

.side-nav .nav-section:last-child {
  border-bottom: none;
}

/* 蓝色标题栏 */
.side-nav .nav-header {
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  background-color: #114d88;
  padding: 5px 15px;
  margin: 0;
}
.side-nav .nav-list li.primary a {
  font-weight: 600;
}

/* 专区样式 - 灰色背景带箭头 */
.side-nav .zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e8e8ed;
  padding: 1px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.side-nav .zone-header:hover .zone-title {
  color: #0071e3;
}

.side-nav .zone-header:hover .zone-arrow i {
  color: #0071e3;
}

.side-nav .zone-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
}

.side-nav .zone-arrow {
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-nav .zone-arrow i {
  font-size: 10px;
  color: #86868b;
}

.side-nav .nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-nav .nav-list li {
  margin: 0;
}

.side-nav .nav-list a {
  display: block;
  padding: 5px 15px;
  color: #1d1d1f;
  text-decoration: none;
  font-size: 10px;
  transition: color 0.2s;
}

.side-nav .nav-list a:hover {
  color: #0071e3;
}

/* 主产品链接加粗 */


/* 响应式设计 */
@media (max-width: 1200px) {
  .side-nav {
    width: 160px;
  }
}

@media (max-width: 992px) {
  .side-nav {
    width: 140px;
  }
}

@media (max-width: 768px) {
  .main-with-sidenav {
    flex-direction: column;
  }
  .side-nav {
    width: 100%;
    border: none !important;
  }
  .side-nav .nav-section {
    border-bottom: 1px solid #d2d2d7;
  }
  .main-content {
    padding: 15px;
  }
}
/* 搜索框直接显示在导航栏上的样式 */
.search-dropdown {
    padding: 0 10px;
}

.search-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.search-form input {
    width: 180px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #d2d2d7;
    border-radius: 15px;
    font-size: 12px;
    outline: none;
    background-color: #fff;
}

.search-form input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 2px rgba(0,113,227,0.2);
}

.search-form button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 5px;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: #f5f5f7;
}

/* 小屏幕下调整搜索框宽度（仅影响搜索框） */
@media (max-width: 768px) {
    .search-form input {
        width: 120px;
    }
}