/* ===== 全局样式 ===== */
:root {
  --primary: #111827;
  --primary-dark: #0b101f;
  --primary-light: #e8eaed;
  --bs-primary: #111827;
  --bs-primary-rgb: 17, 24, 39;
  --secondary: #6c757d;
  --accent: #39b54a;
  --accent-dark: #2d913b;
  --dark: #1a1a2e;
  --darker: #16213e;
  --gradient: linear-gradient(135deg, #111827, #0b101f);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #333;
  overflow-x: hidden;
}

/* ===== Top Bar ===== */
.top-bar {
  background: var(--darker);
  color: #aaa;
  font-size: 13px;
  padding: 6px 0;
}

.top-bar a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s;
}

.top-bar a:hover {
  color: #fff;
}

/* ===== 导航栏 ===== */
.navbar-main {
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  padding: 0;
}

.navbar-main .navbar-brand {
  padding: 8px 0;
}

.navbar-main .navbar-brand img {
  height: 48px;
}

.navbar-main .nav-link {
  padding: 22px 16px !important;
  color: #333 !important;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: var(--primary) !important;
}

.navbar-main .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  border-radius: 3px 3px 0 0;
  transition: background 0.3s;
}

.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after {
  background: var(--primary);
}

.navbar-main.scrolled {
  box-shadow: var(--shadow-md);
}


.navbar-main.scrolled .nav-link {
  padding: 16px 16px !important;
}



/* ===== 页面标题区域 ===== */
.page-hero {
  background: var(--gradient-hero);
  padding: 80px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(17,24,39,0.1) 0%, transparent 70%);
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.page-hero h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.page-hero .breadcrumb {
  background: transparent;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.page-hero .breadcrumb-item,
.page-hero .breadcrumb-item a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.page-hero .breadcrumb-item.active {
  color: #fff;
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.5);
}

/* ===== 通用标题 ===== */
.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.section-title .subtitle {
  color: var(--secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-title .line {
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 15px auto;
  border-radius: 2px;
}

/* ===== 英雄区域 ===== */
.hero-section {
  background: linear-gradient(135deg, rgba(26,26,46,0.88) 0%, rgba(22,33,62,0.72) 40%, rgba(15,52,96,0.55) 100%);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

/* 左侧半透明遮罩层 */
.hero-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(17,24,39,0.75) 0%,
    rgba(17,24,39,0.45) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section::after {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(57,181,74,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section h1 {
  color: #fff;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-section p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 30px;
}

.hero-section .btn-primary {
  padding: 12px 36px;
  font-size: 1rem;
  border-radius: 30px;
  background: var(--accent);
  border: none;
  font-weight: 600;
  transition: all 0.3s;
}

.hero-section .btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(57,181,74,0.4);
}

.hero-section .btn-outline-light {
  padding: 12px 36px;
  font-size: 1rem;
  border-radius: 30px;
  font-weight: 600;
  margin-left: 12px;
}

.hero-image {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-image img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ===== 卡片样式 ===== */
.card-custom {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
  overflow: hidden;
}

.card-custom:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.card-custom .card-img-top {
  height: 200px;
  object-fit: cover;
}

.card-custom .card-body {
  padding: 24px;
}

/* ===== 产品服务卡片 ===== */
.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  text-align: center;
  transition: all 0.4s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.product-card .icon-box {
  width: 70px;
  height: 70px;
  background: var(--primary-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
  color: var(--primary);
  transition: all 0.4s;
}

.product-card:hover .icon-box {
  background: var(--primary);
  color: #fff;
  transform: rotateY(180deg);
}

.product-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--dark);
}

.product-card p {
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== 合作伙伴 ===== */
.partner-item {
  padding: 20px;
  text-align: center;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.partner-item img {
  max-height: 60px;
  max-width: 100%;
  filter: grayscale(30%);
  transition: filter 0.3s;
  opacity: 0.7;
  background: #fff;
  padding: 8px;
  border-radius: 4px;
}

.partner-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ===== 新闻卡片 ===== */
.news-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.4s;
  height: 100%;
}

.news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.news-card .news-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.news-card .news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-card .news-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
}

.news-card .news-body {
  padding: 20px;
}

.news-card .news-body .date {
  color: var(--secondary);
  font-size: 0.85rem;
}

.news-card .news-body h5 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 10px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-body p {
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 新闻分类筛选 ===== */
.news-category-filter .btn {
  border-radius: 20px !important;
  padding: 6px 20px;
  margin: 4px;
  font-size: 14px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  transition: all 0.3s ease;
}
.news-category-filter .btn:hover {
  background: var(--primary);
  color: #fff;
}
.news-category-filter .btn.active {
  background: var(--primary);
  color: #fff;
}

/* ===== 联系我们表单 ===== */
.contact-section {
  padding: 80px 0;
  background: #f8f9fa;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.contact-info-item .icon {
  width: 50px;
  height: 50px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-right: 15px;
}

.contact-info-item h6 {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--dark);
}

.contact-info-item p {
  color: var(--secondary);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.contact-form-wrapper {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 35px;
}

.contact-form-wrapper .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.contact-form-wrapper .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17,24,39,0.1);
}

.contact-form-wrapper textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ===== 滑动验证码 ===== */
.slider-captcha {
  margin: 15px 0;
  position: relative;
}

.slider-captcha .captcha-bg {
  background: #f0f0f0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  height: 48px;
  user-select: none;
}

.slider-captcha .captcha-track {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-sm);
  width: 0;
  transition: width 0.1s;
}

.slider-captcha .captcha-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  z-index: 1;
}

.slider-captcha .captcha-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--secondary);
  z-index: 2;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.slider-captcha .captcha-slider:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.slider-captcha .captcha-slider:active {
  cursor: grabbing;
}

.slider-captcha .captcha-slider.dragging {
  box-shadow: 0 0 0 3px rgba(13,110,253,0.2);
}

.slider-captcha.success .captcha-track {
  background: #28a745 !important;
}

.slider-captcha.success .captcha-slider {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
}

.slider-captcha.success .captcha-text {
  color: #fff;
}

.slider-captcha.error .captcha-track {
  background: #dc3545 !important;
}

.slider-captcha.error .captcha-slider {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.slider-captcha.error .captcha-text {
  color: #fff;
}

/* 刷新按钮 */
.slider-captcha .captcha-refresh {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.3s;
}

.slider-captcha .captcha-refresh:hover {
  color: var(--primary);
}

/* ===== 页脚 ===== */
.footer {
  background: var(--darker);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer h5 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9rem;
}

.footer a:hover {
  color: #fff;
}

.footer .footer-links {
  list-style: none;
  padding: 0;
}

.footer .footer-links li {
  margin-bottom: 10px;
}

.footer .footer-contact li {
  display: flex;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.footer .footer-contact li i {
  width: 24px;
  margin-right: 10px;
  color: var(--accent);
  font-size: 16px;
}

.footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 0.85rem;
}

.footer .footer-bottom a {
  color: rgba(255,255,255,0.7);
}

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.back-to-top.show {
  display: flex;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0 50px;
    text-align: center;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .page-hero h1 {
    font-size: 1.8rem;
  }

  .page-hero {
    padding: 60px 0 35px;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .contact-form-wrapper {
    padding: 20px;
  }

  .product-card {
    padding: 20px;
  }

  .footer {
    padding: 40px 0 0;
  }

  .navbar-main .navbar-brand img {
    height: 36px;
  }
}

/* ===== 动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 特色区域 ===== */
.feature-section {
  padding: 80px 0;
  background: #f8f9fa;
}

.feature-box {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.feature-box:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.feature-box .icon {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 15px;
}

.feature-box h5 {
  font-weight: 600;
  margin-bottom: 10px;
}

/* ===== About页面 ===== */
.about-section {
  padding: 80px 0;
}

.about-content h3 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--secondary);
  line-height: 1.8;
  font-size: 1rem;
}

.about-stats {
  background: var(--primary);
  padding: 40px;
  border-radius: var(--radius-md);
  color: #fff;
  text-align: center;
}

.about-stats .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
}

.about-stats .stat-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ===== 产品详情 ===== */
.product-detail-section {
  padding: 80px 0;
}

.product-feature-list {
  list-style: none;
  padding: 0;
}

.product-feature-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
}

.product-feature-list li i {
  color: var(--primary);
  margin-right: 12px;
  font-size: 18px;
}

/* ===== 新闻详情 ===== */
.news-detail-header {
  padding: 30px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 30px;
}

.news-detail-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.news-detail-header .meta {
  color: var(--secondary);
  font-size: 0.9rem;
}

.news-detail-header .meta span {
  margin-right: 20px;
}

.news-detail-content {
  font-size: 1.05rem;
  line-height: 1.9;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

/* ===== Bootstrap覆盖 ===== */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline-primary {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline-primary:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:focus-visible {
  color: #fff !important;
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  box-shadow: 0 0 0 3px rgba(57,181,74,0.25);
  outline: none;
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination .page-item.active .page-link:hover {
  color: #fff;
}

.pagination .page-link {
  color: var(--primary);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17,24,39,0.1);
}
