/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "微软雅黑", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f9fafc;
    color: #333;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 顶部导航栏 --- */
.header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-c {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 15px;
    position: relative;
}

.nav-btn-logo a {
    font-size: 26px;
    font-weight: bold;
    color: #3377fe;
    letter-spacing: 2px;
    text-decoration: none;
}

/* PC导航栏 */
.nav {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.nav .item {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease;
}

.nav .item .c {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    transition: all 0.3s ease;
}

.nav .item .u {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
    text-align: center;
    transition: all 0.3s ease;
}

/* 激活/悬停状态 */
.nav .item.active .c,
.nav .item:hover .c {
    color: #3377fe;
    transform: scale(1.3);
}

.nav .item.active .u,
.nav .item:hover .u {
    color: #3377fe;
    transform: scale(1.3);
}

/* 租赁中心特殊样式 */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 87, 34, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

.rental-contact-item {
    background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: pulse-ring 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    margin-left: 10px;
}

.rental-contact-item .c,
.rental-contact-item .u {
    color: #ffffff !important;
    font-weight: bold;
}

.rental-contact-item .c {
    font-size: 18px;
}

.rental-contact-item:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    animation: none;
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.6);
}

.rental-contact-item:hover .c,
.rental-contact-item:hover .u {
    transform: scale(1.3);
}

/* 菜单按钮 (手机端显示) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #3377fe;
    border-radius: 3px;
    transition: 0.2s;
}

/* 手机端菜单浮层 */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -70%;
    width: 70%;
    max-width: 280px;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: right 0.3s ease;
    padding: 80px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-menu .mobile-nav-item {
    font-size: 18px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #aaa;
    cursor: pointer;
}

.mobile-nav-menu .mobile-nav-item.active {
    color: #3377fe;
}

.mobile-nav-overlay.show {
    visibility: visible;
    opacity: 1;
}

.mobile-nav-menu.open {
    right: 0;
}

/* 手机端隐藏PC导航 */
@media (max-width: 768px) {
    .nav {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .header-c {
        padding: 12px 15px;
    }

    .nav-btn-logo a {
        font-size: 22px;
    }
}

/* 顶部导航栏 */
.header-top {
    background-color: #666;
    color: #fff;
    padding: 5px 0;
    text-align: center;
    font-size: 12px;
}

.nav-main {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.nav-main .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #3377fe;
    margin-right: 50px;
}

.nav-list {
    display: flex;
}

.nav-list li {
    margin: 0 20px;
    position: relative;
}

.nav-list li a {
    font-size: 16px;
    color: #666;
    padding-bottom: 5px;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: #3377fe;
    border-bottom: 2px solid #3377fe;
}

.nav-list li span {
    display: block;
    font-size: 10px;
    color: #999;
    text-align: center;
}

/* 房源 */
.house-header {
    background-color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
}

.house-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.house-main-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

/* --- 详情页 --- */
.house-img {
    flex: 0 0 50%;
    min-width: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.swiper-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
}

.swiper-wrapper {
    display: flex;
    transition-timing-function: ease;
    width: 100%;
    height: 100%;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 切换按钮样式 */
.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    transition: 0.3s;
    user-select: none;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.swiper-button-prev {
    left: 12px;
}

.swiper-button-next {
    right: 12px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .contact-box {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 999;
        background-color: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .contact-avatar {
        width: 45px;
        height: 45px;
    }

    .contact-info {
        flex: 1;
        padding: 0 10px;
    }

    .house-header {
        padding: 0;
        margin-bottom: 15px;
    }

    .house-header .container {
        max-width: 100%;
        padding: 0;
        width: 100%;
    }

    .house-title {
        padding: 15px 15px 0 15px;
    }

    .house-img {
        flex: 0 0 100%;
        padding: 0 15px;
        width: 100%;
        min-width: auto;
    }

    .swiper-container {
        border-radius: 0;
        border: none;
    }

    .house-meta {
        padding: 0 15px 0 15px;
        width: 100%;
        flex: 0 0 100% !important;
    }

    /* 强制电话区域在底部栏 */
    .contact-actions {
        width: auto;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .call-label {
        display: none;
    }

    .contact-phone-btn {
        background-color: #3377fe;
        color: #fff;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: bold;
        font-size: 14px;
        white-space: nowrap;
    }

    .contact-tip {
        display: none;
    }

    body {
        padding-bottom: 70px;
    }

    .swiper-slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

.house-img img {
    width: 100%;
    border: 1px solid #eee;
}

.house-meta {
    flex: 0 0 calc(50% - 20px);
    min-width: 300px;
}

.price-box {
    margin-bottom: 15px;
}

.price-main {
    font-size: 28px;
    color: #e63946;
    font-weight: bold;
}

.price-main span {
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

.price-unit {
    font-size: 14px;
    color: #999;
}

.house-attr {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.attr-item {
    display: flex;
    flex-direction: column;
}

.attr-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.attr-name {
    font-size: 12px;
    color: #999;
}

.house-address {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.8;
}

.contact-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: bold;
    margin-bottom: 3px;
}

.contact-desc {
    font-size: 12px;
    color: #999;
}

.contact-phone {
    background: #3377fe;
    color: white;
    margin-right: 12%;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

.contact-tip {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}


/* 主体内容区 */
.house-content {
    margin-bottom: 30px;
}

.grid-container {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 20px;
    align-items: stretch;
}

/* 左侧列 */
.content-left-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 右侧列 */
.content-right-column {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/*右侧模块  */
.content-right-column .module {
    height: 100%;
    margin-bottom: 0;
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/*  推荐列表  */
.recommend-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.recommend-list::-webkit-scrollbar {
    width: 6px;
}

.recommend-list::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.recommend-list::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

/* --- 移动端适配 --- */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .content-left-column,
    .content-right-column {
        width: 100%;
    }

    .content-right-column .module {
        height: auto !important;
        display: block;
    }

    .content-right-column {
        order: 2;
    }

    .recommend-list {
        flex: none;
        overflow-y: visible !important;
        max-height: none;
    }
}

.module {
    background-color: #fff;
    padding: 20px;
}

.module-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #3377fe;
    border-left: 3px solid #3377fe;
    padding-left: 10px;
}

/* 房源介绍表格样式 */
.house-desc-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

house-desc-table tr {
    border-bottom: 1px solid #f5f5f5;
}

.house-desc-table td {
    padding: 12px 10px;
    vertical-align: middle;
    font-size: 14px;
    word-break: break-all;
}

.house-desc-table td.label {
    width: 15%;
    min-width: 80px;
    color: #999;
    text-align: right;
    font-weight: 500;
}

.house-desc-table td.value {
    width: 35%;
    color: #333;
    text-align: left;
    padding-left: 15px;
}

.house-desc-table td:first-child {
    width: 120px;
    color: #999;
    background: #fff;
    text-align: left;
    font-weight: 500;
}

.house-desc-table td:last-child {
    width: auto;
    color: #666;
}

.house-desc-text {
    padding: 0 10px 10px 10px;
    margin-top: 20px;
}

.desc-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.desc-row .label {
    width: 120px;
    min-width: 120px;
    margin-right: 5px;
    color: #999;
    font-weight: 500;
    font-size: 14px;
    text-align: left;
    box-sizing: border-box;
}

.desc-row .content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.house-photos img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

#house-photos .module-title {
    grid-column: 1 / -1;
    margin-bottom: 15px;
}

/* 启用 Grid 布局 */
#house-photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    background: #ffffff;
    padding: 20px;
}

#house-photos .house-photos {
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 4px;
}

#house-photos .house-photos img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

#house-photos .house-photos img:hover {
    transform: scale(1.05);
}

.building-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

#building-info {
    padding: 20px;
    background: #ffffff;
}

.building-info-left {
    flex: 1;
    min-width: 300px;
}

.building-info-right {
    flex: 0 0 40%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.building-info-right img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

}

@media (max-width: 768px) {

    /* 移动端样式 */
    .building-info {
        flex-direction: column;
        align-items: stretch;
    }

    .building-info-left {
        width: 100%;
        min-width: auto;
        order: 1;
    }

    .building-info-right {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        order: 2;
        margin-top: 15px;
    }

    .building-info-right img {
        max-height: none;
        aspect-ratio: 16/9;
    }

    .house-desc-table {
        display: block;
        width: 100%;
    }

    .house-desc-table tbody {
        display: block;
        width: 100%;
    }

    .house-desc-table,
    .building-info-left .house-desc-table {
        display: block;
        width: 100%;
        table-layout: auto;
    }

    .house-desc-table tbody,
    .building-info-left .house-desc-table tbody {
        display: block;
        width: 100%;
    }

    .house-desc-table tr,
    .building-info-left .house-desc-table tr {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px dashed #f0f0f0;
        padding: 12px 0;
        box-sizing: border-box;
    }

    /*  所有单元格基础样式 */
    .house-desc-table td,
    .building-info-left .house-desc-table td {
        display: flex;
        align-items: center;
        border: none;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1.4;
    }

    /* 使用 nth-of-type(1) 选中每行的第一个 td */
    .house-desc-table tr td:nth-of-type(1),
    .building-info-left .house-desc-table tr td:nth-of-type(1) {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
        flex: 0 0 20% !important;

        color: #999;
        font-weight: normal;
        justify-content: flex-start;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 使用 nth-of-type(2) 选中每行的第二个 td */
    .house-desc-table tr td:nth-of-type(2),
    .building-info-left .house-desc-table tr td:nth-of-type(2) {
        width: 80% !important;
        min-width: 80% !important;
        max-width: 80% !important;
        flex: 0 0 80% !important;

        color: #333;
        font-weight: 500;
        text-align: left !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 0;
    }

    /*  隐藏多余的列 (如果有第3、4列) */
    .house-desc-table tr td:nth-of-type(n+3),
    .building-info-left .house-desc-table tr td:nth-of-type(n+3) {
        display: none !important;
    }

    .desc-row .label {
        margin-right: 0;
    }

    .house-desc-text {
        padding: 0 0 10px 0;
    }

    #house-photos {
        grid-template-columns: 1fr;
    }

    #house-photos .house-photos img {
        height: auto;
        aspect-ratio: 16/9;
    }

    .contact-content-index {
        flex-direction: column;
    }

    .contact-map-col img,
    #detail-map {
        height: 250px;
    }

    .footer {
        display: none !important;
    }
}

/* 房源推荐 */
.recommend-list li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.recommend-img {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
}

.recommend-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
}

.recommend-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 13px;
}

.recommend-price {
    color: #e63946;
    font-weight: bold;
    font-size: 12px;
}

/* 联系我们 */
.contact-module {
    background-color: #fff;
    padding-top: 20px;
    margin: 0 15px 30px 15px;
}

.contact-module .module-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #3377fe;
    border-left: 3px solid #3377fe;
    padding-left: 10px;
    text-align: left;
}

.contact-content-index {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.contact-map-col {
    flex: 1;
    min-width: 300px;
}

.contact-info-col {
    flex: 1;
    min-width: 300px;
}

/*  地图样式 */
.contact-map-col img,
#detail-map {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/*  联系我们 */
.lxwmp {
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
    color: #666;
}

.lxwmp .glyphicon {
    font-size: 18px;
    min-width: 24px;
    color: #3377fe;
    margin-top: 2px;
}

.lxwmp p {
    margin: 0;
    color: #666;
}

.lxwmp strong {
    color: #333;
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .contact-content-index {
        flex-direction: column;
        align-items: inherit !important;
    }

    .contact-map-col img,
    #detail-map {
        height: 250px;
    }
}

/* 底部 footer */
.footer {
    margin-top: 50px;
    background: #1a2a3a;
    color: #ccc;
    padding-bottom: 0;
}

.foot_bot_con {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    text-align: center;
}

.foot_bot_con_top ul {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    justify-content: center;
    padding: 0;
    margin: 0 0 20px 0;
}

.foot_bot_con_top ul li a {
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
}

.foot_bot_con_top ul li a:hover {
    color: #3377fe;
}

.foot_tel {
    font-size: 24px;
    font-weight: bold;
    color: #3377fe;
    margin: 20px 0 12px;
}

.foot_tel i {
    font-size: 14px;
    color: #93c1f0;
    font-weight: normal;
    font-style: normal;
}

.foot_info_line {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 版权信息 */
.copyright {
    text-align: center;
    padding: 20px;
    background: #111e2a;
    font-size: 12px;
    color: #7f8c8d;
    border-top: 1px solid #2c3e50;
}

.copyright a {
    color: #3377fe;
    text-decoration: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .foot_bot_con_top ul {
        gap: 16px;
    }

    .foot_tel {
        font-size: 20px;
    }

    .foot_info_line {
        font-size: 12px;
    }

    .footer {
        display: none !important;
    }
}