/* 鼠标移动到a标签文本变色 */
.hover-bg-red:hover {
  background-color: red !important;
}

/* 激活导航背景变色 */
.nav-item.active {
  background-color: #ff343f !important;
}

/* 确保链接填满整个li区域 */

.list-inline-item a {
  line-height: 45px;
}

.top-nav:hover {
  color: red !important;
}

.footer a:hover {
  color: #fff !important;
}

/* 重置样式 */

body,
html {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", "微软雅黑", arial, sans-serif;
}

.container-fluid {
  margin: 0;
  padding: 0;
}

/* 特别处理您的导航栏 */

.list-inline {
  margin: 0;
  padding: 0;
}

/* 处理轮播图容器 */

.position-relative {
  margin: 0;
  padding: 0;
}


/* 装修知识列表分页导航 */
.pagination {
  display: inline-block;
  padding-left: 0;
  margin: 20px 0;
  border-radius: 4px;
}

.pagination>li {
  display: inline;
}

.pagination>li>a,
.pagination>li>span {
  position: relative;
  float: left;
  padding: 6px 12px;
  line-height: 1.42857;
  text-decoration: none;
  color: #337ab7;
  background-color: #fff;
  border: 1px solid #ddd;
  margin-left: -1px;
}

.pagination>li:first-child>a,
.pagination>li:first-child>span {
  margin-left: 0;
  border-bottom-left-radius: 4px;
  border-top-left-radius: 4px;
}

.pagination>li:last-child>a,
.pagination>li:last-child>span {
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
}

.pagination>li>a:hover,
.pagination>li>a:focus,
.pagination>li>span:hover,
.pagination>li>span:focus {
  z-index: 2;
  color: #23527c;
  background-color: #eeeeee;
  border-color: #ddd;
}

.pagination>.active>a,
.pagination>.active>a:hover,
.pagination>.active>a:focus,
.pagination>.active>span,
.pagination>.active>span:hover,
.pagination>.active>span:focus {
  z-index: 3;
  color: #fff;
  background-color: #337ab7;
  border-color: #337ab7;
  cursor: default;
}



/* 案例瀑布流主容器样式 */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  margin: -0.5rem;
  /* 抵消列的内边距 */
}

/* 列样式 - 4列布局 */
.gallery-col {
  width: 25%;
  padding: 0.4rem;
  /* 减少内边距 */
  box-sizing: border-box;
}

/* 卡片样式 - 移除固定高度 */
.gallery-card {
  display: block;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  background: white;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #adb5bd;
}

/* 图片容器 - 保持原始比例 */
.gallery-img-container {
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.03);
}

/* 标题区域 - 紧凑布局 */
.gallery-caption {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
}

.gallery-caption p {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* 知识、案例详情内容布局 */
.content-limit {
  overflow: hidden;
}

.content-limit table,
.content-limit iframe {
  max-width: 100%;
  height: auto;
}

/* 仅让图片居中，不影响其他元素 */
.content-limit img {
  display: block;
  /* 使图片单独成行 */
  max-width: 70%;
  /* 限制宽度不超过容器 */
  height: auto;
  /* 保持原始比例 */
  margin-left: auto;
  /* 左外边距自动 */
  margin-right: auto;
  /* 右外边距自动 */
}



/* 首页"装修案例"板块标题浮动效果 */
.image-caption {
  position: absolute;
  bottom: 15px;
  left: 16px;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.position-relative:hover .image-caption {
  opacity: 1;
}

.position-relative {
  position: relative;
  overflow: hidden;
}



/* 这是右侧浮动导航开始 */
/* 右侧浮动导航容器 */
.float-nav {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  background-color: white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  border-radius: 5px 0 0 5px;
  z-index: 1000;
}

/* 导航项 */
.nav-item-1 {
  position: relative;
  padding: 15px 0;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.nav-item-1:last-child {
  border-bottom: none;
}

.nav-item-1:hover {
  background-color: #f8f8f8;
}

/* 导航图标 */
.nav-icon {
  font-size: 1.5rem;
  color: #6c757d;
  margin-bottom: 5px;
}

.nav-text {
  font-size: 0.75rem;
  color: #495057;
}

/* 悬浮面板 */
.nav-panel {
  position: absolute;
  right: 60px;
  top: 0;
  width: 220px;
  background-color: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  border-radius: 5px 0 0 5px;
  padding: 1rem;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item-1:hover .nav-panel {
  display: block;
  opacity: 1;
}

/* 二维码样式 */
.qrcode-img {
  width: 120px;
  height: 120px;
  border: 1px solid #dee2e6;
  margin: 0 auto 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .float-nav {
    width: 50px;
  }
}

@media (max-width: 768px) {
  .nav-panel {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .qrcode-img {
    width: 100px;
    height: 100px;
  }
}

/* 这是右侧浮动导航结束 */



/* 分站首页会员公司12个推荐位展示 */
.company-card {
  overflow: hidden;
}

.company-logo {
  transition: transform 0.5s ease;
}

.company-logo:hover {
  transform: scale(1.2);
}