/* header */
section.header {
    position: absolute;
    width: 100%;
    height: var(--height-header);
    fill: var(--color-on-inverse);
    color: var(--color-on-inverse);
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    transition: color 0.5s ease-in-out, fill 0.5s ease-in-out, background-color 0.5s ease-in-out;
    flex-direction: column;
    z-index: 10;
}

.header.hide {
    position: fixed;
    top: 0;
    transform: translateY(calc(-1 * var(--height-header)));

}

.header.scroll-up {
    position: fixed;
    top: 0;
    /* transform: translateY(0px); */
    transition: transform 0.5s ease-in-out, fill 0.5s ease-in-out;
}

.header.scroll-down {
    position: fixed;
    top: 0;
    transform: translateY(calc(-1 * var(--height-header)));

    transition: transform 0.5s ease-in-out, fill 0.5s ease-in-out;
}



.expend.header {
    fill: var(--color-primary);
    color: var(--color-primary);
    background-color: var(--color-surface);
    border-color: var(--color-primary);
}

.header .title {
    max-width: var(--max-width);
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--padding-side);
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: var(--space-3);
    justify-content: space-between;
}

.header .logo-box {
    display: flex;
    height: 100%;
    align-items: center;
}

.header .menu-expand-btn,
.header .menu-collapse-btn {
    background-color: transparent;
    border: none;
    color: inherit;
    font-size: 2rem;
    margin-right: var(--padding-side);
    cursor: pointer;
}

.header .logo {
    width: 90px;
    display: flex;
}

.header .menu-box {
    display: flex;
    flex-direction: row;
    height: 100%;
    cursor: pointer;
}

.header .action-box {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.2rem;
}

.header .action-box select {
    border: none;
    background-color: transparent;
    padding: 0;
}

.setting-icon {
    font-size: 1.5rem;
}


/* 
.language-select-box {
    display: flex;
    align-items: center;
}

.language-icon {
    font-size: 1.5em;
}

.language-select {
    padding: 0;
    text-align: start;
} */


.menu-item {
    padding: 0 1rem;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    transition: border 0.5s ease-in-out;
    border-style: solid;
    border-top-width: 0px;
    border-right-width: 0px;
    border-left-width: 0px;
    border-bottom-width: 0px;
    border-color: var(--color-primary);
}

.menu-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0.625rem 0.625rem 0.625rem;
    border-color: transparent transparent transparent transparent;
    transition: border-color 0.5s ease-in-out;
}

.menu-item.click::after,
.menu-item:hover::after {
    border-color: transparent transparent var(--color-primary) transparent;
}

button.cta {
    color: inherit;
    background-color: inherit;
    padding: var(--space-3) var(--space-5);
    border-width: 1px;
    border-style: solid;
    border-color: inherit;
    border-radius: 1.25rem;
    cursor: pointer;
}

button.cta:hover {
    background: var(--color-gradient-primary);
    color: var(--color-on-inverse);
    border-color: var(--color-primary);
}

/* 当屏幕宽度大于1200px时的样式 */
@media (min-width: 1200px) {

    .header .content-box {
        position: absolute;
        top: var(--height-header);
        height: 420px;
        width: 100%;
        color: var(--color-on-inverse);
        background: var(--color-gradient-primary);
        opacity: 0;
        transition: opacity 0.2s ease-in-out;
        pointer-events: none;
    }

    .header .content-box.expend {
        display: block;
        opacity: 1;
        pointer-events: all;
    }

    .content-item {
        height: 100%;
        max-width: var(--max-width);
        padding: 0 var(--padding-side);
        width: 100%;
        margin: 0 auto;
        display: none;
    }

    .header .content-item-box {
        position: relative;
        height: 100%;
        width: 100%;
        overflow-y: auto;
    }


    .expend.header,
    section.header:hover {
        fill: var(--color-primary);
        color: var(--color-primary);
        background-color: var(--color-surface);
        border-color: var(--color-primary);
    }

    .content-item.show {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .content-item-word>h1 {
        margin-bottom: 30px;
        font-size: 2em;
    }

    .content-item-word>span {
        display: block;
        margin-bottom: 5px;
        font-size: 0.9em;
    }

    .content-item-list {
        display: grid;
        gap: 20px;
    }

    .content-item-list>li {
        /* 文字下划线 */
        text-decoration: underline;
    }

    .content-item-img {
        width: 50%;
        height: 100%;
    }

    .content-item-img>img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

}


@media (max-width: 1200px) {
    .header .content-title {
        height: var(--height-header);
        color: var(--color-on-inverse);
        background: var(--color-gradient-primary);
        fill: var(--color-on-inverse);
        padding: 0 var(--padding-side);
    }

    .header .content-box.expend {
        display: block;
        opacity: 1;
        pointer-events: all;
    }

    .header .content-box {
        color: var(--color-on-inverse);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: var(--color-gradient-primary);
        transition: transform 0.2s ease-in-out;
        transform: translateX(-100%);
        will-change: transform, opacity;
        z-index: 10;
    }

    .header .content-box.expend {
        transform: translateX(0);
    }

    .header .content-item-box {
        position: relative;
        height: calc(100% - var(--height-header));
        width: 100%;
        overflow-y: auto;
    }

    .header .content-item {
        position: relative;
        padding: 0 var(--padding-side);
    }

    .header .content-item-word {
        padding: 10px 0;
    }

    .header h1 {
        position: relative;
        padding: 10px 0;
        z-index: 1;
        font-size: 1.2em;
    }

    .header span {
        opacity: 0.7;
        font-size: 0.7em;
        transform: translateY(10px);
    }

    .header span,
    .header .content-item-list {
        position: relative;
        display: block;
        overflow: hidden;
        height: 0;
        z-index: 1;
        transition: height 0.2s ease-in-out;
        will-change: height;
    }

    .header .content-item-list>li {
        padding: 10px 0;
        /* border-bottom: 1px solid var(--color-on-inverse); */

        /* 下划线 */
        text-decoration: underline;
    }

    .header .content-item-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
    }

    .header .content-item-img>img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* 暗一点的滤镜 */
        filter: brightness(0.4);
    }
}
