﻿@media (min-width: 1401px) and (max-width: 1600px) {

    .info-section,
    .info-section2,
    .info-section3,
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7 {
        padding: 1.5rem 20rem;
        font-size: 1rem;
    }

    .info-section9 {
        padding: 1.5rem 20rem;
        /* font-size: 0.8rem; */
    }
}

@media (min-width: 1201px) and (max-width: 1400px) {

    .info-section,
    .info-section2,
    .info-section3,
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7 {
        padding: 1.5rem 12rem;
        font-size: 1rem;
    }

    .info-section9 {
        padding: 1.5rem 12rem;
        /* font-size: 0.8rem; */
    }
}

@media (min-width: 1401px) {
    .target-img {
        width: 2.5%;
    }
}

/* For medium screens (>= 992px and < 1200px) */
@media (min-width: 992px) and (max-width: 1200px) {
    .info-section {
        padding: 1.5rem 10rem;
        font-size: 1rem;
    }

    .info-section2,
    .info-section3,
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7,
    .info-section9 {
        padding: 1.5rem 8rem;
        font-size: 1.1rem;
    }

    .info-section2 {
        padding: 1.5rem 2rem;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .info-section2 img {
        max-width: 70%;
    }

    /* .target-img {
        width: 5%;
    } */

    .target-img2 {
        width: 20%;
    }

    .info-section9 {
        padding: 1.5rem 3rem;
        font-size: 0.7rem;
    }

    .info-section9 img {
        max-width: 70%;
    }

}

/* For small screens (>= 768px and < 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .info-section {
        padding: 1.5rem 5rem;
        font-size: 0.9rem;
    }

    .info-section2,
    .info-section3,
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7,
    .info-section9 {
        padding: 1.5rem 5rem;
        font-size: 1rem;
    }

    .info-section2 {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .info-section2 img {
        max-width: 70%;
    }

    .section1,
    .section2,
    .section3,
    .section4 {
        text-align: left;
    }

    /* .target-img {
        width: 5%;
    } */

    .target-img2 {
        width: 18%;
    }

    .info-section .img-responsive1 {
        max-width: 80%;
    }

    .info-section .img-responsive2 {
        max-width: 60%;
    }

    .info-section9 {
        padding: 1.5rem 2rem;
        font-size: 0.6rem;
    }

    .info-section9 img {
        max-width: 70%;
    }
}

@media (min-width: 601px) and (max-width: 767.9px) {
    .info-section {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    .info-section2,
    .info-section3,
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7,
    .info-section9 {
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }

    .info-section2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .info-section2 img {
        max-width: 60%;
    }

    .section1,
    .section2,
    .section3,
    .section4 {
        text-align: left;
    }

    .target-img {
        width: 5%;
        left: 25%;
    }

    .target-img2 {
        width: 15%;
    }

    .info-section .img-responsive1 {
        max-width: 100%;
    }

    .info-section .img-responsive2 {
        max-width: 80%;
    }

    .info-section9 {
        padding: 1.5rem 2rem;
        font-size: 0.5rem;
    }

    .info-section9 img {
        max-width: 60%;
    }
}

/* For extra small screens (< 768px) */
@media (max-width: 600px) {
    .info-section {
        padding: 1.5rem 2rem;
        font-size: 0.85rem;
    }

    .info-section .imgStyle {
        justify-content: center;
    }

    .info-section2,
    .info-section3,
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7 {
        padding: 1.5rem 2rem;
        font-size: 0.9rem;
    }

    .info-section2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .info-section2 img {
        width: 40%;
    }

    .info-section3 img:nth-child(1) {
        max-width: 20%;
    }

    .info-section2>.section4 img {
        width: 10%;
    }

    .section1,
    .section2,
    .section3,
    .section4 {
        text-align: left;
    }

    .target-img {
        width: 7%;
        left: 25%;
        transform: translateX(-50%);
    }

    .target-img2 {
        width: 5%;
        transform: translateY(100%);
        right: 15%;
    }

    .info-section .img-responsive1 {
        max-width: 40%;
    }

    .info-section .img-responsive2 {
        max-width: 30%;
    }

    /*.info-section9 {
        padding: 1.5rem 1rem;
        font-size: 0.5rem;
    }

    .info-section9 .col-3 {
        width: 25% !important;
        padding-right:0;
        padding-left:0;
    }

    .info-section9 .col-4 {
        width: 33.333% !important;
    }

    .info-section9 .col-6 {
        width: 50% !important;
    }
  
    .info-section9 img {
        max-width: 60%;
    }*/
}

@media (max-width: 1500px) {
    .info-section6 .card {
        margin: 1.1rem 0rem;
    }

    .logo-container {
        top: 0%;
        /* padding-top: 15px; */
    }

    .info-section6 table tr {
        font-size: 1rem;
    }
}

@media (max-width: 1200px) {
    .info-section6 .card {
        margin: 1.1rem 0rem;
    }

    .logo-container {
        top: 0%;
        padding-top: 1rem;
    }

    .b02-grid,
    .b04-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* .info-section6 table tr {
        font-size: 1rem;
    } */
}

@media (max-width: 992px) {
    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7 {
        padding: 2rem 5% !important;
    }

    .b02-grid,
    .b04-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .b03-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-section6 .card {
        margin: 1.1rem 0rem;
    }

    .info-section6 table tr {
        font-size: 0.9rem;
    }

    .logo-container {
        top: 0%;
        padding-top: 1rem;
    }
}

@media (max-width: 690px) {
    .logo-container2 {
        top: 0px;
        bottom: -1rem;
        padding-top: 0px
    }
}

@media (min-width: 1800px) {
    .text-overlay-1,
    .text-overlay-2,
    .text-overlay-3 {
        width: calc(25vw - 10rem);
    }
   
}

@media (min-width: 1600px) {
    .text-overlay-2 {
        left: 80%;
    }
}

@media (max-width: 1400px) {
    .text-overlay {
        font-size: 1.25rem;
        left: 52%;
        transform: translate(-55%, 0%);
    }
    .text-overlay img {
        max-width: 20%;
    }
    .text-overlay span {
        font-size: 1.5rem;
    }

    .text-overlay-1 {
        top: 85%;
        font-size: 0.95rem;
        left: 55%;
        transform: translate(-50%, 0%);
        width: calc(25vw - 1rem);

    }

    .text-overlay-2 {
        top: 30%;
        font-size: 0.95rem;
        left: 87%;
        transform: translate(-50%, 0%);
        width: calc(25vw - 1rem);
    }

    .text-overlay-3 {
        top: 85%;
        font-size: 0.95rem;
        left: 85%;
        transform: translate(-50%, 0%);
        width: calc(25vw - 1rem);
    }

    .info-section4,
    .info-section5,
    .info-section6,
    .info-section7 {
        padding: 2.5rem 8% !important;
    }

    .info-section8 img:nth-child(2) {
        padding: 0 10rem 0 3rem;
    }
}

@media (max-width: 1200px) {
    .text-overlay-1,
    .text-overlay-2,
    .text-overlay-3 {
        font-size: 0.9rem;
        width: calc(27vw - 3.2rem);
    }
}

@media (max-width: 992px) {
    .text-overlay {
        font-size: 1.15rem;
        top: 5%;
    }
    .text-overlay span {
        font-size: 1.3rem;
    }
    .text-overlay img {
        max-width: 25%;
    }

    .text-overlay-1 {
        top: 80%;
        font-size: 0.8rem;
        left: 60%;
        transform: translate(-50%, 0%);
        width: calc(28vw - 2rem);
    }

    .text-overlay-2 {
        top: 30%;
        font-size: 0.8rem;
        left: 92%;
        transform: translate(-50%, 0%);
        width: calc(28vw - 2rem);

    }

    .text-overlay-3 {
        top: 80%;
        font-size: 0.8rem;
        left: 90%;
        transform: translate(-50%, 0%);
        width: calc(28vw - 2rem);
    }

    .info-section8 img:nth-child(2) {
        padding: 0 6rem 0 1rem;
    }
}

@media (max-width: 764px) {
    .text-overlay {
        font-size: 1rem;
        top: 5%;
        left: 50%;
        transform: translate(-50%, 0%);
    }
    .text-overlay img {
        max-width: 30%;
    }
    .text-overlay span {
        font-size: 1.2rem;
    }

    .text-overlay-1 {
        top: 80%;
        font-size: 0.7rem;
        left: 60%;
        transform: translate(-50%, 0%);
        width: calc(28vw - 1rem);
    }

    .text-overlay-2 {
        top: 30%;
        font-size: 0.7rem;
        left: 94%;
        transform: translate(-50%, 0%);
        width: calc(28vw - 2rem);
        padding-left: 10px;
    }

    .text-overlay-3 {
        top: 80%;
        font-size: 0.7rem;
        left: 90%;
        transform: translate(-50%, 0%);
        width: calc(28vw - 1rem);
    }

    .info-section8 img:nth-child(2) {
        padding: 0 5rem 0 1rem;
    }
}

@media (max-width: 576px) {
    /*.info-section4 img {
        width: 20%;
    }*/

    .logo-container {
        top: 20%
    }

        .logo-container img {
            width: 70%;
            height: auto;
        }

    .text-overlay {
        top: 10%;
        left: 50%;
        transform: translate(-50%, 0%);
    }

    .text-overlay-1 {
        top: 80%;
        /* font-size: 0.6rem; */
        left: 40%;
        transform: translate(-50%, 0%);
        width: calc(30vw - 1rem);
    }

    .text-overlay-2 {
        top: 80%;
        /* font-size: 0.6rem; */
        left: 100%;
        transform: translate(-50%, 0%);
        width: calc(30vw - 1rem);
    }

    .text-overlay-3 {
        top: 80%;
        /* font-size: 0.6rem; */
        left: 70%;
        transform: translate(-50%, 0%);
        width: calc(30vw - 1rem);
    }

    .info-section8 img:nth-child(2) {
        padding: 0;
    }
}

@media (min-width: 1281px) {
    .cveFont {
        padding: 0 3rem;
    }
}

@media (max-width: 1000px) {
    #info7_bg {
        height: 60vh;
    }
}

@media (min-width: 651px) and (max-width: 800px) {
    #info7_bg {
        height: 50vh;
    }
}

@media (max-width: 650px) {
    #info7_bg {
        height: 40vh;
    }
}

/*Mobile UI*/
@media (max-width: 768px) {
    /* --- 開啟漢堡選單 進場動畫 --- */
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    /* --- 關閉出場動畫（向右滑出螢幕） --- */
    @keyframes slideOutRight {
        from {
            transform: translateX(0);
        }

        to {
            transform: translateX(100%);
        }
    }

    .navbar {
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        background-color: #ffffff !important
    }

    /* 1. 展開中與已展開狀態 */
    .mobile-overlay-menu.collapsing,
    .mobile-overlay-menu.show {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: #ffffff !important;
        z-index: 9999 !important;
        padding: 8px 24px 24px 24px !important;
        box-sizing: border-box !important;
        animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
        transition: none !important;
    }

    /* 2. 當被加上 .slide-out 類別時，強制執行 0.4 秒滑出動畫 */
    .mobile-overlay-menu.slide-out {
        animation: slideOutRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    .mobile-overlay-menu .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
    }

    .mobile-menu-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-top: 5px !important;
        margin-bottom: 25px !important;
    }

        .mobile-menu-header .navbar-brand {
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            margin: 0 !important;
            display: flex !important;
            align-items: center !important;
        }

    /* 右上角 ✕ 按鈕 */
    .btn-close-menu {
        border: none !important;
        background-color: #EEEDFF !important;
        color: #4A3AFF !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        font-weight: bold !important;
        cursor: pointer !important;
        margin: 0 !important;
    }

    /* 3. 中間選單清單：靠左、滿寬、虛線分隔 */
    .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-grow: 1 !important; /* 撐滿空間，將 footer 按鈕推到最下方 */
    }

        .navbar-nav .nav-item {
            width: 100% !important;
            border-bottom: 1px dashed #E5E7EB !important;
        }

            .navbar-nav .nav-item .nav-link {
                display: block !important;
                padding: 18px 0 !important;
                font-size: 1.15rem !important;
                font-weight: 500 !important;
                color: #1F2937 !important;
                text-align: left !important;
            }

                .navbar-nav .nav-item .nav-link.active::after, .navbar-nav .nav-item .nav-link:hover::after {
                    width: 100%;
                }

    /* 4. 底部兩顆固定並排按鈕 */
    .mobile-menu-footer {
        display: flex !important;
        gap: 12px !important;
        width: 100% !important;
        margin-top: auto !important;
        padding-bottom: 15px !important;
    }

    /* Menu button */
    .btn-mobile-menu {
        flex: 1 !important;
        padding: 13px 0 !important;
    }

    .info-section8 {
        padding-bottom: 25px !important;
    }

    /* 三行文字水平置中 */
    .text-overlay-1, .text-overlay-2, .text-overlay-3 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        left: 50% !important;
        transform: translate(-50%, 0) !important;
        width: 100% !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    /* 依序由上往下排列，並精準推至背景圖的最下方區域 */
    .text-overlay-1 {
        top: 76% !important;
    }

    .text-overlay-2 {
        top: 85% !important;
    }

    .text-overlay-3 {
        top: 94% !important;
    }

        .text-overlay-1 .targetStyle1,
        .text-overlay-2 .targetStyle2,
        .text-overlay-3 .targetStyle3 {
            left: unset;
        }

    /* 發光容器 */
    .target-container {
        display: inline-block !important;
        position: relative !important;
        width: 20px !important; /* 適當放大至 20px 讓發光有空間伸展 */
        height: 20px !important;
        vertical-align: middle !important;
        margin-right: 8px !important; /* 與右邊文字保持舒適間距 */
    }

    /* 確保光圈容器完全置中並固定尺寸 */
    .glow-ring-container {
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        position: absolute !important;
    }

    /* 覆蓋大中小光圈，強制三行都用一樣的尺寸發光 */
    .glow-ring {
        position: absolute !important;
        border-width: 1px !important;
        border-radius: 50% !important;
        /* 縮小發光陰影（box-shadow） */
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.8) !important;
    }

    /* 大光圈：直接鎖死在略大於容器的 24px，三行都能拿到完全對稱、不跑位的光暈效果 */
    .glow-ring-large {
        width: 24px !important;
        height: 24px !important;
        top: -2px !important;
        left: -2px !important;
    }

    /* 中光圈 */
    .glow-ring-medium {
        width: 18px !important;
        height: 18px !important;
        top: 1px !important;
        left: 1px !important;
    }

    /* 小光圈 */
    .glow-ring-small {
        width: 14px !important;
        height: 14px !important;
        top: 3px !important;
        left: 3px !important;
    }

    /* 縮小 12 條發光刻度線，確保在手機版不溢出且三行表現一致 */
    .dividing-lines {
        width: 14px !important;
        height: 14px !important;
        top: 3px !important;
        left: 3px !important;
        opacity: 0.3 !important;
    }

    .info-section9 {
        padding: 1.5rem 0.9rem !important;
        font-size: 0.9rem;
        width: 100% !important;
        box-sizing: border-box !important;
    }

        .info-section9 [class*="col-"] {
            width: 100%;
        }

        /* 破除 Bootstrap .row 的 Flex 限制，改成最乾淨的傳統 block 垂直落差 */
        .info-section9 .row {
            display: block !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            text-align: center !important;
        }

        /* 左側 Logo 與版權宣告 */
        .info-section9 .logo-img,
        .info-section9 .col-sm-5 {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            padding: 0 !important;
            margin: 0 auto 20px auto !important;
        }

            .info-section9 .logo-img img {
                max-width: 140px !important;
                margin: 0 auto !important;
                display: block !important;
            }

            .info-section9 .logo-img .pt-4 {
                padding-top: 12px !important;
                font-size: 0.9rem !important;
                color: rgba(255, 255, 255, 0.7) !important;
                display: block !important;
            }

        /* 右側連結區塊 */
        .info-section9 .col-sm-7,
        .info-section9 .pt-4 {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            padding: 0 !important;
            margin: 0 auto !important;
        }

        /* 連結的 UL 容器 */
        .info-section9 #contact .list-unstyled {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            flex-wrap: wrap !important;
            padding: 0 !important;
            margin: 0 !important;
            gap: 25px !important;
        }

            /* 強制拔除 index.html 寫死的 Bootstrap .ps-3 左側內縮，解決對齊歪掉問題 */
            .info-section9 #contact .list-unstyled li,
            .info-section9 #contact .list-unstyled .ps-3 {
                padding-left: 0 !important;
                margin: 0 !important;
                display: inline-block !important;
            }

                .info-section9 #contact .list-unstyled li a {
                    display: inline-block !important;
                    font-size: 1rem !important;
                    font-weight: 700 !important;
                    color: #ffffff !important;
                    letter-spacing: 0.5px;
                }

    .news-swiper .swiper-button-next,
    .news-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }

        .news-swiper .swiper-button-next::after,
        .news-swiper .swiper-button-prev::after {
            font-size: 1rem;
        }

    #latest-news-section h2 {
        font-size: 1.8rem;
    }

    .news-card img {
        height: 180px;
    }

    .custom-card {
        padding: 1.5rem 1.2rem;
    }

    .core-advantage-card {
        padding: 1.5rem;
    }

    .info-section4 .b01-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

