/* ===== contact.css - 联系我们页面样式 ===== */

/* 页面头部 */
.contact-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.contact-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 联系方式网格 */
.contact-info-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.hours {
    font-size: 0.85rem;
    color: var(--text-lighter);
    margin-top: 8px;
}

/* 联系表单区域 */
.contact-form-section {
    padding: 60px 0;
}

.form-map-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: stretch;
}

/* 表单样式 */
.contact-form-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-form-wrapper > p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group .required {
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-primary.btn-large {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* 地图区域 */
.map-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.map-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

.map-address {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-light);
}

.map-address i {
    color: var(--primary);
}

/* 部门联系方式 */
.departments-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.department-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.department-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.dept-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.dept-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dept-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.dept-contact a:hover {
    color: var(--primary);
}

.dept-contact i {
    width: 20px;
    color: var(--primary);
}

/* FAQ CTA 区域 */
.faq-cta-section {
    padding: 60px 0;
    background: white;
}

.faq-cta-content {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(215,23,24,0.05) 100%);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.faq-cta-text h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.faq-cta-text p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.faq-cta-icon i {
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.6;
}

/* 响应式 */
@media (max-width: 1200px) {
    .contact-grid,
    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .form-map-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-wrapper,
    .map-wrapper {
        order: unset;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 40px 0;
    }

    .contact-hero h1 {
        font-size: 1.8rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .departments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .faq-cta-content {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .faq-cta-icon i {
        font-size: 3rem;
    }
}

.btn-primary {
    background: var(--primary);      /* 红色背景 #d71718 */
    color: white;                    /* 白色文字 */
    padding: 12px 30px;              /* 内边距 */
    border-radius: 30px;             /* 圆角 */
    text-decoration: none;           /* 无下划线 */
    font-weight: 600;                /* 加粗 */
    transition: all 0.3s;            /* 过渡动画 */
    display: inline-block;           /* 行内块 */
    border: none;                    /* 无边框 */
    cursor: pointer;                 /* 手型光标 */
}

.btn-primary:hover {
    background: var(--primary-dark); /* 悬停时深红色 */
    transform: translateY(-2px);     /* 向上移动2px */
    box-shadow: 0 4px 12px rgba(215,23,24,0.3); /* 阴影 */
}

.site-footer{
    margin-top: 0;
}

/* 错误高亮样式 */
#contactForm .form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* ===== Toast 通知样式 ===== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-notification {
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.show {
    transform: translateX(0);
    animation: slideIn 0.3s ease forwards;
}

.toast-notification .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-notification .toast-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-notification.success .toast-content {
    background: #d4edda;
    color: #155724;
}

.toast-notification.success .toast-content i {
    color: #28a745;
}

.toast-notification.error .toast-content {
    background: #f8d7da;
    color: #721c24;
}

.toast-notification.error .toast-content i {
    color: #dc3545;
}

.toast-notification .toast-progress {
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    animation: progress 3s linear forwards;
}

.toast-notification.success .toast-progress {
    background: #28a745;
}

.toast-notification.error .toast-progress {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 80px;
        right: 16px;
        left: 16px;
    }

    .toast-notification {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.contact-form {
    flex: 1;
    min-width: 280px;
}
.map-container {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}
.map-container iframe {
    width: 100%;
    height: 400px;   /* 调整此数值控制地图高度 */
    border-radius: 8px;
}
.map-address {
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}
