/* 新能族网站公共样式 */

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2e7d32;
  --primary-light: #4caf50;
  --primary-dark: #1b5e20;
  --secondary-color: #0096ff;
  --accent-color: #ff9800;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: all var(--transition-normal);
}

.navbar:hover {
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  transition: transform var(--transition-fast);
}

.navbar-brand:hover {
  transform: scale3d(1.02, 1.02, 1);
}

.navbar-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.navbar-menu {
  display: flex;
  gap: 28px;
  align-items: center;
}

.navbar-menu a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.navbar-menu a:hover {
  color: var(--primary-color);
  background: rgba(46, 125, 50, 0.08);
}

.navbar-menu a:hover::after {
  width: 60%;
}

.navbar-menu a.active {
  color: var(--primary-color);
  font-weight: 600;
  background: rgba(46, 125, 50, 0.1);
}

/* Banner样式 */
.banner {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 50%,
    #15803d 100%
  );
  color: #fff;
  padding: 90px 30px;
  text-align: center;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: float 8s ease-in-out infinite;
}

.banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 70%
  );
  animation: float-reverse 10s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, -20px, 0) rotate(3deg);
  }
}

@keyframes float-reverse {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(0, 20px, 0) rotate(-3deg);
  }
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner h1 {
  font-size: 40px;
  margin: 0 0 20px 0;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.banner p {
  font-size: 18px;
  margin: 0 0 35px 0;
  opacity: 0.95;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

/* 按钮样式 */
.btn-primary {
  background: #fff;
  color: var(--primary-color);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: var(--shadow-xl);
  background: #fafafa;
}

.btn-primary:active {
  transform: translate3d(0, -1px, 0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* 主内容区域 */
.main-content {
  width: 100%;
  max-width: 1280px;
  margin: 60px auto;
  padding: 0 24px;
  flex: 1;
}

/* 网格布局 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 卡片样式 */
.card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  border: 1px solid var(--border-color);
  position: relative;
  backface-visibility: hidden;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transition: width var(--transition-normal);
  transform: translateX(-50%);
  border-radius: 0 0 3px 3px;
  clip-path: inset(0 16px 0 16px);
}

.card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card:hover::before {
  width: calc(100% - 2px);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: inline-block;
  transition: transform var(--transition-normal);
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 600;
}

.card p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.card a {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.card a:hover {
  background: rgba(46, 125, 50, 0.1);
}

/* 页面标题 */
.page-title {
  font-size: 36px;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 48px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 分类标签 */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.category-tab {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-tab:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(46, 125, 50, 0.05);
}

.category-tab.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* 列表项样式 */
.list-item {
  background: var(--bg-card);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 20px;
}

.list-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.list-item-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-desc {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 统计数据 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 页脚样式 */
.footer {
  background: #0f172a;
  padding: 48px 24px 24px;
  color: #94a3b8;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand img {
  height: 36px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #94a3b8;
}

.footer-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  font-size: 13px;
  color: #64748b;
}

.footer-bottom a {
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--primary-light);
}

/* 资讯卡片 */
.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.modal-category {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 12px;
}

.modal-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #64748b;
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  font-size: 16px;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 16px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #2e7d32;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modal-link:hover {
  background: #1f5f23;
  transform: translateY(-1px);
}

.news-card-image {
  height: 180px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
}

.news-card-content {
  padding: 20px;
}

.news-card-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(46, 125, 50, 0.1);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  margin-bottom: 12px;
}

.news-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all var(--transition-fast);
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }

  .navbar-menu {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar-menu a {
    padding: 6px 10px;
    font-size: 14px;
  }

  .banner {
    padding: 60px 20px;
  }

  .banner h1 {
    font-size: 28px;
  }

  .banner p {
    font-size: 16px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 24px;
    font-size: 15px;
  }

  .main-content {
    margin: 40px auto;
    padding: 0 16px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-value {
    font-size: 24px;
  }

  .list-item {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .list-item-content {
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 18px;
  }

  .navbar-brand img {
    height: 32px;
  }

  .banner h1 {
    font-size: 24px;
  }

  .banner p {
    font-size: 15px;
  }

  .card {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 动画效果 */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}

/* 新闻卡片样式 */
.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.news-card-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.news-card-content {
  padding: 20px;
}

.news-card-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(46, 125, 50, 0.1);
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.news-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* 统计卡片样式 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 渐变背景效果 */
.gradient-bg {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
}

/* 强调色卡片 */
.highlight-card {
  border: 2px solid var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(46, 125, 50, 0.05) 0%,
    rgba(0, 150, 255, 0.05) 100%
  );
}
