/* =========================================
   1. 原始样式保留区 (大屏 > 1200px)
   完全保留你原来的写法和数值
   ========================================= */

   * {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

.footer_bg {
    width: 100%;
    min-width: 1200px; /* 保留原限制 */
    min-height: 260px;
    padding: 56px 20px;
    background-image: url('../images/index/bg1.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer_bg-title {
    font-weight: 600;
    font-size: 36px;
    color: #333333;
    line-height: 54px;
    margin: 0 0 12px;
}

.footer_bg-sub {
    font-size: 16px;
    color: #666666;
    line-height: 24px;
    margin: 0 0 32px;
}

.footer_bg-btns {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer_bg-btns button {
    width: 158px;
    height: 46px;
    border-radius: 4px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.footer_bg-btns button:hover {
    opacity: 0.88;
}

.footer_bg-btns .btn-primary {
    background: #4671FE;
    color: #FFFFFF;
    border: none;
}

.footer_bg-btns .btn-outline {
    background: transparent;
    border: 1px solid #4671FE;
    color: #4671FE;
}

footer {
    background: #041831;
    width: 100%;
    min-width: 1200px; /* 保留原限制 */
}

.footer-container {
    width: 1200px; /* 保留原宽度 */
    margin: 0 auto;
    padding-top: 50px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-container .logo {
    width: 224px;
    height: 50px;
}

.footer-container .logo img {
    width: 100%;
    height: 100%;
}

.footer-cont {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.footer-left {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 24px;
}

.footer-left .footer-item {
    display: flex;
    align-items: center;
}

.footer-left .footer-item img {
    width: 16px;
    height: 16px;
}

.footer-left .footer-item a {
    font-size: 14px;
    margin-left: 2px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
.footer-left .footer-item a:hover {
    color: #ffffff;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 50px 236px 0 160px; /* 保留原复杂间距 */
}

.footer-center img {
    display: block;
    width: 120px;
    height: 120px;
    background: #FFFFFF;
    margin-bottom: 8px;
}

.footer-center span {
    font-size: 14px;
}

.footer-right h3 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-right .phone {
    font-weight: 600;
    font-size: 30px;
    color: #4671FE;
}

.footer-right p {
    font-size: 14px;
    margin-bottom: 14px;
}

.footer-bottom {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-bottom a {
    font-size: 14px;
    margin-left: 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
.footer-bottom a:hover {
    color: #ffffff;
}

.copyright {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
    width: 1200px; /* 保留原宽度 */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 65px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* =========================================
   2. 响应式适配区 (Media Queries)
   仅当屏幕变窄时生效，不干扰原样式
   ========================================= */

/* 当屏幕宽度小于 1200px 时，解除固定宽度限制，改为自适应 */
@media screen and (max-width: 1200px) {
    .footer_bg, 
    footer {
        min-width: 100%; /* 允许缩小 */
    }

    .footer-container,
    .copyright p {
        width: 100%;     /* 容器占满 */
        max-width: 1200px; /* 但不超过最大设计稿 */
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* 调整 footer 高度为自动，防止内容溢出被截断 */
    footer {
        height: auto;
        padding-bottom: 20px;
    }
}

/* 平板尺寸 (<= 992px)：调整为垂直排列，但尽量保持风格 */
@media screen and (max-width: 992px) {
    .footer-cont {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }

    .footer-left {
        width: 100%;
        margin-bottom: 30px;
        justify-content: center;
    }
    
    .footer-left .footer-item {
        justify-content: center;
    }

    /* 重置 footer-center 的奇怪 margin，改为居中 */
    .footer-center {
        margin: 0 0 30px 0;
        order: -1; /* 可选：让二维码排在上面，或者去掉这行让它排中间 */
    }

    .footer-right {
        width: 100%;
        text-align: center;
    }
}

/* 手机尺寸 (<= 768px)：进一步优化间距和字体 */
@media screen and (max-width: 768px) {
    .footer_bg {
        height: auto;
        padding: 40px 20px;
    }

    .footer_bg-title {
        font-size: 24px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .footer_bg-sub {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 24px;
        text-align: center;
    }

    .footer_bg-btns {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-container {
        padding-top: 30px;
    }

    .footer-container .logo {
        margin: 0 auto 20px auto;
    }

    .footer-left {
        grid-template-columns: 1fr; /* 链接变为单列 */
        gap: 15px;
    }

    .footer-right .phone {
        font-size: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
    }

    .footer-bottom a {
        margin-left: 0;
    }

    .copyright p {
        height: auto;
        padding: 20px;
        line-height: 1.6;
    }
}