/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #F5F7FA;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 固定导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo .logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #1E88E5;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 20px;
}

.nav-menu a {
    text-decoration: none;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #1E88E5;
}

.nav-menu a.active {
    color: #1E88E5;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #1E88E5;
    border-radius: 1px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 200px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #1E88E5;
    width: 250px;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #1E88E5;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #1565C0;
    transform: translateY(-50%) scale(1.05);
}

.user-icon {
    text-decoration: none;
    color: #333333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.user-icon:hover {
    color: #1E88E5;
}

/* 主要内容 */
.main-content {
    margin-top: 100px;
    padding-bottom: 60px;
}

/* 房产板块 */
.property-section {
    padding: 40px 0;
    margin-bottom: 40px;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.newhouse-section {
    border-top: 4px solid #1E88E5;
}

.oldhouse-section {
    border-top: 4px solid #4FC3F7;
}

.zuhouse-section {
    border-top: 4px solid #FF9800;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: bold;
    color: #333333;
}

.title-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 50%;
}

.newhouse-icon {
    background-color: #1E88E5;
}

.oldhouse-icon {
    background-color: #4FC3F7;
}

.zuhouse-icon {
    background-color: #FF9800;
}

.view-more {
    text-decoration: none;
    color: #1E88E5;
    font-size: 14px;
    font-weight: normal;
    transition: all 0.3s ease;
}

.view-more:hover {
    color: #1565C0;
    text-decoration: underline;
}

/* 房产网格布局 */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 房产卡片 */
.property-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.property-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.hot-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #FF5722;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.property-info {
    padding: 15px;
}

.property-price {
    font-size: 20px;
    font-weight: bold;
    color: #FF5722;
    margin-bottom: 10px;
}

.property-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666666;
}

.property-address {
    font-size: 14px;
    color: #999999;
    margin-bottom: 10px;
    line-height: 1.4;
}

.property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.property-tag {
    background-color: #F5F7FA;
    color: #1E88E5;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.property-actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: #1E88E5;
    color: white;
}

.btn-primary:hover {
    background-color: #1565C0;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #F5F7FA;
    color: #333333;
    border: 1px solid #E0E0E0;
}

.btn-secondary:hover {
    background-color: #E0E0E0;
    transform: translateY(-1px);
}

/* 页脚 */
.footer {
    background-color: #333333;
    color: white;
    padding: 40px 0;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.6;
    color: #CCCCCC;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #1E88E5;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #999999;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-menu li {
        margin: 0 10px;
    }

    .navbar-right {
        width: 100%;
        justify-content: center;
    }

    .search-box input {
        width: 250px;
    }

    .main-content {
        margin-top: 160px;
    }

    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .property-grid {
        grid-template-columns: 1fr;
    }

    .property-card {
        max-width: 100%;
    }

    .navbar-right {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .main-content {
        margin-top: 200px;
    }

    .property-section {
        padding: 20px 0;
        margin-bottom: 20px;
    }
}