/* ========== 全局重置与基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC","Microsoft YaHei",Arial,sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f5f5f5;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: #333;
  transition: all .2s ease;
}

.container {
  width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .container {
    width: 100%;
    padding: 0 10px;
  }
}

/* ========== 骨架屏加载动画 ========== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== 头部导航样式 ========== */
.header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-top {
  height: 35px;
  line-height: 35px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #eee;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
}

.header-top-left a {
  margin-right: 15px;
  font-size: 12px;
  color: #666;
}

.header-top-left .city-select {
  color: #f85959;
  font-weight: 500;
}

.header-top-left a:hover {
  color: #f85959;
}

.header-top-right a {
  margin-left: 15px;
  font-size: 12px;
  color: #666;
}

.header-top-right a:hover {
  color: #f85959;
}

.header-top-right a i {
  color: #f85959;
  margin-right: 3px;
}

.header-main {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.logo {
  width: 180px;
  height: 40px;
  background: url(https://img1.anjuke.com/ico/logo.gif) no-repeat center;
  background-size: contain;
  display: inline-block;
  text-indent: -9999px;
  overflow: hidden;
}

.header-search {
  margin-left: auto;
  width: 600px;
}

@media (max-width: 768px) {
  .header-search {
    width: 100%;
    margin-left: 10px;
  }
}

.search-tab {
  display: flex;
  margin-bottom: 5px;
}

.search-tab-item {
  padding: 5px 15px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.search-tab-item.active {
  color: #f85959;
  border-bottom: 2px solid #f85959;
  font-weight: 500;
}

.search-input-wrap {
  display: flex;
}

.search-input-wrap input {
  flex: 1;
  height: 40px;
  border: 2px solid #f85959;
  border-right: none;
  border-radius: 3px 0 0 3px;
  padding: 0 15px;
  font-size: 14px;
  outline: none;
}

.search-input-wrap button {
  width: 100px;
  height: 40px;
  background-color: #f85959;
  color: #fff;
  border: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-size: 14px;
}

.search-input-wrap button:hover {
  background-color: #f63838;
}

/* ========== 轮播图样式 ========== */
.banner {
  position: relative;
  height: 450px;
  overflow: hidden;
  margin-bottom: 20px;
}

.banner-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.banner-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .5s ease;
}

.banner-item.active {
  opacity: 1;
  z-index: 10;
}

.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.1));
  display: flex;
  align-items: center;
  z-index: 1;
}

.banner-mask h2 {
  font-size: 36px;
  color: #fff;
  margin-bottom: 15px;
  font-weight: 600;
}

.banner-mask p {
  font-size: 18px;
  color: #fff;
  margin-bottom: 25px;
  opacity: 0.9;
}

.banner-btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: #f85959;
  color: #fff;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 500;
  transition: all .3s ease;
}

.banner-btn:hover {
  background-color: #f63838;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(248,89,89,0.3);
}

/* 轮播控制 */
.banner-control {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
}

.banner-prev, .banner-next {
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 10px;
  font-size: 20px;
  transition: all .2s;
}

.banner-prev:hover, .banner-next:hover {
  background-color: #f85959;
}

.banner-dots {
  display: flex;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  margin: 0 5px;
  cursor: pointer;
  transition: all .2s;
}

.dot.active {
  background-color: #f85959;
  transform: scale(1.2);
}

/* 响应式轮播 */
@media (max-width: 768px) {
  .banner {
    height: 250px;
  }

  .banner-mask h2 {
    font-size: 24px;
  }

  .banner-mask p {
    font-size: 14px;
  }

  .banner-btn {
    padding: 8px 20px;
    font-size: 14px;
  }
}

/* ========== 核心功能入口 ========== */
.func-entrance {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 30px 0;
  margin-bottom: 20px;
}

.func-entrance .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.func-item {
  width: 12.5%;
  text-align: center;
  padding: 10px 0;
}

@media (max-width: 992px) {
  .func-item {
    width: 25%;
    margin-bottom: 15px;
  }
}

@media (max-width: 576px) {
  .func-item {
    width: 50%;
  }
}

.func-item a {
  display: block;
}

.func-item i {
  font-size: 36px;
  color: #f85959;
  margin-bottom: 10px;
  transition: all .3s;
}

.func-item h3 {
  font-size: 16px;
  margin-bottom: 5px;
  font-weight: 500;
}

.func-item p {
  font-size: 12px;
  color: #999;
}

.func-item a:hover i {
  transform: scale(1.1);
}

.func-item a:hover h3 {
  color: #f85959;
}

/* ========== 热门板块样式（核心修复：5个一行稳定布局） ========== */
.hot-section {
  margin-bottom: 20px;
}

.hot-module {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 20px;
  margin-bottom: 15px;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.module-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.module-header .more {
  font-size: 12px;
  color: #f85959;
}

.module-header .more:hover {
  text-decoration: underline;
}

/* 核心修复：弹性布局替代浮动，5个一行稳定无换行 */
.hot-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  gap: 0; /* 移除间距，避免宽度溢出 */
}

/* 核心修复：固定20%宽度，不放大不缩小，仅底部外边距 */
.hot-item {
  width: 20%;
  flex: 0 0 20%;
  border: 1px solid #eee;
  border-radius: 3px;
  padding: 10px;
  margin: 0 0 15px 0;
  transition: all .2s;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

/* 关键修改：热门房源图片高度提高1/4，恢复为100px */
.hot-item-img {
  width: 100%;
  height: 100px; /* 从75px提高1/4，改为100px */
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 8px;
}

.hot-item-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hot-item-title:hover {
  color: #f85959;
}

.hot-item-desc {
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}

/* 修复：价格样式醒目，确保数字正常显示 */
.hot-item-price {
  font-size: 14px;
  color: #f85959;
  font-weight: 600;
}

.hot-item:hover {
  border-color: #f85959;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 响应式适配：断点处调整列数，避免小屏换行异常 */
@media (max-width: 992px) {
  .hot-item {
    width: 33.333%;
    flex: 0 0 33.333%;
  }
}

@media (max-width: 576px) {
  .hot-item {
    width: 50%;
    flex: 0 0 50%;
  }
}

/* ========== 城市推荐样式 ========== */
.city-section {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 20px;
  margin-bottom: 20px;
}

.city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 10px;
}

.city-item {
  padding: 8px 15px;
  background-color: #f9f9f9;
  border-radius: 20px;
  font-size: 14px;
  transition: all .2s;
}

.city-item:hover {
  background-color: #f85959;
  color: #fff;
}

/* ========== 购房指南样式（核心修复：4个一行稳定布局） ========== */
.guide-section {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 20px;
  margin-bottom: 20px;
}

/* 核心修复：弹性布局替代浮动，4个一行稳定无换行 */
.guide-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  gap: 0; /* 移除间距，避免宽度溢出 */
}

/* 核心修复：固定25%宽度，不放大不缩小，仅底部外边距 */
.guide-item {
  width: 25%;
  flex: 0 0 25%;
  border: 1px solid #eee;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 0 15px 0;
  transition: all .2s;
  list-style: none;
  box-sizing: border-box;
}

/* 关键修改：购房指南图片高度提高1/4，恢复为120px */
.guide-item-img {
  width: 100%;
  height: 120px; /* 从90px提高1/4，改为120px */
  object-fit: cover;
}

.guide-item-content {
  padding: 10px;
}

.guide-item-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.guide-item-title:hover {
  color: #f85959;
}

.guide-item-time {
  font-size: 12px;
  color: #999;
}

.guide-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* 响应式适配：断点处调整列数，避免小屏换行异常 */
@media (max-width: 992px) {
  .guide-item {
    width: 50%;
    flex: 0 0 50%;
  }
}

@media (max-width: 576px) {
  .guide-item {
    width: 100%;
    flex: 0 0 100%;
  }
}

/* ========== 底部样式 ========== */
.footer {
  background-color: #333;
  color: #999;
  padding: 40px 0 20px;
  margin-top: 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
  border-bottom: 1px solid #444;
  padding-bottom: 20px;
}

.footer-link-item {
  width: 20%;
  padding: 0 10px;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .footer-link-item {
    width: 50%;
  }
}

.footer-link-title {
  font-size: 16px;
  color: #fff;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 8px;
  font-weight: 500;
}

.footer-link-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: #f85959;
}

.footer-link-list li {
  margin-bottom: 8px;
  font-size: 13px;
  list-style: none;
}

.footer-link-list li a {
  color: #999;
}

.footer-link-list li a:hover {
  color: #f85959;
}

.footer-copyright {
  text-align: center;
  font-size: 12px;
  padding-top: 20px;
  color: #999;
  line-height: 1.6;
}

/* ========== 额外修复：渲染优化样式 ========== */
.hide {
  visibility: hidden;
}

.loading, .no-data {
  text-align: center;
  padding: 20px 0;
  color: #666;
  font-size: 14px;
}