/* ============================================
   上海陆精丰电子有限公司 - 门户网站样式表
   Shanghai Lujingfeng Electronic Technology Co., Ltd.
   ============================================ */

/* ---------- CSS 变量（主题色） ---------- */
:root {
  --primary: #1a3a5c;        /* 深蓝色 - 主色 */
  --primary-light: #2a5a8c;  /* 浅蓝色 */
  --primary-dark: #0f2740;   /* 更深蓝色 */
  --accent: #c8522a;         /* 橙红色 - 强调色（匹配Logo） */
  --accent-light: #d4703e;   /* 浅橙色 */
  --text-dark: #333333;      /* 主文字色 */
  --text-light: #666666;     /* 次文字色 */
  --text-muted: #999999;     /* 淡文字色 */
  --bg-light: #f8f9fa;       /* 浅灰背景 */
  --bg-white: #ffffff;       /* 白色背景 */
  --border-color: #e9ecef;   /* 边框色 */
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);         /* 基础阴影 */
  --shadow-hover: 0 5px 25px rgba(0, 0, 0, 0.15);   /* 悬停阴影 */
  --transition: all 0.3s ease;                        /* 过渡动画 */
}

/* ---------- 全局基础样式 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
}

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

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

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

/* ---------- 通用区块样式 ---------- */
.section-padding {
  padding: 80px 0;
}

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

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

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- 导航栏 ---------- */
.navbar {
  background-color: var(--bg-white) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 0;
  transition: var(--transition);
}

.navbar .container {
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

.navbar-brand img {
  height: 50px;
  margin-right: 12px;
}

.navbar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar-brand .brand-text .company-name-cn {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.navbar-brand .brand-text .company-name-en {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.navbar .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  padding: 20px 18px !important;
  position: relative;
  font-size: 0.95rem;
  transition: var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent) !important;
}

.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* 导航栏滚动固定效果 */
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

/* ---------- Hero 轮播区 ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-slide {
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
}

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 39, 64, 0.55) 0%, rgba(26, 58, 92, 0.40) 50%, rgba(200, 82, 42, 0.25) 100%);
  z-index: 1;
}

.hero-slide .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-slide h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-slide p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-slide .btn-hero {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 35px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 5px;
  transition: var(--transition);
}

.hero-slide .btn-hero:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(200, 82, 42, 0.4);
}

/* ---------- 公司简介区 ---------- */
.intro-section {
  background-color: var(--bg-white);
}

.intro-section .intro-text {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.9;
}

.intro-section .intro-text p {
  margin-bottom: 15px;
}

.intro-highlight {
  border-left: 4px solid var(--accent);
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ---------- 品牌展示区 ---------- */
.brands-section {
  background-color: var(--bg-light);
}

.brand-card {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
}

.brand-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.brand-card .brand-logo {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.brand-card .brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 品牌Logo占位符样式 */
.brand-logo-placeholder {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  margin-bottom: 15px;
}

.brand-logo-placeholder span {
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.brand-card h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.brand-card .brand-origin {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.brand-card .brand-products {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ---------- 品牌详情页样式 ---------- */
.brand-detail-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.brand-detail-section:nth-child(even) {
  background-color: var(--bg-light);
}

.brand-detail-section .brand-detail-logo {
  width: 180px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.brand-detail-section:nth-child(even) .brand-detail-logo {
  background: var(--bg-white);
}

.brand-detail-section .brand-detail-logo span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.brand-detail-section h3 {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 5px;
}

.brand-detail-section .brand-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.brand-detail-section .brand-desc {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.brand-detail-section .product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-detail-section .product-tag {
  background: var(--primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.brand-detail-section .product-tag:hover {
  background: var(--accent);
}

/* ---------- 新闻动态区 ---------- */
.news-section {
  background-color: var(--bg-white);
}

.news-card {
  background: var(--bg-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--border-color);
}

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

.news-card .news-img {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  overflow: hidden;
}

.news-card .news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card .news-body {
  padding: 25px;
}

.news-card .news-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.news-card .news-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}

.news-card .news-link:hover {
  color: var(--primary);
}

/* 新闻详情展开 */
.news-detail {
  display: none;
  padding: 20px 25px 25px;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
}

.news-detail.show {
  display: block;
}

/* ---------- 联系我们区 ---------- */
.contact-section {
  background-color: var(--bg-white);
}

.contact-info-card {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 30px;
  height: 100%;
}

.contact-info-card .info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.contact-info-card .info-item:last-child {
  margin-bottom: 0;
}

.contact-info-card .info-icon {
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-right: 15px;
}

.contact-info-card .info-text h6 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
}

.contact-info-card .info-text p {
  color: var(--text-light);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* 联系表单 */
.contact-form {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 35px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.contact-form .form-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.contact-form .form-control {
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: var(--transition);
}

.contact-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 82, 42, 0.15);
}

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

/* ---------- 页面横幅（子页面顶部） ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 80px 0 60px;
  text-align: center;
  color: #fff;
  margin-top: 0;
}

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

.page-banner .breadcrumb {
  justify-content: center;
  margin-bottom: 0;
}

.page-banner .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.7);
}

.page-banner .breadcrumb-item a:hover {
  color: var(--accent);
}

.page-banner .breadcrumb-item.active {
  color: var(--accent);
}

.page-banner .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- 公司优势卡片 ---------- */
.advantage-card {
  text-align: center;
  padding: 35px 25px;
  background: var(--bg-white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 2px solid transparent;
}

.advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.advantage-card .advantage-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}

.advantage-card h5 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.advantage-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 50px 0 0;
}

.site-footer h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.site-footer .footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
}

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

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

.site-footer .footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.site-footer .footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.site-footer .footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.site-footer .footer-contact i {
  margin-right: 10px;
  color: var(--accent);
  width: 16px;
  text-align: center;
}

.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;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- 通用按钮 ---------- */
.btn-primary-custom {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 30px;
  font-weight: 500;
  border-radius: 5px;
  transition: var(--transition);
}

.btn-primary-custom:hover {
  background-color: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 58, 92, 0.3);
}

.btn-accent {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 30px;
  font-weight: 500;
  border-radius: 5px;
  transition: var(--transition);
}

.btn-accent:hover {
  background-color: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(200, 82, 42, 0.3);
}

.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 8px 25px;
  font-weight: 500;
  border-radius: 5px;
  transition: var(--transition);
}

.btn-outline-accent:hover {
  background-color: var(--accent);
  color: #fff;
}

/* ---------- CTA 区域 ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 60px 0;
  text-align: center;
  color: #fff;
}

.cta-section h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.cta-section p {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 数据统计 ---------- */
.stats-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 50px 0;
  color: #fff;
}

.stat-item {
  text-align: center;
  padding: 20px;
}

.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}

.stat-item .stat-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ---------- 表单提交成功提示 ---------- */
.form-success {
  display: none;
  text-align: center;
  padding: 30px;
}

.form-success.show {
  display: block;
}

.form-success i {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 15px;
}

.form-success h5 {
  color: var(--primary);
  margin-bottom: 10px;
}

/* ---------- 回到顶部按钮 ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

/* ---------- 响应式适配 ---------- */
@media (max-width: 991.98px) {
  .navbar .nav-link {
    padding: 12px 18px !important;
  }

  .navbar .nav-link.active::after {
    display: none;
  }

  .hero-slide {
    height: 400px;
  }

  .hero-slide h1 {
    font-size: 2rem;
  }

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

  .section-padding {
    padding: 60px 0;
  }

  .page-banner {
    padding: 60px 0 40px;
  }

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

@media (max-width: 767.98px) {
  .hero-slide {
    height: 350px;
  }

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

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

  .stat-item .stat-number {
    font-size: 2rem;
  }

  .contact-form {
    margin-top: 30px;
  }

  .brand-detail-section {
    padding: 40px 0;
  }
}

@media (max-width: 575.98px) {
  .hero-slide {
    height: 300px;
  }

  .hero-slide h1 {
    font-size: 1.4rem;
  }

  .section-padding {
    padding: 40px 0;
  }

  .navbar-brand .brand-text .company-name-cn {
    font-size: 0.95rem;
  }

  .navbar-brand .brand-text .company-name-en {
    font-size: 0.55rem;
  }

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

/* ---------- 动画效果 ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
