/* ========================================
   公共头部和底部样式（所有页面共用）
   ======================================== */

/* Reset for new header/footer components */
.site-header *,
.site-header *::before,
.site-header *::after,
.site-footer *,
.site-footer *::before,
.site-footer *::after,
.to_top#type2 *,
.to_top#type2 *::before,
.to_top#type2 *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, opacity 0.3s ease;
}

ul, ol {
    list-style: none;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    background: transparent;
}

.site-header.is-scrolled {
    background: rgba(10, 30, 80, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 80px;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 44px;
    width: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 28px 22px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-item > a:hover,
.nav-item.active > a {
    color: #fff;
}

.nav-item.active > a::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: #fff;
}

/* Sub Menu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 30, 80, 0.95);
    min-width: 180px;
    padding: 10px 0;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.nav-item.has-sub:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-menu a {
    display: block;
    padding: 10px 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.sub-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* 内页导航始终有背景（首页由fullpage.js控制is-scrolled） */
html:not(.fp-enabled) .site-header {
    background: rgba(10, 30, 80, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

html:not(.fp-enabled) .site-header.is-scrolled {
    background: rgba(10, 30, 80, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
.site-footer {
    width: 100%;
}

.footer-main {
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #0a1e50;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.footer-brand {
    flex: 0 0 260px;
}

.footer-logo {width: auto;height: 80px;margin-bottom: 16px;}
.footer-company {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-addr,
.footer-tel {font-size: 13px;color: rgba(255, 255, 255, 0.5);line-height: 1.8;}
.footer-tel a:hover{color: rgba(255, 255, 255, 0.5);}

.footer-links {flex: 1;display: grid;grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));gap: 24px 16px;align-items: start;}
.footer-col {min-width: 0;}
.footer-col h4 {font-size: 14px;color: #fff;font-weight: 600;margin-bottom: 12px;letter-spacing: 1px;}
.footer-col a {display: block;font-size: 13px;color: rgba(255, 255, 255, 0.5);margin-bottom: 8px;transition: color 0.3s ease;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.footer-col a:hover {color: #fff;}

.footer-bottom {
    padding: 20px 0;
    background: #0a1e50;
}

.footer-bottom .footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #fff;
}

/* 浮动工具栏 */
.to_top#type2 {
    position: fixed;
    right: 40px;
    bottom: 80px;
    z-index: 9997;
    display: block !important;
    width: auto !important;
    padding: 12px 10px !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.to_top#type2 ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.to_top#type2 ul li {
    width: auto !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    position: relative;
}

.to_top#type2 ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px !important;
    height: 60px !important;
    background: transparent !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px;
    color: #666 !important;
    font-size: 11px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    padding-top: 0 !important;
    box-shadow: none;
}

.to_top#type2 ul li a:hover {
    background: rgba(10, 30, 80, 0.9) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.to_top#type2 ul li a img {
    width: 26px;
    display: block;
    margin: 0 auto 3px;
}

.to_top#type2 ul li a img.hover {
    display: none;
}

.to_top#type2 ul li a:hover img.xian {
    display: none;
}

.to_top#type2 ul li a:hover img.hover {
    display: block;
    margin-bottom: 3px;
}

/* 电话号码 - 默认隐藏，hover时在左侧展开显示 */
.to_top#type2 ul li:first-child a p {
    display: none;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    line-height: normal;
    background: rgba(10, 30, 80, 0.95);
    padding: 14px 20px;
    border-radius: 6px;
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

.to_top#type2 ul li:first-child a:hover p {
    display: block;
}

/* 微信二维码 - 默认隐藏，hover时在左侧展开显示 */
.to_top#type2 ul li:nth-child(2) a p {
    display: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}
.to_top#type2 ul li:nth-child(2) a:hover {
    background: rgba(10, 30, 80, 0.9) !important;
}
.to_top#type2 ul li:nth-child(2) a p img {
    width: 120px;
    height: auto;
    display: block;
}

.to_top#type2 ul li:nth-child(2) a:hover p {
    display: block;
}

/* 文字始终显示 */
.to_top#type2 ul li a span {
    font-size: 11px;
}

/* Responsive */
@media (max-width: 1200px) {
    .header-inner {
        padding: 0 24px;
    }
    .nav-item > a {
        padding: 28px 14px;
        font-size: 14px;
    }
    .footer-inner {
        gap: 20px;
        padding: 0 24px;
    }
    .footer-brand {
        flex: 0 0 220px;
    }
}

@media (max-width: 992px) {
    .footer-inner {
        flex-wrap: wrap;
        gap: 30px;
    }
    .footer-brand {
        flex: 0 0 100%;
        text-align: center;
    }
    .footer-links {
        flex-wrap: wrap;
        gap: 16px 24px;
        justify-content: flex-start;
    }
    .footer-col {
        flex: 0 0 calc(25% - 18px);
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    .footer-col {
        flex: 0 0 calc(33.333% - 12px);
    }
}

@media (max-width: 480px) {
    .footer-col {
        flex: 0 0 50%;
    }
}
