/* 联系我们页面专用样式 */

/* 联系信息 */
.contact-info {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-card {
    background-color: var(--light-gray);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-10px);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #9a7a01);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.contact-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 20px;
}

.contact-card .btn-primary {
    margin-top: 10px;
}

.contact-card .qr-code {
    margin-top: 20px;
}

.qr-image {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
}

.qr-placeholder {
    width: 120px;
    height: 120px;
    background-color: var(--white);
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--text-body);
    font-size: 0.9rem;
}

/* 地图区域 */
.map-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.map-container {
    margin-top: 50px;
}

.map-placeholder {
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.map-content h3 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.map-content p {
    color: var(--text-body);
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-align: center;
}

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

.info-item {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: 10px;
}

.info-item strong {
    color: var(--primary-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 15px;
}

.info-item p {
    color: var(--text-body);
    margin-bottom: 8px;
    text-align: left;
}

/* 在线留言表单 */
.contact-form-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-subtitle {
    text-align: center;
    color: var(--text-body);
    font-size: 1.2rem;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--light-gray);
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-body);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 3px;
}

.privacy-link {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-link:hover {
    text-decoration: underline;
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

.form-submit .btn-primary {
    padding: 15px 50px;
    font-size: 1.1rem;
}

/* 常见问题 */
.faq-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.faq-list {
    max-width: 800px;
    margin: 50px auto 0;
}

.faq-item {
    background-color: var(--white);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: var(--light-gray);
}

.faq-question h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin: 0;
}

.faq-toggle {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--light-gray);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 30px 25px;
}

.faq-answer p {
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 15px;
}

.faq-answer ul {
    list-style: none;
    padding-left: 0;
}

.faq-answer li {
    padding: 5px 0;
    color: var(--text-body);
    position: relative;
    padding-left: 20px;
}

.faq-answer li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .contact-card {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .map-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .map-placeholder {
        padding: 25px 20px;
    }
    
    .faq-question {
        padding: 20px;
    }
    
    .faq-answer-content {
        padding: 0 20px 20px;
    }
}

@media (max-width: 480px) {
    .contact-card {
        padding: 25px 15px;
    }
    
    .contact-icon {
        font-size: 2.5rem;
    }
    
    .contact-form {
        padding: 25px 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
    }
    
    .map-content h3 {
        font-size: 1.5rem;
    }
    
    .map-content p {
        font-size: 1rem;
    }
}

/* 表单验证样式 */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.form-group .error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* 成功消息样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.message-success {
    background-color: #27ae60;
}

.message-error {
    background-color: #e74c3c;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载状态 */
.form-submit .btn-primary.loading {
    position: relative;
    color: transparent;
}

.form-submit .btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
