/* =========================================
   Contact Section - 联系我们组件样式
   ========================================= */

#contact {
    position: relative;
    min-height: 528px;
    background-image: url('../images/footer_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 73px 165px 0;
}

/* 内容区域 */
.contact-content {
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
    min-height: 379px;
}

/* 左侧内容 */
.contact-left {
    max-width: 780px;
}

/* "联系我们"标签 */
.contact-label {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25em;
    color: #FFFFFF;
    margin-bottom: 24px;
    display: block;
}

/* 主标题 */
.contact-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.33em;
    color: #FFFFFF;
    margin-bottom: 23px;
}

/* 信息列表 */
.contact-grid-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-grid-info > div {
    display: flex;
    height: 40px;
    align-items: center;
}

.ci-label {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    min-width: 100px;
    flex-shrink: 0;
}

.ci-value {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 75px;
}

/* PC端：确保所有ci-value左对齐 */
@media (min-width: 769px) {
    .ci-label {
        width: 150px;
    }
    
    /* 英文语言下，ci-label宽度再加80px */
    :lang(en) .ci-label {
        width: 230px;
    }
    
    .ci-value {
        margin-left: 0;
    }
}

/* 谷歌地图按钮 */
.contact-right {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

/* PC端Logo */
.contact-pc-logo {
    display: none;
    width: 144px;
}

.contact-pc-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.map-btn-circle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.map-btn-circle span {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25em;
    text-align: right;
    color: #FFFFFF;
}

.map-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    overflow: hidden;
}

.map-icon-circle img {
    width: 100%;
    height: 100%;
}

/* =========================================
   Contact Section - 响应式适配 (1440px)
   ========================================= */
@media (max-width: 1440px) {
    #contact {
        padding: 60px 80px 0;
        min-height: 450px;
    }
    
    .contact-content {
        min-height: 320px;
    }
    
    .contact-left {
        max-width: 650px;
    }
    
    .contact-label {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .contact-title {
        font-size: 40px;
        margin-bottom: 20px;
    }
    
    .contact-right {
        top: 70px !important; /* 1440px下contact-label的margin-bottom值 */
        height: calc(40px * 1.33 + 190px) !important; /* 适配1440px下的contact-title高度 */
    }
    
    .map-btn-circle span {
        font-size: 14px;
    }
    
    .map-icon-circle {
        width: 28px;
        height: 28px;
    }
    
    .map-icon-circle img {
        width: 14px;
        height: 14px;
    }
    
    .ci-label {
        width: 150px;
    }
    
    /* 英文语言下，ci-label宽度再加80px */
    :lang(en) .ci-label {
        width: 230px;
    }
    
    .ci-value {
        margin-left: 0;
    }
}

/* =========================================
   Contact Section - 移动端适配
   严格按照Figma设计稿还原
   ========================================= */
@media (max-width: 768px) {
    #contact {
        min-height: 495px; /* 按照Figma设计稿精确高度 */
        padding: 0;
        background-image: none;
        background-color: #3A3941; /* 按照Figma设计稿精确颜色 */
        position: relative;
        overflow-x: hidden; /* 防止横向滚动 */
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
    }
    
    .contact-content {
        min-height: 495px; /* 按照Figma设计稿精确高度 */
        flex-direction: column;
        position: relative;
        padding: 0;
    }
    
    /* 移动端Logo - 按照Figma设计稿 */
    .contact-mobile-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 42px; /* 按照Figma设计稿精确位置 */
        width: 110.9px; /* 按照Figma设计稿精确宽度 */
        height: 81.6px; /* 按照Figma设计稿精确高度 */
        display: block;
    }
    
    .contact-mobile-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    /* 移动端导航链接 - 按照Figma设计稿 */
    .contact-nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 161px; /* 按照Figma设计稿精确位置 */
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 16px; /* 按照Figma设计稿精确间距 */
        width: 100%; /* 使用100%而不是固定390px，避免超出视口 */
        max-width: 390px; /* 最大宽度限制 */
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    .contact-nav-links a {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 14px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 400; /* 按照Figma设计稿精确字重 */
        line-height: 1.79em; /* 按照Figma设计稿精确行高 */
        color: rgba(255, 255, 255, 0.8); /* 按照Figma设计稿精确颜色 */
        text-decoration: none;
    }
    
    /* 联系信息区域 - 按照Figma设计稿 */
    .contact-left {
        position: absolute;
        left: 25px; /* 按照Figma设计稿精确位置 */
        top: 224px; /* 按照Figma设计稿精确位置 */
        width: calc(100vw - 50px); /* 使用计算值，确保不超出视口 */
        max-width: 339px; /* 最大宽度限制 */
        margin: 0;
        box-sizing: border-box;
    }
    
    .contact-label {
        display: none; /* 移动端隐藏"联系我们"标签 */
    }
    
    .contact-title {
        display: none; /* 移动端隐藏标题 */
    }
    
    .contact-grid-info {
        flex-direction: column;
        gap: 12px; /* 按照Figma设计稿精确间距 */
        width: 100%;
    }
    
    .contact-grid-info > div {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        opacity: 0.3; /* 按照Figma设计稿精确透明度 */
    }
    
    .ci-label {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 14px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 400; /* 按照Figma设计稿精确字重 */
        line-height: 1.79em; /* 按照Figma设计稿精确行高 */
        color: #FFFFFF; /* 按照Figma设计稿精确颜色 */
        min-width: auto;
        margin-bottom: 0;
        width: auto;
    }
    
    /* H5端去掉ci-label的固定宽度，改为自适应 */
    .contact-grid-info > div:first-child .ci-label {
        width: auto; /* H5端去掉固定宽度 */
    }
    
    /* E-mail标签 */
    .contact-grid-info > div:nth-child(2) .ci-label {
        width: auto; /* H5端去掉固定宽度 */
        height: 25px; /* 按照Figma设计稿精确高度 */
    }
    
    /* 公司地址标签 */
    .contact-grid-info > div:nth-child(3) .ci-label {
        width: auto; /* H5端去掉固定宽度 */
        height: 25px; /* 按照Figma设计稿精确高度 */
    }
    
    .ci-value {
        font-family: 'Roboto', sans-serif; /* 工作时间使用Roboto */
        font-size: 14px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 400; /* 按照Figma设计稿精确字重 */
        line-height: 1.79em; /* 按照Figma设计稿精确行高 */
        color: #FFFFFF; /* 按照Figma设计稿精确颜色 */
        margin-left: 0;
        width: auto;
    }
    
    /* E-mail、公司地址使用Noto Sans SC */
    .contact-grid-info > div:nth-child(2) .ci-value,
    .contact-grid-info > div:nth-child(3) .ci-value {
        font-family: 'Noto Sans SC', sans-serif;
    }
    
    /* 公司地址值特殊宽度 */
    .contact-grid-info > div:nth-child(3) .ci-value {
        width: 286px; /* 按照Figma设计稿精确宽度 */
    }
    
    .contact-right {
        display: none; /* 移动端隐藏地图按钮 */
    }
    
    /* 移动端隐藏PC端Logo */
    .contact-pc-logo {
        display: none !important;
    }
    
    /* 移动端隐藏Logo（PC端显示） */
    .contact-mobile-logo {
        display: block;
    }
}

/* PC端保护 - 确保移动端样式不影响PC端 */
@media (min-width: 769px) {
    .contact-mobile-logo {
        display: none !important; /* PC端隐藏移动端Logo */
    }
    
    .contact-nav-links {
        display: none !important; /* PC端隐藏移动端导航链接 */
    }
    
    .contact-label {
        display: block !important; /* PC端显示"联系我们"标签 */
    }
    
    .contact-title {
        display: block !important; /* PC端显示标题 */
    }
    
    .contact-left {
        position: static !important;
        max-width: 780px !important;
        margin-bottom: 0 !important;
    }
    
    .contact-grid-info > div {
        opacity: 1 !important; /* PC端不透明 */
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .ci-label {
        opacity: 1 !important;
        margin-bottom: 0 !important;
        width: auto !important;
        height: auto !important;
        flex-shrink: 0 !important;
        width: 150px !important; /* PC端固定宽度，确保所有ci-value左对齐 */
    }
    
    /* 英文语言下，ci-label宽度再加80px */
    :lang(en) .ci-label {
        width: 230px !important;
    }
    
    .ci-value {
        opacity: 0.6 !important; /* PC端使用原有透明度 */
        margin-left: 0 !important; /* 移除margin-left，使用flex布局对齐 */
        flex: 1 !important;
    }
    
    .contact-right {
        display: flex !important; /* PC端显示地图按钮 */
        flex-direction: column !important;
        position: absolute !important;
        right: 0 !important;
        top: 70px !important; /* 和contact-title顶部对齐（contact-label的margin-bottom值） */
        bottom: auto !important;
        align-items: flex-end;
        height: calc(48px * 1.33 + 140px) !important; /* contact-title高度 + margin-bottom + contact-grid-info高度(3*40+2*10) */
        justify-content: space-between;
    }
    
    .contact-pc-logo {
        display: block !important;
        align-self: flex-end;
        width: 144px !important;
    }
    
    .contact-pc-logo img {
        display: block;
        height: auto;
        width: 100%;
    }
}

