/* base.css - 通用样式重置与字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ================= 导航栏 ================= */
nav {
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo img {
    height: auto;
    max-height: 60px;
    display: block;
}

.nav-inner {
    width: 1696px;
    max-width: 95vw;
    height: 80px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.menu {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-item > a {
    width: 120px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    line-height: 80px;
    position: relative;
    transition: color 0.3s;
}

/* 一级菜单红线 */
.menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff0000;
    transition: width 0.3s;
}

.menu-item > a:hover {
    color: #ff0000;
}

.menu-item > a:hover::after {
    width: 100%;
}

.menu-item.active-line > a::after {
    width: 100%;
}

/* 子菜单：下拉且特效和主导航一致 */
.submenu {
    position: absolute;
    top: 100%; /* 紧贴主菜单底部 */
    left: 0;
    width: auto;
    min-width: 120px;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.submenu a {
    line-height: 60px;
    height: 60px;
    font-size: 16px;
    color: #fff;
    text-align: center;
    position: relative;
    transition: color 0.3s;
}

/* 子菜单红线效果 */
.submenu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff0000;
    transition: width 0.3s;
}

.submenu a:hover::after {
    width: 100%;
}

.submenu a:hover {
    color: #ff0000;
}

/* PC端：悬停显示下拉 */
.menu-item:hover > .submenu {
    display: flex;
}

.close-menu{
    display: none;
}

/* ================= 移动端导航优化 ================= */
@media (max-width: 992px) {
    nav {
        height: 50px;
        line-height: 50px;
        padding: 0 15px;
        background: rgba(0,0,0,0.95);
    }

    .nav-inner {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .logo img {
        height: 20px; /* 适合平板和小屏设备 */
        width: auto;
    }


    /* 关闭菜单的叉叉按钮 */
    .close-menu {
        display: block;
        font-size: 35px;
        color: white;
        cursor: pointer;
        width: 25px;
        height: 25px;
        text-align: center;
        line-height: 25px;
        z-index: 10001; /* 确保叉叉在最上面 */
    }
    /* 菜单按钮样式 */
    .hamburger {
        display: block;
        cursor: pointer;
    }

    .hamburger div {
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 5px 0;
        transition: 0.3s;
    }

    .menu {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: calc(100vh - 50px);
        background-color: rgba(0,0,0,0.95);
        display: none;
        flex-direction: column;
        align-items: center;
        padding-top: 10px;
        overflow-y: auto;
        z-index: 10000;
    }

    .menu.active {
        display: flex;
    }

    .menu-item {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .menu-item > a {
        width: 100%;
        font-size: 18px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        color: #fff;
        text-decoration: none;
        padding: 12px 20px;
        transition: background 0.3s, color 0.3s;
        cursor: pointer;
    }

    .menu-item > a:hover {
        color: #ff0000;
        background: rgba(255,0,0,0.05);
    }

    .menu-item.has-submenu > a {
        position: relative;
        display: inline-block; /* 保持文字布局不变 */
    }

    /* 父菜单有子菜单，+/- 紧挨文字 */
    .menu-item.has-submenu > a::before {
        content: "+";
        display: inline-block;
        margin-right: 4px;   /* 图标和文字间距 */
        font-weight: bold;
        font-size: 16px;
        vertical-align: middle;
    }

    /* 父菜单展开时显示 - */
    .menu-item.has-submenu.open > a::before {
        content: "-";
    }


    .submenu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(0,0,0,0.9);
        position: static;    /* 关键：取消 absolute */
        margin: 0;           /* 保证流布局 */
        padding-bottom: 20px;
    }

    .submenu.active {
        display: flex;  /* 保证 toggle 生效 */
    }

    .submenu a {
        width: 100%;
        padding: 10px 20px;
        text-align: center;
        color: #fff;
        font-size: 16px;
        transition: background 0.3s, color 0.3s;
    }

    .submenu a:hover {
        color: #ff0000;
        background: rgba(255,0,0,0.05);
    }
}

/* ================= Footer ================= */
.footer-wrapper {
    max-width: 1696px;
    margin: 80px auto 0px auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ff0000;
}

.footer-main {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo {
    font-size: 28px;
    font-weight: bold;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s;
}

.social-icons a:hover img {
    transform: scale(1.2);
}

.footer-right {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.footer-group h4 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 5px;
}

.footer-group a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
}

.footer-group a:hover {
    color: #ff0000;
}

.footer-bottom {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 20px;
}

/* ================= Hero Banner ================= */
.hero-banner {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 420px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 40px;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.hero-title {
    font-size: clamp(40px, 6vw, 50px);
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: #ffffff;
}

/* ================= 分页 ================= */
.news-pagination {
    margin-top: 40px;
    text-align: center;
}

.news-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    margin: 0 5px;
    font-size: 18px;
    border-radius: 6px;
    background-color: #ff0000;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    vertical-align: middle;
}

.news-pagination a.active,
.news-pagination a:hover {
    background-color: #cc0000;
}

/* ================= 移动端优化 Hero 和分页 ================= */
@media (max-width: 992px) {
    .hero-banner {
        height: 300px;
        max-height: 300px;
    }
    .hero-content {
        min-height: 300px;
    }
    .hero-title { font-size: 40px; }
    .hero-subtitle { font-size: 20px; }
    .news-pagination a { font-size: 16px; padding: 6px 14px; }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 220px;
        max-height: 220px;
    }
    .hero-content {
        min-height: 220px;
    }
    .hero-title { font-size: 30px; }
    .hero-subtitle { font-size: 16px; }
}
