/**
 * 移动端响应式样式
 * 此文件仅在移动端生效，PC端保持原有样式不变
 * 使用媒体查询 @media 针对最大宽度768px的设备
 */

/* ==================== PC端默认隐藏移动端元素 ==================== */
.mobile-menu-toggle {
  display: none;
}

.mobile-nav-menu {
  display: none;
}

/* ==================== 移动端适配 (max-width: 768px) ==================== */
@media screen and (max-width: 768px) {
  
  /* === 基础样式重置 === */
  html {
    font-size: 14px;
  }
  
  body {
    overflow-x: hidden;
  }
  
  /* === 内容区域容器 === */
  .content-info {
    width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box;
  }
  
  /* === 头部导航栏 === */
  .header-out {
    position: fixed;
    z-index: 9999;
    top: 0;
    height: 56px;
    left: 0;
    width: 100%;
    background-color: #a71918;
    padding: 0 10px;
  }
  
  .header-out img {
    height: 45px;
  }
  
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0;
  }
  
  /* 隐藏PC端导航菜单 */
  .header-tabs {
    display: none !important;
  }
  
  /* 移动端汉堡菜单按钮 */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 10001;
  }
  
  .mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* 移动端侧边栏菜单 */
  .mobile-nav-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #a71918;
    z-index: 9998;
    overflow-y: auto;
    padding: 20px 0;
  }
  
  .mobile-nav-menu.active {
    display: block;
  }
  
  .mobile-nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }
  
  .mobile-nav-menu a:hover,
  .mobile-nav-menu a:active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f5d389;
  }
  
  /* === 顶部Banner区域 === */
  .base-top {
    height: auto !important;
    min-height: 300px;
    padding-top: 70px;
    padding-bottom: 30px;
    background-size: cover;
    background-position: center;
  }
  
  .base-top .logo-box {
    margin: 30px auto 25px;
    font-size: 22px;
    text-align: center;
    padding: 0 15px;
  }
  
  .base-top .logo-box > img {
    width: 50px;
    margin-right: 12px;
  }
  
  .base-top .logo-box > span {
    display: block;
    line-height: 1.4;
  }
  
  /* 搜索框 */
  .base-top .search {
    width: 100% !important;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }
  
  .base-top .search .el-input__inner {
    height: 42px;
    font-size: 14px;
  }
  
  .el-input-group__append a {
    padding: 0 15px;
    height: 40px;
    font-size: 14px;
  }
  
  /* === 党组织简介区域 === */
  .base-bottom {
    height: auto !important;
    min-height: auto;
    padding: 20px 0 30px;
  }
  
  .space-50 {
    height: 20px;
  }
  
  .base-bottom .bottom-tabs {
    position: relative;
    top: 0;
    margin-left: 0;
    padding: 0 20px;
    font-size: 18px;
    height: 45px;
    line-height: 45px;
    justify-content: center;
  }
  
  .base-bottom .bottom-tabs::before,
  .base-bottom .bottom-tabs::after {
    display: none;
  }
  
  .base-bottom .swiper-out {
    display: block !important;  /* 取消flex布局 */
    height: auto !important;
    margin: 15px 0;
    padding: 0;
  }
  
  /* 取消原样式中的flex:1限制，让内容占满宽度 */
  .base-bottom .swiper-out > * {
    flex: none !important;
    width: 100% !important;
  }
  
  /* 取消第一个子元素的右边距 */
  .base-bottom .swiper-out > :first-child {
    margin-right: 0 !important;
  }
  
  .base-bottom .base-tip {
    margin: 15px 0;
    padding: 0;
    width: 100% !important;  /* 确保占满宽度 */
  }
  
  .base-bottom .base-tip span {
    font-size: 15px;
    line-height: 1.7em;
    -webkit-line-clamp: 6;
    text-align: justify;
    padding: 0;
    width: 100% !important;  /* 确保文本占满宽度 */
  }
  
  /* 主标签导航 - 四个标签同一行显示 */
  .base-bottom .main-tabs {
    display: flex;
    flex-wrap: nowrap;  /* 不换行，保持同一行 */
    height: auto;
    font-size: 14px;
    justify-content: space-between;  /* 均匀分布 */
    padding: 0 5px;
    overflow-x: auto;  /* 如果实在放不下可以滚动 */
  }
  
  .base-bottom .main-tabs > div {
    padding: 8px 8px;
    margin: 3px 2px;
    font-size: 13px;
    flex-shrink: 0;  /* 不缩小 */
    white-space: nowrap;  /* 不换行 */
  }
  
  .base-bottom .main-tabs > *:not(:first-child) {
    margin-left: 0;
  }
  
  /* === 通知列表区域 === */
  .notice-list {
    padding: 0;
  }
  
  .notice-item {
    padding: 0 !important;
  }
  
  .list-box {
    padding: 15px 0;
  }
  
  .list-box > * {
    height: auto;
    min-height: 50px;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .list-box > *:last-child {
    border-bottom: none;
  }
  
  .list-box > * > :first-child {
    width: 100%;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
    font-size: 15px;
    line-height: 1.5;
  }
  
  .list-box > * > :last-child {
    width: 100%;
    text-align: left;
    font-size: 13px;
    color: #999;
  }
  
  .more-view {
    height: 45px;
    line-height: 45px;
    margin-bottom: 10px;
  }
  
  /* === 底部链接区域 === */
  .footer-url {
    padding: 15px 0;
  }
  
  .footerUrl-inner {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 0;
    align-items: center;
  }
  
  .footerUrl-inner > span {
    width: 100%;
    margin-bottom: 10px;
    font-size: 14px;
  }
  
  .footerUrl-inner > a {
    display: inline-block;
    margin-right: 12px !important;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
  
  /* 第二个链接后换行（中国公共招聘网换行） */
  .footerUrl-inner > a:nth-child(3) {
    width: 100%;
    margin-right: 0 !important;
  }
  
  /* === 底部页脚 === */
  .bottom-footer .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
  }
  
  .bottom-footer .footer-inner > * {
    margin: 10px 0;
  }
  
  .bottom-footer .footer-inner > :last-child {
    margin-left: 0;
  }
  
  .gzh-ewm {
    justify-content: center;
    gap: 20px;
  }
  
  .gzh-ewm div {
    margin-right: 0;
  }
  
  .gzh-ewm img {
    width: 70px;
    height: 70px;
  }
  
  /* === 二级菜单隐藏 === */
  .secondary-menu {
    display: none !important;
  }
  
  /* === 轮播图适配 === */
  .special-column {
    height: auto !important;
    padding: 30px 0;
  }
  
  .special-column .el-carousel__item > a {
    width: 100% !important;
  }
  
  .special-column .el-carousel__item > *:not(:first-child) {
    margin-left: 0;
  }
  
  .special-column .card-item {
    margin: 0 10px;
  }
  
  .special-column .card-item > :first-child {
    font-size: 18px;
    height: auto;
    line-height: 1.4;
    padding: 0 15px;
  }
  
  .special-column .card-item > :nth-child(2) {
    margin: 15px;
  }
  
  .special-column .card-item > :nth-child(3) {
    height: 150px;
  }
  
  /* === 广告位 === */
  .advertisement-box {
    height: auto;
    margin: 15px 0;
  }
  
  .advertisement-box > img {
    height: auto;
    max-height: 120px;
    object-fit: cover;
  }
  
  /* === Swiper通知区 === */
  .swiper-notice {
    height: auto !important;
    padding: 30px 0;
  }
  
  .swiper-notice .swiper-slide {
    width: calc(50% - 7px) !important;
  }
  
  .swiper-notice .swiper-slide:not(:first-child) {
    margin-left: 10px;
  }
  
  .swiper-notice .card-item .cardImg-box {
    height: 100px;
  }
  
  /* === 模板信息区域 === */
  .template-info {
    padding: 30px 0;
  }
  
  .template-innner > * {
    width: 100% !important;
    margin: 0 0 20px 0;
  }
  
  .template-innner > * .content > div {
    width: 100% !important;
    padding-right: 0 !important;
  }
  
  .template-innner .template-item .header {
    height: 45px;
    line-height: 45px;
    padding-left: 15px;
    font-size: 14px;
  }
  
  .template-innner .template-item .content {
    padding: 12px 10px;
  }
  
  .template-innner .template-item .content > div {
    margin-bottom: 10px;
    font-size: 13px;
  }
  
  /* === 面包屑导航 === */
  .breadcrumb {
    width: 100%;
    height: auto;
    min-height: 45px;
    padding: 10px 15px;
    font-size: 13px;
    flex-wrap: wrap;
  }
  
  /* === 分页组件 === */
  .pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .pagination > * {
    margin: 3px;
  }
  
  /* === 详情页 === */
  .detail-out {
    height: auto;
    min-height: calc(100vh - 180px);
    padding: 15px;
    margin: 0 0 15px 0;
  }
  
  .detail-inner {
    height: auto;
  }
  
  .detail-out .title {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  .detail-out .title::before {
    width: 3px;
    height: 18px;
    margin-right: 10px;
  }
  
  .detail-out .info {
    font-size: 14px;
    margin: 6px 0 12px 0;
  }
  
  /* === 详情列表项适配 === */
  .detail-out .detail-list {
    display: block;
  }
  
  .detail-out .detail-item {
    height: auto;
    min-height: 50px;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 10px;
    font-size: 15px;
  }
  
  .detail-out .detail-item > :first-child {
    width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    line-height: 1.5;
  }
  
  .detail-out .detail-item > :last-child {
    width: 100%;
    text-align: left;
    font-size: 13px;
    color: #999;
  }
  
  /* === 内页顶部间距调整（适配移动端header高度56px） === */
  .content-info[style*="margin-top"] {
    margin-top: 60px !important;
  }
  
  /* === 详情页新闻样式适配 === */
  .detail-news {
    margin-bottom: 15px;
    min-height: auto;
    border: none;
    border-top: 1px solid #e0e0e0;
  }
  
  .detail-news .header {
    padding: 15px;
  }
  
  .detail-news .header > :first-child {
    font-size: 18px;
    line-height: 1.4;
  }
  
  .detail-news .header > :nth-child(2) {
    font-size: 13px;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .detail-news .header > :nth-child(2) > span {
    display: inline-block;
  }
  
  .detail-news .header > :nth-child(3) {
    font-size: 13px;
    margin-top: 8px;
  }
  
  .detail-news .content {
    padding: 15px;
    font-size: 15px;
    line-height: 1.8;
    word-break: break-all;
  }
  
  .detail-news .content img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .detail-news .content table {
    max-width: 100% !important;
    overflow-x: auto;
    display: block;
  }
  
  .detail-news .content video,
  .detail-news .content iframe {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .detail-news .primary-txt {
    margin-right: 10px;
  }
  
  /* === 搜索结果 === */
  .search-item {
    height: auto;
    min-height: 120px;
    padding: 15px;
  }
  
  .search-item .header {
    height: auto;
    line-height: 1.4;
    font-size: 16px;
    margin-bottom: 8px;
    white-space: normal;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .search-item .txt {
    font-size: 13px;
    line-height: 1.6;
  }
  
  /* === 搜索页面特有样式 === */
  .res-search {
    width: 100% !important;
    max-width: 100%;
    margin: 10px 0 15px 0 !important;
  }
  
  .search-list {
    min-height: auto !important;
  }
  
  /* 搜索页分页组件 */
  .search-list .el-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    padding: 10px 0;
  }
  
  .search-list .el-pagination .el-pagination__sizes {
    display: none;
  }
  
  /* 总条数单独一行 */
  .search-list .el-pagination .el-pagination__total {
    flex: 0 0 100%;
    text-align: center;
    order: -1;
    margin-bottom: 10px;
  }
  
  /* 左右翻页按钮和页码在同一行，不换行 */
  .search-list .el-pagination .btn-prev {
    order: 0;
    flex-shrink: 0;
  }
  
  .search-list .el-pagination .el-pager {
    order: 0;
    flex-shrink: 0;
  }
  
  .search-list .el-pagination .btn-next {
    order: 0;
    flex-shrink: 0;
  }
  
  /* 跳转框单独一行 */
  .search-list .el-pagination .el-pagination__jump {
    flex: 0 0 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 10px;
    order: 1;
  }
  
  /* === Element UI组件适配 === */
  .el-input__inner {
    height: 40px;
  }
  
  .el-carousel__container {
    height: auto !important;
  }
  
  .el-carousel__button {
    width: 8px;
    height: 8px;
  }
  
  .el-carousel__indicator--horizontal {
    padding: 8px 5px !important;
  }
  
  /* === 内页盒子 === */
  .inner-box {
    padding-top: 20px;
  }
}

/* ==================== 小屏手机适配 (max-width: 480px) ==================== */
@media screen and (max-width: 480px) {
  
  html {
    font-size: 13px;
  }
  
  .base-top .logo-box {
    font-size: 20px;
    margin: 25px auto 20px;
  }
  
  .base-top .logo-box > img {
    width: 40px;
    margin-right: 10px;
  }
  
  /* 小屏四个标签保持同一行，字号更小 */
  .base-bottom .main-tabs {
    padding: 0 2px;
  }
  
  .base-bottom .main-tabs > div {
    padding: 6px 6px;
    margin: 2px 1px;
    font-size: 12px;
  }
  
  .list-box > * > :first-child {
    font-size: 14px;
  }
  
  .list-box > * > :last-child {
    font-size: 12px;
  }
  
  .footerUrl-inner > a {
    font-size: 12px;
    margin-right: 10px !important;
  }
  
  /* 小屏详情列表项 */
  .detail-out .detail-item {
    padding: 10px 8px;
    font-size: 14px;
  }
  
  .detail-out .detail-item > :first-child {
    font-size: 14px;
  }
  
  .detail-out .detail-item > :last-child {
    font-size: 12px;
  }
  
  /* 小屏详情页新闻 */
  .detail-news .header > :first-child {
    font-size: 16px;
  }
  
  .detail-news .header > :nth-child(2),
  .detail-news .header > :nth-child(3) {
    font-size: 12px;
  }
  
  .detail-news .content {
    font-size: 14px;
    padding: 12px;
  }
  
  /* 小屏搜索结果 */
  .search-item {
    min-height: 100px;
    padding: 12px;
  }
  
  .search-item .header {
    font-size: 15px;
  }
  
  .search-item .txt {
    font-size: 12px;
  }
  
  .swiper-notice .swiper-slide {
    width: 100% !important;
    margin-left: 0 !important;
  }
  
  .gzh-ewm img {
    width: 60px;
    height: 60px;
  }
}

/* ==================== 平板适配 (769px - 1024px) ==================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  
  .content-info {
    width: 95% !important;
    max-width: 960px;
  }
  
  .header-tabs > * a {
    padding: 0 12px;
    font-size: 15px;
  }
  
  .base-top .search {
    width: 600px;
  }
  
  .base-top .logo-box {
    font-size: 30px;
  }
  
  .base-bottom .main-tabs {
    font-size: 20px;
  }
  
  .base-bottom .main-tabs > div {
    padding: 0 25px;
  }
  
  .template-innner > * .content > div {
    width: 50%;
  }
  
  .swiper-notice .swiper-slide {
    width: calc(33.333% - 10px) !important;
  }
}
