/* 
 * 云南省戒毒网 - 自定义样式
 * 包含页面特殊样式和覆盖样式
 */

/* ==================== Header Logo 样式 ==================== */
.header_logo img {
  height: 70px !important;
  width: auto !important;
}

@media (max-width: 768px) {
  .header_logo img {
    height: 50px !important;
  }
}

/* ==================== 内容区域布局 ==================== */
/* 首页第一区域 */
.p1 > .inner.p-30r.bgc-fff1 {
  padding-top: 0 !important;
}

/* 头条文本居中 */
.toutiao {
  text-align: center !important;
}

/* 列布局宽度 - 仅PC端应用 */
@media (min-width: 769px) {
  .p1 .col-md-l {
    width: 50% !important;
  }

  .p1 .col-md-r {
    width: 47% !important;
  }

  .p3 .col-md-l {
    width: 65% !important;
  }

  .p3 .col-md-r {
    width: 30% !important;
  }

  /* Tab内部列布局 */
  .pane.row .col-md-l {
    width: 65% !important;
  }

  .pane.row .col-md-r {
    width: 34% !important;
  }
}

/* 移动端列布局 - 全宽显示 */
@media (max-width: 768px) {
  .p1 .col-md-l,
  .p1 .col-md-r,
  .p3 .col-md-l,
  .p3 .col-md-r,
  .pane.row .col-md-l,
  .pane.row .col-md-r {
    width: 100% !important;
  }
}

/* Tab和Pane间距 */
.tab_pane1 > .tab + .pane {
  margin-top: -15px !important;
}

.zfxkgk_tab .tab + .pane .list_t {
  margin-top: -15px !important;
}

.zfxkgk_tab h3.tab {
  margin-bottom: 14px !important;
}

/* ==================== 专题宣传横幅 ==================== */
.promotion-banner {
  width: 100%;
  max-width: 1320px;
  height: 176px;
  margin: 0 auto 60px auto;
  text-align: center;
  padding: 0.3rem;
}

.promotion-banner img {
  width: 100%;
  height: 176px;
  object-fit: cover;
  border: 0;
}

/* 移动端专题横幅适配 */
@media (max-width: 768px) {
  .promotion-banner {
    height: auto;
    padding: 15px;
    margin-bottom: 30px;
  }

  .promotion-banner img {
    height: auto;
    min-height: 100px;
    object-fit: inherit;
  }
}

/* ==================== 专题图片容器样式 ==================== */
.promotion-images-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 0 20px 20px 20px;
  max-width: 1320px;
  margin: 0 auto;
}

.promotion-image-item {
  flex: 1;
  max-width: calc(50% - 10px);
  transition: transform 0.3s ease;
}

.promotion-image-item:hover {
  transform: translateY(-5px);
}

.promotion-image-item .img_box {
  display: block;
  height: 150px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.promotion-image-item:hover .img_box {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.promotion-image-item img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: transform 0.3s ease;
}

.promotion-image-item:hover img {
  transform: scale(1.05);
}

/* ==================== 轮播图容器居中对齐 ==================== */
.swiper_box2 {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.swiper_box2 .swiper-container {
  width: 100% !important;
  height: 150px !important;
}

/* 专题专栏轮播图图片高度 */
#Swiper3 .img_box {
  height: 150px !important;
  overflow: hidden;
  border-radius: 8px;
}

#Swiper3 .img_box img {
  width: 100% !important;
  height: 150px !important;
  object-fit: fill !important;
}

#Swiper3 .swiper-slide {
  height: 150px !important;
  box-sizing: border-box;
}

/* 优化导航按钮位置 - 垂直居中 */
#Swiper3Prev,
#Swiper3Next {
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-top: 0 !important;
}

/* 也可以用class选择器作为备选 */
.swiper_box2 .swiper-button-prev,
.swiper_box2 .swiper-button-next {
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-top: 0 !important;
}

/* ==================== 列表样式调整 ==================== */
.list_t li:not(.panel-more) a {
  font-size: 20px !important;
}

/* ==================== 主题色配置 ==================== */
:root {
  --primary-color: rgb(9, 75, 170);
  --primary-hover: rgb(7, 60, 136);
}

/* 更新特定元素的蓝色主题色 */
.tab a.cur,
.tab a:hover,
.enter:hover,
.list_t li a:hover,
.marquee-item:hover,
.more-link:hover,
.section-header a:hover,
.section-list li a:hover {
  color: var(--primary-color) !important;
}

/* ==================== Header 样式修复 ==================== */
/* 修复可能导致文字看不见的hover状态 */
.header .header_toolbar_right .mode-a:hover,
.header .header_toolbar_right .mode-b:hover {
  color: #fff !important;
}

.nav > li:hover > a {
  color: #fff !important;
}

/* 下拉菜单hover时文字颜色 - 使用深色确保可读性 */
.nav .dropdown li:hover a {
  color: rgb(9, 75, 170) !important;
  background: #f0f6ff !important;
}

/* ==================== Tab 样式优化 ==================== */
/* 添加缺失的tab hover样式 */
.tab a:not(.enter):hover {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
}

/* 修复tab选中状态的文字颜色 - 强制移除背景色 */
.tab a:not(.enter).cur {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
  background: none !important;
  background-color: transparent !important;
}

/* 同样修复hover状态 - 移除背景色 */
.tab a:not(.enter):hover {
  background: none !important;
  background-color: transparent !important;
}

/* 修复标题相关hover状态 */
.title .more:hover {
  color: var(--primary-color) !important;
}

.where a:hover {
  color: var(--primary-color) !important;
}

/* ==================== Footer 样式修复 ==================== */
/* 修复其他可能遗漏的hover状态 */
.footer .links > ul > li a:hover {
  color: var(--primary-color) !important;
}

.footer .copyright p a:hover {
  color: var(--primary-color) !important;
}

.header .hotwords a:hover {
  color: var(--primary-color) !important;
}

.menu .mobile-dropdown li a:hover {
  color: var(--primary-color) !important;
}

/* ==================== 政务信息公开Tab样式 ==================== */
/* 优化政务信息公开tab的hover样式 */
.zfxkgk_tab .tab a {
  transition: all 0.3s ease !important;
  border-radius: 4px 4px 0 0 !important;
  padding: 8px 16px !important;
  margin-right: 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  line-height: 1.2 !important;
}

.zfxkgk_tab .tab a:hover {
  background-color: rgba(9, 75, 170, 0.1) !important;
  color: var(--primary-color) !important;
  transform: translateY(-1px) !important;
}

.zfxkgk_tab .tab a.cur {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(9, 75, 170, 0.3) !important;
}

.zfxkgk_tab .tab a.cur:hover {
  background-color: var(--primary-hover) !important;
  transform: none !important;
}

/* ==================== 互动交流区域样式 ==================== */
/* 优化互动交流区域样式 */
.hdjl_box {
  background: transparent !important;
  padding: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: flex-start !important;
  margin-top: 0 !important;
}

.hdjl_box .tab {
  border-bottom: 2px solid var(--primary-color) !important;
  margin-bottom: 20px !important;
  padding-bottom: 10px !important;
}

.hdjl_box .tab a {
  color: var(--primary-color) !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

/* 优化互动交流按钮样式 */
.hdjl_box .zfxkgk_btn_box {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  background: transparent !important;
}

.hdjl_box .zfxkgk_btn_box a {
  display: flex !important;
  align-items: center !important;
  padding: 12px 16px !important;
  background: #ffffff !important;
  border: 1px solid #e9ecef !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
  margin-bottom: 20px !important;
  outline: none !important;
  box-shadow: none !important;
}

.hdjl_box .zfxkgk_btn_box a:hover,
.hdjl_box .zfxkgk_btn_box a:focus,
.hdjl_box .zfxkgk_btn_box a:active {
  background-color: rgba(9, 75, 170, 0.05) !important;
  background: rgba(9, 75, 170, 0.05) !important;
  border: 1px solid var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  outline: none !important;
  box-shadow: 0 2px 8px rgba(9, 75, 170, 0.1) !important;
  text-decoration: none !important;
  transform: none !important;
}

/* 覆盖外部CSS的::before伪元素 */
.hdjl_box .zfxkgk_btn_box a:hover::before,
.hdjl_box .zfxkgk_btn_box a:focus::before,
.hdjl_box .zfxkgk_btn_box a:active::before {
  display: none !important;
}

/* 强制覆盖任何可能的红色边框 */
.hdjl_box .zfxkgk_btn_box a:hover *,
.hdjl_box .zfxkgk_btn_box a:focus *,
.hdjl_box .zfxkgk_btn_box a:active * {
  border-color: transparent !important;
  outline: none !important;
}

.hdjl_box .zfxkgk_btn_box a img {
  width: 36px !important;
  height: 36px !important;
  margin-right: 12px !important;
  filter: none !important;
  transition: none !important;
}

.hdjl_box .zfxkgk_btn_box a:hover img,
.hdjl_box .zfxkgk_btn_box a:focus img,
.hdjl_box .zfxkgk_btn_box a:active img {
  filter: none !important;
  transform: none !important;
}

.hdjl_box .zfxkgk_btn_box a span {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

/* ==================== 通用样式覆盖 ==================== */
/* 边框颜色 */
.info-section,
.interaction-panel .panel-title,
.section-header {
  border-color: var(--primary-color) !important;
}

/* 背景色 */
.tab a.cur {
  background-color: var(--primary-color) !important;
}

/* 按钮和链接颜色 */
a[href]:hover,
.btn:hover,
.button:hover {
  color: var(--primary-color) !important;
}

/* ==================== 友情链接显示控制 ==================== */
/* 友情链接在PC端和移动端都显示 */
.footer .links {
  display: block !important;
  padding: 30px !important;
  margin-bottom: 0 !important;
}

@media (max-width: 768px) {
  .footer .links {
    padding: 0 15px !important;
    margin-bottom: 25px !important;
  }
}

/* ==================== 页脚版权区域图片尺寸 ==================== */
/* 页脚版权区域图片统一尺寸 */
.copyright_box .copyright_wrapper .copyright_item_img_container {
  width: 120px !important;
  height: 140px !important;
}

.copyright_box .copyright_wrapper .copyright_item_img_container img {
  max-width: 120px !important;
  max-height: 140px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

.copyright_badge_large,
.copyright_badge_medium {
  max-width: 120px !important;
  max-height: 140px !important;
  width: auto !important;
  height: auto !important;
}

/* ==================== 移动端响应式适配 ==================== */
@media screen and (max-width: 768px) {
  /* 专题图片容器 */
  .promotion-images-container {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px 20px 15px;
  }

  .promotion-image-item {
    max-width: 100%;
    width: 100%;
  }

  .promotion-image-item .img_box {
    height: 200px;
  }

  /* 轮播图容器 */
  .swiper_box2 {
    padding: 0 15px;
  }

  .swiper_box2 .swiper-container {
    height: auto !important;
  }

  #Swiper3 .img_box,
  #Swiper3 .swiper-slide {
    height: auto !important;
    min-height: 120px;
  }

  #Swiper3 .img_box img {
    height: auto !important;
    min-height: 120px;
  }

  /* Tab间距调整 */
  .zfxkgk_tab h3.tab {
    margin-bottom: 10px !important;
  }

  .tab_pane1 > .tab + .pane {
    margin-top: -10px !important;
  }

  .zfxkgk_tab .tab + .pane .list_t {
    margin-top: -10px !important;
  }

  /* 移动端政务信息公开按钮区域优化 */
  .zfxkgk_btn_box {
    padding: 15px !important;
    margin-top: 0 !important;
    margin-bottom: 40px !important;
  }

  .zfxkgk_btn_box a {
    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    padding: 12px 15px !important;
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    border-radius: 8px !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    transition: all 0.3s ease !important;
  }

  .zfxkgk_btn_box a:hover {
    background: #e3f2fd !important;
    border-color: #2196f3 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15) !important;
  }

  .zfxkgk_btn_box a img {
    width: 24px !important;
    height: 24px !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
  }

  .zfxkgk_btn_box a:last-child {
    margin-bottom: 0 !important;
  }
}

/* ==================== 浮窗样式 ==================== */
.floating-window {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 380px;
  width: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-window a {
  display: block;
  width: 100%;
}

.floating-window img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
}

/* 关闭按钮 */
.floating-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  line-height: 28px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

/* 移动端隐藏浮窗 */
@media (max-width: 768px) {
  .floating-window {
    display: none !important;
  }
}
