/* 联系我们部分的整体容器 */
.contact-section {
    width: 100%;
    position: sticky;
}

/* 全宽渐变色区域 - 高度根据内容自适应 */
.contact-gradient-full {
    width: 100%;
    position: relative;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(235, 241, 249, 1));
}

/* 背景图 - 限制在80%和1536px内 */
.contact-bg-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1536px;
    height: 100%;
    background-image: url('../images/home-contact-background.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* 内容区域 - 限制在80%和1536px内 */
.contact-content {
    position: relative;
    z-index: 2;
    padding: 60px 20px 0px 20px;
    color: #333;
    width: 80%;
    max-width: 1536px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    margin-bottom: 40px;
    text-align: center;
}

.contact-title {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    /* 标题居中 */
}

.contact-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 55px;
    text-align: center;
    font-weight: 300;
}

.contact-details {
    display: flex;
    justify-content: center;
    /* 居中对齐 */
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
    /* 文字居中 */
}

.contact-detail-item {
    display: flex;
    align-items: center;
    min-width: 250px;
    justify-content: center;
    /* 居中对齐 */
}

.contact-detail-icon {
    /* color: #009F71; */
    /* font-size: 1.5em; */
    margin-right: 15px;
    width: 30px;
    /* min-width: 30px; */
    /* text-align: center; */
}

.contact-detail-text {
    color: #333;
    font-size: 1.1em;
    text-align: center;
    font-weight: 300;
    letter-spacing: 2px;
    position: relative;
    top: 8px;
}

/* 全宽纯黑色区域 - 紧接在渐变色区域下方 */
.contact-black-full {
    background-color: #000000;
    width: 100%;
    height: 100px;
    position: relative;
    z-index: 3;
}

/* 表单区域 - 浮动在两个背景色上方，使用bottom定位 */
.contact-form-area {
    position: relative;
    bottom: -100px;
    background-color: #009F71;
    border-radius: 50px;
    padding: 100px 150px 50px 150px;
    width: 80%;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    flex: 1;
    margin-bottom: 0;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5em;
}

.form-field.full-width {
    width: 100%;
}

.form-submit {
    text-align: center;
    margin-top: 20px;
}

.submit-button {
    background-color: #009F71;
    /* 按钮底色 */
    color: #FFFFFF;
    /* 文字颜色 */
    border: 2px solid #FFFFFF;
    /* 边框颜色 */
    padding: 12px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    background-color: rgba(255, 255, 255, 0.5);
    -webkit-transition: all 0.4s;
    -moz-transition: all 0.4s;
    -o-transition: all 0.4s;
    transition: all 0.4s;
    -webkit-transform: scale(0.2, 1);
    transform: scale(0.2, 1);
}

.submit-button:hover::before {
    opacity: 1;
    -webkit-transform: scale(1, 1);
    transform: scale(1, 1);
}

.submit-button:hover {
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 1500px) {
    .contact-bg-image {
        top: -10%;
    }
}

@media (max-width: 1200px) {
    .contact-bg-image {
        top: -15%;
    }
}

@media (max-width: 991px) {
    .contact-bg-image {
        width: 100%;
        background-position: unset;
        top: 0;
    }

    .contact-content {
        width: 100%;
        padding: 40px 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-details {
        gap: 15px;
        display: flex;
        align-items: center;
        gap: 20px;
        text-align: center;
        display: flex;
        align-items: flex-start;
        gap: 20px;
        text-align: center;
        flex-direction: column;
        justify-content: center;
    }

    .contact-detail-item {
        min-width: auto;
    }

    .contact-form-area {
        width: 90%;
        padding: 40px;
        border-radius: 30px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .contact-title {
        font-size: 1.6em;
    }

    .contact-info {
        margin-bottom: 0px;
    }
}

@media (max-width: 768px) {
    .contact-gradient-full {
        padding: 40px 0;
    }

    .contact-bg-image {
        width: 100%;
        background-position: unset;
        background-size: contain;
        top: 5%;
    }

    .contact-content {
        width: 100%;
        padding: 40px 15px;
    }

    .contact-form-area {
        width: 90%;
        padding: 40px;
        border-radius: 25px;
    }

    .contact-black-full {
        height: 120px;
    }

    .contact-title {
        font-size: 1.5em;
    }

    /* .contact-details {
        flex-direction: column;
        align-items: center;
    } */

    .contact-detail-item {
        justify-content: center;
        margin-bottom: 15px;
    }

    /* .form-row {
        flex-direction: column;
        gap: 0;
    } */
}

@media (max-width: 576px) {
    .contact-bg-image {
        top: 8%;
    }

    .contact-content {
        padding: 30px 10px;
        top: 60px;
    }

    .contact-title {
        font-size: 1.3em;
    }

    .contact-subtitle {
        font-size: 1em;
    }

    .contact-detail-item {
        flex-direction: row;
        text-align: center;
    }

    .contact-detail-text {
        /* font-size: 0.7em; */
    }

    .contact-detail-icon {
        font-size: 1em;
        margin-right: 15px;
        margin-bottom: 0;
    }

    .contact-form-area {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .submit-button {
        padding: 10px 30px;
        font-size: 16px;
    }
}

/* 发送动画样式 */
.sending-animation {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 居中显示 */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    z-index: 99999;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    text-align: center;
}

/* 居中显示 */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f44336;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    z-index: 9999;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    text-align: center;
}