/* ==================== Contact Modern Page Styles ==================== */

/* 确保样式优先级 */
.contact-modern-page {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 重置可能冲突的样式 */
.contact-modern-page * {
    box-sizing: border-box;
}

/* Contact Modern 页面的 container 样式 */
.contact-modern-page .contact-modern__content .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* 确保 footer 的 container 不受影响，在所有页面统一居中 */
body .footer .container,
body .foot-bottom .container {
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Hero Section 已删除 - Contact Us 页面不再使用 banner */

/* Main Content */
.contact-modern__content {
    background-color: #f8f8f8;
    padding: 15px 0;
    margin-top: 0; /* 为 fixed header 留出空间（因为删除了 hero section） */
}

.contact-modern__content.section-padding {
    padding: 80px 0;
}

/* 确保 row 和 col 正确对齐 */
.contact-modern-page .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    align-items: stretch;
}

.contact-modern-page [class*="col-"] {
    position: relative;
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
}

/* 确保 col-lg-5 和 col-lg-7 正确显示 */
@media screen and (min-width: 992px) {
    .contact-modern-page .col-lg-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    
    .contact-modern-page .col-lg-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
}

@media screen and (max-width: 991px) {
    .contact-modern-page .col-lg-5,
    .contact-modern-page .col-lg-7 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Contact Information Card */
.contact-modern__info {
    margin-bottom: 0;
}

.contact-modern__info-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    box-sizing: border-box;
}

.contact-modern__info-title {
    font-size: 32px;
    font-weight: 700;
    color: #202539;
    margin-bottom: 15px;
}

.contact-modern__info-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Contact Items */
.contact-modern__items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-modern__item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.contact-modern__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-modern__item-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #0059ff 0%, #214abb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccfdf;
    flex-shrink: 0;
}

.contact-modern__item-icon svg {
    width: 24px;
    height: 24px;
}

.contact-modern__item-content {
    flex: 1;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.contact-modern__item-title {
    font-size: 16px;
    font-weight: 600;
    color: #202539;
    margin: 0;
    margin-right: 8px;
    display: inline;
}

.contact-modern__item-title::after {
    content: ':';
    margin-left: 4px;
}

.contact-modern__item-link {
    font-size: 16px;
    color: #666;
    text-decoration: none;
    transition: var(--transition);
    display: inline;
}

.contact-modern__item-link:hover {
    color: #255cf3;
}

.contact-modern__item-text {
    font-size: 16px;
    color: #666;
    line-height: 1.4;
    margin: 0;
    display: inline;
}

/* Contact Form Card */
.contact-modern__form-wrapper {
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .contact-modern__form-wrapper {
        margin-top: 40px;
    }
}

.contact-modern__form-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    box-sizing: border-box;
}

.contact-modern__form-title {
    font-size: 32px;
    font-weight: 700;
    color: #202539;
    margin-bottom: 15px;
}

.contact-modern__form-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 35px;
}

/* Form Styles */
.contact-modern__form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-modern__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 767px) {
    .contact-modern__form-row {
        grid-template-columns: 1fr;
    }
}

.contact-modern__form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-modern__form-label {
    font-size: 14px;
    font-weight: 600;
    color: #202539;
}

.contact-modern__form-input,
.contact-modern__form-textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: #333;
    background-color: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    transition: var(--transition);
    font-family: inherit;
}

.contact-modern__form-input:focus,
.contact-modern__form-textarea:focus {
    outline: none;
    border-color: #174af1;
    background-color: #fff;
}

.contact-modern__form-textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-modern__form-submit {
    margin-top: 10px;
}

.contact-modern__form-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #202539;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-modern__form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.contact-modern__form-btn:active {
    transform: translateY(0);
}

.contact-modern__form-btn .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-modern__form-btn .btn-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==================== WPForms overrides (Contact Modern) ==================== */
/* 让 WPForms 表单在本模板里继承原先的表单风格（宽度/间距/按钮等） */
.contact-modern__form-card .wpforms-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.contact-modern__form-card .wpforms-container form.wpforms-form {
    width: 100%;
    max-width: 100%;
}

.contact-modern__form-card .wpforms-field-container {
    width: 100%;
}

/* 每个字段占满卡片宽度（修复你截图里的窄输入框） */
.contact-modern__form-card .wpforms-form .wpforms-field {
    width: 100%;
    max-width: 100%;
}

.contact-modern__form-card .wpforms-form .wpforms-field input[type="text"],
.contact-modern__form-card .wpforms-form .wpforms-field input[type="email"],
.contact-modern__form-card .wpforms-form .wpforms-field input[type="tel"],
.contact-modern__form-card .wpforms-form .wpforms-field input[type="url"],
.contact-modern__form-card .wpforms-form .wpforms-field select,
.contact-modern__form-card .wpforms-form .wpforms-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 18px;
    font-size: 15px;
    color: #333;
    background-color: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
}

.contact-modern__form-card .wpforms-form .wpforms-field input:focus,
.contact-modern__form-card .wpforms-form .wpforms-field select:focus,
.contact-modern__form-card .wpforms-form .wpforms-field textarea:focus {
    outline: none;
    border-color: #ffd700;
    background-color: #fff;
}

/* 标签风格对齐 */
.contact-modern__form-card .wpforms-form .wpforms-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #202539;
}

/* 间距对齐 */
.contact-modern__form-card .wpforms-form .wpforms-field {
    margin-bottom: 22px;
}

.contact-modern__form-card .wpforms-submit-container {
    margin-top: 10px;
    padding: 0;
}

/* 按钮风格对齐 */
.contact-modern__form-card .wpforms-container .wpforms-submit,
.contact-modern__form-card .wpforms-container button[type="submit"] {
    background: linear-gradient(135deg, #214fe7 0%, #3623da 100%);
    color: #202539;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-modern__form-card .wpforms-container .wpforms-submit:hover,
.contact-modern__form-card .wpforms-container button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* WPForms 默认提示/错误信息不挤压布局 */
.contact-modern__form-card .wpforms-error,
.contact-modern__form-card label.wpforms-error {
    font-size: 13px;
}

/* ==================== Map Section ==================== */

/* Map Section */
.contact-modern__map {
    width: 100%;
    background-color: #f8f8f8;
    padding: 0;
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.contact-modern__map-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.contact-modern__map-canvas {
    width: 100%;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8e8e8;
}

.contact-modern__map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 确保表单和卡片高度一致 */
.contact-modern-page .row {
    align-items: stretch;
}

.contact-modern__info-card,
.contact-modern__form-card {
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .contact-modern__info-card,
    .contact-modern__form-card {
        padding: 35px;
    }
}

@media (max-width: 991px) {
    .contact-modern__content {
        padding: 60px 0;
    }
    
    .contact-modern__info-title,
    .contact-modern__form-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .contact-modern__content {
        padding: 40px 0;
    }
    
    .contact-modern__info-card,
    .contact-modern__form-card {
        padding: 25px;
    }
    
    .contact-modern__info-title,
    .contact-modern__form-title {
        font-size: 24px;
    }
    
    .contact-modern__item {
        gap: 12px;
        padding-bottom: 15px;
    }
    
    .contact-modern__item-icon {
        width: 45px;
        height: 45px;
        min-width: 45px;
    }
    
    .contact-modern__item-content {
        line-height: 1.3;
    }
    
    .contact-modern__item-title {
        font-size: 15px;
    }
    
    .contact-modern__item-link,
    .contact-modern__item-text {
        font-size: 15px;
    }
    
    .contact-modern__map-canvas {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .contact-modern__info-card,
    .contact-modern__form-card {
        padding: 20px;
    }
    
    .contact-modern__form-btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-modern__map-canvas {
        height: 300px;
    }
}

/* ==================== Contact Modern Overrides ==================== */
/* Hero section 已删除 */

.contact-modern__item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 16px;
    align-items: center;
    padding-bottom: 20px;
}

.contact-modern__item-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
}

.contact-modern__item-content {
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.contact-modern__map-canvas {
    height: 320px;
}

@media (max-width: 767px) {
    .contact-modern__item {
        grid-template-columns: 52px 1fr;
        gap: 12px;
    }

    .contact-modern__item-icon {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }

    .contact-modern__map-canvas {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .contact-modern__map-canvas {
        height: 200px;
    }
}

