/* =====================================================
   预约咨询模态弹层 - 高端科技感设计
   ===================================================== */

/* ========= 模态容器基础样式 ========= */
.consultation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.consultation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.consultation-modal.show {
    opacity: 1;
}

/* ========= 遮罩层 ========= */
.consultation-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

/* ========= 模态主容器 ========= */
.consultation-modal .modal-container {
    position: relative;
    width: 92%;
    max-width: 1100px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 深色系背景 */
    background: linear-gradient(135deg, #0f1419 0%, #1a1f26 100%);
    border-radius: 16px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(54, 201, 88, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.consultation-modal.show .modal-container {
    transform: scale(1) translateY(0);
}

/* ========= 科技网格背景动画 ========= */
.modal-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(54, 201, 88, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(54, 201, 88, 0.3) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: gridMove 20s linear infinite;
    border-radius: 16px;
    overflow: hidden;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

/* ========= 关闭按钮 ========= */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn:hover {
    background: rgba(54, 201, 88, 0.1);
    border-color: rgba(54, 201, 88, 0.3);
    color: #36c958;
    transform: rotate(90deg);
}

.modal-close-btn i {
    width: 24px;
    height: 24px;
}

/* ========= 内容包装器 ========= */
.modal-content-wrapper {
    padding: 50px;
    position: relative;
    z-index: 3;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
}

/* ========= 左侧服务介绍区域 ========= */
.modal-left-section {
    /* 使用负margin让背景延伸到容器边缘 */
    margin: -50px 0 -50px -50px;
    /* 恢复padding以保持内容间距 - 左右对称 */
    padding: 50px 35px 50px 35px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(54, 201, 88, 0.05) 0%, rgba(54, 201, 88, 0.02) 100%);
    display: flex;
    align-items: flex-end;
    flex: 1;
}

.modal-service-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* 顶部徽章 */
.modal-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(54, 201, 88, 0.15), rgba(54, 201, 88, 0.05));
    border: 1px solid rgba(54, 201, 88, 0.3);
    border-radius: 50px;
    color: #36c958;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    width: fit-content;
}

.modal-header-badge i {
    width: 16px;
    height: 16px;
}

/* 主标题 */
.modal-main-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.3;
}

/* 介绍文字 */
.modal-intro-text {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
}

.modal-intro-text .text-highlight {
    color: #36c958;
    font-weight: 500;
}

/* ========= 服务卡片列表 ========= */
.modal-services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.modal-service-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #36c958, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-service-card:hover {
    background: rgba(54, 201, 88, 0.08);
    border-color: rgba(54, 201, 88, 0.3);
    transform: translateX(4px);
}

.modal-service-card:hover::before {
    opacity: 1;
}

.service-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(54, 201, 88, 0.15), rgba(54, 201, 88, 0.05));
    border: 1px solid rgba(54, 201, 88, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #36c958;
    transition: all 0.3s ease;
}

.modal-service-card:hover .service-card-icon {
    background: linear-gradient(135deg, rgba(54, 201, 88, 0.25), rgba(54, 201, 88, 0.1));
    border-color: rgba(54, 201, 88, 0.4);
    transform: scale(1.05);
}

.service-card-icon i {
    width: 24px;
    height: 24px;
}

.service-card-content h5 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    margin-top: 0;
}

.service-card-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ========= 快速联系方式 ========= */
.modal-quick-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(54, 201, 88, 0.03);
    border: 1px solid rgba(54, 201, 88, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quick-contact-item:hover {
    background: rgba(54, 201, 88, 0.08);
    border-color: rgba(54, 201, 88, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 201, 88, 0.15);
}

/* 强制设置图标颜色为绿色 */
.modal-quick-contact .quick-contact-item i {
    width: 20px;
    height: 20px;
    color: #36c958 !important;
}

/* 强制Lucide SVG图标显示为绿色 - 多层选择器确保优先级 */
.consultation-modal .modal-quick-contact .quick-contact-item i svg,
.consultation-modal .modal-quick-contact svg.lucide {
    stroke: #36c958 !important;
    fill: none !important;
    color: #36c958 !important;
}

.consultation-modal .modal-quick-contact .quick-contact-item i svg *,
.consultation-modal .modal-quick-contact svg.lucide * {
    stroke: #36c958 !important;
    fill: none !important;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-text .contact-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.contact-text a {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: #36c958;
}

/* ========= 右侧表单区域 ========= */
.modal-right-section {
    /* 使用负margin让区域延伸到容器边缘 */
    margin: -50px -50px -50px 0;
    /* 恢复padding以保持内容间距 */
    padding: 50px 35px 50px 35px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
}

.modal-form-wrapper {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-header {
    margin-bottom: 28px;
}

.form-header .form-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.2;
}

.form-header .form-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ========= 表单样式 ========= */
.modal-consultation-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.modal-consultation-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.modal-consultation-form .form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.modal-consultation-form .form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #36c958;
    box-shadow: 0 0 0 3px rgba(54, 201, 88, 0.2);
}

.modal-consultation-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* 下拉框样式 */
.modal-consultation-form select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    padding-right: 40px;
    cursor: pointer;
}

/* 下拉箭头 */
.modal-consultation-form .form-group:has(select)::after {
    content: '';
    position: absolute;
    right: 16px;
    bottom: 23px;
    transform: translateY(50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #36c958;
    pointer-events: none;
    z-index: 1;
}

/* 下拉框选项 */
.modal-consultation-form select.form-control option {
    background: #ffffff !important;
    background-image: none !important;
    color: #333333;
    padding: 12px 16px;
    font-size: 14px;
}

.modal-consultation-form select.form-control option:hover,
.modal-consultation-form select.form-control option:checked {
    background: #36c958 !important;
    color: #ffffff;
}

/* 验证码输入组 */
.form-group-verification .verification-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.verification-input-wrapper .form-control {
    flex: 1;
}

.verification-btn {
    flex-shrink: 0;
    padding: 14px 24px;
    background: rgba(54, 201, 88, 0.1);
    border: 1px solid rgba(54, 201, 88, 0.3);
    border-radius: 8px;
    color: #36c958;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.verification-btn:hover:not(:disabled) {
    background: rgba(54, 201, 88, 0.2);
    border-color: #36c958;
    box-shadow: 0 0 16px rgba(54, 201, 88, 0.3);
}

.verification-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========= 提交按钮 ========= */
.modal-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #36c958, #2da849);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.modal-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.modal-submit-btn:hover::before {
    left: 100%;
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(54, 201, 88, 0.4),
        0 0 30px rgba(54, 201, 88, 0.3);
}

.modal-submit-btn i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.modal-submit-btn:hover i {
    transform: translateX(4px);
}

/* ========= 表单提示 ========= */
.form-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.form-notice i {
    width: 16px;
    height: 16px;
    color: #36c958;
}

.form-notice span {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* ========= 响应式设计 ========= */
@media (max-width: 991px) {
    .modal-content-wrapper {
        padding: 40px 30px;
        min-height: 500px;
    }

    .modal-left-section {
        /* 调整负margin以匹配新的容器padding */
        margin: -40px 0 0 -30px;
        padding: 40px 30px 40px 30px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-right-section {
        /* 调整负margin以匹配新的容器padding */
        margin: 0 -30px -40px -30px;
        padding: 40px 30px 40px 30px;
    }

    .modal-main-title {
        font-size: 24px;
    }

    .consultation-modal .modal-container {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 767px) {
    .consultation-modal .modal-container {
        width: 96%;
        max-height: 92vh;
        border-radius: 12px;
    }

    .modal-content-wrapper {
        padding: 30px 20px;
        min-height: 400px;
        flex-direction: column;
    }

    .modal-left-section {
        /* 调整负margin以匹配移动端容器padding */
        margin: -30px -20px 0 -20px;
        padding: 30px 20px 30px 20px;
        align-items: flex-start;
    }

    .modal-right-section {
        /* 调整负margin以匹配移动端容器padding */
        margin: 0 -20px -30px -20px;
        padding: 30px 20px 30px 20px;
    }

    .modal-form-wrapper {
        max-width: 100%;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .modal-main-title {
        font-size: 22px;
    }

    .form-header .form-title {
        font-size: 22px;
    }

    .modal-intro-text {
        font-size: 14px;
    }

    .modal-service-card {
        padding: 16px;
    }

    .service-card-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .verification-btn {
        padding: 14px 16px;
        font-size: 13px;
    }
}

/* ========= 滚动条样式 ========= */
.consultation-modal .modal-container::-webkit-scrollbar {
    width: 8px;
}

.consultation-modal .modal-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.consultation-modal .modal-container::-webkit-scrollbar-thumb {
    background: #36c958;
    border-radius: 4px;
}

.consultation-modal .modal-container::-webkit-scrollbar-thumb:hover {
    background: #2da849;
}

/* ========= 防止背景滚动 ========= */
body.modal-open {
    overflow: hidden;
}
