/* 首頁新版樣式（僅首頁載入） */
body {
    background: #f3f5f8;
    color: #23262b;
}

/* 首頁未載入 layui 時補齊導航基礎樣式 */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    list-style: none;
}

.hm-page {
    padding-bottom: 40px;
}

.hm-wrap {
    width: 1200px;
    margin: 0 auto;
}

/* 頂部信息條 */
.hm-topbar {
    display: flex;
    align-items: center;
    height: 46px;
    color: #8b929b;
    font-size: 13px;
    border-bottom: 1px solid #e6e9ee;
}

.hm-topbar .hm-date {
    color: #2ea1cd;
    font-weight: 700;
    letter-spacing: .5px;
}

.hm-topbar .hm-slogan {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #dfe3e9;
}

.hm-topbar .hm-topnav {
    margin-left: auto;
    color: #6b7280;
}

.hm-topbar .hm-topnav:hover {
    color: #2ea1cd;
}

/* 首屏：輪播 + 焦點 */
.hm-hero {
    display: grid;
    grid-template-columns: 860px 320px;
    gap: 20px;
    margin-top: 18px;
}

.hm-slider {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: #10151c;
    box-shadow: 0 10px 26px rgba(24, 40, 64, .12);
}

.hm-slides {
    position: absolute;
    inset: 0;
}

.hm-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .7s ease, transform 6s ease;
    z-index: 1;
}

.hm-slide.on {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hm-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .78) 100%);
}

.hm-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 26px;
    z-index: 3;
    box-sizing: border-box;
}

.hm-cap em {
    display: block;
    color: #fff;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-dots {
    position: absolute;
    right: 18px;
    top: 16px;
    z-index: 4;
    display: flex;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 16px;
    background: rgba(16, 21, 28, .38);
}

.hm-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: all .25s;
}

.hm-dots i.on {
    width: 22px;
    border-radius: 4px;
    background: #fff;
}

.hm-arrow {
    position: absolute;
    top: 50%;
    margin-top: -22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .32);
    z-index: 4;
    cursor: pointer;
    opacity: 0;
    transition: all .3s;
}

.hm-arrow::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.hm-prev::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

.hm-next::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

.hm-prev {
    left: 14px;
}

.hm-next {
    right: 14px;
}

.hm-slider:hover .hm-arrow {
    opacity: 1;
}

.hm-arrow:hover {
    background: rgba(46, 161, 205, .85);
}

/* 右側焦點列表 */
.hm-topnews {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px 8px;
    box-shadow: 0 6px 18px rgba(24, 40, 64, .06);
    min-width: 0;
}

.hm-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 11px;
    margin-bottom: 6px;
}

.hm-h h2 {
    position: relative;
    margin: 0;
    padding-left: 12px;
    font-size: 19px;
    font-weight: 700;
    color: #1b1e23;
    line-height: 1.2;
}

.hm-h h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: #2ea1cd;
}

.hm-more {
    font-size: 12px;
    color: #9aa1aa;
}

.hm-more:hover {
    color: #2ea1cd;
}

.hm-topnews ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.hm-topnews li {
    border-bottom: 1px dashed #eef1f4;
    min-width: 0;
}

.hm-topnews li:last-child {
    border-bottom: none;
}

.hm-topnews li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #34383f;
    font-size: 14.5px;
    line-height: 1.5;
}

.hm-topnews li a:hover span {
    color: #2ea1cd;
}

.hm-topnews li b {
    flex: none;
    width: 21px;
    height: 21px;
    border-radius: 4px;
    background: #f1f3f6;
    color: #98a0aa;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 21px;
}

.hm-topnews li.hot b {
    background: #e6463d;
    color: #fff;
}

.hm-topnews li span {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

/* 圖片精選 */
.hm-feature {
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px 20px;
    box-shadow: 0 6px 18px rgba(24, 40, 64, .06);
}

.hm-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 12px;
}

.hm-title {
    position: relative;
    margin: 0;
    padding-left: 13px;
    font-size: 22px;
    font-weight: 700;
    color: #1b1e23;
    line-height: 1.2;
}

.hm-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 21px;
    border-radius: 2px;
    background: #2ea1cd;
}

.hm-title a {
    color: #1b1e23;
}

.hm-title a:hover {
    color: #2ea1cd;
}

.hm-fgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.hm-fcard {
    display: block;
    min-width: 0;
    transition: transform .25s;
}

.hm-fcard:hover {
    transform: translateY(-3px);
}

.hm-fimg {
    display: block;
    height: 142px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #cfe4f0, #8fbfd8);
}

.hm-fimg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}

.hm-fcard:hover .hm-fimg img {
    transform: scale(1.06);
}

.hm-ftxt {
    display: block;
    padding-top: 9px;
}

.hm-ftxt i {
    display: inline-block;
    font-style: normal;
    font-size: 12px;
    color: #2ea1cd;
    background: #eaf6fb;
    border-radius: 3px;
    padding: 1px 6px;
    margin-bottom: 6px;
}

.hm-ftxt b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.55;
    color: #2b2f36;
}

.hm-fcard:hover .hm-ftxt b {
    color: #2ea1cd;
}

/* 主體兩欄 */
.hm-main {
    display: grid;
    grid-template-columns: 860px 320px;
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}

.hm-sec {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px 8px;
    box-shadow: 0 6px 18px rgba(24, 40, 64, .06);
    margin-bottom: 20px;
}

.hm-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    justify-content: flex-end;
}

.hm-cats a {
    font-size: 14px;
    color: #6f7680;
    line-height: 22px;
}

.hm-cats a:hover {
    color: #2ea1cd;
}

.hm-sec-body {
    display: grid;
    grid-template-columns: 296px 1fr;
    gap: 22px;
    padding: 16px 0 12px;
}

.hm-lead {
    min-width: 0;
    border-right: 1px solid #f0f2f5;
    padding-right: 20px;
}

.hm-lead-img {
    display: block;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #cfe4f0, #8fbfd8);
}

.hm-lead-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hm-tag {
    display: inline-block;
    font-size: 12px;
    color: #e6463d;
    background: #fdeeec;
    border-radius: 3px;
    padding: 1px 7px;
    margin-bottom: 7px;
}

.hm-lead h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.45;
    font-weight: 700;
    color: #1d2127;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-lead a:hover h3 {
    color: #2ea1cd;
}

.hm-lead p {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: #858c95;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    align-content: start;
}

.hm-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #eef1f4;
    min-width: 0;
}

.hm-list li a {
    position: relative;
    padding-left: 12px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #34383f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.hm-list li a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: #c9ced6;
}

.hm-list li a:hover {
    color: #2ea1cd;
}

.hm-list li em {
    flex: none;
    font-style: normal;
    font-size: 12px;
    color: #a2a9b2;
}

/* 側欄 */
.hm-ai {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 6px 18px rgba(24, 40, 64, .06);
    margin-bottom: 20px;
}

.hm-rank {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.hm-rank li {
    border-bottom: 1px dashed #eef1f4;
}

.hm-rank li:last-child {
    border-bottom: none;
}

.hm-rank li a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    min-width: 0;
}

.hm-rank li b {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 4px;
    background: #f1f3f6;
    color: #98a0aa;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 20px;
}

.hm-rank li:nth-child(1) b {
    background: #e6463d;
    color: #fff;
}

.hm-rank li:nth-child(2) b {
    background: #f08a3c;
    color: #fff;
}

.hm-rank li:nth-child(3) b {
    background: #f2b544;
    color: #fff;
}

.hm-rank li span {
    font-size: 14px;
    line-height: 1.5;
    color: #34383f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-rank li a:hover span {
    color: #2ea1cd;
}

.hm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 14px;
}

.hm-chips a {
    padding: 5px 11px;
    border-radius: 14px;
    background: #f4f6f9;
    color: #5c636d;
    font-size: 13px;
    line-height: 1.4;
}

.hm-chips a:hover {
    background: #2ea1cd;
    color: #fff;
}

.hm-newlist {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.hm-newlist li {
    padding: 9px 0;
    border-bottom: 1px dashed #eef1f4;
    min-width: 0;
}

.hm-newlist li:last-child {
    border-bottom: none;
}

.hm-newlist li a {
    position: relative;
    display: block;
    padding-left: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #34383f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-newlist li a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: #c9ced6;
}

.hm-newlist li a:hover {
    color: #2ea1cd;
}

.hm-newlist li em {
    display: block;
    padding-left: 12px;
    font-style: normal;
    font-size: 12px;
    color: #a7adb6;
}

/* 響應式 */
@media (max-width: 1240px) {
    .hm-wrap {
        width: 96%;
    }

    .hm-hero,
    .hm-main {
        grid-template-columns: 1fr 300px;
    }

    .hm-slider {
        height: 360px;
    }

    .hm-sec-body {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 991px) {
    .hm-hero,
    .hm-main {
        grid-template-columns: 1fr;
    }

    .hm-slider {
        height: 340px;
    }

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

    .hm-sec-body {
        grid-template-columns: 1fr;
    }

    .hm-lead {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #f0f2f5;
        padding-bottom: 14px;
    }

    .hm-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .hm-topbar .hm-slogan {
        display: none;
    }

    .hm-slider {
        height: 210px;
    }

    .hm-cap {
        padding: 12px 14px;
    }

    .hm-cap em {
        font-size: 17px;
    }

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

    .hm-fimg {
        height: 100px;
    }

    .hm-list {
        grid-template-columns: 1fr;
    }

    .hm-list li:nth-child(n+7) {
        display: none;
    }

    .hm-sec {
        padding: 14px 14px 6px;
    }

    .hm-lead h3 {
        font-size: 17px;
    }

    .hm-cats {
        display: none;
    }
}
