.contact-main {
    max-width: 1400px;
    margin: calc(var(--nav-height)) auto 20px;
    padding: 0 20px;
    flex: 1; /* 撑满剩余空间 */
    transition: margin-top 0.3s ease;
}

/* 默认的 :root 变量 */
@media (min-width: 769px) {
    :root {
      --nav-height: 70px;
      --footer-height: 60px;
    }
  }

.contact-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px auto;
    max-width: 1400px;
}

.contact-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.contact-card i {
    font-size: 24px;
    color: #2c7be5;
    margin-right: 20px;
    min-width: 24px;
}

.contact-card h3 {
    color: #2c7be5;
    margin-bottom: 8px;
    font-size: 18px;
}

.contact-card p {
    color: #555;
    margin: 15px 0;
    line-height: 1.5;
}

/* 第二排调整后布局 */
.contact-card:nth-child(5) {
    grid-column: span 2;
}
.contact-card:nth-child(6) {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .contact-cards {
        grid-template-columns: 1fr;
    }
    .contact-card:nth-child(n) {
        grid-column: auto !important;
    }
}

/* 百度地图容器样式 */
#company-map {
    height: 600px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    #company-map {
        height: 300px;
        border-radius: 8px;
    }
}

.welcome-text {
    text-align: center;
    font-size: 25px;
    color: #6d6f72;
    font-weight: bold;
    margin: 20px 0 20px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .welcome-text {
        font-size: 16px;
    }
}


/* 微信二维码图片样式 */
.contact-card img {
    max-width: 60px !important;
    height: auto;
    margin-right: 50px;
    margin-left: 50px;
}

@media (max-width: 768px) {
    .contact-card img {
        max-width: 60px !important;
        margin-right: 50px;
        margin-left: 80px;
    }
    .contact-card {
        justify-content: flex-start;
        padding: 20px 15px;
    }
    .contact-card i {
        margin-right: 15px;
    }
}