/*头部*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

a {
    text-decoration: none;
    color: #333;
}

ul, li {
    list-style: none;
}

/* 导航栏 */
.header {
    width: 100%;
    height: 100px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 1);
    padding: 25px 0;
}

.nav-wrap {
    display: flex;
    justify-content: space-around;
    align-items: center;
    /*margin-left: 95px;*/
}

.nav {
    height: 45px;
    line-height: 45px;

    /*min-width: 1100px;*/
}

.nav a {
    margin: 0 24px;
    font-size: 16px;
    color: rgba(33, 33, 33, 1);
}

.nav-a {
    color: rgba(0, 45, 176, 1) !important;
    font-weight: 700;
}

/* 语言切换 */
.lang-switch {
    display: flex;
    align-items: center;
    height: 45px;
    line-height: 45px;
}

.lang-btn {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.3s;
}

.lang-btn.active {
    color: rgba(0, 45, 176, 1);
    font-weight: 700;
}

.header.white .lang-btn.active {
    color: #002DB0;
}

.lang-divider {
    color: rgba(51, 51, 51, 0.4);
    font-size: 15px;
}

/* 顶部 */
.top {
    position: relative;
    /*max-width: 1920px;*/
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin: 100px auto 0;
}

.top > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
    z-index: 1;
}


/* 右侧文字容器 .top-left */
.top-left {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 119px 160px;
    z-index: 1;
}

/* 英文 "We are Epsilon" */
.top-left span:first-child {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0px;
    line-height: 69.5px;
    color: rgba(255, 255, 255, 1);
    text-align: left;
}

/* 中文 "我们是埃普斯隆" */
.top-left span:nth-child(2) {
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 0px;
    line-height: 57.92px;
    color: rgba(255, 255, 255, 1);
}

/* 装饰线 .top-line */
.top-line {
    width: 46px;
    height: 5px;
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    margin-top: 34px;
}

/* 完全PC专用，无手机媒体查询，但保持在大屏下的优雅 */
@media screen and (max-width: 1024px) {
    section.top {
        padding: 2.2rem 2.8rem;
        gap: 2.2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    section.top img {
        width: 100%;
        /*max-width: 480px;*/
    }

    .top-left {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .top-left span:first-child {
        font-size: 3.6rem;
    }

    .top-left span:nth-child(2) {
        font-size: 2rem;
    }

    .top-line {
        width: 80px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 640px) {
    /* 依然保留，但保持pc优先，不做移动端专项优化，仅防止溢出 */
    section.top {
        padding: 1.8rem 1.5rem;
        /*border-radius: 2.4rem;*/
        flex-direction: column;
    }

    section.top img {
        max-width: 100%;
        aspect-ratio: 16 / 10;
    }

    .top-left span:first-child {
        font-size: 2.8rem;
    }

    .top-left span:nth-child(2) {
        font-size: 1.6rem;
        letter-spacing: 0.15em;
    }
}

/* ============================================
   头部 & 导航栏 - 移动端适配
   ============================================ */

/* ----- 1024px 以下 (平板/小屏) ----- */
@media screen and (max-width: 1024px) {
    /* 导航栏 */
    .header {
        height: 70px;
        padding: 15px 0;
    }

    .lang-switch {
        display: flex;
        align-items: center;
        height: 45px;
        line-height: 45px;
        margin-left: 150px;
    }

    .nav-wrap {
        margin-left: 20px;
        justify-content: space-between;
        padding: 0 20px;
    }

    .nav a {
        margin: 0 25px;
        font-size: 15px;
    }

    /* Top 区域 */
    .top {
        height: 300px;
        margin-top: 70px;
    }

    .top-left {
        padding: 60px 40px;
    }

    .top-left span:first-child {
        font-size: 36px;
        line-height: 50px;
    }

    .top-left span:nth-child(2) {
        font-size: 28px;
        line-height: 40px;
    }

    .top-line {
        width: 40px;
        height: 4px;
        margin-top: 20px;
    }
}

/* ----- 768px 以下 (手机) ----- */
@media screen and (max-width: 768px) {
    .lang-switch {
        display: flex;
        align-items: center;
        height: 45px;
        line-height: 45px;
        margin-left: 150px;
    }

    /* ===== 导航栏 ===== */
    .header {
        height: 60px;
        padding: 10px 0;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }

    .nav-wrap {
        margin-left: 0;
        padding: 0 15px;
        justify-content: space-between;
    }

    /* Logo 区域 */
    .logo img {
        height: 35px;
        width: auto;
    }

    /* 导航菜单 - 默认隐藏 */
    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        height: auto;
        background: #ffffff;
        flex-direction: column;
        padding: 10px 0 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f0f0f0;
        line-height: normal;
    }

    /* 导航菜单 - 展开状态 */
    .nav.open {
        display: flex !important;
    }

    .nav a {
        display: block;
        padding: 14px 30px;
        margin: 0;
        font-size: 16px;
        color: rgba(51, 51, 51, 1) !important;
        border-bottom: 1px solid #f5f5f5;
        transition: all 0.2s ease;
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .nav a:active {
        background: #f0f4ff;
        color: rgba(0, 45, 176, 1) !important;
    }

    .nav-a {
        color: rgba(0, 45, 176, 1) !important;
        background: #f5f8ff;
    }

    /* ===== 移动端汉堡菜单按钮 ===== */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        cursor: pointer;
        padding: 8px;
        border: none;
        background: transparent;
        border-radius: 6px;
        transition: background 0.2s ease;
        z-index: 100;
    }

    .menu-toggle:active {
        background: rgba(0, 0, 0, 0.05);
    }

    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2.5px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    /* 汉堡菜单 → 叉号动画 */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
        background: rgba(0, 45, 176, 1);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
        background: rgba(0, 45, 176, 1);
    }

    /* ===== Top 区域 (Banner/顶部大图) ===== */
    .top {
        height: 220px;
        margin-top: 60px;
        position: relative;
    }

    .top > img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }

    /* Top 文字容器 */
    .top-left {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px 30px;
        text-align: center;
        background: rgba(0, 0, 0, 0.2); /* 增加文字可读性 */
    }

    /* 英文 "We are Epsilon" */
    .top-left span:first-child {
        font-size: 28px;
        font-weight: 700;
        line-height: 1.3;
        color: rgba(255, 255, 255, 1);
        text-align: center;
    }

    /* 中文 "我们是埃普斯隆" */
    .top-left span:nth-child(2) {
        font-size: 22px;
        font-weight: 500;
        line-height: 1.4;
        color: rgba(255, 255, 255, 1);
        text-align: center;
        margin-top: 4px;
    }

    /* 装饰线 */
    .top-line {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 1);
        margin: 16px auto 0;
        border-radius: 2px;
    }
}

/* ----- 480px 以下 (小屏手机) ----- */
@media screen and (max-width: 480px) {
    .lang-switch {
        display: flex;
        align-items: center;
        height: 45px;
        line-height: 45px;
        margin-left: 150px;
    }

    .header {
        height: 52px;
        padding: 8px 0;
    }

    .nav-wrap {
        padding: 0 12px;
    }

    .logo img {
        height: 28px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        padding: 6px;
        gap: 4px;
    }

    .menu-toggle span {
        width: 20px;
        height: 2px;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav {
        top: 52px;
    }

    .nav a {
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Top 区域 */
    .top {
        height: 180px;
        margin-top: 52px;
    }

    .top-left {
        padding: 15px 20px;
    }

    .top-left span:first-child {
        font-size: 22px;
    }

    .top-left span:nth-child(2) {
        font-size: 17px;
    }

    .top-line {
        width: 32px;
        height: 3px;
        margin-top: 12px;
    }
}

/* ============================================
   辅助类 - 菜单按钮 (默认隐藏)
   ============================================ */
/*.menu-toggle {
    display: none;
}*/

/* ============================================
   导航栏滚动效果 - 可选
   ============================================ */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   平滑滚动 & 点击反馈 (移动端)
   ============================================ */
@media (max-width: 768px) {
    .nav a {
        -webkit-tap-highlight-color: rgba(0, 45, 176, 0.1);
        touch-action: manipulation;
    }

    .menu-toggle {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}
