/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 24px;
    color: #3498db;
    font-weight: bold;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu .user-link {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.user-menu .user-link i {
    margin-right: 5px;
}

.main-nav {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    flex: 1;
    text-align: center;
}

.main-nav ul li a {
    display: block;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav ul li a i {
    margin-right: 5px;
    font-size: 16px;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #3498db;
    background-color: #f0f8ff;
}

/* 轮播图 */
.banner {
    position: relative;
    margin-top: 20px;
    margin-bottom: 30px;
}

.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.banner-item {
    position: relative;
    display: none;
}

.banner-item.active {
    display: block;
}

.banner-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    padding: 30px;
    color: #fff;
}

.banner-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 16px;
    opacity: 0.9;
}

.banner-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.banner-controls button {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.banner-controls button:hover {
    background-color: #3498db;
    color: #fff;
}

/* 通用section样式 */
section {
    padding: 30px 0;
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #3498db;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 生活服务分类 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.service-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-item:hover {
    background-color: #f0f8ff;
    transform: translateY(-5px);
}

.service-item i {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 10px;
}

.service-item h3 {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 新闻资讯 */
.news-filter {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.news-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.news-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

/* 社区活动 */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.activity-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.activity-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.activity-content {
    padding: 15px;
}

.activity-content h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.activity-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.activity-time {
    display: flex;
    align-items: center;
}

.activity-time i {
    margin-right: 5px;
    color: #3498db;
}

/* 商家信息 */
#business-category {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.business-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.business-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.business-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.business-content {
    padding: 15px;
}

.business-content h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.business-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.business-info {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.business-info i {
    margin-right: 5px;
    color: #3498db;
}

.business-rating {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.business-rating i {
    color: #f39c12;
    font-size: 14px;
}

/* 房产信息 */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.property-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.property-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.property-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.property-content {
    padding: 15px;
}

.property-content h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.property-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.property-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.property-info span {
    display: flex;
    align-items: center;
}

.property-info i {
    margin-right: 5px;
    color: #3498db;
}

.property-price {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
    margin-top: 10px;
}

/* 社区互动 */
.community-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.community-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3498db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.post-author {
    flex: 1;
}

.post-author h4 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.post-time {
    font-size: 12px;
    color: #999;
}

.post-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.post-action {
    display: flex;
    align-items: center;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-action:hover {
    color: #3498db;
}

.post-action i {
    margin-right: 5px;
    font-size: 14px;
}

.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.hot-topics li {
    margin-bottom: 10px;
}

.hot-topics li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hot-topics li a:hover {
    color: #3498db;
}

.announcement {
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more button {
    padding: 10px 30px;
    border: 1px solid #3498db;
    background-color: #fff;
    color: #3498db;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.load-more button:hover {
    background-color: #3498db;
    color: #fff;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 10px;
}

.footer-column ul li {
    margin-bottom: 10px;
    list-style: none;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-column ul li a:hover {
    color: #3498db;
}

.footer-column ul li i {
    margin-right: 5px;
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #3498db;
    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: #ccc;
}

.footer-bottom a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-bottom a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }
    
    .search-box {
        max-width: 100%;
        margin: 0;
    }
    
    .main-nav ul {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .main-nav ul li {
        flex: none;
    }
    
    .banner-item img {
        height: 300px;
    }
    
    .community-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .banner-item img {
        height: 250px;
    }
    
    .banner-content h2 {
        font-size: 20px;
    }
    
    .banner-content p {
        font-size: 14px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .service-item i {
        font-size: 24px;
    }
    
    .service-item h3 {
        font-size: 12px;
    }
    
    .news-grid,
    .activities-grid,
    .businesses-grid,
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-filter {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .banner-item img {
        height: 200px;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    .banner-content h2 {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}