/* =========================================================
   pbootcms 响应式适配样式 (二级目录 /xiezilou/)
   作用：在移动端断点下把固定宽度桌面布局改为流式/单列，
        不影响桌面端（>1200px）既有样式。
   引入方式：已在各 pc 模板 </head> 前通过
   <link rel="stylesheet" href="/xiezilou/template/default/css/responsive.css"> 引入
   ========================================================= */

/* seo 用隐藏 h1：保留在 dom 中给搜索引擎/屏幕阅读器，视觉上不显示 */
.seo-h1 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- 中屏(≤1200px)：放开强制最小宽度，容器转流式 ---------- */
@media screen and (max-width: 1200px) {
  body { min-width: 0 !important; }
  .banner_0907,
  .theme-detail,
  .chengqu,
  .box4,
  .warp,
  .w,
  .cooperation,
  .likebox,
  .titlebox,
  .titlebox.pt14 {
    width: 100% !important;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
  }
  .container {
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
  }
}

/* ---------- 头部汉堡菜单（纯 css 实现，无 js 依赖） ---------- */
/* 桌面端隐藏开关和按钮 */
.nav-toggle,
.nav-toggle-btn { display: none; }

/* ---------- 平板/手机(≤768px)：单列堆叠、图片自适应 ---------- */
@media screen and (max-width: 768px) {
  body { font-size: 14px; }
  img { max-width: 100% !important; height: auto !important; }

  .box4 li img,
  .likeimg img,
  .list-style5 li img,
  .list-style5 .first img,
  .zixun-left img,
  .zixun-right img {
    width: 100% !important;
    height: auto !important;
  }

  /* 头部：logo 左   汉堡按钮右，搜索框整行在下 */
  .logo { position: static !important; }
  .banner_0907 {
    width: 100% !important;
    padding: 8px 10px;
    box-sizing: border-box;
    line-height: normal !important;
    font-size: 14px !important;
    position: relative;
  }
  .banner_0907_short { float: left !important; max-width: 70%; }
  .banner_0907_short img { max-height: 48px; width: auto !important; }

  /* 汉堡按钮：固定在头部右侧 */
  .logo .link {
    float: none !important;
    margin: 0 !important;
    width: auto !important;
    position: absolute;
    top: 4px;
    right: 10px;
    z-index: 1001;
  }
  .nav-toggle-btn {
    display: block;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 11px;
    box-sizing: border-box;
    cursor: pointer;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  }
  .nav-toggle-btn span {
    display: block;
    width: 100%;
    height: 3px;
    margin: 3px 0;
    background: #016a9f;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }

  /* 菜单项默认隐藏，勾选后展开为下拉列表 */
  .logo .link .gift {
    display: none;
    width: 150px !important;
    height: auto !important;
    line-height: 1.5 !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background: #fff !important;
    white-space: nowrap !important;
    text-align: left;
  }
  .nav-toggle:checked ~ .gift { display: block; }
  .nav-toggle:checked ~ .gift:first-of-type { border-top: 1px solid #f0f0f0; }

  /* 勾选后按钮变 × */
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translatey(9px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translatey(-9px) rotate(-45deg); }

  .search {
    float: none !important;
    clear: both;
    width: 100% !important;
    margin: 8px 0 10px 0 !important;
    box-sizing: border-box;
  }
  .search .input input {
    width: 68% !important;
    box-sizing: border-box;
  }

  /* 通用：取消浮动，单列堆叠 */
  .theme-detail,
  .chengqu,
  .box4,
  .warp,
  .w,
  .likebox,
  .likeabout,
  .likeimg,
  .zixun-box,
  .wenben2,
  .chhot,
  .clearfix1 li,
  .list-style5 li,
  .list-style5 .first,
  .box4 li,
  .zixun-left,
  .zixun-right,
  .likeabout-price,
  .price-box .dl-box {
    float: none !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }
  .list-style5 li,
  .list-style5 .first,
  .box4 li { margin: 0 0 15px 0 !important; }
  .likeabout { padding-left: 0 !important; }
  .likeabout .p1,
  .likeabout .p2 { width: 100% !important; }
  .likeabout-price {
    position: static !important;
    text-align: left !important;
    margin-top: 8px;
  }

  /* 网格：两列排布，提升利用率 */
  .list-style5 li,
  .box4 li { width: 48% !important; display: inline-block; vertical-align: top; margin-right: 2% !important; }
  .list-style5 .first { width: 48% !important; height: 160px !important; }
  .clearfix1 li { width: 50% !important; }

  /* 热门写字楼商圈：统一图片高度，object-fit 裁剪保持比例 */
  .list-style5 li,
  .list-style5 .first {
    height: 160px !important;
    overflow: hidden !important;
  }
  .list-style5 li a,
  .list-style5 .first a {
    display: block !important;
    height: 100% !important;
    position: relative !important;
  }
  .list-style5 li img,
  .list-style5 .first img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* 资讯区：双栏转单栏 */
  .zixun-box { width: 100% !important; }
  .zixun-box .zixun-item { width: 100% !important; padding: 0 10px !important; }
  .wenben2 { width: 100% !important; margin-left: 0 !important; float: none !important; }

  /* 页脚：绝对定位改流式 */
  #foot .d1,
  #foot .d2,
  #foot .d3 {
    position: static !important;
    width: 100% !important;
    border: 0 !important;
    padding: 10px 0 !important;
    text-align: center;
  }
  .foot-line { margin-top: 10px !important; }
  .fuwu { height: auto !important; }
  .clearfix1 { padding: 20px 10px 0 10px !important; }
}

/* ---------- 小屏(≤480px)：全部单列 ---------- */
@media screen and (max-width: 480px) {
  .list-style5 li,
  .box4 li,
  .list-style5 .first,
  .clearfix1 li {
    width: 100% !important;
    margin-right: 0 !important;
    display: block;
  }
  .h1-title .s1 { font-size: 18px !important; }
  .likeabout h3 { font-size: 16px !important; }
}

/* =========================================================
   补充：详情页 / 列表页（content.css / news.css 固定宽度布局）流式化
   覆盖 #wrap(1200px)、.container(1300px)、.main(900px)、
   .sider(340px)、.movie_img(600px)、.movie_content(540px) 等
   ========================================================= */
@media screen and (max-width: 1200px) {
  #wrap,
  .comm_content,
  .banner-little .container,
  .channel-top .dir {
    width: 100% !important;
    box-sizing: border-box;
  }
  .channel-top .dir { padding-right: 10px; }

  .movie_content,
  .movie_content ul,
  .movie_content li,
  .movie_content h2,
  .movie_img,
  .movie_img img,
  .hit_left {
    width: 100% !important;
    box-sizing: border-box;
  }
  .movie_img { height: auto !important; }
  .movie_img img { height: auto !important; }
  .hit_left { float: none !important; }
  .fuwu { width: auto !important; margin-left: 0 !important; float: none !important; }
}

@media screen and (max-width: 768px) {
  /* 楼盘详情：图片 信息两栏转单列 */
  .movie_img { float: none !important; margin-left: 0 !important; }
  .movie_content { float: none !important; margin-left: 0 !important; }
  .movie_content .l,
  .movie_content .r { float: none !important; width: 100% !important; }
  .movie_content h2 { font-size: 22px !important; }
  .main-body h1 { font-size: 20px !important; }

  /* 资讯/列表页：主内容优先，侧栏沉底 */
  .banner-little .container { display: flex; flex-direction: column; }
  .banner-little .container .main { order: -1; }
  .sider { float: none !important; width: 100% !important; margin-top: 15px !important; }
  .main { float: none !important; width: 100% !important; }

  .channel-top { height: auto !important; line-height: 1.6 !important; }
  .channel-top .dir { width: 100% !important; white-space: normal; word-break: break-all; }

  .telphone label { display: block; }
  .list-pager { text-align: center !important; }
  .page-h1 { font-size: 18px !important; word-break: break-all; }
}

/* =========================================================
   移动端增强（合并为响应式单模板后，手机走 pc 模板）
   1. 防横向溢出
   2. 处理详情页遗留的 min-width:1200px 固定导航
   3. 回到顶部按钮缩小
   4. 触控目标加大
   ========================================================= */
@media screen and (max-width: 768px) {
  /* 防横向滚动 */
  body { overflow-x: hidden; }

  /* 详情页固定二级导航：取消吸顶、放开最小宽度、允许换行 */
  .second-nav-fixed {
    position: static !important;
    min-width: 0 !important;
    height: auto !important;
  }
  .second-nav-fixed .wrapper {
    width: 100% !important;
    box-sizing: border-box;
    padding: 0 10px;
  }
  .second-nav-fixed .pos_fixed_top a {
    float: none !important;
    display: inline-block;
    height: auto !important;
    line-height: 1.6 !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
  }
  .second-nav-fixed .wrapper .order-area {
    float: none !important;
    width: 100% !important;
    box-sizing: border-box;
    line-height: 1.6 !important;
    padding: 10px !important;
    margin: 5px 0;
  }

  /* 回到顶部按钮：缩小并贴近边缘 */
  #back-to-top,
  p #back-to-top {
    right: 10px !important;
    bottom: 60px !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
  }

  /* 触控目标：电话/委托等按钮加大点击区域 */
  .telphone a,
  .telphone .tel-num,
  .nospace-agence .button-common {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* 分页条在窄屏允许换行，避免溢出 */
  .list-pager a, .list-pager strong, .list-pager em {
    height: 32px !important;
    line-height: 32px !important;
    min-width: 32px !important;
    font-size: 13px;
  }
  p.list-pager { height: auto !important; }

  /* 悬浮二维码在移动端隐藏，避免遮挡内容 */
  #floating-box { display: none !important; }
}


/* =========================================================
   移动端：列表页(办公室出租/独栋/房源等)图文排版优化
   图片缩为缩略图（左图右文），侧栏广告大图直接隐藏
   ========================================================= */
@media screen and (max-width: 768px) {
  /* 列表项：左图右文紧凑排列 */
  .listbox li { text-align: left !important; }
  .listcover {
    width: 38% !important;
    margin-right: 3% !important;
    float: left !important;
  }
  .listcover img { width: 100% !important; height: auto !important; }
  .listinfo {
    width: 58% !important;
    margin-left: 0 !important;
    display: block !important;
    float: right !important;
  }
  .listinfo h3 {
    font-size: 16px !important;
    height: auto !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    padding-bottom: 4px !important;
    word-break: break-all;
  }
  .listinfo p {
    width: 100% !important;
    height: auto !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    font-size: 12px;
    word-break: break-all;
  }
  .listinfo p span { float: none !important; width: 100% !important; display: block; }
  .score { float: none !important; margin-top: 5px !important; line-height: 1.4 !important; }
  .score span { font-size: 18px !important; }

  /* 侧栏广告大图（装修案例等）：移动端隐藏 */
  .sider .banner,
  .sider .banner img { display: none !important; }

  /* 侧栏「您可能感兴趣」：图文纵排自适应 */
  .zblistbox { width: 100% !important; box-sizing: border-box; float: none !important; }
  .zblistbox li { width: auto !important; }
  .zbpic { float: none !important; width: 100% !important; }
  .zbpic img { width: 100% !important; height: auto !important; }
}

/* =========================================================
   固定页头：在 body 上加 fixed-header 类启用，页头高 90px；
   移动端（≤768px）自动回退普通布局（wap 是独立模板）。
   适用：fangyuan / fangyuanlist / dudong / dudonglist /
        product / productlist / index
   ========================================================= */
body.fixed-header {
  padding-top: 90px;
}

body.fixed-header .logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
}

body.fixed-header .channel-top {
  padding: 10px 0;
  background-color: #f8f8f8;
}

@media screen and (max-width: 768px) {
  body.fixed-header {
    padding-top: 0;
  }
}

/* =========================================================
   固定页头 · 小横条版（list / news / newslist 页，.logo 高 55px）：
   在 body 上加 fixed-header-sm 类启用，移动端同样回退。
   ========================================================= */
body.fixed-header-sm {
  padding-top: 55px;
}

body.fixed-header-sm .logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
}

@media screen and (max-width: 768px) {
  body.fixed-header-sm {
    padding-top: 0;
  }
}
