﻿/* ============================================
   sc51.com H5 响应式模板样式（Bootstrap 5 + 定制）
   电动门/道闸厂家站 · 蓝白主色
   ============================================ */

:root {
  --brand: #1565c0;
  --brand-deep: #0d47a1;
  --brand-soft: #e8f1fb;
  --gold: #c9a227;
  --bg-soft: #f5f8fc;
  --line: #e5e9f0;
  --text: #2b3440;
  --text-soft: #667085;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: var(--brand-deep);
  color: #fff;
  font-size: 13px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: #ffd666; }

/* ---------- 站点头部 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(13, 71, 161, .05);
}
.site-header .navbar-brand { color: var(--brand-deep); }
.site-header .nav-link {
  color: var(--text);
  font-weight: 500;
  padding: .6rem .9rem !important;
}
.site-header .nav-link:hover,
.site-header .nav-item.active > .nav-link,
.site-header .nav-link.active {
  color: var(--brand);
}
.site-header .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(13, 71, 161, .1);
}
/* 一级栏目点击跳转；子菜单 hover 展开（不依赖 Bootstrap JS） */
@media (min-width: 992px) {
  .site-header .dropdown:hover > .dropdown-menu { display: block; }
  .site-header .dropdown-menu { margin-top: 0; }
}
.site-header .dropdown-item { font-size: 14px; padding: .45rem 1rem; }
.site-header .dropdown-item:hover { background: var(--brand-soft); color: var(--brand-deep); }
.header-tel { font-size: 20px; font-weight: 700; color: var(--brand); white-space: nowrap; }

/* ---------- 区块通用 ---------- */
.section { padding: 44px 0; }
.section.bg-soft { background: var(--bg-soft); }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-title .t {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-deep);
}
.section-title .t::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--brand);
}
.section-title .t small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-title .more {
  font-size: 13px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 14px;
  transition: all .2s;
}
.section-title .more:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

/* ---------- 首页 Hero（轮播） ---------- */
.hero-slide { position: relative; overflow: hidden; }
.hero-slide .carousel-item img { width: 100%; object-fit: cover; }
.hero-slide .carousel-indicators [data-bs-target] { background-color: var(--brand); }

/* ---------- 案例网格 ---------- */
.case-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(13, 71, 161, .12); }
.case-card img { width: 100%; height: 190px; object-fit: cover; }
.case-card .body { padding: 12px 14px; }
.case-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-card h3 a { color: var(--text); }
.case-card h3 a:hover { color: var(--brand); }
.case-card .desc {
  font-size: 13px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 产品网格 ---------- */
.product-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(13, 71, 161, .12); }
.product-card img { width: 100%; height: 170px; object-fit: cover; }
.product-card .name {
  display: block;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-card .name:hover { color: var(--brand); }

/* ---------- 产品分类导航（侧栏） ---------- */
.prod-nav { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prod-nav .head {
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 18px;
}
.prod-nav ul { list-style: none; margin: 0; padding: 6px 0; }
.prod-nav li a {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}
.prod-nav li a:hover { color: var(--brand); background: var(--brand-soft); padding-left: 22px; transition: padding-left .2s; }

/* ---------- 公司介绍（首页，左图右文 + 荣誉条） ---------- */
.about-wrap { display: flex; gap: 28px; align-items: stretch; }
.about-wrap .about-img { flex: 0 0 46%; }
.about-wrap .about-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.about-wrap .about-text {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-wrap .about-text h1 { font-size: 22px; font-weight: 700; color: var(--brand); margin: 0 0 10px; }
.about-wrap .about-text h3 { font-size: 20px; color: var(--brand-deep); margin-bottom: 14px; }
.about-wrap .about-text p { color: var(--text-soft); font-size: 14px; line-height: 2; }
.honer-line { margin-top: 18px; }
.honer-line img { width: 100%; border-radius: 12px; }

/* ---------- 新闻列表 ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line);
}
.news-list li a { flex: 1; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list li a:hover { color: var(--brand); }
.news-list li time { color: var(--text-soft); font-size: 13px; white-space: nowrap; }

.news-feature {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.news-feature img { width: 220px; height: 130px; object-fit: cover; border-radius: 8px; }
.news-feature h3 { font-size: 16px; margin: 0 0 8px; }
.news-feature p { font-size: 13px; color: var(--text-soft); margin: 0; }

/* ---------- 列表页（内容前置：正文在前、侧栏在后，float 控制显示） ---------- */
.page-head {
  background: linear-gradient(90deg, #ffffff 0%, var(--bg-soft) 40%, #d9e6f5 100%);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.page-head .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.page-head .ph-img {
  width: 400px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(13, 71, 161, .12);
}
@media (max-width: 991.98px) { .page-head .ph-img { display: none; } }
.page-head .page-title { margin: 0 0 6px; }
.page-head .page-desc { margin: 0; }
.page-inner { padding: 34px 0 50px; }
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-deep);
  margin: 0 0 8px;
}
.page-desc { color: var(--text-soft); font-size: 14px; margin: 0 0 22px; }
.breadcrumb-nav {
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
}
.breadcrumb-nav a { color: var(--text-soft); }
.breadcrumb-nav a:hover { color: var(--brand); }
.breadcrumb-nav .sep { margin: 0 8px; color: #c3cad6; }

.sidebar-col { width: 260px; }
.main-col { width: calc(100% - 260px - 26px); }

/* 内容前置布局：源码 main 在前、aside 在后；顺序显示为内容左、侧栏右 */
.page-inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 26px; }
.page-inner .main-col { order: 1; }
.page-inner .sidebar-col { order: 2; }

/* ---------- 内容页 ---------- */
.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}
.article h1 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.article .meta {
  font-size: 13px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.article .content { font-size: 15px; line-height: 2; word-break: break-word; }
.article .content img { max-width: 100%; height: auto; }
.article .prenext {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 16px;
  font-size: 14px;
  color: var(--text-soft);
}
.article .prenext div { margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 分页 ---------- */
.pagination-wrap { margin-top: 26px; text-align: center; }
.pagination-wrap .pagination { justify-content: center; }
.pagination-wrap .page-link { color: var(--brand); border-color: var(--line); font-size: 14px; }
.pagination-wrap .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #1c2b3a;
  color: #aeb9c7;
  font-size: 13px;
  padding: 40px 0 20px;
}
.site-footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 14px;
}
.site-footer a { color: #aeb9c7; }
.site-footer a:hover { color: #fff; }
.site-footer .f-link li { margin-bottom: 8px; }
.site-footer .copyright {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 26px;
  padding-top: 16px;
  text-align: center;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 991.98px) {
  .section { padding: 30px 0; }
  .section-title .t { font-size: 19px; }
  .case-card img { height: 160px; }
  .product-card img { height: 140px; }
  .news-feature img { width: 120px; height: 90px; }
  .sidebar-col, .main-col { width: 100%; }
  .sidebar-col { margin-top: 26px; }
  .article { padding: 18px; }
  .article h1 { font-size: 19px; }
  .about-wrap { flex-direction: column; }
  .about-wrap .about-img { flex: none; }
}

@media (max-width: 575.98px) {
  .news-feature { flex-direction: column; }
  .news-feature img { width: 100%; height: auto; }
}

/* ---------- 回顶按钮 ---------- */
.back-top{
  position:fixed;right:1.4rem;bottom:1.6rem;z-index:1050;
  width:44px;height:44px;border-radius:50%;border:0;
  background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px rgba(13,71,161,.25);opacity:0;visibility:hidden;transform:translateY(12px);
  transition:all .3s ease;
}
.back-top.show{opacity:1;visibility:visible;transform:none}
.back-top:hover{background:var(--brand-deep)}

/* ---------- 移动端底部导航（<xl 显示，替代顶部汉堡菜单） ---------- */
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:1040;
  background:#fff;border-top:1px solid var(--line);
  display:flex;padding:.32rem 0 calc(.32rem + env(safe-area-inset-bottom,0px));
  box-shadow:0 -2px 14px rgba(13,71,161,.10);
}
.bottom-nav a,.bottom-nav button{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
  background:none;border:0;padding:.3rem 0 .2rem;font-size:11.5px;color:var(--text-soft);
  line-height:1.25;font-family:var(--bs-body-font-family);
}
.bottom-nav a.active,.bottom-nav button.active{color:var(--brand);font-weight:600}
.bottom-nav svg{width:21px;height:21px}
@media (min-width:1200px){.bottom-nav{display:none}}
@media (max-width:1199.98px){
  body{padding-bottom:62px}
  .back-top{bottom:5.4rem}
}

/* ---------- 底部全菜单面板（offcanvas-bottom） ---------- */
.all-menu{--bs-offcanvas-height:78vh;max-height:78vh;border-radius:18px 18px 0 0}
.menu-group-title{
  display:flex;align-items:center;justify-content:space-between;
  font-size:14.5px;font-weight:700;color:var(--brand-deep);
  margin-bottom:.55rem;padding-bottom:.4rem;border-bottom:1px solid var(--line);
  text-decoration:none;
}
.menu-group-title::after{content:"›";color:var(--brand);font-size:16px}
.menu-group-title:hover{color:var(--brand)}
.menu-group-links a{
  font-size:13px;color:var(--text);background:var(--bg-soft);border:1px solid var(--line);
  padding:.38rem .85rem;border-radius:999px;text-decoration:none;transition:all .2s;
}
.menu-group-links a:hover{background:var(--brand-soft);border-color:rgba(21,101,192,.45);color:var(--brand)}
