/* ==========================================
   上海申北爱信诺航天信息有限公司
   主样式文件
   ========================================== */

:root {
  --primary-color: #1a4d7c;
  --primary-light: #2563a0;
  --primary-dark: #0f3250;
  --secondary-color: #ff6b35;
  --accent-color: #00a8e8;
  --text-dark: #2c3e50;
  --text-gray: #7f8c8d;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --success: #27ae60;
  --danger: #e74c3c;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #fff;
}

/* ==================== 通用样式 ==================== */

container, .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a:hover {
  color: var(--secondary-color);
}

button, .btn {
  padding: 12px 28px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 77, 124, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ==================== 头部导航 ==================== */

header {
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background-color: var(--primary-dark);
  color: white;
  padding: 8px 0;
  font-size: 12px;
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-info {
  display: flex;
  gap: 30px;
}

.contact-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 40px;
}

nav a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 15px;
}

nav a:hover {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  margin: 5px 0;
  transition: var(--transition);
}

/* ==================== 轮播图 ==================== */

.slider {
  position: relative;
  height: 600px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  width: 100%;
  padding: 0 20px;
}

.slide h1 {
  font-size: 56px;
  margin-bottom: 20px;
  animation: slideInUp 0.8s ease;
}

.slide p {
  font-size: 20px;
  margin-bottom: 30px;
  animation: slideInUp 0.8s ease 0.2s backwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slider-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: white;
  transform: scale(1.2);
}

/* ==================== 特性区域 ==================== */

.features {
  padding: 80px 20px;
  background-color: var(--bg-light);
}

.features .container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-gray);
  font-size: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  background: white;
  padding: 40px 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.feature-card p {
  color: var(--text-gray);
  line-height: 1.8;
}

/* ==================== 关于区域 ==================== */

.about {
  padding: 80px 20px;
  background-color: white;
}

.about .container {
  max-width: 1200px;
  margin: 0 auto;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-gray);
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 15px;
}

.about-features {
  list-style: none;
  margin-top: 30px;
}

.about-features li {
  padding: 12px 0;
  display: flex;
  gap: 10px;
  color: var(--text-dark);
}

.about-features li:before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
  font-size: 18px;
}

.about-image {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 8px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
}

/* ==================== 产品服务 ==================== */

.products {
  padding: 80px 20px;
  background-color: var(--bg-light);
}

.products .container {
  max-width: 1200px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 60px;
}

.product-content {
  padding: 30px;
}

.product-content h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.product-content p {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.8;
}

.product-content a {
  color: var(--secondary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-content a:after {
  content: "→";
}

/* ==================== 新闻区域 ==================== */

.news {
  padding: 80px 20px;
  background-color: white;
}

.news .container {
  max-width: 1200px;
  margin: 0 auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.news-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-date {
  background-color: var(--secondary-color);
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: bold;
}

.news-content {
  padding: 30px;
}

.news-content h3 {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.news-content p {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.8;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-gray);
}

/* ==================== 脚部 ==================== */

footer {
  background-color: var(--primary-dark);
  color: white;
  padding: 60px 20px 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-column h3 {
  margin-bottom: 20px;
  font-size: 16px;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-column a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.icp-info {
  margin-top: 10px;
  font-size: 12px;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
  nav ul {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  nav.active ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    gap: 0;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
  }

  nav.active ul li {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
  }

  nav.active ul li:last-child {
    border-bottom: none;
  }

  .slider {
    height: 400px;
  }

  .slide h1 {
    font-size: 36px;
  }

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

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    height: 300px;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
  }

  .header-top-content {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .slide h1 {
    font-size: 24px;
  }

  .slide p {
    font-size: 14px;
  }

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

  .section-title h2 {
    font-size: 24px;
  }
}

/* ==================== 页面特定样式 ==================== */

.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 48px;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 18px;
  opacity: 0.9;
}

.breadcrumb {
  background-color: var(--bg-light);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
  color: var(--primary-color);
  margin: 0 5px;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 77, 124, 0.1);
}
