@charset "UTF-8";
/* ==========================================================================
   捷创智能官网 · 响应式 / 移动端适配样式
   --------------------------------------------------------------------------
   说明：
   1. 本文件必须在 css/styles.css 与 css/jquery-yys-slider.css 之后加载；
   2. 只做“覆盖”，不修改原主题样式，便于随时回退；
   3. 断点沿用 Bootstrap 5：≥1200 桌面 / 992~1199 小桌面 / 768~991 平板
      / 576~767 大屏手机 / <576 手机。
   ========================================================================== */

/* ==========================================================================
   1. 全局基础
   ========================================================================== */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* 兜底：任何意外溢出都不产生横向滚动条。
       必须写在 html 上，不能写在 body 上 —— 原因见下面 body 的注释。 */
    overflow-x: hidden;
}

body {
    /* 【重要】这里绝对不要再写 overflow-x: hidden。
       CSS 规范规定：overflow-x 设为 hidden 时，overflow-y 会由 visible 被强制计算为 auto；
       而 Bootstrap 5 的 ScrollSpy 用
         getComputedStyle(body).overflowY === 'visible' ? null : body
       来决定 IntersectionObserver 的 root。写成 auto 后它会把 <body> 当成滚动容器，
       观察区域变成整页高度，结果就是：顶部导航的高亮卡在“服务”不再跟随滚动。 */
}

/* 防止图片撑破容器（不改动原有宽高比，只限制最大宽度） */
img {
    max-width: 100%;
}

/* 手机端不要出现“点击区域太小”的问题 */
#mainNav .nav-link,
.footer a {
    touch-action: manipulation;
}

/* ==========================================================================
   2. 顶部导航
   ========================================================================== */
@media (max-width: 991.98px) {
    #mainNav {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    #mainNav .navbar-brand img {
        height: 1.75rem;
    }

    #mainNav .navbar-toggler {
        padding: 0.5rem 0.75rem;
        border-radius: 0.35rem;
    }

    /* 展开后的菜单：顶部留一点缝隙，选项之间加分隔线，整体更好点按 */
    #mainNav .navbar-collapse {
        margin-top: 0.5rem;
        padding-top: 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        max-height: calc(100vh - 4.5rem);
        overflow-y: auto;
    }

    #mainNav .navbar-nav {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }

    #mainNav .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    #mainNav .navbar-nav .nav-item:last-child {
        border-bottom: 0;
    }

    #mainNav .navbar-nav .nav-item .nav-link {
        padding: 0.8rem 0.25rem;
        font-size: 0.95rem;
        letter-spacing: 0.02em;
    }
}

/* ==========================================================================
   3. 首屏 Banner
   ========================================================================== */
@media (max-width: 991.98px) {
    header.masthead {
        padding-top: 6.5rem;
        padding-bottom: 4rem;
    }

    header.masthead .masthead-heading {
        /* 手机上一行放得下 12 个汉字，避免把“限公司”单独折行 */
        /* 第一行给不支持 clamp() 的老浏览器的兜底值 */
        font-size: 1.75rem;
        font-size: clamp(1.5rem, 7.2vw, 3.25rem);
        line-height: 1.3;
        margin-bottom: 1.1rem;
        letter-spacing: 0.02em;
    }

    header.masthead .masthead-subheading {
        font-size: 1rem;
        font-size: clamp(0.85rem, 3.6vw, 1.5rem);
        line-height: 1.4;
        letter-spacing: 0.04em;
        margin-bottom: 1.5rem;
    }

    header.masthead .btn-xl {
        padding: 0.85rem 1.6rem;
        font-size: 1rem;
    }
}

/* ==========================================================================
   4. 通用区块间距 / 标题
   ========================================================================== */
@media (max-width: 767.98px) {
    .page-section {
        padding: 3.25rem 0;
    }

    .page-section h2.section-heading {
        font-size: 1.75rem;
        font-size: clamp(1.5rem, 6.6vw, 2.1rem);
        margin-bottom: 0.65rem;
        letter-spacing: 0.02em;
    }

    .page-section h3.section-subheading {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* 卡片内部的副标题不需要那么大的下边距 */
    .team-member h3.section-subheading,
    .team-member .section-subheading {
        margin-bottom: 1rem;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   5. 服务 Services
   ========================================================================== */
@media (max-width: 991.98px) {
    .team-member {
        margin-bottom: 2.5rem;
    }

    .team-member img {
        width: 11rem;
        height: 11rem;
    }

    .team-member h4 {
        margin-top: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .team-member img {
        width: 9.5rem;
        height: 9.5rem;
        border-width: 0.35rem;
    }

    .team-member p {
        font-size: 0.92rem;
        line-height: 1.7;
        text-align: left;
    }
}

/* ==========================================================================
   6. 检测系统 Detection
   ========================================================================== */
@media (max-width: 991.98px) {
    #team .fa-stack {
        font-size: 3rem;
    }

    #team .col-md-4 {
        margin-bottom: 2.25rem;
    }

    #team .col-md-4:last-child {
        margin-bottom: 0;
    }

    #team h4 {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem !important;
    }

    #team p {
        text-align: left;
        font-size: 0.95rem;
        line-height: 1.75;
    }
}

/* ==========================================================================
   7. 产品介绍 Products
   ========================================================================== */
/* 预留 4:3 图片高度：懒加载时不会造成页面跳动（原图本身都是 4:3） */
#portfolio .portfolio-item .portfolio-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (max-width: 991.98px) {
    #portfolio .portfolio-item {
        max-width: 100%;
    }

    #portfolio .portfolio-item .portfolio-caption {
        padding: 1rem 0.75rem;
    }

    #portfolio .portfolio-item .portfolio-caption .portfolio-caption-heading {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    #portfolio .portfolio-item .portfolio-caption .portfolio-caption-subheading {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

@media (max-width: 575.98px) {
    #portfolio .row > [class*="col-"] {
        margin-bottom: 1.25rem;
    }

    #portfolio .portfolio-item .portfolio-link {
        box-shadow: 0 6px 16px -6px rgba(112, 113, 114, 0.7);
    }
}

/* 触屏设备没有 hover：避免点击后灰罩一直停留 */
@media (hover: none) {
    #portfolio .portfolio-item .portfolio-link:hover .portfolio-hover {
        opacity: 0;
    }

    .Products-box:hover .Products-selector,
    .Products-box .Products-selector {
        display: flex;
    }
}

/* ==========================================================================
   8. 关于我们 About
   ========================================================================== */
.about-out {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    height: auto;
}

.about-us {
    float: none;
    margin: 0;
    flex: 0 0 46%;
    max-width: 46%;
    /* 与原设计一致：图片在右、文字在左 */
    order: 2;
}

.about-us img {
    display: block;
    width: 100%;
    height: auto;
    /* 与原设计 600×370 的裁切比例保持一致 */
    aspect-ratio: 600 / 370;
    object-fit: cover;
}

.about-out .timeline-heading {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
}

@media (max-width: 991.98px) {
    .about-out {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-us {
        flex: none;
        width: 100%;
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
        order: -1;
    }

    .about-out .timeline-heading h4 {
        font-size: 1.3rem;
    }

    .about-out .timeline-heading p {
        font-size: 0.95rem;
        line-height: 1.8;
    }
}

/* ==========================================================================
   9. 荣誉证书 Certificates
   —— 桌面端保留 3D 画廊；平板/手机改为网格平铺 + 点击放大
   ========================================================================== */

/* 9.1 小桌面（992~1199）：整体等比缩小，避免 1200px 画布溢出出现横向滚动条 */
@media (min-width: 992px) and (max-width: 1199.98px) {
    #certificates .content-part {
        transform: scale(0.85);
        transform-origin: 50% 0;
    }

    #certificates .Certificates-box2 {
        height: 430px;
    }
}

/* 9.2 平板与手机：3D 画廊 → 网格 */
@media (max-width: 991.98px) {
    #certificates .Certificates-box2 {
        height: auto;
    }

    #certificates .content-part {
        position: static;
        width: auto;
        margin: 0;
        opacity: 1;
        transform: none !important;
    }

    #certificates .part-tese .gallery_container {
        position: static;
        width: auto;
        height: auto;
        top: auto;
        left: auto;
        margin: 0;
        opacity: 1 !important;
        transform: none !important;
    }

    #certificates .gallery_wrap.threeD_gallery_wrap {
        position: static;
        width: auto;
        height: auto;
        left: auto;
        top: auto;
        margin: 0 !important;
        perspective: none;
        transform: none !important;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    #certificates .gallery_item.threeD_gallery_item {
        position: relative;
        width: auto;
        height: auto;
        transform: none !important;
        opacity: 1 !important;
        z-index: auto !important;
        transition: none;
        border-radius: 0.5rem;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }

    #certificates .gallery_container .gallery_item img,
    #certificates .gallery_container .gallery_item img.show {
        width: 100%;
        height: auto;
        visibility: visible !important;
        display: block;
        /* 证书原图比例约 0.707，先占位避免懒加载跳动 */
        aspect-ratio: 800 / 1131;
        object-fit: contain;
        background: #fff;
    }

    #certificates .gallery_container .prev,
    #certificates .gallery_container .next,
    #certificates .gallery_container .prev_2,
    #certificates .gallery_container .next_2 {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    #certificates .gallery_wrap.threeD_gallery_wrap {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

/* ==========================================================================
   10. 联系我们 Contact
   ========================================================================== */
#contact .container {
    height: auto !important;
}

#contact .contact-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2.5rem 3rem;
    align-items: start;
}

.contact-act {
    float: none;
    margin: 0;
}

.contact-act img {
    display: block;
    width: 100%;
    height: auto;
    /* 与原设计 600×370 的裁切比例保持一致 */
    aspect-ratio: 600 / 370;
    object-fit: cover;
}

.weixin {
    min-width: 0;
}

#contact .contact-line {
    margin-bottom: 0.9rem;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
}

#contact .contact-line:last-of-type {
    margin-bottom: 1rem;
}

#contact .contact-tel {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

#contact .contact-tel:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.weixin .qr-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.weixin .qr-item {
    flex: 0 0 auto;
    width: 200px;
    max-width: 45%;
    margin: 0;
}

.weixin .qr-item img {
    float: none;
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0.35rem;
    background: #fff;
}

.weixin .qr-name {
    display: block;
    margin-top: 0.5rem;
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    #contact .contact-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }

    #contact .contact-line {
        font-size: 1.05rem;
        margin-bottom: 0.6rem;
    }

    .weixin .qr-list {
        gap: 1rem;
        justify-content: center;
    }

    .weixin .qr-item {
        width: 160px;
    }
}

@media (max-width: 575.98px) {
    #contact .contact-line {
        font-size: 1rem;
    }

    .weixin .qr-item {
        width: 42%;
    }

    .weixin .qr-name {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   11. 页脚 Footer
   ========================================================================== */
@media (max-width: 991.98px) {
    .footer {
        font-size: 0.85rem;
        line-height: 1.8;
    }

    .footer .row > div + div {
        margin-top: 0.75rem;
    }

    .footer .logo-side {
        height: 42px;
        width: auto;
    }
}

/* ==========================================================================
   12. 产品弹窗 Portfolio modals
   ========================================================================== */
/* 关闭按钮：
   1. 主题里 .portfolio-modal .modal-content img 给了 margin-bottom: 2rem，
      这条规则也会命中关闭图标，把“×”顶到圆圈上方（缩放后错层明显），必须清零；
   2. 关闭图标用的 SVG 没有内建宽高，限制它撑满按钮内容区。 */
.portfolio-modal .close-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.portfolio-modal .close-modal img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 991.98px) {
    /* 原主题把弹窗内容强制为 80% 宽 + 10% 左缩进，手机上太浪费空间 */
    .portfolio-modal .modal-content {
        width: 100%;
        margin-left: 0;
        padding-top: 3.5rem;
        padding-bottom: 3rem;
    }

    .portfolio-modal .modal-content h2 {
        font-size: 1.6rem;
        font-size: clamp(1.3rem, 5.2vw, 2.25rem);
        line-height: 1.35;
        padding: 0 1.5rem;
    }

    .portfolio-modal .modal-content p {
        margin-bottom: 1.25rem;
    }

    .portfolio-modal .close-modal {
        top: 0.75rem;
        right: 0.75rem;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.6rem;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.06);
    }

    .portfolio-modal .modal-body {
        padding: 0;
    }

    .portfolio-modal .modal-content ul.list-inline li {
        font-size: 0.95rem;
        line-height: 1.8;
        text-align: left;
    }

    .portfolio-modal .modal-content .btn-xl {
        padding: 0.8rem 1.6rem;
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    /* 轮播箭头改成真正垂直居中，手机上不会被 line-height 推偏 */
    .Products-left,
    .Products-right {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        font-size: 1.75rem;
        line-height: 1;
        color: #fff;
        background: rgba(0, 0, 0, 0.28);
    }

    /* 手机没有 hover，圆点常驻显示并水平居中 */
    .Products-selector {
        display: flex !important;
        left: 50%;
        right: auto;
        width: auto;
        height: 2.25rem;
        transform: translateX(-50%);
        justify-content: center;
        align-items: center;
        gap: 0.4rem;
    }

    .Products-selector > span {
        width: 0.8rem;
        height: 0.8rem;
        margin: 0;
    }
}

/* ==========================================================================
   13. 证书点击放大（移动端友好）
   ========================================================================== */
.jc-lightbox {
    position: fixed;
    /* inset 的兼容写法：老版本 Safari / 安卓 WebView 不认识 inset */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(10, 12, 16, 0.92);
}

.jc-lightbox.is-open {
    display: flex;
}

.jc-lightbox img {
    max-width: 100%;
    max-height: 86vh;
    width: auto;
    height: auto;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.jc-lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.jc-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

body.jc-lightbox-open {
    overflow: hidden;
}
