/* 容器基本設定 */
.interactive-container {
    width: 100%;
    max-width: 1000px;
    margin: 5em auto;
    font-family: Arial, sans-serif;
}

/* 上方按鈕樣式 */
.button-group {
    display: flex;
    justify-content: center;
    margin-bottom: 2em;
}

.nav-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 20px;
    padding: 0.15em 0 0 0;
    width: 120px;
    height: 120px;
    border-radius: 50%; /* 圓形關鍵 */
    text-align: center;
    
    border: 1.5px solid transparent; 
    background-image: linear-gradient(#fff, #fff), linear-gradient(to right, #0000ff, #00c5ff, #0000ff);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    transition: color 0.3s ease; /* 字體顏色平滑過渡 */
    cursor: pointer;
}

/* 4. 關鍵：使用偽元素製作 Hover 時的 #00c5ff 背景層 */
.nav-btn::before {
    content: '';
    position: absolute;
    top: -4px;    /* 覆蓋到外框的最外緣 (與 border 寬度相同) */
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background-color: #1FACCC;
    z-index: -1;  /* 擋在文字後面，但遮住原本的漸層 */
    
    /* 預設為隱形且縮小，做出由內向外擴散的動態效果 */
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

/* 5. Hover 觸發狀態 */
.nav-btn:hover {
    color: #ffffff; /* 字體變白色 */
    background: #1FACCC;
}

.cnav-btn:hover::before {
    opacity: 1;     /* 顯示 #00c5ff 背景 */
    transform: scale(1); /* 恢復正常大小，完美覆蓋原本的漸層邊框 */
}

/* 5. Hover 觸發狀態 */
.nav-btn.active {
    color: #ffffff; /* 字體變白色 */
    background: #1FACCC;
}


/* 下方圖片容器 */
.image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: src 0.6s ease; /* 讓圖片更換時有些微過渡感 */
}

/* SVG 滿版覆蓋在圖片上 */
.image-wrapper svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}



/* 讓不規則區域在 Hover 時有淡淡的提示色，方便你在開發時測試範圍是否正確 */
.svg-area {
    fill: rgba(0, 0, 0, 0); /* 平時完全透明 */
    stroke: transparent;
    cursor: pointer;
    transition: fill 0.2s ease;
}

/* 測試用：滑鼠移入時顯示半透明藍色，上線時若不需要可整段刪除 */
.svg-area:hover {
    fill: rgba(0, 123, 255, 0); 
}

/* 如果不想讓地板的藍色遮罩擋住其他盒子，可以單獨把地板的 hover 顏色改淡 */
.svg-area[data-target="integration"]:hover {
    fill: rgba(0, 123, 255, 0);
}


#section-process, #section-precision, #section-tray, #section-integration {
    margin: 0 auto;
    width: 100%;
    height: 20px;
}




@media screen and (max-width: 1100px) {

.interactive-container {
    width: 100%;
    max-width: 1000px;
    margin: 3em auto;
}

.nav-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    width: 110px;
    height: 110px;
    
}

}

@media screen and (max-width: 736px) {

.interactive-container {
    width: 90%;
    max-width: 1000px;
    margin: 2em auto;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2em;
}

.nav-btn {
    margin: 0 10px 10px 10px;
    width: 100px;
    height: 100px;
    line-height: 120%;
    font-size: 115%;
}


}

@media screen and (max-width: 500px) {

.interactive-container {
    margin: 1em auto;
    width: 90%;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto 2em auto;
    width: 90%;
}

.nav-btn {
    margin: 0 10px 10px 20px;
    width: 110px;
    height: 110px;
    line-height: 145%;
    font-size: 115%;
}

#section-process, #section-precision, #section-tray, #section-integration {
    height: 10px;

}


}


@media screen and (max-width: 440px) {

.interactive-container {
    width: 90%;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto 2em auto;
    width: 80%;
}

.nav-btn {
    margin: 0 10px 10px 20px;
    width: 100px;
    height: 100px;
    line-height: 155%;
    font-size: 110%;
}

}


@media screen and (max-width: 400px) {

.interactive-container {
    width: 90%;
}

.button-group {
    width: 100%;
}

.nav-btn {
    margin: 0 10px 10px 20px;
    width: 110px;
    height: 110px;
    line-height: 155%;
    font-size: 110%;
}

}