/* 联系页面专用样式 */
.contactpage {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.contact-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.contact-container h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.contact-container h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
    border-radius: 2px;
}

/* 联系网格布局 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* 联系信息卡片 */
.contact-info {
    display: flex;
    flex-direction: column;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
}

.info-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.info-card p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 联系详情 */
.contact-details {
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 10px;
    transition: background-color 0.3s;
}

.detail-item:hover {
    background-color: #f8f9fa;
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon i {
    color: white;
    font-size: 1.2rem;
}

.detail-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.detail-content p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.detail-content a {
    color: #009688;
    text-decoration: none;
    transition: color 0.3s;
}

.detail-content a:hover {
    color: #00796b;
    text-decoration: underline;
}

.note {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-top: 5px;
}

/* 社交联系 */
.social-contact h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #666;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.social-icons a:hover {
    background: #009688;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 150, 136, 0.3);
}

/* 联系表单容器 */
.contact-form-container {
    display: flex;
    flex-direction: column;
}

.form-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.form-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

/* 警告消息 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert i {
    font-size: 1.2rem;
}

/* 表单样式 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #009688;
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 字符计数 */
.char-count {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* reCAPTCHA 样式 */
.g-recaptcha {
    margin: 10px 0;
}

/* 提交按钮 */
.btn-submit {
    background: linear-gradient(135deg, #009688, #4DB6AC);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 150, 136, 0.3);
}

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

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-note {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

/* FAQ 部分 */
.contact-faq {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.contact-faq h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.contact-faq h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
    border-radius: 2px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #009688;
    margin-bottom: 15px;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .contact-grid {
        gap: 30px;
    }
    
    .info-card,
    .form-card {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .contact-container {
        padding: 0 15px;
    }
    
    .contact-container h1 {
        font-size: 2.2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .info-card,
    .form-card {
        padding: 25px;
    }
    
    .contact-faq {
        padding: 30px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-faq h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .contact-container h1 {
        font-size: 1.8rem;
    }
    
    .info-card,
    .form-card {
        padding: 20px;
    }
    
    .contact-faq {
        padding: 20px;
    }
    
    .contact-faq h2 {
        font-size: 1.5rem;
    }
    
    .detail-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .detail-icon {
        align-self: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .contactpage {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .contact-container h1,
    .form-card h2,
    .info-card h2,
    .contact-faq h2,
    .detail-content h3,
    .social-contact h3,
    .form-group label {
        color: #e0e0e0;
    }
    
    .info-card,
    .form-card,
    .contact-faq {
        background: #1e1e1e;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .info-card p,
    .detail-content p,
    .form-note,
    .char-count {
        color: #b0b0b0;
    }
    
    .detail-item:hover {
        background-color: #252525;
    }
    
    .faq-item {
        background: #252525;
    }
    
    .faq-item p {
        color: #b0b0b0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #009688;
        box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.2);
    }
    
    .social-icons a {
        background: #2a2a2a;
        color: #b0b0b0;
    }
    
    .alert-success {
        background: #1b4332;
        color: #d8f3dc;
        border-left-color: #2d6a4f;
    }
    
    .alert-error {
        background: #3c1516;
        color: #ffb3c1;
        border-left-color: #a4161a;
    }
}

/* 打印样式 */
@media print {
    .contactpage {
        background: white;
        color: black;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card,
    .form-card,
    .contact-faq {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn-submit,
    .social-icons,
    .g-recaptcha {
        display: none;
    }
    
    .contact-container h1,
    .form-card h2,
    .info-card h2,
    .contact-faq h2 {
        color: black;
    }
    
    .contact-container h1::after,
    .contact-faq h2::after {
        background: black;
    }
}