/* 页头开关沿用原悬浮按钮样式。 */
html[data-header-collapsed] [data-site-header] {
    display: none !important;
}

#foldable-header-toggle[hidden] {
    display: none !important;
}

#foldable-header-toggle {
    position: fixed;
    right: 50px;
    bottom: 30px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    border: 1px solid #4636ff;
    border-radius: 0;
    background: #4636ff;
    color: #fff;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 8px 20px rgba(35, 29, 120, .24);
}

#foldable-header-toggle:focus-visible {
    outline: 3px solid rgba(70, 54, 255, .25);
    outline-offset: 3px;
}

html[data-theme="dark"] #foldable-header-toggle {
    color: #c9d9fb;
    background: #232529;
    border-color: #485d84;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .30);
}

html[data-theme="dark"] #foldable-header-toggle:hover {
    color: #0b1320;
    background: var(--blue-color);
    border-color: var(--blue-color);
}

/* 横向折叠屏：首页首屏并排，覆盖原平板断点的超高占位。 */
@media (min-width: 820px) and (max-width: 1024px) and (min-height: 560px) and (max-height: 780px) and (orientation: landscape) {
    .hero__area .hero__height {
        min-height: 85vh;
        padding: 40px 0;
    }

    .hero__area .hero__item > .container > .row {
        align-items: center;
    }

    .hero__area .hero__item > .container > .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        min-width: 0;
    }

    .hero__area .hero__thumb-wrapper {
        margin: 0;
        height: auto;
    }

    .hero__area .hero__thumb.one {
        position: relative;
        top: auto;
        left: auto;
        text-align: center;
    }

    .hero__area .hero__thumb img {
        height: min(62vh, 420px) !important;
        width: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    .hero__area .hero__content h1 {
        font-size: clamp(44px, 5.4vw, 56px);
    }

    .hero__area .hero__content p {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .services__area-2.pt-270 {
        padding-top: 180px;
    }
}

/* 首页内容区只在折叠屏适配范围内收紧，保留原配色与卡片样式。 */
@media (min-width: 820px) and (max-width: 1024px) and (min-height: 560px) and (max-height: 780px) and (orientation: landscape),
       (min-width: 430px) and (max-width: 480px) and (min-height: 620px) and (max-height: 740px) and (orientation: portrait) {
    /* 页头不沿用正文的固定宽度容器，避免两侧留下过宽空白。 */
    [data-site-header] .header__top > .container,
    [data-site-header] .header__bottom > .container {
        width: 100%;
        max-width: none;
        padding-left: max(20px, env(safe-area-inset-left, 0px));
        padding-right: max(20px, env(safe-area-inset-right, 0px));
    }

    [data-site-header] .header-btn {
        margin-right: 0;
    }

    .services__area-2.pb-140 {
        padding-bottom: 72px;
    }

    .services__area-2 > .container > .row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin: 0;
    }

    .services__area-2 > .container > .row > [class*="col-"] {
        width: auto;
        max-width: none;
        min-width: 0;
        padding: 0;
    }

    .services__area-2 .services__item-2 {
        height: 100%;
        margin: 0;
        padding: 24px 16px;
    }

    .services__area-2 .services__icon {
        margin-bottom: 20px;
    }

    .services__area-2 .services__content-2 h3 {
        font-size: 21px;
        margin-bottom: 6px;
    }

    .services__area-2 .services__content-2 p {
        font-size: 13px;
        line-height: 1.6;
    }

    /* 更新列表沿用原布局，仅缩小字号。 */
    .services__area-2 .section__title h2 {
        font-size: 32px;
    }

    .services__area-2 .section__title h3 {
        font-size: 18px;
    }

    .services__area-2 .mode-tag {
        font-size: 13px;
    }

    .services__area-2 .article-line__meta h4 {
        font-size: 20px;
    }

    .services__area-2 .article-line__meta h6 {
        font-size: 12px;
    }

    .services__area-2 .article-line__name {
        font-size: 20px;
    }

    .services__area-2 .article-line__info {
        font-size: 14px;
    }

    .services__area-2 .blog__meta.user {
        font-size: 13px;
    }

    .services__area-2 .article-line__btn .link-btn-2 {
        font-size: 14px;
    }

    .services__area-2 .expart__area > .container {
        padding: 0;
    }

    .services__area-2 .expart__tab-content {
        display: grid;
        grid-template-columns: 42% minmax(0, 1fr);
        align-items: stretch;
    }

    .services__area-2 .expart__thumb {
        display: block;
        position: relative;
        width: 100%;
        height: auto;
        min-height: 300px;
        background-size: contain;
    }

    .services__area-2 .expart__tab-content > .row {
        margin: 0;
        align-items: center;
    }

    .services__area-2 .expart__tab-content > .row > [class*="col-"] {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        padding: 0;
    }

    .services__area-2 .expart__content {
        padding: 36px 28px;
    }

    .services__area-2 .expart__content h3 {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 18px;
    }

    .services__area-2 .expart__content p {
        font-size: 15px;
        line-height: 1.8;
        margin-bottom: 24px;
    }
}

/* 外屏保留双列入口，介绍区改为居中的上下布局。 */
@media (min-width: 430px) and (max-width: 480px) and (min-height: 620px) and (max-height: 740px) and (orientation: portrait) {
    .services__area-2 > .container > .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services__area-2 .article-line__meta h4 {
        font-size: 18px;
    }

    .services__area-2 .expart__tab-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .services__area-2 .expart__thumb {
        min-height: 0;
        height: 190px;
        margin-top: 24px;
    }

    .services__area-2 .expart__content {
        padding: 24px;
        text-align: center;
    }
}
