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

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    background-color: #f5f7fa;
}

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

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

.logo-img {
    height: 50px;
    width: auto;
    max-width: 160px;
}

/* 主导航 */
.main-nav {
    background-color: transparent;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-list li {
    position: relative;
}

.nav-list li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s;
}

#modules-nav a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-list li a:hover,
.nav-list li a.active,
#modules-nav a:hover,
#modules-nav a.active {
    background-color: #a31616;
    color: #fff;
}

/* 首页横幅 */
.hero-section {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1200px;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    padding: 40px 60px;
    border-radius: 8px;
}

.hero-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 35px;
    background-color: #a31616;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #8a1212;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.hero-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* 主要内容区 */
.main-content {
    padding: 40px 0;
}

.content-section {
    margin-bottom: 60px;
}

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

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

.section-header p {
    color: #666;
    font-size: 14px;
    margin-left: 15px;
    flex: 1;
}

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

.section-header .more:hover {
    text-decoration: underline;
}

/* 总部活动 - 部门卡片 */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.dept-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.dept-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.dept-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.dept-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.dept-card small {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
    font-weight: normal;
}

.dept-link {
    color: #a31616;
    font-size: 13px;
}

.dept-link:hover {
    text-decoration: underline;
}

/* 分支机构 */
.branch-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.branch-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.branch-map {
    font-size: 14px;
    color: #a31616;
    margin-bottom: 10px;
    font-weight: bold;
}

.branch-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.branch-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

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

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

.feature-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

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

.feature-item p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* 培训活动 */
.training-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.training-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.training-image {
    height: 180px;
    overflow: hidden;
}

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

.training-card:hover .training-image img {
    transform: scale(1.05);
}

.training-content {
    padding: 20px;
}

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

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

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

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

.btn-apply {
    display: inline-block;
    padding: 8px 25px;
    background-color: #a31616;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-apply:hover {
    background-color: #8a1212;
}

/* APP下载 */
.app-section {
    background: linear-gradient(135deg, #a31616 0%, #c41e3a 100%);
    border-radius: 12px;
    padding: 50px;
    color: #fff;
}

.app-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-info h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.app-info > p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.app-features {
    list-style: none;
    margin-bottom: 30px;
}

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

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

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background-color: #fff;
    color: #a31616;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    transition: transform 0.3s;
}

.app-btn:hover {
    transform: scale(1.05);
}

.app-qrcode {
    text-align: center;
}

.qrcode-placeholder {
    width: 180px;
    height: 180px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
}

/* 加盟 */
.join-section .join-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.join-intro h3,
.join-form h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

.join-intro p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 25px;
}

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

@media (max-width: 768px) {
    .join-benefits {
        grid-template-columns: 1fr;
    }
}

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

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    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: 30px;
    text-align: center;
}

.btn-submit {
    background: linear-gradient(135deg, #a31616 0%, #c41e3a 100%);
    color: #fff;
    border: none;
    padding: 12px 40px;
    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: 10px;
    padding: 15px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.position-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 保持原有的职位列表样式以备后用 */
.position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.position-item h4 {
    font-size: 16px;
    color: #333;
    flex: 1;
}

.position-location {
    font-size: 13px;
    color: #666;
    margin-right: 15px;
}

.position-salary {
    font-size: 14px;
    color: #a31616;
    font-weight: 500;
    margin-right: 15px;
}

.btn-apply {
    background-color: #a31616;
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-apply:hover {
    background-color: #8a1212;
}

.position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.position-item h4 {
    font-size: 16px;
    color: #333;
    flex: 1;
}

.position-location {
    font-size: 13px;
    color: #666;
    margin-right: 15px;
}

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

/* 底部 */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 30px 0;
    text-align: center;
}

.footer-info p {
    font-size: 13px;
}

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

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

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

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

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

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

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.chat-video {
    width: 100%;
    height: 400px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

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

.chat-messages {
    flex: 1;
    max-height: 300px;
    min-height: 200px;
    padding: 15px;
    overflow-y: auto;
    background-color: #f5f5f5;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

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

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

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

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

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

.typing-indicator span {
    width: 8px;
    height: 8px;
    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(-10px); }
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    max-height: 60px;
    flex-shrink: 0;
}

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

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

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

.chat-input button:hover {
    background-color: #8a1212;
}

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

/* 响应式适配 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
    
    .dept-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .branch-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .training-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
    }
    
    .dept-grid,
    .branch-list,
    .feature-grid,
    .training-list {
        grid-template-columns: 1fr;
    }
    
    .join-section .join-content {
        grid-template-columns: 1fr;
    }
    
    .app-content {
        flex-direction: column;
        text-align: center;
    }
    
    .chat-widget {
        width: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
}
