/* 全局：防止手机端横向滚动 */
html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 公共头部样式 */
.site-header {
    background: rgba(191, 202, 215, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* 滚动时导航栏样式增强 */
.site-header.scrolled {
    background: rgba(191, 202, 215, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

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

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 30px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-right: 15px;
}

.logo-url {
    font-size: 12px;
    color: #999;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
}

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 0;
    display: block;
}

.nav-list > li > a:hover {
    color: #fff;
}

.nav-list > li::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #fff;
    border-radius: 1.5px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-list > li:hover::after {
    width: 100%;
}

/* 下拉菜单 */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #f5f9ee;
    border: 1px solid #e5ecd8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    margin: 0;
}

.submenu li a {
    display: block;
    padding: 8px 20px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.submenu li a:hover {
    background: #e8f0dc;
    color: #2d3a1e;
}

/* 移动端菜单按钮：满足 44px 触控区域 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 5px;
    padding: 12px 10px;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s;
}

/* 页脚弧形背景 - 使用SVG实现弧形效果 */
.footer-arc-bg {
    width: 100%;
    height: 100px;
    min-height: 100px;
    position: relative;
    z-index: 2;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    background: transparent;
    line-height: 0;
}

.footer-arc-bg svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 公共底部样式 */
.site-footer {
    background: #b8d477;
    padding: 0 0 48px;
    margin-top: -1px; /* 与弧形无缝衔接，避免白色缝隙 */
    position: relative;
    overflow: visible;
}

/* 弧形已由 .footer-arc-bg 实现，此处隐藏避免出现白色条 */
.site-footer::before {
    content: none !important;
    display: none !important;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: end;
}

.footer-logo {
    display: flex;
    align-items: flex-start;
}

.footer-contact h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.contact-item {
    font-size: 14px;
    line-height: 1.45;
    color: #fff;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    font-size: 16px;
    filter: brightness(0) invert(1);
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.45;
    color: #fff;
    margin: 6px 0;
}

/* 页脚右侧文字统一字号与字重 - 行间距缩小 */
.footer-legal p,
.footer-legal .copyright,
.footer-legal .license {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    color: #fff !important;
    margin: 2px 0 !important;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #f0f0f0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-block;
    padding: 8px 15px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.social-icon:hover {
    background: #b8d477;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.footer-bottom p {
    margin: 5px 0;
    color: #999;
    font-size: 12px;
}

.footer-license {
    font-size: 11px !important;
    color: #999;
}

/* 平板适配 */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 15px;
    }
    
    .nav-list {
        gap: 20px;
    }
    
    .nav-list > li > a {
        font-size: 15px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-container {
        height: 60px;
        padding: 0 15px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(191, 202, 215, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
        backdrop-filter: blur(10px);
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .nav-list > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-list > li > a {
        padding: 15px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #fff;
        margin-left: 20px;
    }
    
    .has-submenu:hover .submenu {
        transform: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .site-footer {
        padding: 0 0 48px;
        margin-top: 0;
    }
    
    /* 全站容器：小屏收紧内边距，避免贴边 */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}
