/* ============================================================
   联系我们页面专用样式 (contact.css)
   复用 style.css 的 CSS 变量
============================================================ */

/* 页面整体深色底色（覆盖 body 默认浅色） */
.main-content {
    background: #1c1c1e;
}

/* ---------- 1. Hero：订阅我们的新闻 ---------- */
.contact-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
}

.contact-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.contact-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9), rgba(28, 28, 30, 0.78));
    z-index: 1;
}

.contact-hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    width: 100%;
    padding: 100px 40px;
}

.contact-hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.contact-hero p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 32px;
    opacity: 0.92;
}

/* 订阅表单 */
.contact-subscribe-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.contact-subscribe-row {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 520px;
}

.contact-subscribe-input {
    flex: 1;
    height: 46px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #333333;
    outline: none;
}

.contact-subscribe-input::placeholder {
    color: #999999;
}

.contact-subscribe-btn {
    min-width: 120px;
    height: 42px;
    padding: 0 30px;
    border: none;
    border-radius: 21px;
    background: #ffffff;
    color: var(--primary-color, #0b2a6b);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.contact-subscribe-btn:hover {
    background: var(--accent-color, #f5b800);
    color: #ffffff;
}

/* 联系客服按钮：蓝渐变胶囊 + 客服图标 + 悬浮上浮动效 */
.contact-service-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    height: 48px;
    padding: 0 34px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: linear-gradient(135deg, #2b4bb8 0%, #3d5bbd 55%, #4f8ff7 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    box-shadow: 0 10px 24px rgba(43, 75, 184, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.contact-service-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(43, 75, 184, 0.5);
    filter: brightness(1.08);
    color: #ffffff;
}

.contact-service-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ---------- 2. 客户的声音 ---------- */
.contact-voices {
    padding: 80px 8%;
    background: #1c1c1e;
}

.contact-section-head {
    text-align: center;
    margin-bottom: 50px;
}

.contact-section-head h2 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.contact-section-head p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.contact-section-head.light h2,
.contact-section-head.light p {
    color: #ffffff;
}

.contact-voice-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-voice-card {
    display: grid;
    grid-template-columns: 44% 56%;
    align-items: stretch;
    background: #2c2c2e;
    border-radius: var(--radius, 10px);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-voice-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* 偶数卡片图片在右、文字在左 */
.contact-voice-card:nth-child(even) {
    direction: rtl;
}

.contact-voice-card:nth-child(even) > * {
    direction: ltr;
}

.contact-voice-img {
    min-height: 260px;
    overflow: hidden;
}

.contact-voice-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.contact-voice-card:hover .contact-voice-img img {
    transform: scale(1.05);
}

.contact-voice-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 52px;
}

.contact-voice-text h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.contact-voice-text p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.9;
}

/* ---------- 3. 联系我们：表单 + 联系信息 ---------- */
.contact-main {
    padding: 80px 8%;
    background: #1c1c1e;
    color: #ffffff;
}

.contact-section-head.light p {
    color: rgba(255, 255, 255, 0.65);
}

.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
}

/* 联系表单 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-input,
.contact-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #48484a;
    border-radius: 8px;
    background: #3a3a3c;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    caret-color: #ffffff;
    outline: none;
    transition: border-color 0.3s ease;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

/* 输入文字选中时保持亮色 */
.contact-input::selection,
.contact-textarea::selection {
    background: rgba(61, 91, 189, 0.55);
    color: #ffffff;
}

/* Chrome/Safari 自动填充：强制保持深色背景 + 亮白文字，避免浅底黑字看不清 */
.contact-input:-webkit-autofill,
.contact-input:-webkit-autofill:hover,
.contact-input:-webkit-autofill:focus,
.contact-textarea:-webkit-autofill,
.contact-textarea:-webkit-autofill:hover,
.contact-textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0 1000px #3a3a3c inset;
    transition: background-color 9999s ease-in-out 0s;
}

.contact-input:focus,
.contact-textarea:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.contact-textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-submit-btn {
    align-self: center;
    min-width: 120px;
    height: 40px;
    padding: 0 32px;
    border: none;
    border-radius: 20px;
    background: #ffffff;
    color: #1c1c1e;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-submit-btn:hover {
    background: #e5e5e5;
}

/* 联系信息 */
.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
    padding: 0;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-info-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
}

.contact-info-text p {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- 4. 滚动渐入动画 ---------- */
.contact-reveal {
    opacity: 0;
}

.contact-reveal.contact-reveal-visible {
    animation: contactRevealUp 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes contactRevealUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-reveal {
        opacity: 1;
    }

    .contact-reveal.contact-reveal-visible {
        animation: none;
    }
}

/* ---------- 5. 响应式 ---------- */
@media (max-width: 1100px) {
    .contact-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contact-hero h1 {
        font-size: 30px;
    }

    .contact-hero-content {
        padding: 80px 24px;
    }

    .contact-hero p {
        font-size: 15px;
    }

    .contact-subscribe-row {
        flex-direction: column;
    }

    .contact-voices,
    .contact-main {
        padding: 60px 6%;
    }

    .contact-voice-card {
        grid-template-columns: 1fr;
    }

    .contact-voice-card:nth-child(even) {
        direction: ltr;
    }

    .contact-voice-img {
        min-height: 220px;
    }

    .contact-voice-text {
        padding: 28px 26px;
    }
}
