/* ==================== 首页主体 ==================== */
.home-main {
    padding: 20px 0 40px;
}

/* 服务分类入口 */
.service-showcase {
    display: grid;
    grid-template-columns: 202px 1fr;
    gap: 10px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #e5e5e5;
}

.service-rail {
    position: relative;
    background: #f8f8f8;
    border-right: 1px solid #ddd;
}

.service-rail-title {
    height: 45px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    color: #fff;
    background: #f57405;
    font-size: 17px;
    font-weight: 700;
}

.service-rail-title span,
.service-rail-title span::before,
.service-rail-title span::after {
    width: 14px;
    height: 2px;
    display: block;
    background: #fff;
    content: '';
}

.service-rail-title span {
    position: relative;
}

.service-rail-title span::before,
.service-rail-title span::after {
    position: absolute;
    left: 0;
}

.service-rail-title span::before {
    top: -5px;
}

.service-rail-title span::after {
    top: 5px;
}

.service-rail-item {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    color: #222;
    border-left: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
}

.service-rail-item i {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    font-style: normal;
    text-align: center;
}

.service-rail-item i img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.service-rail-item i b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.service-rail-item i img + b {
    display: none;
}

.service-rail-item:hover,
.service-rail-item.active {
    color: #f57405;
    background: #fff;
    border-left-color: #f57405;
}

.service-rail-item:hover i,
.service-rail-item.active i {
    color: #f57405;
}

.service-rail-node {
    display: block;
    position: relative;
}

.service-sub-panel {
    position: absolute;
    left: 100%;
    top: 0;
    z-index: 3;
    width: 285px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 12px 14px;
    background: rgba(255,255,255,0.98);
    border: 1px solid #ddd;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.service-rail-node:hover .service-sub-panel {
    display: grid;
}

.service-sub-panel a {
    color: #111;
    font-size: 13px;
    line-height: 40px;
    white-space: nowrap;
}

.service-sub-panel a:hover {
    color: #f57405;
}

.service-content {
    min-width: 0;
    padding: 0 0 18px;
}

.service-card-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.service-hero-card {
    position: relative;
    min-height: 178px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    padding: 28px 26px;
    color: #1f2a3a;
    border-radius: 8px;
    background: #f5f5f5;
}

.service-hero-card::before,
.service-hero-card::after {
    position: absolute;
    content: '';
    pointer-events: none;
}

.service-hero-card::before {
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.92), rgba(255,255,255,0.46));
    z-index: 1;
}

.service-hero-card::after {
    right: 18px;
    bottom: -24px;
    width: 155px;
    height: 155px;
    border-radius: 45% 55% 40% 60%;
    opacity: 0.38;
    z-index: 0;
}

.service-hero-card strong,
.service-hero-card span {
    position: relative;
    z-index: 2;
}

.service-hero-icon {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 2;
    width: 72px;
    height: 72px;
    object-fit: contain;
    opacity: 0.86;
}

.service-hero-card strong {
    margin-bottom: 4px;
    color: #142033;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.service-hero-card span {
    color: #777;
    font-size: 17px;
}

.card-housekeeping {
    background: linear-gradient(135deg, #fff6ef 0%, #f0ece7 100%);
}

.card-housekeeping::after {
    background: radial-gradient(circle at 40% 35%, #f6b27d, #e8d5c8 60%, transparent 62%);
}

.card-repair {
    background: linear-gradient(135deg, #effcf6 0%, #e7f4f7 100%);
}

.card-repair::after {
    background: radial-gradient(circle at 45% 40%, #77cfdb, #c3e7e6 60%, transparent 62%);
}

.card-business {
    background: linear-gradient(135deg, #eef4ff 0%, #edf0f5 100%);
}

.card-business::after {
    background: radial-gradient(circle at 45% 40%, #9fb7da, #d3dbe8 60%, transparent 62%);
}

.service-hot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 34px;
    row-gap: 30px;
    padding: 8px 24px 0;
}

.service-hot-item {
    position: relative;
    min-height: 60px;
    display: grid;
    grid-template-columns: 1fr 46px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
}

.service-hot-item strong {
    color: #ff7816;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.service-hot-item em {
    color: #333;
    font-size: 13px;
    font-style: normal;
    line-height: 1.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-icon {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    overflow: hidden;
    background: linear-gradient(135deg, #7ff0a8, #41d8dc);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.hot-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    background: #fff;
}

.hot-icon b {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.hot-icon img + b {
    display: none;
}

.icon-clean { background: linear-gradient(135deg, #7ff0a8, #41d8dc); }
.icon-nanny { background: linear-gradient(135deg, #bd5cff, #ed6bd1); }
.icon-move { background: linear-gradient(135deg, #42c8ff, #476eff); }
.icon-pipe { background: linear-gradient(135deg, #53f1cf, #22bfd4); }
.icon-lock { background: linear-gradient(135deg, #ff709b, #ffb36a); }
.icon-edu { background: linear-gradient(135deg, #ffb84c, #ff7d28); }
.icon-wedding { background: linear-gradient(135deg, #ff8d7b, #ff568a); }
.icon-rent { background: linear-gradient(135deg, #74efa7, #31c978); }
.icon-recycle { background: linear-gradient(135deg, #76dbff, #4777e8); }
.icon-health { background: linear-gradient(135deg, #5ee0d7, #33b4e8); }
.icon-play { background: linear-gradient(135deg, #ffb04d, #ff6d75); }
.icon-beauty { background: linear-gradient(135deg, #ff75a2, #fb5d69); }

/* 最新生活分类信息 */
.latest-info-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 0 0 6px;
    margin-bottom: 20px;
    box-shadow: none;
}

.latest-info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.latest-info-head h2 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 40px;
    border-bottom: 2px solid var(--primary);
}

.latest-info-actions {
    font-size: 12px;
    color: #f00;
}

.latest-info-actions a {
    color: #f00;
    font-weight: 600;
}

.latest-info-actions span {
    color: #f00;
    margin: 0 8px;
}

.latest-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.latest-info-item {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 10px;
    min-width: 0;
    border: 1px solid #e5e5e5;
    padding: 8px;
    background: #fff;
    transition: var(--transition);
    position: relative;
    min-height: 85px;
}

.latest-info-item:hover,
.latest-info-item.is-top:hover {
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(255,106,0,0.12);
}

.latest-info-item.is-top {
    border-color: #ffd9aa;
    background: #fffdf0;
}

.latest-info-img {
    width: 105px;
    height: 72px;
    display: block;
    overflow: hidden;
    background: var(--bg-gray);
}

.latest-info-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-info-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.latest-info-title {
    display: block;
    color: #06f;
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    padding-right: 42px;
}

.latest-info-item.is-top .latest-info-title {
    color: var(--primary);
}

.latest-info-desc {
    color: var(--text-lighter);
    font-size: 13px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-info-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.latest-info-contact {
    color: #9a6b25;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-info-contact::before {
    content: '✦';
    color: #b28a4a;
    margin-right: 5px;
}

.latest-info-tag {
    flex: 0 0 auto;
    color: #315da8;
    background: #f0f4ff;
    border: 1px solid #d9e3ff;
    border-radius: 2px;
    padding: 1px 5px;
    font-size: 12px;
}

.top-label {
    position: absolute;
    right: 14px;
    top: 10px;
    color: #fff;
    background: #ff4d6a;
    border-radius: 2px;
    padding: 2px 5px;
    font-size: 12px;
    line-height: 1.2;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cat-block {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cat-block:hover {
    box-shadow: var(--shadow-hover);
}

.cat-block h3 {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.cat-block h3 i {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-style: normal;
}

/* 分类图标颜色 */
.icon-house { background: #e53935; }
.icon-business { background: #1e88e5; }
.icon-join { background: #43a047; }
.icon-car { background: #fb8c00; }
.icon-car-service { background: #8e24aa; }
.icon-pet { background: #00acc1; }
.icon-wedding { background: #e53935; }
.icon-travel { background: #3949ab; }
.icon-market { background: #fb8c00; }
.icon-agri { background: #43a047; }
.icon-wholesale { background: #1e88e5; }
.icon-life { background: #e53935; }
.icon-decorate { background: #8e24aa; }
.icon-edu { background: #3949ab; }
.icon-entertain { background: #d81b60; }
.icon-ticket { background: #00acc1; }

.cat-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-links a {
    font-size: 13px;
    color: var(--text-light);
    padding: 3px 8px;
    border-radius: 3px;
    transition: var(--transition);
}

.cat-links a:hover {
    color: var(--primary);
    background: rgba(255,106,0,0.08);
}

.cat-links a.hot {
    color: var(--primary);
    font-weight: 500;
}

.cat-links a.hot:hover {
    background: rgba(255,106,0,0.12);
}

.cat-flat-links {
    align-items: flex-start;
}

.cat-list-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.cat-row {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 8px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.8;
}

.cat-parent-link {
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
}

.cat-row:first-child .cat-parent-link,
.cat-parent-link:hover {
    color: var(--primary);
}

.cat-child-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    min-width: 0;
}

.cat-child-links a {
    color: var(--text);
    margin: 0 0 4px;
    padding: 0 8px;
    border-left: 1px solid var(--border);
    line-height: 1.5;
    white-space: nowrap;
}

.cat-child-links a:first-child {
    border-left: 0;
    padding-left: 0;
}

.cat-child-links a:hover {
    color: var(--primary);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .service-showcase {
        grid-template-columns: 180px 1fr;
    }

    .service-rail-item {
        padding: 0 14px;
        font-size: 14px;
    }

    .service-sub-panel {
        display: none;
    }

    .service-hero-card {
        min-height: 150px;
        padding: 22px 18px;
    }

    .service-hero-card strong {
        font-size: 23px;
    }

    .service-hot-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 24px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .latest-info-grid {
        grid-template-columns: repeat(2, 1fr);

    }
}

@media (max-width: 768px) {
    .service-showcase {
        display: block;
    }

    .service-rail {
        border-right: 0;
        border-bottom: 1px solid #ddd;
    }

    .service-rail-title {
        height: 42px;
    }

    .service-rail {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .service-rail-node {
        display: contents;
    }

    .service-rail-title {
        grid-column: 1 / -1;
    }

    .service-rail-item {
        justify-content: center;
        height: 38px;
        padding: 0 6px;
        border-left: 0;
        border-bottom: 2px solid transparent;
        font-size: 13px;
    }

    .service-rail-item.active {
        border-bottom-color: #f57405;
    }

    .service-rail-item i {
        display: none;
    }

    .service-card-row {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 14px;
    }

    .service-hero-card {
        min-height: 126px;
        padding: 20px;
    }

    .service-hero-card strong {
        font-size: 22px;
    }

    .service-hero-card span {
        display: inline-block;
        margin-right: 14px;
        font-size: 15px;
    }

    .service-hot-grid {
        grid-template-columns: 1fr;
        row-gap: 16px;
        padding: 4px 14px 16px;
    }

    .latest-info-section {
        padding: 0 0 6px;
    }

    .latest-info-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .latest-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cat-block {
        padding: 12px;
    }

    .cat-links a {
        font-size: 12px;
    }

    .cat-row {
        grid-template-columns: 74px 1fr;
        font-size: 13px;
    }

    .cat-child-links a {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .service-rail {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-hot-item strong {
        font-size: 18px;
    }

    .service-hot-item em {
        white-space: normal;
    }

    .latest-info-item {
        grid-template-columns: 88px 1fr;
    }

    .latest-info-img {
        width: 88px;
        height: 66px;
    }

    .latest-info-title {
        font-size: 14px;
    }
}
