/* contact.css - 联系页面特定样式 */

/* 页面标题区域 */
.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* 联系卡片 */
.contact-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.contact-card:nth-child(1) {
    border-top-color: #dc3545;
}

.contact-card:nth-child(2) {
    border-top-color: #0d6efd;
}

.contact-card:nth-child(3) {
    border-top-color: #198754;
}

.contact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info p {
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 联系表单样式 */
#contactForm .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

#contactForm .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

#contactForm .form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

#contactForm .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* 地图容器 */
#map {
    width: 100%;
    z-index: 1;
}

.contact-map {
    height: 300px;
    border-radius: 0 0 8px 8px;
}

.leaflet-container {
    font-family: inherit;
}

/* 分支机构卡片 */
.branch-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    height: 100%;
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.branch-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.branch-flag {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.branch-body p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

/* 紧急联系区域 */
.emergency-section {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    position: relative;
    overflow: hidden;
}

.emergency-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/contact/emergency-pattern.png') repeat;
    opacity: 0.1;
    z-index: 0;
}

.emergency-section .container {
    position: relative;
    z-index: 1;
}

.emergency-contact .display-6 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* 常见问题链接卡片 */
.faq-link-card {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.faq-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: #0d6efd;
}

.faq-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #0d6efd;
}

.faq-link-card:hover .faq-icon {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

/* 表单验证样式 */
.was-validated .form-control:valid,
.was-validated .form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.was-validated .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-card {
        margin-bottom: 20px;
    }
    
    .emergency-section .display-6 {
        font-size: 2rem;
    }
    
    .branch-card {
        margin-bottom: 20px;
    }
    
    .faq-link-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .emergency-contact .display-6 {
        font-size: 1.75rem;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-icon i {
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-card,
.branch-card,
.faq-link-card {
    animation: fadeInUp 0.6s ease forwards;
}

.contact-card:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-card:nth-child(3) {
    animation-delay: 0.4s;
}