/* ===== 萤火虫（深圳）灯光科技有限公司 - 静态官网样式 ===== */
/* 全局重置与基础样式 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Barlow', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', sans-serif;
  background-color: #f5f7fa;
  color: #303133;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #335df8;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== 顶部导航 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo img {
  height: 60px;
}

/* 头部右侧：电话 + 搜索 */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #335df8;
  white-space: nowrap;
}

.header-phone .icon {
  font-size: 24px;
}

.header-search {
  font-size: 20px;
  color: #606266;
  cursor: pointer;
}

.nav-list {
  display: flex;
  gap: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  padding: 0 20px;
  height: 80px;
  line-height: 80px;
  font-size: 15px;
  color: #303133;
  transition: color 0.3s;
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
  color: #335df8;
}

.nav-list > li.has-sub > a::after {
  content: '▾';
  margin-left: 4px;
  font-size: 12px;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 200px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 100;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.nav-list > li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sub-menu a {
  display: block;
  padding: 14px 24px;
  font-size: 14px;
  color: #606266;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s;
  white-space: nowrap;
}

.sub-menu a:last-child {
  border-bottom: none;
}

.sub-menu a:hover {
  background: #f0f4ff;
  color: #335df8;
  padding-left: 30px;
}

/* ===== 导航Mega菜单（图文下拉） ===== */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 100;
  border-radius: 0 0 12px 12px;
  padding: 24px;
  display: flex;
  gap: 20px;
  min-width: 500px;
}

.nav-list > li:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu .mega-col {
  flex: 1;
  min-width: 140px;
}

.mega-menu .mega-col h4 {
  font-size: 13px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.mega-menu .mega-col a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: #606266;
  transition: all 0.3s;
}

.mega-menu .mega-col a:hover {
  color: #335df8;
  padding-left: 6px;
}

.mega-menu .mega-col a .thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.mega-menu .mega-col a .info h5 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.mega-menu .mega-col a .info span {
  font-size: 12px;
  color: #bbb;
}

/* 移动端汉堡菜单 */
.mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.mobile-toggle span {
  width: 28px;
  height: 2px;
  background: #303133;
  margin: 3px 0;
  transition: all 0.3s;
}

/* 顶部栏（电话等） */
.top-bar {
  background: #242933;
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}

.top-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.top-bar .phone {
  display: flex;
  align-items: center;
  gap: 5px;
}

.top-bar .phone i {
  font-size: 16px;
}

/* ===== 首页 Banner 轮播 (与原官网一致) ===== */
.foxcms-index-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.foxcms-index-banner .swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85vh;
  min-height: 500px;
  max-height: 900px;
  overflow: hidden;
}

.foxcms-index-banner .swiper-slide .slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 8s ease-out;
}

.foxcms-index-banner .swiper-slide-active .slide-bg {
  transform: scale(1.05);
}

.foxcms-index-banner .swiper-slide .slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 100%);
}

.foxcms-index-banner .slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 20px;
  max-width: 800px;
}

.foxcms-index-banner .slide-content h1 {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 15px rgba(0,0,0,0.4);
  line-height: 1.2;
}

.foxcms-index-banner .slide-content p {
  font-size: 22px;
  margin-bottom: 35px;
  opacity: 0.92;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.foxcms-index-banner .swiper-pagination-bullet {
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  opacity: 1;
  transition: all 0.3s;
}

.foxcms-index-banner .swiper-pagination-bullet-active {
  background: #fff;
  width: 60px;
}

.foxcms-index-banner .swiper-button-next,
.foxcms-index-banner .swiper-button-prev {
  color: #fff;
  background: rgba(255,255,255,0.15);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.3s;
}

.foxcms-index-banner .swiper-button-next:hover,
.foxcms-index-banner .swiper-button-prev:hover {
  background: rgba(51,93,248,0.8);
}

.foxcms-index-banner .swiper-button-next::after,
.foxcms-index-banner .swiper-button-prev::after {
  font-size: 20px;
  font-weight: 700;
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: #335df8;
  color: #fff;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1a3fc4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(51,93,248,0.4);
  color: #fff;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.5);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: #fff;
}

/* ===== Section 通用 ===== */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  color: #303133;
  margin-bottom: 8px;
}

.section-title .sub {
  font-size: 14px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 4px;
}

/* ===== 案例展示 ===== */
.case-section {
  background: #fff;
}

.case-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.case-tab {
  padding: 8px 24px;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.case-tab.active,
.case-tab:hover {
  background: #335df8;
  color: #fff;
  border-color: #335df8;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9fb;
  transition: all 0.3s;
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.case-card .thumb {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.case-card .thumb .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(51,93,248,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
}

.case-card .info {
  padding: 16px 20px;
}

.case-card .info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.case-card .info p {
  font-size: 13px;
  color: #999;
}

/* ===== 公司简介区 ===== */
.about-section {
  background: #f5f7fa;
}

.about-wrapper {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-image {
  flex: 0 0 45%;
  border-radius: 12px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-content {
  flex: 1;
}

.about-content h3 {
  font-size: 28px;
  margin-bottom: 6px;
}

.about-content .en-title {
  font-size: 14px;
  color: #999;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.about-content p {
  color: #606266;
  line-height: 1.8;
  margin-bottom: 24px;
  text-align: justify;
}

/* ===== 产品中心 ===== */
.product-section {
  background: #fff;
}

.product-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.product-categories a {
  padding: 6px 20px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s;
}

.product-categories a:hover,
.product-categories a.active {
  background: #335df8;
  color: #fff;
  border-color: #335df8;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9fb;
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-card .thumb {
  height: 220px;
  background-size: cover;
  background-position: center;
}

.product-card .info {
  padding: 16px 20px;
}

.product-card .info h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.product-card .info p {
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .info .price {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #335df8;
}

/* ===== 合作客户 ===== */
.partners-section {
  background: #fff;
}

.partner-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.partner-logos .logo-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  transition: all 0.3s;
}

.partner-logos .logo-item:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  border-color: #335df8;
}

.partner-logos .logo-item img {
  max-height: 144px;
  max-width: 90%;
  opacity: 0.7;
  transition: all 0.3s;
  filter: grayscale(1);
}

.partner-logos .logo-item:hover img {
  opacity: 1;
  filter: grayscale(0);
}

/* ===== Footer ===== */
.footer {
  background: #242933;
  color: #ccc;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  color: #999;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact .phone-big {
  font-size: 24px;
  color: #fff;
  font-weight: 700;
  margin: 10px 0;
}

.footer-qr {
  margin-top: 15px;
}

.footer-qr img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
}

.footer-bottom a {
  color: #666;
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-links a {
  margin-left: 15px;
}

/* ===== 右侧浮动工具栏 ===== */
.fixed-tools {
  position: fixed;
  right: 20px;
  bottom: 120px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fixed-tools a,
.fixed-tools .tool-item {
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #606266;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.fixed-tools a:hover,
.fixed-tools .tool-item:hover {
  background: #335df8;
  color: #fff;
  border-color: #335df8;
}

.fixed-tools .tool-top {
  margin-top: 4px;
  writing-mode: vertical-lr;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 8px 0;
}

/* ===== 子页面通用样式 ===== */

/* 内容面板(与原官网一致) */
.main-pannel {
  padding: 48px 0 70px;
}

.main-pannel .pannel {
  border-radius: 18px;
  background-color: #fff;
  padding: 64px 60px;
}

.main-pannel .pannel .rich-text {
  font-size: 18px;
}

.main-pannel .pannel .rich-text p {
  line-height: 1.8;
}

@media (max-width: 768px) {
  .main-pannel .pannel {
    padding: 24px 16px;
    border-radius: 12px;
  }
  .main-pannel .pannel .rich-text {
    font-size: 15px;
  }
}

.page-banner {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.page-banner .banner-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.page-banner .banner-content .en {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 4px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.page-banner .banner-content h1 {
  font-size: 36px;
  font-weight: 700;
}

.page-subnav {
  background: #f5f7fa;
  border-bottom: 1px solid #eee;
}

.page-subnav .container {
  display: flex;
  gap: 0;
}

.page-subnav a {
  padding: 14px 28px;
  font-size: 15px;
  color: #606266;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.page-subnav a:hover,
.page-subnav a.active {
  color: #335df8;
  border-bottom-color: #335df8;
  background: #fff;
}

.page-content {
  padding: 60px 0;
  min-height: 400px;
}

.page-content .rich-text {
  max-width: 900px;
  margin: 0 auto;
  text-align: justify;
  line-height: 2;
  color: #606266;
}

.page-content .rich-text p {
  text-indent: 2em;
  margin-bottom: 16px;
}

.page-content .rich-text img {
  display: block;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 12px;
}

/* ===== 联系我们表单 ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info h3 {
  font-size: 24px;
  margin-bottom: 20px;
}

.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-info .info-item .icon {
  width: 44px;
  height: 44px;
  background: #f0f4ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #335df8;
  flex-shrink: 0;
}

.contact-info .info-item .text h4 {
  font-size: 17px;
  margin-bottom: 4px;
}

.contact-info .info-item .text p {
  font-size: 18px;
  color: #333;
  font-weight: 500;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #335df8;
}

.contact-form textarea {
  height: 120px;
  resize: vertical;
}

.contact-form .btn-submit {
  width: 100%;
  padding: 14px;
  background: #335df8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.contact-form .btn-submit:hover {
  background: #1a3fc4;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .nav-list > li > a { padding: 0 14px; font-size: 14px; }
  .foxcms-index-banner .swiper-slide { height: 50vh; min-height: 350px; }
  .slide-content h1 { font-size: 36px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-wrapper { flex-direction: column; }
  .about-image { flex: none; width: 100%; }
}

@media (max-width: 768px) {
  .nav-list { display: none; }
  .mobile-toggle { display: flex; }

  .nav-list.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 1000;
    padding-top: 80px;
    overflow-y: auto;
  }

  .nav-list.active > li > a {
    height: auto;
    line-height: 1;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
  }

  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #f9f9fb;
    display: none;
  }

  .nav-list.active .has-sub.open .sub-menu {
    display: block;
  }

  .foxcms-index-banner .swiper-slide { height: 45vh; min-height: 300px; }
  .foxcms-index-banner .slide-content h1 { font-size: 28px; }
  .foxcms-index-banner .slide-content p { font-size: 16px; }

  .section { padding: 50px 0; }
  .section-title h2 { font-size: 28px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .case-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }

  .page-banner { height: 200px; }
  .page-banner .banner-content h1 { font-size: 28px; }
  .page-subnav .container { overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .foxcms-index-banner .swiper-slide { height: 40vh; min-height: 250px; }
  .foxcms-index-banner .slide-content h1 { font-size: 22px; }
  .logo img { height: 40px; }
  .header-inner { height: 60px; }
}
