/* ================= 1. Footer 基础样式 ================= */
.flagship-footer {
    background-color: #1B263B;
    color: #fff;
    padding: 70px 0 30px;
    font-family: 'Inter', sans-serif;
    border-top: 4px solid #e3ac2d;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 60px;
}

.brand-col h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 20px 0;
    color: #fff;
}
.brand-desc {
    color: #e0e6ed;
    line-height: 1.8;
    font-size: 15px;
    max-width: 340px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.social-group {
    display: flex;
    gap: 12px;
}
.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e3ac2d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1B263B;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(227, 172, 45, 0.3);
}
.social-icon:hover {
    background: #fff;
    color: #e3ac2d;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.nav-col h4 {
    color: #e3ac2d;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 25px 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 14px;
}
.footer-links a {
    color: #e0e6ed;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}
.footer-links a:hover {
    color: #e3ac2d;
    padding-left: 5px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    color: #e0e6ed;
    font-size: 15px;
    line-height: 1.5;
}
.contact-item i {
    color: #e3ac2d;
    margin-right: 12px;
    font-size: 18px;
    margin-top: 4px;
}

/* --- 底部法律链接与支付图标样式 --- */
.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.copyright {
    color: #cbd5e1;
    font-size: 13px;
}

.footer-legal-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.footer-legal-links a {
    color: #cbd5e1;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-legal-links a:hover {
    color: #e3ac2d;
    text-decoration: underline;
}

.payment-icons {
    display: flex;
    gap: 15px;
    font-size: 24px;
    color: #fff;
    opacity: 0.8;
}
.payment-icons i {
    transition: transform 0.3s;
}
.payment-icons i:hover {
    transform: scale(1.1);
    color: #e3ac2d;
    opacity: 1;
}

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
    .footer-top { grid-template-columns: 1fr; gap: 30px; }
    .social-group { justify-content: flex-start; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-legal-links { justify-content: center; flex-wrap: wrap; gap: 15px; }
}

/* ================= 2. 悬浮按钮组 ================= */
.floating-action-group {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 2147483647; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; 
}

.back-to-top-btn {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0; 
    transform: translateY(20px);
    pointer-events: none;
    color: #233b73;
    font-size: 18px;
}

.back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top-btn:hover {
    background-color: #233b73;
    color: #fff;
    box-shadow: 0 6px 15px rgba(35, 59, 115, 0.3);
}

.wecom-pulse-btn {
    position: relative; 
    width: 110px;  
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.wecom-inner-circle {
    width: 110px; 
    height: 110px;
    background: #fff;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 8px 25px rgba(227, 172, 45, 0.7); 
    position: relative; 
    z-index: 2;
    border: 3px solid #fff; 
    overflow: hidden; 
}

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

.wecom-badge {
    position: absolute; 
    top: 0; 
    right: 0;
    background: #ff4757; 
    color: #fff;
    font-size: 14px; 
    font-weight: bold;
    width: 30px; 
    height: 30px;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 3; 
    border: 2px solid #fff;
    animation: bounce 2s infinite;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.wecom-ripple {
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    border-radius: 50%;
    background: rgba(227, 172, 45, 0.7); 
    z-index: 1;
    animation: ripple 2s infinite cubic-bezier(0, 0.2, 0.8, 1);
}

.wecom-pulse-btn:hover .wecom-inner-circle {
    transform: scale(1.05); 
    border-color: #e3ac2d; 
}
.wecom-pulse-btn:hover .avatar-img {
    transform: scale(1.1);
}

/* ================= 3. 聊天框 & 弹窗 ================= */
#cbh-chat-box {
    position: fixed;
    bottom: 120px; 
    right: 40px;
    width: 360px; height: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    z-index: 2147483647 !important;
    overflow: hidden;
    font-family: Arial, sans-serif;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.hidden { opacity: 0; transform: scale(0.9) translateY(20px); pointer-events: none; }

.chat-header {
    background: linear-gradient(135deg, #233b73, #1a2b55);
    color: white; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.agent-name { font-weight: bold; font-size: 16px; }
.status-dot { width: 8px; height: 8px; background: #00ff00; border-radius: 50%; display: inline-block; margin-right: 5px; }
.close-btn { background: none; border: none; color: white; font-size: 28px; cursor: pointer; }

.chat-content { flex: 1; padding: 15px; background: #f4f6f8; overflow-y: auto; }
.msg-row { display: flex; margin-bottom: 12px; }
.msg-bot { justify-content: flex-start; }
.msg-user { justify-content: flex-end; }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg-bot .bubble { background: white; color: #333; box-shadow: 0 1px 2px rgba(0,0,0,0.1); border-top-left-radius: 2px;}
.msg-user .bubble { background: #233b73; color: white; border-top-right-radius: 2px;}

.option-btn {
    background: white; border: 1px solid #233b73; color: #233b73;
    padding: 8px 16px; border-radius: 20px; font-size: 13px; cursor: pointer;
    margin-bottom: 8px; text-align: left; display: block; width: fit-content;
}
.option-btn:hover { background: #233b73; color: white; }

.contact-card {
    background: white; padding: 20px; border-radius: 8px; text-align: center;
    border: 1px solid #eee; margin-top: 10px;
}
.contact-title { font-weight: bold; display: block; margin-bottom: 10px; color: #333; }
.action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 10px; margin-bottom: 8px; border-radius: 6px;
    text-decoration: none; font-weight: bold; font-size: 14px; cursor: pointer;
}
.btn-email { background: #e3ac2d; color: white; border: none; }
.btn-whatsapp { background: white; color: #233b73; border: 1px solid #233b73; }

/* 弹窗遮罩 */
#form-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2147483648; 
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s;
}
.modal-hidden { opacity: 0; pointer-events: none; visibility: hidden; }

.form-modal-container {
    background: #fff; width: 90%; max-width: 500px;
    border-radius: 12px; padding: 30px; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(1); transition: transform 0.3s;
}
.modal-hidden .form-modal-container { transform: scale(0.8); }
.modal-close-btn {
    position: absolute; top: 15px; right: 20px; font-size: 30px;
    background: none; border: none; cursor: pointer; color: #999;
}

.custom-modal-form label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 13px; color: #333; }
.custom-modal-form input, .custom-modal-form textarea {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px;
    margin-bottom: 15px; background: #f9f9f9;
}
.submit-btn {
    width: 100%; padding: 12px; background: #e3ac2d; color: white;
    border: none; border-radius: 6px; font-weight: bold; font-size: 16px; cursor: pointer;
}
.submit-btn:hover { background: #dcb329; }

@keyframes bounce { 0%, 100% {transform: translateY(0);} 50% {transform: translateY(-3px);} }
@keyframes ripple { 0% {transform: scale(1); opacity: 0.6;} 100% {transform: scale(1.8); opacity: 0;} }

@media (max-width: 768px) {
    .floating-action-group { bottom: 20px; right: 20px; }
    .wecom-pulse-btn { width: 90px; height: 90px; }
    .wecom-inner-circle { width: 90px; height: 90px; }
    #cbh-chat-box { right: 20px; bottom: 100px; width: calc(100% - 40px); height: 60vh; }
}
