/*
  浮动侧边栏样式 - 与页脚统一的联系方式设计
  品牌色系统：蓝色 #3b82f6 + 青色 #06b6d4
  文件: css/floating-sidebar.css (v2.0)
*/

/* ====== CSS变量（与footer.css一致）====== */
:root {
    --contact-blue: #3b82f6;
    --contact-cyan: #06b6d4;
    --contact-blue-dark: #2563eb;
    --contact-cyan-dark: #0891b2;
}

/* ====== 悬浮侧边栏容器 ====== */
.floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ====== 悬浮按钮统一样式 ====== */
.floating-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    color: var(--contact-blue);
    width: 64px;
    height: 68px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        -3px 0 16px rgba(59, 130, 246, 0.12),
        0 2px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border: none;
    border-radius: 14px 0 0 14px;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: visible;
    backdrop-filter: blur(10px);
}

.floating-btn:hover {
    background: linear-gradient(135deg, var(--contact-blue) 0%, var(--contact-cyan) 100%);
    box-shadow:
        -4px 0 24px rgba(59, 130, 246, 0.35),
        0 8px 28px rgba(59, 130, 246, 0.22);
    transform: translateX(-4px) scale(1.03);
    color: #ffffff;
}

.floating-btn i {
    font-size: 22px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(59, 130, 246, 0.15));
}

.floating-btn:hover i {
    transform: scale(1.12);
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.5));
}

.floating-btn .btn-text {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* ====== 微信二维码弹窗 ====== */
.floating-qrcode {
    position: absolute;
    right: 72px;
    bottom: 50%;
    transform: translateY(50%) translateX(10px) scale(0.92);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 16px;
    border-radius: 14px;
    box-shadow:
        0 10px 32px rgba(23, 26, 32, 0.18),
        0 3px 10px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(59, 130, 246, 0.1);
    width: 150px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.floating-qrcode::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: var(--contact-blue);
    filter: drop-shadow(-2px 0 4px rgba(59, 130, 246, 0.2));
}

.floating-qrcode img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 2px solid rgba(59, 130, 246, 0.1);
    padding: 6px;
    position: relative;
    z-index: 1;
    background: #ffffff;
}

.floating-qrcode p {
    margin: 10px 0 0;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #393C41;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.wechat-btn:hover .floating-qrcode {
    opacity: 1;
    visibility: visible;
    transform: translateY(50%) translateX(0) scale(1);
    pointer-events: auto;
}

/* ====== 电话咨询提示框 ====== */
.floating-tooltip {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%) translateX(10px) scale(0.92);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow:
        0 10px 32px rgba(23, 26, 32, 0.18),
        0 3px 10px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(59, 130, 246, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.floating-tooltip::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -8px;
    bottom: -8px;
    width: 24px;
}

.floating-tooltip::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: var(--contact-blue);
    filter: drop-shadow(-2px 0 4px rgba(59, 130, 246, 0.2));
}

.floating-tooltip p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #393C41;
    line-height: 1.9;
    position: relative;
    z-index: 1;
}

.floating-tooltip a {
    color: var(--contact-blue);
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 700;
    position: relative;
}

.floating-tooltip a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, var(--contact-blue), var(--contact-cyan));
    transition: width 0.3s ease;
}

.floating-tooltip a:hover {
    color: var(--contact-cyan);
}

.floating-tooltip a:hover::after {
    width: 100%;
}

.phone-btn:hover .floating-tooltip,
.mobile-btn:hover .floating-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
    pointer-events: auto;
}

/* ====== 移动端底部联系栏 ====== */
.mobile-contact {
    display: none;
}

@media (max-width: 991px) {
    .floating-btn {
        width: 56px;
        height: 60px;
    }

    .floating-btn i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .floating-btn .btn-text {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    /* 隐藏大部分悬浮按钮，只保留返回顶部 */
    .floating-btn {
        display: none !important;
    }

    .floating-btn.back-to-top {
        display: flex !important;
        width: 48px;
        height: 48px;
        border-radius: 50% !important;
        border: none;
        transition: all 0.25s ease;
        position: fixed;
        right: 16px;
        bottom: 80px;
        color: #fff;
        background: linear-gradient(135deg, var(--contact-blue) 0%, var(--contact-cyan) 100%);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    }

    .floating-btn.back-to-top:hover {
        transform: translateY(-4px) scale(1.08);
        box-shadow: 0 8px 28px rgba(59, 130, 246, 0.55);
    }

    .floating-btn:hover {
        background: linear-gradient(135deg, var(--contact-blue) 0%, var(--contact-cyan) 100%);
        transform: translateY(0);
        color: #fff;
    }

    .floating-btn:hover i {
        transform: scale(1);
        filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.5));
    }

    .floating-btn:active {
        transform: scale(0.95);
    }

    .floating-btn .btn-text {
        display: none;
    }

    .floating-btn i {
        margin-bottom: 0;
        font-size: 22px;
    }

    .floating-qrcode {
        width: 140px;
        padding: 12px;
        right: 10px;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%) translateX(10px) scale(0.92);
    }

    .wechat-btn:hover .floating-qrcode {
        transform: translateY(-50%) translateX(0) scale(1);
    }

    /* 移动端底部联系栏样式 - 统一品牌色 */
    .mobile-contact {
        display: flex;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        height: 60px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        border-top: 1px solid rgba(59, 130, 246, 0.15);
        box-shadow:
            0 -2px 16px rgba(23, 26, 32, 0.1),
            0 0 0 1px rgba(59, 130, 246, 0.05);
        backdrop-filter: blur(10px);
    }

    .mobile-contact a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        color: var(--contact-blue);
        font-size: 15px;
        font-weight: 700;
        transition: all 0.25s ease;
        position: relative;
        letter-spacing: 0.5px;
    }

    .mobile-contact a:first-child::after {
        content: '';
        position: absolute;
        right: 0;
        top: 14px;
        bottom: 14px;
        width: 1px;
        background: linear-gradient(
            180deg,
            transparent 0%,
            rgba(59, 130, 246, 0.3) 50%,
            transparent 100%
        );
    }

    .mobile-contact a:active {
        background: linear-gradient(
            180deg,
            rgba(59, 130, 246, 0.04) 0%,
            rgba(6, 182, 212, 0.04) 100%
        );
    }

    .mobile-contact a i {
        font-size: 19px;
        filter: drop-shadow(0 1px 2px rgba(59, 130, 246, 0.2));
    }
}

/* ========== 弹窗样式（quote-modal）- 统一品牌色 ========== */
.quote-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(23, 26, 32, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.quote-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    margin: 8vh auto 0;
    padding: 36px;
    border-radius: 18px;
    box-shadow:
        0 24px 64px rgba(23, 26, 32, 0.22),
        0 8px 24px rgba(23, 26, 32, 0.12),
        0 0 0 1px rgba(59, 130, 246, 0.1);
    width: 92%;
    max-width: 500px;
    position: relative;
    animation: quoteModalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

@keyframes quoteModalIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.quote-modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 50%;
    line-height: 1;
}
.quote-modal-close:hover {
    color: var(--contact-blue);
    background: rgba(59, 130, 246, 0.08);
    transform: rotate(90deg);
}

.quote-modal-header { margin-bottom: 4px; }

.quote-modal-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0;
    color: #171A20;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--contact-blue), var(--contact-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quote-modal-tip {
    font-size: 13px;
    color: #5C5E62;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(59, 130, 246, 0.2);
    line-height: 1.6;
}
.quote-modal-tip em {
    font-style: normal;
    color: #ef4444;
    font-weight: 700;
}

/* 表单字段 */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-field label {
    font-size: 13px;
    font-weight: 700;
    color: #393C41;
    letter-spacing: 0.3px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid #e4e4e7;
    border-radius: 10px;
    font-size: 14px;
    color: #171A20;
    background: #fafafa;
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--contact-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-width: 2px;
}

.form-field textarea { min-height: 76px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-row .form-field { margin-bottom: 14px; }

.button-group {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--contact-blue) 0%, var(--contact-cyan) 100%);
    color: #fff;
    padding: 13px 40px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--contact-blue-dark) 0%, var(--contact-cyan-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(59, 130, 246, 0.42);
}
.submit-btn:active { transform: translateY(0); }
.submit-btn i { font-size: 17px; filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3)); }

@media (max-width: 576px) {
    .quote-modal-content {
        margin: 4vh auto 0;
        padding: 26px 22px;
        max-width: 94%;
        border-radius: 16px;
    }
    .quote-modal-title { font-size: 19px; }
    .form-row { grid-template-columns: 1fr; }
    .submit-btn { width: 100%; padding: 14px 0; }
}

/* ====== 打印时隐藏侧边栏 ====== */
@media print {
    .floating-sidebar,
    .mobile-contact,
    .back-to-top-btn {
        display: none !important;
    }
}

/* ====== 高对比度模式支持 ====== */
@media (prefers-contrast: high) {
    :root {
        --contact-blue: #2563eb;
        --contact-cyan: #0891b2;
    }
    
    .floating-btn {
        border: 2px solid currentColor;
    }
    
    .mobile-contact a {
        font-weight: 800;
    }
}

/* ====== 减少动效模式支持 ====== */
@media (prefers-reduced-motion: reduce) {
    .floating-btn,
    .floating-qrcode,
    .floating-tooltip,
    .quote-modal-content,
    .submit-btn {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
