/* ============================================
   特种货物与危化品物流综合平台 - 全局样式
   警示黄+工业红 特种行业视觉风格
   ============================================ */

/* CSS变量定义 */
:root {
  --primary: #FF9800;
  --primary-dark: #E65100;
  --secondary: #D32F2F;
  --secondary-dark: #B71C1C;
  --bg-gray: #EFEFEF;
  --card-white: #FFFFFF;
  --text-dark: #212121;
  --text-gray: #616161;
  --text-light: #9E9E9E;
  --border-color: #E0E0E0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-heading: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
}

/* 重置与基础 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--bg-gray);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

ul, ol {
  list-style: none;
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   顶部导航栏
   ============================================ */
.site-header {
  background: var(--text-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-top {
  background: var(--secondary);
  padding: 6px 0;
  font-size: 0.8rem;
  color: #fff;
  text-align: center;
}

.header-top a {
  color: #fff;
  margin: 0 10px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   Hero区域
   ============================================ */
.hero-section {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(33,33,33,0.7) 0%, rgba(211,47,47,0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 0 20px;
  animation: slideUp 0.8s ease-out;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* UN编号查询框 */
.un-search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 6px;
  border: 2px solid var(--primary);
}

.un-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 20px;
  font-size: 1rem;
  color: #fff;
  outline: none;
}

.un-search-box input::placeholder {
  color: rgba(255,255,255,0.7);
}

.un-search-box button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.un-search-box button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ============================================
   安全计数器
   ============================================ */
.safety-counter {
  background: linear-gradient(135deg, var(--text-dark) 0%, #37474F 100%);
  padding: 40px 0;
  text-align: center;
  color: #fff;
}

.counter-number {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary);
  display: inline-block;
  min-width: 200px;
}

.counter-label {
  font-size: 1.1rem;
  margin-top: 8px;
  opacity: 0.8;
}

/* 警示灯闪烁效果 */
.blink-warning {
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   通用模块标题
   ============================================ */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

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

/* ============================================
   内容区块
   ============================================ */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--card-white);
}

/* 资质展示 */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--card-white);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.cert-card .cert-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.cert-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.cert-card p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* 业务领域矩阵 */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.biz-card {
  background: var(--card-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: block;
}

.biz-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.biz-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.biz-card-body {
  padding: 24px;
}

.biz-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.biz-card-body p {
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.7;
}

.biz-card-body .tag {
  display: inline-block;
  background: rgba(255, 152, 0, 0.1);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-top: 12px;
  margin-right: 6px;
}

/* 车队展示 */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.fleet-card {
  background: var(--card-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.fleet-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.fleet-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.fleet-card-body {
  padding: 20px;
}

.fleet-card-body h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.fleet-card-body .specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.fleet-card-body .spec-tag {
  background: var(--bg-gray);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* 安全管控体系 */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.safety-item {
  background: var(--card-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary);
  transition: var(--transition);
}

.safety-item:hover {
  border-left-color: var(--primary);
  transform: translateX(5px);
}

.safety-item h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.safety-item h4::before {
  content: '●';
  color: var(--secondary);
}

.safety-item p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* 应急响应时间轴 */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 50%;
  margin-bottom: 30px;
  position: relative;
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 50%;
}

.timeline-content {
  background: var(--card-white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 400px;
  margin-right: 30px;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: 0;
  margin-left: 30px;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 16px;
  height: 16px;
  background: var(--secondary);
  border: 3px solid var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
}

.timeline-content h4 {
  color: var(--secondary);
  margin-bottom: 6px;
}

.timeline-content p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* ============================================
   24小时应急联系
   ============================================ */
.emergency-section {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  padding: 60px 0;
  text-align: center;
  color: #fff;
}

.emergency-section h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.emergency-section .phone {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  margin: 20px 0;
}

.emergency-section p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   页脚
   ============================================ */
.site-footer {
  background: var(--text-dark);
  color: #ccc;
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 2;
  display: block;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

.footer-bottom a {
  color: #aaa;
  margin: 0 8px;
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-gray);
}

.breadcrumb a {
  color: var(--text-gray);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-light);
}

/* ============================================
   内页通用样式
   ============================================ */
.page-banner {
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-banner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}

.page-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

.page-banner-content h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-banner-content p {
  font-size: 1rem;
  opacity: 0.85;
}

.page-content {
  padding: 60px 0;
}

.page-content .content-block {
  background: var(--card-white);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.page-content h2 {
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.page-content h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 20px 0 12px;
}

.page-content p {
  color: var(--text-gray);
  margin-bottom: 16px;
  line-height: 1.9;
}

.page-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.page-content ul li {
  color: var(--text-gray);
  line-height: 2;
  position: relative;
  padding-left: 16px;
}

.page-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* FAQ区域 */
.faq-section {
  margin-top: 40px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.faq-item h4 {
  font-size: 1rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item h4::before {
  content: 'Q';
  background: var(--primary);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.faq-item p {
  margin-top: 10px;
  padding-left: 32px;
  font-size: 0.9rem;
}

/* ============================================
   搜索页
   ============================================ */
.search-section {
  padding: 80px 0;
  min-height: 60vh;
}

.search-box-large {
  max-width: 600px;
  margin: 0 auto 40px;
  display: flex;
  border: 2px solid var(--primary);
  border-radius: 50px;
  overflow: hidden;
}

.search-box-large input {
  flex: 1;
  border: none;
  padding: 16px 24px;
  font-size: 1rem;
  outline: none;
}

.search-box-large button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 16px 32px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-box-large button:hover {
  background: var(--primary-dark);
}

.search-results {
  max-width: 800px;
  margin: 0 auto;
}

.search-result-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item h3 a {
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.search-result-item p {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* ============================================
   404页面
   ============================================ */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-page h1 {
  font-size: 8rem;
  color: var(--primary);
  font-weight: 900;
  line-height: 1;
}

.error-page h2 {
  font-size: 1.8rem;
  margin: 16px 0;
}

.error-page p {
  color: var(--text-gray);
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================
   APP下载页
   ============================================ */
.app-section {
  padding: 80px 0;
  text-align: center;
}

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.app-feature-item {
  background: var(--card-white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-feature-item h4 {
  margin-bottom: 10px;
  color: var(--text-dark);
}

.app-feature-item p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.app-download-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ============================================
   动画
   ============================================ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-section {
    height: 500px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    padding-left: 50px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: 0;
  }

  .timeline-dot {
    left: 20px;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--text-dark);
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    border-top: 2px solid var(--primary);
  }

  .main-nav.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-section {
    height: 450px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .un-search-box {
    flex-direction: column;
    border-radius: 12px;
  }

  .un-search-box button {
    border-radius: 8px;
    margin-top: 8px;
  }

  .counter-number {
    font-size: 2.5rem;
  }

  .section {
    padding: 50px 0;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .page-banner {
    height: 200px;
  }

  .page-banner-content h1 {
    font-size: 1.5rem;
  }

  .page-content .content-block {
    padding: 24px;
  }

  .emergency-section .phone {
    font-size: 1.8rem;
  }

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

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 1.3rem;
  }

  .page-content .content-block {
    padding: 16px;
  }
}
