/* ==================== 公共样式 ==================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ==================== 头部导航 ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    gap: 44px;
    box-sizing: content-box;
}

.header-logo {
    display: flex;
    align-items: center;
    height: 36px;
}

.header-logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-logo img {
    width: 120px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 45px;
}

/* 桌面端隐藏导航里的按钮 */
.header-nav .nav-btn {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* 汉堡菜单按钮 */
.header-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    gap: 5px;
}

.header-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* 汉堡菜单展开状态 */
.header-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.header-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-link {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6b35;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 20px;
    background: #FA541C;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ==================== 页脚 ==================== */
.footer {
    height: 260px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    position: relative;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing:content-box;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo img {
    width: 120px;
    height: 36px;
    object-fit: contain;
}

.footer-desc {
    font-size: 14px;
    color: #fff;
    line-height: 1.6;
}

.footer-address {
    font-size: 14px;
    color: #fff;
}

.footer-right {
    text-align: right;
}

.footer-phone-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.footer-phone {
    font-size: 36px;
    color: #ff6b35;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 页脚底部备案信息 */
.footer-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.copyright-text {
    font-size: 13px;
    color: #999;
}

.footer-icp {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-icp:hover {
    opacity: 0.8;
}

.icp-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.icp-text {
    font-size: 13px;
    color: #999;
}

/* ==================== 响应式适配 ==================== */

/* 平板设备 (768px - 1199px) */
@media screen and (max-width: 1199px) {
    .header-container {
        padding: 0 24px;
    }

    .footer-container {
        padding: 0 24px;
    }
}

/* 平板设备导航适配 */
@media screen and (max-width: 991px) {
    .header-container {
        gap: 24px;
    }

    .header-nav {
        gap: 20px;
    }

    .nav-link {
        font-size: 13px;
    }
}

/* 手机设备 (< 768px) */
@media screen and (max-width: 767px) {
    .header {
        height: 50px;
    }

    .header-container {
        padding: 0 16px;
        gap: 0;
        justify-content: space-between;
    }

    .header-logo img {
        width: 100px;
        height: 36px;
    }

    /* 汉堡菜单按钮显示 */
    .header-menu-btn {
        display: flex;
    }

    /* 导航默认隐藏 */
    .header-nav {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 8px 20px 20px;
        gap: 0;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    /* 导航展开状态 */
    .header-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .header-nav .nav-link {
        font-size: 15px;
        padding: 16px 0;
        border-bottom: 1px solid #f5f5f5;
        width: 100%;
        text-align: center;
        color: #333;
        transition: color 0.2s ease;
    }

    .header-nav .nav-link:hover {
        color: #FA541C;
    }

    .header-nav .nav-link:last-of-type {
        border-bottom: none;
    }

    /* 手机端按钮移到导航里面 */
    .header-actions .nav-btn {
        display: none;
    }

    .header-nav .nav-btn {
        display: inline-flex;
        margin-top: 12px;
        padding: 10px 32px;
        font-size: 14px;
        border-radius: 20px;
    }

    .footer {
        height: auto;
        padding: 30px 0 20px;
        flex-direction: column;
        gap: 20px;
    }

    .footer-container {
        flex-direction: column;
        gap: 25px;
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .footer-left {
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .footer-logo img {
        width: 100px;
        height: 32px;
    }

    .footer-desc {
        font-size: 13px;
        line-height: 1.5;
    }

    .footer-address {
        font-size: 12px;
    }

    .footer-right {
        text-align: center;
    }

    .footer-phone-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .footer-phone {
        font-size: 22px;
    }

    .footer-bottom {
        position: static;
        margin-top: 20px;
        padding: 12px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-copyright {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .copyright-text {
        font-size: 11px;
        text-align: center;
        line-height: 1.5;
    }

    .footer-icp {
        justify-content: center;
    }

    .icp-icon {
        width: 16px;
        height: 16px;
    }

    .icp-text {
        font-size: 11px;
    }
}

/* ==================== 悬浮工具栏 ==================== */
.float-tools {
    position: fixed;
    right: 100px;
    bottom: 300px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 10px;
    overflow: hidden;
}

.float-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.float-tool-item:last-child {
    border-bottom: none;
}

.float-tool-item a,
.float-tool-item .tool-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.tool-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 6px;
}

.tool-robot {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.float-tool-item span {
    font-size: 12px;
    color: #ff6b35;
    white-space: nowrap;
}

.tool-online-wrap {
    padding-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tool-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.tool-top {
    color: #999;
}

/* ==================== 在线咨询弹框 ==================== */
.consult-modal {
    display: none;
    position: fixed;
    right: 200px;
    bottom: 400px;
    z-index: 1000;
}

.consult-modal-content {
    background-color: #fff;
    width: 320px;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.float-consult-header {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
}

.float-consult-header-left {
    flex: 1;
}

.float-consult-header-img {
    width: 100px;
    height: 60px;
    object-fit: contain;
    margin-top: 15px;
}

.float-consult-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.float-consult-time {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
    color: #666;
}

.online-count {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #52c41a;
    border-radius: 50%;
    display: inline-block;
}

.float-consult-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consult-staff-list {
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}

.consult-staff-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.consult-staff-item:hover {
    background-color: #f5f5f5;
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.staff-position {
    font-size: 12px;
    color: #999;
}

.staff-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.staff-status.online {
    color: #52c41a;
    background-color: #f6ffed;
}

/* ==================== 聊天弹框 ==================== */
.chat-modal {
    display: none;
    position: fixed;
    right: 200px;
    bottom: 80px;
    z-index: 1001;
    background-color: transparent;
}

.chat-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 360px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.chat-header {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.chat-header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.chat-staff-avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

.chat-staff-info {
    color: #fff;
}

.chat-staff-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chat-staff-position {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 6px;
}

.chat-staff-badges {
    display: flex;
    gap: 8px;
}

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-faq-section {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.chat-faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.faq-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-left: 10px;
}

.faq-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: #ff6b35;
    border-radius: 2px;
}

.faq-refresh {
    font-size: 12px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.faq-refresh:hover {
    color: #ff6b35;
}

.chat-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
}

.faq-item:hover {
    background: #fff2ed;
    color: #ff6b35;
}

.faq-item i {
    color: #ff6b35;
    font-size: 12px;
}

.chat-messages {
    padding: 15px 20px;
    overflow-y: auto;
    height: 400px;
}

.chat-message {
    margin-bottom: 12px;
}

.chat-message.user-message {
    display: flex;
    justify-content: flex-end;
}

.chat-message.user-message .message-content {
    background: #ff6b35;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px 12px 2px 12px;
    max-width: 80%;
    font-size: 13px;
}

.chat-message.staff-message {
    display: flex;
    justify-content: flex-start;
}

.chat-message.staff-message .message-content {
    background: #f0f0f0;
    color: #333;
    padding: 10px 14px;
    border-radius: 12px 12px 12px 2px;
    max-width: 80%;
    font-size: 13px;
}

.message-time-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    position: relative;
}

.message-time-divider span {
    background: #e0e0e0;
    color: #999;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input-box {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fafafa;
}

.chat-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.chat-input::placeholder {
    color: #bbb;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: #ff6b35;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chat-send-btn:hover {
    background: #e55a2b;
}

/* ==================== 电话咨询弹框 ==================== */
.phone-modal {
    display: none;
    position: fixed;
    right: 200px;
    bottom: 460px;
    z-index: 1000;
}

.phone-modal-content {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f5a 100%);
    width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.phone-modal-body {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.phone-modal-body:hover {
    opacity: 0.95;
}

.phone-icon-wrap {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.phone-icon-wrap i {
    color: #fff;
    font-size: 20px;
}

.phone-info {
    flex: 1;
}

.phone-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.phone-number {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

/* ==================== 留言咨询弹框 ==================== */
.message-modal {
    display: none;
    position: fixed;
    right: 200px;
    bottom: 130px;
    z-index: 1000;
}

.message-modal-content {
    background-color: #fff;
    width: 360px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.message-header {
    background: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e8e8e8;
}

.message-header-left {
    flex: 1;
}

.message-title {
    font-size: 18px;
    font-weight: 600;
    color: #ff6b35;
    margin-bottom: 8px;
}

.message-subtitle {
    font-size: 13px;
    color: #999;
}

.message-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-close:hover {
    color: #666;
}

.message-form {
    padding: 20px;
}

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

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.3s;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #ff6b35;
    background: #fff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #bbb;
}

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

.message-submit-btn {
    width: 100%;
    padding: 14px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.message-submit-btn:hover {
    background: #e55a2b;
}

/* ==================== 悬浮工具栏响应式 ==================== */
@media (max-width: 768px) {
    .float-tools {
        right: 10px;
        bottom: 80px;
        flex-direction: column;
        gap: 12px;
    }

    .float-tool-item {
        width: 48px;
        height: 48px;
        padding: 6px;
    }

    .float-tool-item i {
        font-size: 14px;
    }

    .float-tool-item span {
        font-size: 9px;
        margin-top: 2px;
    }

    .float-tool-item {
        border-bottom: none;
    }

    .float-tool-item .tool-icon-img {
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
    }

    .tool-online-wrap {
        height: auto;
        padding: 4px;
        border-bottom: none;
    }

    .tool-online-wrap .tool-online {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .tool-online-wrap .tool-robot {
        width: 24px;
        height: 24px;
        margin-bottom: 2px;
    }

    .tool-online-wrap .tool-btn {
        font-size: 8px;
        padding: 2px 6px;
        border-radius: 10px;
        margin-top: 0;
    }

    .consult-modal,
    .chat-modal,
    .phone-modal,
    .message-modal {
        right: 10px;
        left: 10px;
        bottom: 80px;
        top: auto;
        max-height: calc(100vh - 100px);
    }

    .consult-modal-content,
    .chat-modal-content,
    .phone-modal-content,
    .message-modal-content {
        width: 100%;
        max-height: calc(100vh - 100px);
    }

    .chat-modal-content {
        max-height: 70vh;
    }

    .chat-messages {
        max-height: 40vh;
        min-height: 200px;
    }

    .consult-staff-list {
        max-height: 50vh;
    }
}
