/* 公共CSS样式 - 与主页保持一致 */
:root {
    --primary-blue: #1a6dfc;
    --secondary-blue: #4d8df8;
    --light-blue: #e8f1ff;
    --dark-blue: #0a4cb3;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    font-size: clamp(0.8rem, 2vw, 1rem);
    /* 设置基础字体大小 */
}

body.menu-open {
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark-blue);
    font-size: clamp(1.2rem, 2vw, 2.2rem);
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: clamp(0.8rem, 2vw, 1rem);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.btn:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 109, 252, 0.3);
}

/* 加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-blue);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 导航栏样式 - 移动端优化 */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.logo {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links > li {
    margin-left: 30px;
    position: relative;
}

.nav-links > li > a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    display: block;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    background-color: var(--primary-blue);
    color: white;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-links > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--light-gray);
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.dropdown-menu a:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

/* 移动端菜单样式 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
    z-index: 999;
}

/* 移动端菜单覆盖层 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* 移动端特定元素 - 默认隐藏 */
.dropdown-toggle,
.mobile-close-btn {
    display: none;
}

/* 底部样式 */
footer {
    background-color: #1a1a2e;
    color: var(--white);
    padding: 70px 0 20px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--white);
    font-size: clamp(0.8rem, 2vw, 1.3rem);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.contact-info p {
    margin-bottom: 10px;
    color: #b0b0b0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #444;
    background-color: #2d3047;
    color: var(--white);
}

.contact-form textarea {
    height: 100px;
    resize: vertical;
}

/* 验证码样式 */
.captcha-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.captcha-container {
    display: flex;
    gap: 5px;
    width: 160px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.captcha-code {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
    font-size: clamp(0.8rem, 2vw, 1rem);
    letter-spacing: 3px;
    border-radius: var(--border-radius);
    user-select: none;
    min-height: 48px;
}

.refresh-captcha {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-captcha:hover {
    background-color: var(--dark-blue);
}

#captcha-input {
    flex: 1;
    margin-bottom: 0;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
}

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

.keywords {
    text-align: center;
    margin-top: 20px;
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: #b0b0b0;
}

/* 悬浮联系方块样式 */
.floating-contact {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: none;
    z-index: 999;
}

.contact-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-icon {
    color: var(--white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 8px rgba(26, 109, 252, 0.3);
}

.contact-icon:hover {
    background-color: var(--dark-blue);
    transform: scale(1.1);
}

/* 微信二维码样式 */
.wechat-qr {
    position: absolute;
    left: -95px;
    top: -10px;
    width: 80px;
    height: 80px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: none;
    z-index: 1001;
}

.wechat-icon.active .wechat-qr {
    display: block;
}

.wechat-icon:hover .wechat-qr {
    display: block;
}

.wechat-qr img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.wechat-qr::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid white;
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        margin-top: 0;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 9999;
    }

    .nav-links.active {
        display: flex;
        right: 0;
    }

    .nav-links > li {
        margin: 0;
        width: 100%;
    }

    .nav-links > li > a {
        padding: 15px;
        border-radius: 0;
        border-bottom: 1px solid var(--light-gray);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* 移动端下拉菜单样式 */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: var(--light-blue);
    }

    .dropdown-menu.active {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding: 12px 15px 12px 30px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* 移动端特定元素 - 显示 */
    .dropdown-toggle,
    .mobile-close-btn {
        display: block;
    }

    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        font-size: 1rem;
        color: var(--text-color);
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .dropdown-toggle.active {
        transform: rotate(180deg);
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-blue);
        cursor: pointer;
        z-index: 9999;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    /* 移动端悬浮联系块样式 */
    .floating-contact {
        position: fixed;
        right: auto;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        transform: none;
        background-color: transparent;
        /* 移除背景颜色 */
        padding: 10px;
        box-shadow: none;
        /* 移除阴影 */
    }

    .contact-icons {
        flex-direction: row;
        justify-content: space-around;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
        background-color: var(--primary-blue);
        /* 确保图标有背景色 */
    }

    /* 为body添加底部内边距，防止内容被悬浮联系块遮挡 */
    body {
        padding-bottom: 70px;
        /* 悬浮联系块高度 */
    }

    /* 移动端验证码布局调整 */
    .captcha-row {
        flex-direction: column;
    }

    .captcha-container {
        width: 100%;
    }

    #captcha-input {
        width: 100%;
        margin-bottom: 15px;
    }

    /* 移动端微信二维码调整 */
    .wechat-qr {
        left: 200px;
        width: 100px;
        height: 100px;
        bottom: 60px;
        top: auto;
    }
}

@media (max-width: 480px) {
    /* 小屏幕微信二维码调整 */
    .wechat-qr {
        left: -20px;
        width: 90px;
        height: 90px;
    }

    .wechat-qr::after {
        content: '';
        position: absolute;
        top: 100%;
        /* 将箭头定位到容器底部 */
        left: 50%;
        /* 水平居中 */
        transform: translateX(-50%);
        /* 水平居中调整 */
        width: 0;
        height: 0;
        border-top: 10px solid white;
        /* 上边框形成箭头 */
        border-right: 10px solid transparent;
        /* 右边框透明 */
        border-left: 10px solid transparent;
        /* 左边框透明 */
        border-bottom: 10px solid transparent;
        /* 下边框透明 */
    }
}
