/* ========== 首页样式 index.css ========== */

/* ========== Banner区域 ========== */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    text-align: center;
    color: #fff;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: bold;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-banner {
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 8px;
}

/* ========== 搜索筛选区 ========== */
.search-section {
    background-color: #fff;
    padding: 40px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: -30px auto 40px;
    position: relative;
    z-index: 10;
}

.search-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e5e5;
}

.tab {
    padding: 12px 30px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab.active {
    color: #00a854;
    font-weight: bold;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00a854;
}

.search-form {
    display: flex;
    gap: 15px;
}

.form-select {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #00a854;
}

.btn-search {
    padding: 12px 40px;
    background-color: #00a854;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

/* ========== 热门房源 ========== */
.properties-section {
    padding: 60px 0;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.property-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.property-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 15px;
    background-color: #00a854;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
}

.property-tag.hot {
    background-color: #ff4757;
}

.property-tag.new {
    background-color: #2ed573;
}

.property-info {
    padding: 20px;
}

.property-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.property-address {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.property-details {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #777;
}

.property-details span {
    background-color: #f8f9fa;
    padding: 4px 10px;
    border-radius: 4px;
}

.property-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 15px;
}

.property-price .price {
    font-size: 28px;
    font-weight: bold;
    color: #ff6b6b;
}

.property-price .unit {
    font-size: 14px;
    color: #666;
}

.btn-detail {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    color: #00a854;
    border: 1px solid #00a854;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s;
}

.btn-detail:hover {
    background-color: #00a854;
    color: #fff;
}

.btn-more {
    padding: 12px 40px;
    font-size: 16px;
}

/* ========== 服务优势 ========== */
.advantages-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    background-color: #fff;
    padding: 40px 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.advantage-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.advantage-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.advantage-item p {
    color: #666;
    line-height: 1.8;
}

/* ========== 最新资讯 ========== */
.news-section {
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.news-image {
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-date {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e9ecef;
    color: #666;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.5;
}

.news-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: #00a854;
    font-size: 14px;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* ========== 合作伙伴 ========== */
.partners-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.partner-item {
    background-color: #fff;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    color: #999;
    font-size: 14px;
    transition: all 0.3s;
}

.partner-item:hover {
    background-color: #00a854;
    color: #fff;
    transform: translateY(-3px);
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .banner-content h2 {
        font-size: 32px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .banner-buttons {
        flex-direction: column;
    }

    .search-form {
        flex-direction: column;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 自助查询系统 ========== */
.query-system-section {
    padding: 60px 0;
    background-color: #fff;
}

.query-title {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 40px;
    font-weight: 600;
}

.query-grid {
    display: grid;
    /* 9个项目，一行排满，自适应宽度 */
    grid-template-columns: repeat(9, 1fr);
    gap: 20px;
    align-items: center;
    justify-items: center;
}

.query-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.query-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.query-item p {
    font-size: 14px;
    color: #333;
    margin: 0;
    text-align: center;
}

/*  hover 效果 */
.query-item:hover {
    transform: translateY(-5px);
}

.query-item:hover img {
    transform: scale(1.1);
}

.query-item:hover p {
    color: #00a854;
}

/* ========== 响应式适配 ========== */
@media (max-width: 1200px) {
    .query-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .query-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .query-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .query-item img {
        width: 50px;
        height: 50px;
    }
    .query-item p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .query-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .query-title {
        font-size: 24px;
    }
}

/* ========== 自助查询弹框样式 ========== */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}
.modal-close:hover {
    color: #333;
}
.modal-title {
    text-align: center;
    font-size: 20px;
    color: #333;
    margin: 0 0 25px;
    font-weight: 600;
}
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-item label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.form-item input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}
.form-item input:focus {
    outline: none;
    border-color: #00a854;
    box-shadow: 0 0 0 2px rgba(0,168,84,0.1);
}
.modal-submit {
    padding: 12px;
    background: #00a854;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.modal-submit:hover {
    background: #009649;
    transform: translateY(-2px);
}
.modal-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}
/* 输入框错误样式 */
.form-item input.error {
    border-color: #ff4757;
}


/* 预约看房图片数字标签：绝对定位叠加 */
.num-tag {
    /* 核心：绝对定位，基于父级.container定位 */
    position: absolute;
    /* 定位调整：根据你的图片需求微调top/left，以下为通用默认值 */
    top: 66%;    /* 垂直位置（离图片顶部40%），数字越大越靠下 */
    left: 49%;   /* 水平位置（离图片左侧50%），数字越大越靠右 */
    /* 数字样式：可根据图片风格修改，保证醒目 */
    font-size: 24px;    /* 数字大小 */
    font-weight: bold;  /* 加粗 */
    color: black;     /* 红色（醒目，可改#FFFFFF白色/#FFFF00黄色） */
    z-index: 9;         /* 确保数字在图片上方，不被遮挡 */
    /* 可选：添加背景/边框，提升辨识度 */
    /* background: #FFFFFF; padding: 2px 8px; border-radius: 4px; */
}

/* 适配你的query-item样式，防止点击冲突 */
.query-system-section .query-item {
    position: relative;
    z-index: 1; /* 图片层级低于数字，不遮挡 */
    cursor: pointer; /* 保留鼠标手型 */
}

/* 搜索框容器 */
.banner-content .search-box {
    width: 80%;
    max-width: 900px;
    margin: 40px auto 0;
    position: relative;
    display: flex;
    align-items: center;
}

/* ========== 首页 Banner 搜索框（不破坏原有布局） ========== */
.banner-content {
    position: relative;
    z-index: 1;
}
.banner-search-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}
.banner-search-input {
    flex: 1;
    height: 54px;
    padding: 0 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* ========== 首页 Banner 搜索框（最终修复版：不透明 + 不跳转错误 + 样式正常） ========== */
.banner-search-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 99;
}
.banner-search-input {
    flex: 1;
    height: 54px;
    padding: 0 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    background: #fff !important;
    color: #333 !important;
    opacity: 1 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.banner-search-input::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}
.banner-search-btn {
    width: auto;
    height: 54px;
    line-height: 54px;
    text-align: center;
    background-color: #00a854;
    color: #fff;
    font-size: 16px;
    padding: 0 20px;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}
.banner-search-btn:hover {
    background-color: #008f46;
}
.banner-search-btn i {
    font-size: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

/* 响应式 */
@media (max-width: 768px) {
    .banner-search-wrapper {
        width: 90%;
        margin-top: 25px;
    }
    .banner-search-input,
    .banner-search-btn {
        height: 48px;
        line-height: 48px;
    }
}