/* ===== 版身網格 ===== */

.about-grid {
    display: grid;
    grid-template-columns: 260px 1fr; /* 子選單 / 文章 / 拼貼 */
    gap: 2rem;
    align-items: start;
}


.sgs-quality-title {
  /* width: 156px;
  height: 37px;
  margin: 112px 10px 59px 28px; */
    font-size: 45px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: 0.75;
    letter-spacing: 2px;
    text-align: left;
    color: #fff;
    text-align: center;
}

@media (max-width: 992px) {
    /* 小於 lg 時改為單欄 */
    .about-grid {
        display: block;
        /* grid-template-columns: 1fr; */
    }
    .rd-text {
        margin-top: 2rem;
    }
    .collage {
        margin-inline: auto;
    } /* 圖片區置中 */
}

/* about 拼貼 */
/* ===== 拼貼容器：標準 2×2 ===== */
.collage {
    display: grid;
    grid-template-columns: repeat(2, 150px);
    grid-auto-rows: 150px;
    gap: 1rem;
    justify-content: center;
    margin-top: 64px; /* ★ 新增：頂端對齊段落 */
}

/* 每張圖的基礎樣式 */
.collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid #fff6e8; /* 米白描邊 */
    border-radius: 4px;
    box-shadow: 0 2px 6px #0002;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ===== Hover 效果 ===== */
.collage img:hover {
    transform: scale(1.08); /* 放大 8% */
    box-shadow: 0 6px 16px #0003; /* 陰影加深 */
    z-index: 1; /* 確保浮在最上層 */
}

/* sgs 滑動標誌 */
.cert-block h5 {
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 2rem;
    font-weight: bold;
}

/* sgs 證書列表 */
.row-cols-2.row-cols-md-4.g-4 .col img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.row-cols-2.row-cols-md-4.g-4 .col img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* ===== CSR 共用背景：左上→右下柔和斜角 ===== */
.csr-bg {
    background: #feb100;
}


.csr-item {
    display: flex;
    /* align-items: stretch; */
    justify-content: space-between;
    gap: 2rem;
}

.csr-list,
.csr-item-img {
    flex: 1 1 50%;
}
.csr-item img {
    display: block;
    /* width: 30%; 其餘維持 RWD */
    width: 570px;
    height: auto;
    object-fit: cover; /* 填滿框，超出部分裁掉 */
    margin-left: auto;
    margin-right: 0;
}

/* 再針對偶數個 .csr-item 裡的 img 改成靠左 */
.csr-item:nth-child(even) img {
    margin-left: 0;
    margin-right: auto;
}

.csr-list {
    list-style: none;
    padding-left: 2em;
    text-align: left;
}

.csr-list li {
    position: relative;
    padding-left: 2.5em; /* 調整文字與圖示間距 */
    margin-bottom: 0.6em;
}

.csr-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em; /* 往下移 0.1em */
    width: 1.25em; /* 對應 SVG 的 24×24 大小 */
    height: 1.25em;
    background: url("/frontstage/image/li-dot.svg") no-repeat center/contain;
}

/* 偶數項改為使用 li-dot-blue.svg */
.csr-list li:nth-child(even)::before {
    background: url("/frontstage/image/li-dot-blue.svg") no-repeat
        center/contain;
    /* 移除 filter，改為直接載入藍色版本 */
}

/* ===== 淡入效果：沿用既有動畫邏輯 ===== */
.animate-csr {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease-out;
}
.animate-csr.in {
    opacity: 1;
    transform: none;
}

/* === 產品項目區塊 === */
.product-items {
    /* 若已在外層套背景漸層，此處可留白或覆寫 */
}
/* === 卡片 === */
.product-card {
    border: 2px solid #004480; /* 預設藍框 */
    border-radius: 4px;
    padding: 2.5rem 1.5rem 2rem;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.product-card:hover {
    border-color: #ffb400; /* Hover 變黃框 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* 圖片容器固定高度，保持上下留白一致 */
.product-img-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img-wrapper img {
    max-height: 100%;
    object-fit: contain;
}

/* 文字 */
.product-title {
    font: 700 24px/1.2 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: #082b41;
}
.product-text {
    font: 400 15px/1.6 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: #555d63;
}

/* 連結 */
.product-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    /* font: 700 16px/1 "Noto Sans TC", "Microsoft JhengHei", sans-serif; */
    color: #082b41;
    text-decoration: none;
}
.product-link .arrow {
    font-size: 1.25em;
    position: relative;
    top: -2px; /* ↑ 往上 2px，可依需求微調 */
    transition: transform 0.2s;
}
.product-link:hover .arrow {
    transform: translateX(3px);
}

/* ============ 更多產品項目按鈕 ============ */
.btn-more-products {
    /* 固定寬高 → 與 PNG 相同；要自適應可刪除 width / height 改用 padding */
    width: 235px;
    height: 53px;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;

    background: #004c8a; /* 深藍 */
    color: #fff;
    /* font: 700 18px/1 "Noto Sans TC", "Microsoft JhengHei", sans-serif; */
    text-decoration: none;

    border-radius: 6px; /* PNG 圓角感覺約 6px */
    border: none;
    cursor: pointer;

    transition: background 0.2s, box-shadow 0.2s;
}

.btn-more-products:hover {
    background: #0062b3; /* Hover 稍亮 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-more-products:active {
    background: #003b71; /* 點擊再深一階 */
}

/* ====== 基本排版 ====== */
.banner-water {
    min-height: 260px; /* 依內容調整 */
    color: #fff;
}

/* 避免 Vanta.js 覆蓋字體顏色 */
.banner-water-text {
    font: 700 28px/1.7 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    word-break: keep-all;
    z-index: 2; /* 文字永遠在最上層 */
}

/* RWD：手機字級 & 行高調小 */
@media (max-width: 767.98px) {
    .banner-water-text {
        font-size: 22px;
    }
}

/* ========== 客戶 Logo 區塊 ========== */
/* 讓每張 slide 只佔自己的寬度，而不是 100% */
.client-swiper .swiper-slide {
    width: auto !important;
    flex: 0 0 auto; /* 防止被縮放 */
    display: flex;
    align-items: center;
}

/* 固定 logo 高度，寬度自等比 */
.client-logo {
    height: 64px;
    width: auto;
}

/* 容器與格線設定 */

/* ① 加大卡片之間的縱橫間距（原本 g-4=1.5 rem）→ 改成 2 rem */
/* ① 卡片四周留 12px 白框（避免 margin 上塌陷）*/
.category-section .card {
    padding: 12px; /* 上下左右皆 12px */
}

/* ② 灰底比例盒維持 8px 圓角 */
.category-section .card .ratio {
    border-radius: 8px;
}

/* ③ 把 .row 欄間距改大（等同 g-5：3rem）*/
.category-section .row {
    --bs-gutter-x: 3rem;
    --bs-gutter-y: 3rem;
}

.hover-lift {
    transition: transform 0.25s, box-shadow 0.25s;
}
.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s;
}
.hover-lift:hover .card-img-top {
    transform: scale(1.08);
}

/* 分頁樣式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0 4px;
}

.pagination .page-link {
    display: block;
    /* padding: 8px 12px; */
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover {
    background-color: #007396;
    border-color: #007396;
    color: #fff;
}

/* Layout */
.rd-tech {
    padding: 60px 0;
}
.rd-row {
    display: flex;
    gap: 40px;
}
.rd-col {
    flex: 1;
}
/* 文字區 */
.rd-text {
    /* 調整桌機的間距 */
    margin-left: 24px; 
}



/* 視覺區 Grid */
.visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}
.vg-main {
    grid-area: 1 / 1 / 2 / 2;
}
.vg-stat--big {
    grid-area: 1 / 2 / 2 / 3;
}
.vg-stat--small {
    grid-area: 2 / 1 / 3 / 2;
}
.vg-sub {
    grid-area: 2 / 2 / 3 / 3;
}

/* 共同樣式 */
.vg-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}
/* 數字卡片 */
.vg-stat {
    background: #ffa500;
    color: #fff;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-number {
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
}
.vg-stat p {
    margin-top: 8px;
    font-size: 16px;
}

/* 圖片淡入＋滑鼠移入放大：改用 ease-out */
.item-image {
    width: 100%;
    display: block;
    opacity: 0;
    transform: scale(0.9);
    transition: transform 0.5s ease-out, opacity 0.7s ease-out;
    animation: fadeInScale 0.7s forwards ease-out;
}
@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.item-image-wrapper:hover .item-image {
    transform: scale(1.05);
}

/* 先把預設隱藏＋往下位移 */
.animate-item {
    opacity: 0;
    transform: translateY(20px);
    /* 設定不執行，等 JS 幫你加上 .in 動畫才跑 */
}

/* 真正的淡入＋上移動畫 */
.animate-item.in {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 僅放在自訂樣式檔最下方 */
.equip-section {
    background-color: #e0e0e0;
}
.equip-section .card {
    background-color: #fff;
    border-radius: 0.5rem;
}
.equip-section .card-img-top {
    object-fit: contain;
    width: 100%;
    height: 180px;
}

/* 自訂最下方加入 */
.testing-section .table-dark {
    background-color: #0a3150;
}
.testing-section .table-dark th {
    color: #fff;
}
.testing-section .table-secondary {
    background-color: #f2f2f2;
}
.testing-section table td,
.testing-section table th {
    vertical-align: middle;
}

/* styles.css */

/* 1. 先移除之前的 margin-top:auto，讓 badge 緊貼文字下方 */
.industry-app .badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    /* margin-top: auto;  ← 已刪除這行 */
}

/* 2. 卡片標題還原深藍樣式（加上 !important 提升優先度）*/
.industry-app .card-header {
    background-color: #00437a !important;
    color: #fff !important;
    text-align: center;
    font-weight: 600;
    font-size: 1.125rem;
    height: 3rem;
    line-height: 3rem;
}

/* 3. 去掉 <p> 的預設上邊距，統一控制間距 */
.industry-app .card-body p {
    margin: 0 0 1rem; /* 上 0，下 1rem */
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4; /* 兩行文字約 2.8rem，高度一致 */
    min-height: 6rem; /* 確保不滿兩行時，也佔滿兩行高度 */
}

/* 4. 重新配置 badge 等寬排列 */
.industry-app .badge-grid .badge-pill {
    flex: 1 1 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
    /* background-color: rgba(0, 123, 255, 0.15); */
    /* color: #007bff; */
    /* border-radius: 999px; */
    /* padding: 0.5rem 1rem; */
   
    /* font-size: 0.875rem; */
}

/* 1. 三欄水平排列 */
.contact .contact-info {
    display: flex;
    align-items: flex-start;
    /* 三欄之間再拉開一點 */
    gap: 120px;
}

/* 2. 每個 contact-item 變成縱向排列的小卡片 */
.contact .contact-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 160px; /* 或依內容微調 */
}

/* 3. 調整斜線長度和角度 */
.contact .location-name::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 80px; /* 拉長到 80px */
    height: 1px;
    background: #d1d1d1;
    transform: translateY(-50%) rotate(15deg);
}

/* 4. 逐個淡入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.contact .location {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}
.contact .location:nth-child(1) {
    animation-delay: 0.2s;
}
.contact .location:nth-child(2) {
    animation-delay: 0.4s;
}
.contact .location:nth-child(3) {
    animation-delay: 0.6s;
}

/* 淡入動畫定義 */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        /* transform: translateY(30px); */
    }
    100% {
        opacity: 1;
        /* transform: translateY(0); */
    }
}

.about-images-container {
    position: relative;
    width: 372px;
    max-width: 372px;
    height:362px;
    aspect-ratio: 366/361;
    opacity: 0;
    animation: fadeInUp 1.2s ease-in forwards;
}

.about-images-container > div {
    position: absolute;
    border: 7px solid #fff;
}

.about-images-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* #img1,
#img4 {
    width: 49%;
    height: 37%;
}

#img2,
#img3,
#img5 {
    width: 41%;
    height: 55%;
} */

#img1 {
    left: 0;
    top: 0;
    width:178px;
    height: 135px;
}

#img2 {
    right: 0;
    top: 0;
    width: 163px;
    height: 213px;
}

#img3 {
    left: 0;
    bottom: 0;
    width: 162px;
    height: 210px;
}

#img4 {
    right: 0;
    bottom: 0;
    width:178px;
    height:133px;
}

#img5 {
    left: 50%;
    transform: translateX(-50%);
    bottom: 18%;
    width:164px;
    height:213px;
}

/* ===== 公司簡介區塊樣式 ===== */
.company-pd {
    background-color: #feb100;
    padding: 2.125vw 1.042vw 0 1.042vw; /* 60px 20px 0 20px at 1920px */
}

.company-pd .about-grid {
    max-width: 100%;
    margin: 0 5.208vw; /* 100px at 1920px */
    display: block;
}

.rd-text {
    margin: 0;
}

.company-title-box {
    background: repeating-linear-gradient(#0981a9,#003c50);
    padding: 0.521vw 1.563vw; /* 10px 30px at 1920px */
    margin: 0;
    position: relative;
    border-radius: 0.717vw 0.717vw 0 0; /* 8px at 1920px */
    display: inline-block;
    margin-left: 4.167vw; /* 80px at 1920px */
}

.company-title {
    color: #ffffff;
    font-size: 2.604vw; /* 50px at 1920px */
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.company-content-box {
    background: linear-gradient(to bottom, #ffc642 0%, #ffc642 40%, #feb100 80%, #ffb200 100%);
    padding: 4.083vw 4.167vw; /* 40px 80px at 1920px */
    margin: 0;
    border-radius: 1.042vw 1.042vw 0 0; /* 20px at 1920px */
    box-shadow: 1px 1px 30px 0 rgba(0, 0, 0, 0.1);
}

.company-bow {
    background: linear-gradient(to bottom, #ffc642 0%, #ffc642 40%, #feb100 80%, #ffb200 100%);
    padding: 2.083vw 5.5vw; /* 40px 80px at 1920px */
    margin: 0;
    border-radius: 1.042vw; /* 20px at 1920px */
    box-shadow: 1px 1px 30px 0 rgba(0, 0, 0, 0.1);
}

/* ===== 研發設備區塊（等比例縮放） ===== */
.company-bow-product {
    background: linear-gradient(to bottom, #ffc642 0%, #ffc642 40%, #feb100 100%);
    padding: 2.08vw 4.17vw; /* 40px 80px / 1920px * 100 */
    margin: 0;
    border-radius: 1.04vw; /* 20px / 1920px * 100 = 1.04vw */
    box-shadow: 0 0 30px 15px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.56vw; /* 30px / 1920px * 100 = 1.56vw */
}

.company-subtitle{
    font-size: 3.03vw; /* 58.2px / 1920px * 100 = 3.03vw */
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    letter-spacing: 0.08vw; /* 1.45px / 1920px * 100 = 0.08vw */
    text-align: left;
    color: #00546e;
}
.rd-text p {
    line-height: 1.75;
    color: #00546e;
    margin-bottom: 1.563vw; /* 30px at 1920px */
    font-weight: 500;
    font-stretch: normal;
    font-style: normal;
    letter-spacing: -0.03px;
}

/* 研發技術內容文字大小 */
.rd-content-text {
    font-size: 1.56vw; /* 30px / 1920px * 100 = 1.56vw */
}
.rd-content-text p {
    margin-bottom: 0;
}

.company-content {
    color: #fff;
    font-size: 0.781vw; /* 15px at 1920px */
    line-height: 1.8;
}

.company-content p {
    font-size: 1.302vw;
    margin-bottom: 1.25vw; /* 24px at 1920px */
}

.company-content p:last-child {
    margin-bottom: 0;
}

/* 研發技術標題區塊漸層背景 */
.company-title-gradient {
    background: linear-gradient(to right, #035b79, #035b7900);
    border-radius: 0.78vw; /* 15px / 1920px * 100 = 0.78vw */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.6vw 5vw; /* 30px 100px / 1920px * 100 */
}

.company-title-gradient .company-title {
    font-size: 4vw;
}

/* 確保外層容器能讓 inline-flex 置中 */
.about-grid .company-title-gradient {
    margin: 0 auto;
    display: block;
    width: fit-content;
}

