﻿/* ==========================================================================
   底部样式 - Footer Styles
   ========================================================================== */

/* 底部主容器 */
.footer {
    background-color: #105E8C;
    color: #ffffff;
    padding: 3.5rem 0 2rem;
    width: 100%;
    position: relative;
}

.footer-chat {
    position: sticky;
    bottom: 250px;
    z-index: 1000;
    background-color: #126595a9;
    font-size: 20px;
    padding: 7px 21px;
    border-radius: 38px;
    display: flex;
    align-items: center;
    font-weight: 100;
    cursor: pointer;
    /* 确保在footer出现时，chat元素会向上移动 */
    transition: bottom 0.3s ease;
    margin-left: 66vw;
    bottom: 30vw;
    color: #fff;
}

.footer-chat-btn {
    cursor: pointer;
}

.footer-chat:hover {
    background-color: #1c88c796;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 底部内容区域 */
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

/* 底部各个区块 */
.footer-section {
    display: flex;
    flex-direction: column;
}

/* 底部标题 */
.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
    line-height: 1.4;
}

.about-title {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* 底部描述文字 */
.footer-description {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: #ffffff;
    opacity: 0.9;
}

/* 邮件订阅表单 */
.newsletter-form {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    display: flex;
    border: 1px solid #ffffff;
    border-radius: 20px;
    overflow: hidden;
    max-width: 309px;
    height: 40px;
}

.newsletter-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #ffffff;
    padding: 0 1rem;
    font-size: 0.875rem;
    outline: none;
}

.newsletter-input::placeholder {
    color: #ffffff;
    opacity: 0.7;
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-btn {
    background-color: #ffffff;
    color: #245D9C;
    border: none;
    padding: 0 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
    margin: -1px;
}

.newsletter-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.newsletter-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* 社交媒体链接 */
.social-media {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    width: 150px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

.social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 底部链接列表 */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    opacity: 0.9;
}

.footer-link:hover {
    color: #ffffff;
    opacity: 1;
    text-decoration: underline;
}

.footer-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* 底部Logo区域 */
.footer-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 2rem;
}

.footer-logo img {
    max-width: 237px;
    height: auto;
    transition: transform 0.3s ease;
}

.footer-logo:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   响应式设计 - Responsive Design
   ========================================================================== */

/* 平板设备 */
@media screen and (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 1.5rem;
    }
    
    .privacy-section {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    .footer-container {
        padding: 0 15px;
    }

}

/* 小屏平板 */
@media screen and (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }
    
    .footer {
        padding: 2.5rem 0 1.5rem;
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-section {
        grid-column: 1 / -1;
        margin-bottom: 1rem;
    }
    
    .privacy-section {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    .footer-bottom {
        justify-content: center;
        padding-top: 1.5rem;
    }
    
    .input-wrapper {
        max-width: 100%;
    }
    
    .social-media {
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .footer-container {
        padding: 0 12px;
    }

}

/* 手机设备 */
@media screen and (max-width: 480px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-section,
    .support-section,
    .offers-section,
    .privacy-section {
        grid-column: 1;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .about-title {
        margin-top: 1rem;
    }
    
    .input-wrapper {
        height: 44px; /* 增加触摸友好性 */
    }
    
    .newsletter-input {
        font-size: 1rem; /* 防止iOS缩放 */
    }
    
    .newsletter-btn {
        padding: 0 1rem;
        font-size: 0.9rem;
    }
    
    .social-media {
        gap: 1.2rem;
        margin-top: 1rem;
    }
    
    .social-link {
        width: 28px;
        height: 28px;
    }
    
    .footer-links li {
        margin-bottom: 0.8rem;
    }
    
    .footer-links-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-link {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .footer-bottom {
        padding-top: 1rem;
    }
    
    .footer-logo img {
        max-width: 180px;
    }
    
    .footer-container {
        padding: 0 10px;
    }
    

}

/* 超小屏幕设备 */
@media screen and (max-width: 360px) {
    .footer {
        padding: 1.5rem 0 0.8rem;
    }
    
    .footer-content {
        gap: 1.2rem;
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .newsletter-btn {
        padding: 0 0.8rem;
        font-size: 0.8rem;
    }
    
    .social-media {
        gap: 1rem;
    }
    
    .social-link {
        width: 24px;
        height: 24px;
    }
    
    .footer-logo img {
        max-width: 150px;
    }
    
    .footer-container {
        padding: 0 8px;
    }

}

/* 高分辨率屏幕优化 */
@media screen and (min-width: 1400px) {
    .footer-container {
        max-width: 1400px;
        padding: 0 40px;
    }
    
    .footer-content {
        gap: 3rem;
    }
}

/* 打印样式 */
@media print {
    .footer {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none;
    }
    
    .newsletter-form,
    .social-media {
        display: none;
    }
    
    .footer-link {
        color: #000 !important;
        text-decoration: underline;
    }
    
    .footer-logo img {
        filter: grayscale(100%);
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    .newsletter-btn,
    .social-link,
    .footer-link,
    .footer-logo img {
        transition: none;
    }
    
    .newsletter-btn:hover,
    .social-link:hover {
        transform: none;
    }
    
    .footer-logo:hover img {
        transform: none;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .footer {
        border-top: 2px solid #000;
    }
    
    .input-wrapper {
        border: 2px solid #ffffff;
    }
    
    .newsletter-btn {
        border: 2px solid #245D9C;
    }
    
    .footer-bottom {
        border-top: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* 旧的CSS类已被新的响应式类替代 */

/* 弹窗基础样式 */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}



@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 模态框头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

/* 模态框主体 */
.modal-body {
    padding: 24px;
}

/* 表单样式 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-group.half-width {
    flex: 1;
    min-width: 200px;
}

.form-group.full-width {
    width: 100%;
}

.form-label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82c4;
    box-shadow: 0 0 0 3px rgba(59, 130, 196, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 表单按钮 */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.submit-btn {
    background: #126495;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 140px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 196, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px auto;
        width: 95%;
        max-height: calc(100vh - 40px);
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-group.half-width {
        min-width: auto;
    }
    
    .form-input,
    .form-textarea {
        padding: 10px 12px;
    }
    
    .submit-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: calc(100% - 20px);
        border-radius: 8px;
    }
    
    .modal-header,
    .modal-body {
        padding: 12px;
    }
    
    .contact-form {
        gap: 16px;
    }
    
    .form-input,
    .form-textarea {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 显示模态框 */
.contact-modal.show {
    display: block;
}

/* 加载状态 */
.submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}