/* ==========================================
   CroWebsite - Contact Page Styles (联系页面样式)
   ========================================== 
   
   文件结构：
   1. 页面背景和布局
   2. 联系表单样式
   3. 联系信息卡片
   4. 地图和媒体元素
   5. 响应式设计
   6. 隐私政策模态窗口样式
   
   作者：CroWebsite Team
   最后更新：2025年6月17日
   版本：v2.0
   ========================================== */

/* ==========================================
   1. PAGE BACKGROUND & LAYOUT
   ========================================== */

/* 页面背景设置 */
.page-contact {
    position: relative;
    min-height: 100vh;
}

.page-contact::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/images/hippopx.com.jpg') no-repeat;
    background-size: cover;
    background-position: center center;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
    /* 平滑过渡效果 */
    transition: opacity 0.8s ease-in-out;
    /* GPU加速 */
    will-change: opacity;
    transform: translate3d(0, 0, 0);
}

/* 添加渐变遮罩层 */
.page-contact::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.92) 50%, rgba(241, 245, 249, 0.95) 100%);
    z-index: -1;
    pointer-events: none;
}

/* 联系页面背景优化 - 基础样式已移至 styles.css */
.page-contact main.container {
    border-radius: 20px;
    /* 页面特有：更大的圆角 */
    margin: 1rem auto;
    /* 页面特有：自动居中 */
    max-width: 1200px;
    /* 页面特有：最大宽度限制 */
}

/* Contact页面特有样式 - 基础样式已移至 styles.css */
.page-contact main.container {
    margin-top: 0;
    /* 页面特有：无顶部外边距 */
}

/* ==========================================
   2. CONTACT FORM STYLES
   ========================================== */

/* 卡片透明度优化 */
.page-contact .card {
    background-color: rgba(255, 255, 255, 0.85);
}

/* ==========================================
   3. CONTACT INFO CARDS
   ========================================== */

/* 右侧卡片容器 - 为高度同步做准备 */
.page-contact .right-cards-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 联系信息卡片 */
.page-contact .contact-info-card {
    flex: 0 0 auto;
    margin-bottom: 1.5rem;
}

/* 地图卡片 */
.page-contact .map-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.page-contact .map-card .card-body {
    flex: 1;
}

/* 联系信息卡片内容布局 */
.page-contact .contact-info-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

.page-contact .contact-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.05), rgba(0, 191, 255, 0.02));
    border-left: 4px solid #1e90ff;
    transition: all 0.3s ease;
}

.page-contact .contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 144, 255, 0.1);
}

.page-contact .contact-item:last-child {
    margin-bottom: 0;
}

.page-contact .contact-item h5 {
    color: #1e90ff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.page-contact .contact-item p {
    margin-bottom: 0;
    color: #495057;
    line-height: 1.6;
}

/* ==========================================
   4. MAP & MEDIA ELEMENTS
   ========================================== */

.page-contact .map-container {
    height: 100%;
    min-height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-contact #baidu-map-gl {
    width: 100%;
    height: 100%;
}

/* 地图加载指示器 */
.page-contact .map-loading {
    color: #6c757d;
    font-size: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.page-contact .map-loading .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: contact-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes contact-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================
   5. RESPONSIVE DESIGN
   ========================================== */

/* Contact页面响应式设计 - 导航栏样式已移至 styles.css */

/* ==========================================
   6. PRIVACY POLICY MODAL STYLES
   ========================================== */

.privacy-content h6 {
    color: #1e90ff;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 0.5rem;
}

.privacy-content h6:first-child {
    margin-top: 0;
}

.privacy-content ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.privacy-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.privacy-content p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #495057;
}

.modal-header .modal-title {
    color: #1e90ff;
    font-weight: 600;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid #e3f2fd;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 2px solid #e3f2fd;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 0 0 15px 15px;
}

/* ==========================================
   7. RESPONSIVE HEIGHT ADJUSTMENTS
   ========================================== */

/* 平板设备高度调整 */
@media (max-width: 1024px) and (min-width: 992px) {
    .page-contact .map-container {
        min-height: 300px;
    }
}

/* 平板设备及以下 - 重置高度同步 */
@media (max-width: 991px) {
    .page-contact .right-cards-container {
        height: auto !important;
    }

    .page-contact .contact-info-card {
        margin-bottom: 1.5rem;
    }

    .page-contact .map-container {
        height: 350px;
        min-height: 350px;
    }
}

/* 移动设备高度调整 */
@media (max-width: 768px) {
    .page-contact .map-container {
        height: 300px;
        min-height: 300px;
        border-radius: 8px;
    }

    .page-contact .contact-info-card .card-body {
        padding: 1.5rem;
    }

    .page-contact .contact-item {
        margin-bottom: 1.25rem;
        padding: 0.75rem;
    }

    .page-contact .contact-item h5 {
        font-size: 1rem;
    }

    .page-contact .contact-item p {
        font-size: 0.9rem;
    }
}

/* 小屏幕设备进一步优化 */
@media (max-width: 576px) {
    .page-contact .map-container {
        height: 250px;
        min-height: 250px;
    }

    .page-contact .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .page-contact .contact-item .me-3 {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}