/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.5;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 10px;
}

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

/* 顶部标题 */
.header {
    background-image: url('images/headback.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 15px 0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.logo-img {
    height: 45px;
    width: auto;
    max-width: 140px;
}

.menu-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 30px;
    background-image: url('images/xialass.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    background-color: #a31616;
    padding: 0;
}

.nav-item {
    width: 25%;
    text-align: center;
    padding: 12px 5px;
    font-size: 14px;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.nav-item:nth-child(4n) {
    border-right: none;
}

.nav-item:nth-child(5),
.nav-item:nth-child(6),
.nav-item:nth-child(7) {
    border-bottom: none;
}

.nav-item.active {
    color: #fff;
    font-weight: bold;
    background-color: rgba(255,255,255,0.2);
}

/* 轮播图区域 */
.banner {
    background-color: #fff;
    margin-bottom: 10px;
    position: relative;
    margin: 0 auto;
    max-width: 600px;
}

.banner-slider {
    position: relative;
    overflow: hidden;
}

.banner-item {
    display: none;
    position: relative;
}

.banner-item.active {
    display: block;
}

.banner-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    padding: 15px;
    font-size: 16px;
    line-height: 1.4;
}

.banner-dots {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    background-color: #fff;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 4px;
}

.dot.active {
    background-color: #a31616;
}

/* 内容区块 */
.content-section {
    background-color: #fff;
    margin-bottom: 10px;
    padding: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #a31616;
}

.section-header h2 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.section-header .more {
    color: #a31616;
    font-size: 13px;
}

/* 总部活动 - 部门列表 */
.dept-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dept-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.dept-icon {
    font-size: 32px;
    margin-right: 12px;
    flex-shrink: 0;
}

.dept-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.dept-info p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 5px;
}

.dept-info small {
    display: block;
    font-size: 12px;
    color: #888;
    font-weight: normal;
}

/* 分支机构 */
.branch-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.branch-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #a31616;
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.branch-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: #a31616;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
}

.branch-item h3 {
    font-size: 16px;
    color: #333;
}

.branch-area {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.branch-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

/* 平台功能 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.feature-item {
    text-align: center;
    padding: 20px 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.feature-item h3 {
    font-size: 14px;
    color: #333;
}

/* 培训活动 */
.training-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.training-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.training-image {
    position: relative;
    height: 150px;
}

.training-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.training-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    background-color: #a31616;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
}

.training-content {
    padding: 15px;
}

.training-content h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.training-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.training-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

/* APP下载 */
.app-section {
    background: linear-gradient(135deg, #a31616 0%, #c41e3a 100%);
    padding: 30px 15px;
    color: #fff;
    text-align: center;
}

.app-content h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.app-content > p {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.app-features {
    list-style: none;
    margin-bottom: 25px;
    text-align: left;
    padding: 0 20px;
}

.app-features li {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.95;
}

.app-download-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    background-color: #fff;
    color: #a31616;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

/* 加入我们 */
.join-intro {
    margin-bottom: 20px;
}

.join-intro h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.join-intro p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.join-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* 加盟表单样式 */
.franchise-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group label .required {
    color: #e53935;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a31616;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-group {
    margin-top: 20px;
    text-align: center;
}

.btn-submit {
    background: linear-gradient(135deg, #a31616 0%, #c41e3a 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(163, 22, 22, 0.3);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.benefit-icon {
    font-size: 20px;
}

.benefit-item span {
    font-size: 13px;
    color: #333;
}

.position-list {
    margin-top: 20px;
}

.position-list > h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
}

.position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
}

.position-info h4 {
    font-size: 15px;
    color: #333;
    margin-bottom: 5px;
}

.position-location {
    font-size: 12px;
    color: #666;
}

.position-salary {
    font-size: 14px;
    color: #a31616;
    font-weight: bold;
}

/* 底部信息 */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 20px 15px;
    text-align: center;
}

.footer-info {
    margin-bottom: 15px;
}

.footer-info p {
    font-size: 12px;
    color: #ccc;
}

.footer-version {
    border-top: 1px solid #555;
    padding-top: 15px;
}

.desktop-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: #a31616;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
}

/* 客服窗口 */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #a31616 0%, #c41e3a 100%);
    color: #fff;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background-color: #fff;
}

.chat-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-avatar img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

.chat-header span {
    flex: 1;
    font-weight: bold;
    font-size: 14px;
}

.chat-toggle {
    width: 28px;
    height: 28px;
    border: none;
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.chat-body {
    height: 350px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background-color: #f5f5f5;
}

.message {
    margin-bottom: 12px;
    max-width: 85%;
}

.message.system {
    margin-left: 0;
}

.message.user {
    margin-left: auto;
    text-align: right;
}

.message p {
    display: inline-block;
    padding: 10px 12px;
    background-color: #fff;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.message.user p {
    background-color: #a31616;
    color: #fff;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    background-color: #fff;
    border-radius: 8px;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.chat-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
}

.chat-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: #a31616;
}

.chat-input button {
    margin-left: 8px;
    padding: 10px 16px;
    background-color: #a31616;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.chat-widget.collapsed .chat-body {
    display: none;
}

/* 响应式优化 */
@media (max-width: 375px) {
    .nav-item {
        font-size: 12px;
        padding: 10px 3px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-download-btns {
        flex-direction: column;
    }
    
    .chat-widget {
        width: calc(100% - 40px);
        right: 20px;
    }
}
