

.masonry-container {
    columns: 1 300px;
    column-gap: 1rem;
}

.masonry-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

.home-container{
    background-color: #fafafa;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}
[data-theme="dark"] .home-container {
    background-color: #161616;
}

.home-header-section {
    padding: 30px 30px 0 30px;
}
.home-header{
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease, margin-bottom 0.3s ease;
    /* overflow-x: auto; */
}
.home-header-item {
    width: 20%;
    min-width: 120px;
    flex: 1 1 20%;
    height: 98px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
[data-theme="dark"] .home-header-item {
    background: #212121;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}
.home-header-item:hover {
    transform: scale(0.95);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .home-header-item:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}
.home-header-item-icon{
    width: 34px;
    height: 34px;
    background-color: blue;
    border-radius: 50%;
    opacity: 0.6;
}
.home-header-item-title{
    font-family: PingFangSC-Medium;
    font-size: 14px;
    letter-spacing: 0;
    font-weight: 500;
    margin-top: 6px;
    color: #333;
    transition: color 0.3s ease;
}
[data-theme="dark"] .home-header-item-title {
    color: #fff;
}

.home-header-item-desc{
    font-family: PingFangSC-Regular;
    font-size: 12px;
    color: #999;
    letter-spacing: 0;
    font-weight: 400;
}
.home-content{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* 默认最小宽度400px */
    gap: 15px;
    width: 100%;
    height: auto;
    padding: 0 30px 30px 30px;
    align-content: start;
    justify-items: stretch;
}
.home-content-item{
    width: 100%;
    min-width: unset;
    min-height: auto;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px 10px 20px;
    box-sizing: border-box;
    position: relative;
    border: 1px solid #F2F2F2;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    justify-content: space-between;
}
[data-theme="dark"] .home-content-item {
    background: #212121;
    border: 1px solid #212121;
}

.home-content-item-img{
    width: 100%;
    height: 128px; /* 默认高度，宽高比 4:3 */
    background-color: #f6f6f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #999;
    font-size: 14px;
    flex-shrink: 0;
}

.home-content-item img {
    width: 100%;
    height: -webkit-fill-available;
    border-radius: 4px;
}

.home-content-item-title{
    font-family: PingFangSC-Medium;
    font-size: 14px;
    color: #3444FC;
    letter-spacing: 0;
    font-weight: 500;
    margin-top: 10px;
}
[data-theme="dark"] .home-content-item-title {
    color: #fff;
}
.home-content-item-desc{
    font-family: PingFangSC-Regular;
    font-size: 12px;
    color: #999999;
    letter-spacing: 0;
    font-weight: 400;
}
.home-content-item-btn{
    width: 72px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: PingFangSC-Regular;
    font-size: 14px;
    letter-spacing: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
    margin-top: 20px;
    border: 1px solid #E6E6E6;
    color: #666666;
}
.home-content-item-btn:hover{
    transform: scale(1.05);
}

[data-theme="dark"] .home-content-item-btn {
    color: #fff; 
    background-color:#333333;
    border:none
}

.home-header-item-icon.building{
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.home-header-item-icon.decoration{
    background-image: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.home-header-item-icon.landscape{
    background-image: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.home-header-item-icon.municipalAdministration{
    background-image: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
}
.home-header-item-icon.plan{
    background-image: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.home-header-item-icon.cooperate{
    background-image: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* ========== 响应式样式（按断点从大到小排列） ========== */

/* 瀑布流布局响应式 */
@media (min-width: 1280px) {
    .masonry-container {
        columns: 5 300px;
    }
}

@media (min-width: 1024px) {
    .masonry-container {
        columns: 4 300px;
    }
}

@media (min-width: 768px) {
    .masonry-container {
        columns: 3 300px;
    }
}

@media (min-width: 640px) {
    .masonry-container {
        columns: 2 300px;
    }
}

/* 1200px 及以下 */
@media (max-width: 1200px) {
    .home-header-section {
        padding: 25px 25px 0 25px;
    }
    .home-content {
        padding: 0 25px 25px 25px;
        gap: 16px;
        align-content: start;
    }
    .home-header {
        margin-bottom: 30px;
        gap: 18px;
    }
    .home-header-item {
        width: 18%;
        min-width: 140px;
        height: 110px;
    }
}

/* 1050px 及以下 */
@media (max-width: 1050px) {
    .home-header-section {
        padding: 20px 20px 0 20px;
    }
    .home-content {
        padding: 0 20px 20px 20px;
        gap: 15px;
        align-content: start;
    }
    .home-header {
        margin-bottom: 28px;
        gap: 16px;
    }
    .home-header-item {
        width: 170px;
        height: 100px;
        flex: 0 0 auto;
    }
}

/* 900px 及以下 */
@media (max-width: 900px) {
    .home-header-section {
        padding: 18px 18px 0 18px;
    }
    .home-content {
        padding: 0 18px 18px 18px;
        gap: 14px;
        align-content: start;
    }
    .home-header {
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-bottom: 25px;
        gap: 15px;
    }
    .home-header-item {
        width: 160px;
        height: 95px;
        flex: 0 0 auto;
    }
    .home-content-item-title {
        font-size: 13px;
        margin-top: 8px;
    }
}

/* 800px 及以下 */
@media (max-width: 800px) {
    .home-header-section {
        padding: 16px 16px 0 16px;
    }
    .home-content {
        padding: 0 16px 16px 16px;
        gap: 12px;
        align-content: start;
    }
    .home-header {
        margin-bottom: 22px;
        gap: 14px;
    }
    .home-header-item {
        width: 150px;
        height: 92px;
    }
    .home-header-item-icon {
        width: 30px;
        height: 30px;
    }
    .home-header-item-title {
        font-size: 13px;
        margin-top: 5px;
    }
    .home-header-item-desc {
        font-size: 11px;
    }
    .home-content-item-btn {
        width: 72px;
        height: 28px;
        font-size: 13px;
        margin-top: 16px;
    }
}

/* 768px 及以下 */
@media (max-width: 768px) {
    .home-header-section {
        padding: 15px 15px 0 15px;
    }
    .home-content {
        gap: 10px;
        padding: 0 15px 15px 15px;
        align-content: start;
    }
    .home-header {
        margin-bottom: 20px;
        gap: 12px;
    }
    .home-header-item {
        width: 140px;
        height: 88px;
    }
    .home-header-item-icon {
        width: 28px;
        height: 28px;
    }
    .home-header-item-title {
        font-size: 12px;
        margin-top: 4px;
    }
    .home-header-item-desc {
        font-size: 10px;
    }
    .home-content-item-title {
        margin: 12px 0 4px 0;
        font-size: 12px;
    }
    .home-content-item-desc {
        font-size: 11px;
        line-height: 1.4;
    }
    .home-content-item-btn {
        width: 75px;
        height: 28px;
        font-size: 12px;
        margin-top: 14px;
    }
}