/* 首页响应式增强：覆盖旧版固定宽度规则，不影响其他页面。 */
.swiper-banner,
.swiper-banner * {
    box-sizing: border-box;
}

.index-search-form {
    max-width: 100%;
}

.index-search-form input {
    padding-right: 100px;
}

.mobile-nav-toggle {
    display: none;
}

/* PC端统一为四列，八份资料正好显示两行。 */
.list-row,
.list-row-2 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.list-row .list-item,
.list-row-2 .list-item {
    width: auto;
    margin: 0;
    padding: 0;
}

/* 首页头部独立于横幅，避免宽屏下品牌文字与导航重叠。 */
.doc-header {
    position: relative;
    height: 80px;
    background: #fff;
    border-bottom: 1px solid #edf0f5;
    box-shadow: 0 2px 12px rgba(22, 34, 51, .06);
}

.doc-header .container .jn-nav > li > a,
.doc-header .container .jn-nav > li > a.active,
.doc-header .container .jn-nav > li:hover > a {
    color: #273142;
}

.swiper-container .swiper-slide a {
    position: relative;
}

.banner-copy {
    position: absolute;
    inset: 0;
    display: flex;
    padding-bottom: 72px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-align: center;
    text-shadow: 0 3px 12px rgba(116, 0, 0, .28);
}

.banner-copy h1 {
    margin: 0;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 8px;
}

.banner-copy p {
    position: static !important;
    margin: 12px 0 0 !important;
    font-size: 21px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    letter-spacing: 5px;
    color: #ffe8a8 !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
}

@media (max-width: 1320px) {
    body .container {
        width: calc(100% - 40px);
        min-width: 0;
    }

    .notice {
        display: flex;
        align-items: center;
    }

    .notice .main-wrap {
        display: flex;
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .notice .main-wrap li {
        display: flex;
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .notice .main-wrap li a.text {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .list-row,
    .list-row-2 {
        display: grid;
        gap: 18px;
    }

    .list-row,
    .list-row-2 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .list-row .list-item,
    .list-row-2 .list-item {
        width: auto;
        margin: 0;
        padding: 0;
    }

    .list-row .list-item-img,
    .list-row-2 .list-item-img {
        height: auto;
        aspect-ratio: 4 / 5;
        background: #f5f7fa;
        border-radius: 6px;
    }

    .list-row .list-item-img img,
    .list-row-2 .list-item-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 1024px) {
    .list-row,
    .list-row-2 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .notice .main-wrap li:nth-child(n + 3) {
        display: none;
    }
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        min-width: 0 !important;
        overflow-x: hidden;
    }

    body .container {
        width: calc(100% - 24px);
    }

    .doc-header {
        min-width: 0;
        height: 64px;
        background: #fff;
    }

    .doc-header .container {
        display: flex;
        height: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .doc-header .container .jn-logo {
        display: flex;
        height: 64px;
        align-items: center;
    }

    .doc-header .container .jn-logo a,
    .doc-header .container .jn-logo a img {
        max-width: 210px;
        height: auto;
    }

    .mobile-nav-toggle {
        display: flex;
        width: 42px;
        height: 42px;
        padding: 10px;
        border: 1px solid #dfe4eb;
        border-radius: 10px;
        flex-direction: column;
        justify-content: space-around;
        background: #f7f8fa;
        cursor: pointer;
    }

    .mobile-nav-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: #273142;
        transition: transform .2s, opacity .2s;
    }

    .mobile-nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .doc-header .container .jn-nav {
        position: absolute;
        top: 64px;
        right: 0;
        left: 0;
        display: none;
        overflow: hidden;
        width: 100%;
        height: auto;
        padding: 8px 12px 12px;
        border-radius: 0 0 14px 14px;
        background: #fff;
        box-shadow: 0 14px 24px rgba(26, 39, 58, .16);
        white-space: normal;
    }

    .doc-header .container .jn-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .doc-header .container .jn-nav > li {
        float: none;
        width: auto;
        height: 42px;
    }

    .doc-header .container .jn-nav > li > a {
        display: block;
        height: 42px;
        padding: 0 12px;
        border-radius: 8px;
        line-height: 42px;
        color: #273142;
        background: #f6f7f9;
    }

    .doc-header .nav-drop,
    .doc-header .flag_icon,
    .doc-header .header-right {
        display: none !important;
    }

    .swiper-container {
        height: 228px;
    }

    .swiper-container .swiper-slide a {
        background-position: center !important;
    }

    .banner-copy {
        padding: 28px 16px 70px;
        justify-content: flex-start;
    }

    .banner-copy h1 {
        font-size: 30px;
        letter-spacing: 4px;
    }

    .banner-copy p {
        margin-top: 8px !important;
        font-size: 14px !important;
        letter-spacing: 2px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }

    .swiper-container-horizontal > .swiper-pagination-bullets {
        bottom: 52px !important;
    }

    .index-search {
        top: auto;
        bottom: 14px;
        left: 12px;
        width: calc(100% - 24px);
        margin-left: 0;
    }

    .index-search-form {
        width: 100%;
        border-radius: 10px;
    }

    .index-search-form input {
        width: 100%;
        height: 44px;
        font-size: 14px;
    }

    .btn-search-v4 {
        top: 4px;
        right: 4px;
        height: 36px;
        line-height: 36px;
    }

    .notice {
        height: 48px;
        margin: 12px 0;
        padding: 0 12px;
        line-height: 48px;
    }

    .notice .name-wrap {
        flex: 0 0 auto;
        height: 48px;
        font-size: 14px;
        line-height: 48px;
    }

    .notice .main-wrap li {
        padding-left: 12px;
    }

    .notice .main-wrap li:nth-child(n + 2),
    .notice .main-wrap .line_col,
    .notice .main-wrap .time,
    .notice .more-wrap i {
        display: none;
    }

    .notice .more-wrap {
        flex: 0 0 auto;
        font-size: 12px;
    }

    .ct-box {
        padding: 0 14px 18px;
        border-radius: 8px;
    }

    .ct-box .hd {
        height: 56px;
        line-height: 56px;
    }

    .ct-box .hd .doc-list-title {
        font-size: 19px;
    }

    .list-row,
    .list-row-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
    }

    .list-row .list-item-title,
    .list-row-2 .list-item-title {
        height: 40px;
        margin-top: 8px;
        font-size: 13px;
        line-height: 20px;
    }

    /* 手机端每个栏目展示四项，与两列网格组成完整两行。 */
    .refresh-box .list-row .list-item:nth-child(n + 5),
    .uploaddoc-wrap .list-row-2 .list-item:nth-child(n + 5) {
        display: none;
    }

    .jiuniao-kefu-right-bottom {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .swiper-container {
        height: 208px;
    }

    .list-row,
    .list-row-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* 小屏手机展示四项，与两列网格组成完整两行。 */
    .refresh-box .list-row .list-item:nth-child(n + 5),
    .uploaddoc-wrap .list-row-2 .list-item:nth-child(n + 5) {
        display: none;
    }

    .list-row .list-item-img,
    .list-row-2 .list-item-img {
        aspect-ratio: 4 / 5.2;
    }
}
