.home-carousel { position: relative; height: 500px; overflow: hidden; }
.home-carousel-slides { display: flex; transition: transform 0.5s ease; height: 100%; }
.home-carousel-slide { min-width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.home-carousel-inner { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.home-carousel-inner > * { pointer-events: auto; }
.home-carousel-content { position: relative; text-align: center; color: white; z-index: 1; }
.home-carousel-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s ease; }
.home-carousel-dot.active { background: white; transform: scale(1.2); }
.home-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; cursor: pointer; z-index: 2; transition: all 0.3s ease; }
.home-carousel-arrow:hover { background: rgba(255,255,255,0.4); }
.home-carousel-arrow.prev { left: 20px; }
.home-carousel-arrow.next { right: 20px; }
.home-carousel-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.home-search-section { background: #ffffff; padding: 30px 0; }
.home-search-box { max-width: 700px; margin: 0 auto; display: flex; background: #fff; border-radius: 50px; overflow: hidden; border: 2px solid #e0e0e0; box-shadow: 0 4px 12px rgba(0,0,0,0.05); transition: border-color 0.3s; }
.home-search-box:focus-within { border-color: #0066FF; box-shadow: 0 4px 16px rgba(0,102,255,0.15); }
.home-search-box input { flex: 1; padding: 14px 25px; border: none; background: transparent; font-size: 16px; outline: none; }
.home-search-box button { padding: 14px 40px; background: #0066FF; color: white; border: none; font-size: 16px; font-weight: 500; cursor: pointer; transition: background 0.3s; border-radius: 0 50px 50px 0; }
.home-search-box button:hover { background: #0056cc; }
.home-search-tags { max-width: 700px; margin: 12px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-search-tag { padding: 5px 14px; background: #f5f7fa; color: #555; border-radius: 16px; text-decoration: none; font-size: 13px; transition: all 0.3s ease; white-space: nowrap; border: 1px solid #e8ecf0; }
.home-search-tag:hover { background: #0066FF; color: #fff; border-color: #0066FF; }
.home-ads-section { padding: 10px 0 5px; }
.home-ads-row { display: grid; gap: 15px; margin-bottom: 15px; }
.home-ads-row-1 { display: flex; gap: 15px; height: 453px; }
.home-ads-row-1-left { flex: 51%; min-width: 0; }
.home-ads-row-1-left .home-ad-card { width: 100%; height: 100%; }
.home-ads-row-1-right { flex: 49%; min-width: 0; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 10px; }
.home-ads-row-1-right .home-ad-card { width: 100%; height: 100%; }
.home-ads-row-2 { display: flex !important; flex-wrap: nowrap; gap: 10px; height: 300px !important; }
.home-ads-row-2 .home-ad-card { flex: 1; width: auto; height: 100%; }
.home-ads-row-3 { display: flex; gap: 15px; height: 440px; }
.home-ads-row-3-left { flex: 51%; min-width: 0; }
.home-ads-row-3-left .home-ad-card { width: 100%; height: 100%; }
.home-ads-row-3-right { flex: 49%; min-width: 0; display: flex; flex-direction: row; gap: 10px; }
.home-ads-row-3-right .home-ad-card { flex: 1; width: auto; height: 100%; }
.home-ad-card { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #f0f0f0; transition: all 0.3s ease; }
.home-ad-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.home-ad-card img { width: 100%; height: 100%; object-fit: cover; }
/* 首页素材网格：6列布局 */
.home-materials-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.home-materials-grid .material-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.home-materials-grid .material-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.home-materials-grid .material-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}

.home-materials-grid .material-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-materials-grid .material-card-info {
    padding: 10px 12px;
}

.home-materials-grid .material-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-materials-grid .material-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
}

@media (max-width: 768px) {
    .home-carousel { height: 250px !important; }
    .home-search-section { padding: 15px 0; }
    .home-search-box { margin: 0 15px !important; border-radius: 40px; }
    .home-search-box input { padding: 9px 15px; font-size: 13px; }
    .home-search-box button { padding: 9px 20px; font-size: 13px; }
    .home-search-tags { margin: 8px 15px 0 !important; gap: 6px; }
    .home-search-tag { padding: 4px 10px; font-size: 12px; }
    .home-ads-section { padding: 5px 10px; }
    .home-ads-row-1 { flex-direction: column; height: auto; gap: 10px; }
    .home-ads-row-1-left { height: 200px; flex: none; }
    .home-ads-row-1-right { height: auto; flex: none; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 10px; }
    .home-ads-row-1-right .home-ad-card { height: 150px; }
    .home-ads-row-3 { flex-direction: column; height: auto; gap: 10px; }
    .home-ads-row-3-left { height: 180px; flex: none; }
    .home-ads-row-3-right { height: auto; flex: none; flex-direction: column; gap: 10px; }
    .home-ads-row-3-right .home-ad-card { height: 180px; }
    .home-ads-row-2 { height: auto !important; flex-wrap: wrap !important; gap: 10px !important; }
    .home-ads-row-2 .home-ad-card { flex: 0 0 calc(50% - 5px) !important; width: calc(50% - 5px) !important; height: 160px !important; }
    /* 首页素材网格移动端：3列 */
    .home-materials-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .home-materials-grid .material-card {
        border-radius: 6px;
    }
    .home-materials-grid .material-card-info {
        padding: 8px;
    }
    .home-materials-grid .material-card-title {
        font-size: 11px;
    }
    .home-materials-grid .material-card-meta {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    /* 小屏手机：2列 */
    .home-materials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}
