/* 主色调定义 */
:root {
    --primary-color: #2d74b8;
    --primary-dark: #004884;
    --secondary-color: #549cd1;
    --dark-color: #333333;
    --light-gray: #f8f9fa;
    --contact-primary-rgb: 45,116,184;
}

/* 全局样式 */
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 区块内边距 */
.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
}

/* 导航栏 */
.transition-navbar {
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar-scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    height: 2px;
    background-color: #005AA0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: scaleX(1);
}

.carousel-control-next, .carousel-control-prev{
    z-index: 999;
}


/* 轮播图 */
.carousel-item {
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.carousel-caption {
    bottom: 25%;
    z-index: 2;
}

.banner-caption {
    left: 8%;
    right: auto;
    bottom: 25%;
    transform: none;
    max-width: 680px;
    width: min(680px, calc(100% - 32px));
    text-align: left;
}

@media (min-width: 992px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 6%;
    }

    .banner-caption {
        left: 12%;
        max-width: 620px;
    }
}

/* 标题样式 */
.section-title {
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #005AA0;
}

.st2::after {
    left: 0;
    transform: none;
}

.text-start .section-title::after {
    left: 0;
    transform: none;
}

/* 按钮样式 */
.btn-primary {
    background-color: #005AA0;
    border-color: #005AA0;
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: #005AA0;
    border-color: #005AA0;
}

.btn-outline-primary:hover {
    background-color: #005AA0;
    border-color: #005AA0;
    color: #fff;
}

/* 卡片样式 */
.card {
    border-radius: 6px;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.factory-card {
    border-left: 4px solid #005AA0;
    background-color: #fff;
}

/* 优势列表 */
.advantage-item .icon-box {
    width: 60px;
    height: 60px;
    background-color: #005AA0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto;
}

/* 资质证书 */
.cert-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cert-item:hover {
    transform: scale(1.05);
}

/* 产品中心 Tab */
.nav-pills .nav-link {
    color: var(--dark-color) !important;
    border: 1px solid #dee2e6;
    margin: 5px;
    border-radius: 30px;
    padding: 8px 20px;
}

.nav-pills .nav-link.active {
    background-color: #005AA0 !important;
    border-color: #005AA0;
    color: #fff !important;
}

.nav-pills .nav-link.active::after {
    display: none;
}

.product-table-wrap {
    width: 100%;
    margin-bottom: 1rem;
}

.product-table-wrap .table {
    margin-bottom: 0;
    white-space: nowrap;
}

/* 表单 */
.form-control:focus, .form-select:focus {
    border-color: #005AA0;
    box-shadow: 0 0 0 0.25rem rgba(248, 200, 208, 0.25);
}

/* 回到顶部 */
#backToTop {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 联系方式快捷卡片 */
.contact-quick-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 90, 160, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-quick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 90, 160, 0.12);
}

.contact-quick-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #005AA0;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.contact-quick-label {
    color: #6c757d;
    font-size: 14px;
}

.contact-quick-value {
    color: var(--dark-color);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

a.contact-quick-value:hover {
    color: #005AA0;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .carousel-item {
        height: 60vh;
    }
    .carousel-caption {
        bottom: 15%;
    }
    .carousel-caption h1 {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .carousel-item {
        min-height: 420px;
    }

    .banner-caption {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100% - 24px);
        text-align: center !important;
    }

    .banner-caption h1 {
        font-size: 1.6rem;
        line-height: 1.4;
    }

    .banner-caption .lead {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .banner-caption .mt-4 {
        margin-top: 1rem !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .banner-caption .btn {
        margin-right: 0 !important;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .product-tab-nav {
        flex-wrap: nowrap;
        justify-content: flex-start !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .product-tab-nav .nav-item {
        flex: 0 0 auto;
    }

    .product-tab-nav::-webkit-scrollbar {
        height: 4px;
    }

    .product-tab-nav::-webkit-scrollbar-thumb {
        background: rgba(0, 90, 160, 0.25);
        border-radius: 999px;
    }

    .contact-quick-card {
        padding: 18px 20px;
    }

    .contact-quick-value {
        font-size: 16px;
    }

    .product-table-wrap .table {
        font-size: 14px;
    }
}
