.carousel-section {
    width: 100vw;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-family: "Noto Serif TC", serif;
    font-weight: 700;
    align-items: center;
    z-index: 0;
    position: relative;
    overflow-y: hidden
}

.carousel-bg {
    top: calc(var(--spacing) * 0);
    left: calc(var(--spacing) * 0);
    z-index: -1;
    width: 100%;
    position: absolute;
    overflow-x: hidden;
}


.carousel-bg img {
    /* size */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-section h1 {
    font-size: 5vw;
    color: #585858;
    margin-top: 10%;
    letter-spacing: 5px;
}

.carousel {
    width: 30%;
    /* 改變大小 rwd注意 */
    min-height: 40%;
    perspective: 1000px;
    touch-action: pan-y;
    writing-mode: vertical-rl;
    margin-top: 15%;

}




.carousel__track {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;

}

.carousel__slide {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0%;
    background-color: rgba(255, 255, 255, 0.4);
    /*box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);*/
    transition: transform 0.3s, opacity 0.3s;
    cursor: grab;
    overflow: visible;

}

.carousel__slide img,
.carousel__slide .label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease, color 0.3s ease;
    pointer-events: none;
    z-index: 1;
    /* 預設圖片在下層 */

}
.carousel__slide img, .carousel__slide .label{
    top: -10px;
    left: -5px;    
}


.label {
    z-index: 2;
    /* 讓文字在圖片上面 */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8vw;
    letter-spacing: 3vw;
    background: transparent;
    /* 不遮住圖片 */
    color: #00000080;
    text-align: center;

}

.carousel__slide img.visible,
.carousel__slide .label.visible {
    opacity: 1;
    pointer-events: auto;
}

.label.visible {
    opacity: 1;
}

.label.center {
    color: #fff;
}

/* ✅ 禁止圖片拖曳與選取 */
img {
    pointer-events: none;
    /* user-drag: none; */
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

.page-content {
    display: none;
    width: 100%;
    background: #fff;
    padding-top: 1px;
    margin-top: 20%;
    min-height: 100vh;
    color: black;
    position: relative;

}

.page-content.active {
    display: block;
}

.page-wrapper {
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
}


/* new page */


.page-title {
    width: auto;
    text-align: center;
    position: absolute;
    top: 5%;
    left: 20%;
    z-index: 0;
    /* 設為0，讓下面的子層能比它低 */
}



.page-title img {
    position: absolute;
    top: 60%;
    left: 30%;
    width: 100%;
    z-index: -1;
}

.page-title h2 {
    color: #7BAAB4;
    font-size: 8vw;
    letter-spacing: 2vw;
    z-index: 1;
}

.page-introduce {
    z-index: 1000;
    width: 100%;
    /* background-color: blueviolet; */
    height: 43vh;
    margin-top: 30%;
    writing-mode: vertical-rl;
    /* 垂直從右到左 */
    text-align: left;
    /* 文字靠右對齊（上面） */
    position: relative;
}

.page-introduce img {
    width: 100%;
    position: absolute;
    z-index: -1;

}

.page-introduce h3 {
    padding-top: 20vw;
    text-align: start;
    font-size: 2.5vw;
    z-index: 1;
    letter-spacing: 0.5vw;
    font-weight: 100;
}

.map-section {
    position:relative;
    width: 90vw;
    margin:auto;
    height: 50%;
    /* background-color: blueviolet; */
    writing-mode: vertical-rl;
    /* 垂直從右到左 */
    text-align: left;
    /* 文字靠右對齊（上面） */
    z-index: 0;
    position: relative;
    background: transparent;
    background-color: transparent;
    margin-top: 5%;
    height: max-content;
}

.map-section img {
    visibility: hidden;
    width: 90%;
    /*position: absolute;*/
    z-index: -1;
    object-fit: cover;
    background: transparent;
    background-color: transparent;
}

.city {
    position: absolute;
    color: #7BAAB4;
    text-align: left;
    writing-mode: horizontal-tb;
}

.city1 {
    writing-mode: horizontal-tb;
    position: absolute;
    width: 20vw;
    top: 14%;
    right: 25.3%;
}
.city-button {
    padding: 0px;
    color: #7BAAB4;
    width: 100%;
    border: none;
    border-bottom: 1px #72C8C8 solid;
    background: transparent;
    font-size: 2vw;
}
.city-button:hover,
.city-button:focus {
    color: #F6CD3F;
}


.dot {
    position: absolute;
    box-sizing: content-box;
    top: 100%; /* 貼在 button 下方 */
    transform: translate(50%, -50%); /* 往右一點，垂直置中在 border 線 */
    width: 3px;
    height: 3px;
    aspect-ratio: 1 / 1;
    border: 2.5px solid #72C8C8;
    border-radius: 50%;
    background-color: transparent;
}
.left .city-button {
    text-align: start;
}
.left .dot{
    right: -3px;
}
.right .city-button {
    text-align: end;
}
.right .dot{
    left: -8px;
}

/* --- page2 --- */
#page1 .map-section .city1{
    top: 60%;
    width: 30%;
    right: 25%;
}
#page1 .map-section .city2{
    top: 35%;
    width: 25%;
    right: 15%;
}

/* --- page2 --- */
#page2 .map-section .city1{
    top: 40%;
    width: 10%;
    right: 3%;
}
#page2 .map-section .city2{
    top: 65%;
    width: 15%;
    right: 3%;
}
#page2 .map-section .city3{
    top: 72%;
    width: 25%;
    right: 3%;
}

/* ---page3 --- */
#page3 .map-section .city1{
    top: 50%;
    width: 18%;
    right: 7%;
}
#page3 .map-section .city2{
    top: 52%;
    width: 18%;
    right: 73%;
}
#page3 .map-section .city3{
    bottom: 20%;
    width: 18%;
    right: 57%;
}
#page3 .map-section .city4{
    top: 20%;
    width: 18%;
    right: 30%;
}
/* ---page4 --- */
#page4 .map-section .city1{
    width: 18%;
    right: 40%;
    top: 89%;
}
#page4 .map-section .city2{
    top: 55%;
    width: 14%;
    right: 7%;
}
#page4 .map-section .city3{
    top: 10%;
    width: 35%;
    right: 45%;
}

/* ---page5 --- */
#page5 .map-section .city1{
    width: 24%;
    right: 49%;
    top: 66%;    
}
#page5 .map-section .city2{
    top: 8%;
    width: 20%;
    right: 24%;
}
#page5 .map-section .city3{
    top: 45%;
    width: 20%;
    right: 45%;
}
#page5 .map-section .city4{
    top: 62%;
    width: 25%;
    right: 65%;
}
#page5 .map-section .city5{
    top: 88%;
    width: 20%;
    right: 60%;
}
#page5 .map-section .city6{
    top: 48%;
    width: 20%;
    right: 10%;
}
#page5 .map-section .city7{
    top: 58%;
    width: 25%;
    right: 25%;
}

/* ---page6 --- */
#page6 .map-section .city1{
    width: 45%;
    right: 45%;
    top: 55%;    
}
#page6 .map-section .city2{
    top: 47%;
    width: 23%;
    right: 10%;
}
#page6 .map-section .city3{
    top: 65%;
    width: 25%;
    right: 10%;
}
#page6 .map-section .city4{
    top: 52%;
    width: 25%;
    right: 10%;
}
#page6 .map-section .city5{
    top: 60%;
    width: 40%;
    left: 10%;
}
#page6 .map-section .city6{
    top: 71%;
    width: 28%;
    right: 10%;
}
#page6 .map-section .city7{
    top: 25%;
    width: 25%;
    right: 20%;
}
#page6 .map-section .city8{
    top: 50%;
    width: 40%;
    left: 10%;
}
#page6 .map-section .city9{
    top: 30%;
    width: 15%;
    right: 38%;
}

/* ---page7 --- */
#page7 .map-section .city1{
    width: 18%;
    right: 30%;
    top: 18%;    
}
#page7 .map-section .city2{
    top: 85%;
    width: 10%;
    right: 10%;
}
#page7 .map-section .city3{
    top: 5%;
    width: 18%;
    left: 30%;
}
#page7 .map-section .city4{
    top: 30%;
    width: 20%;
    left: 12%;
}
#page7 .map-section .city5{
    top: 55%;
    width: 20%;
    left: 10%;
}

/* ---page8 --- */
#page8 .map-section .city1{
    width: 17%;
    right: 35%;
    top: 88%;    
}
#page8 .map-section .city2{
    top: 40%;
    width: 18%;
    right: 22%;
}
#page8 .map-section .city3{
    top: 38%;
    width: 10%;
    left: 35%;
}
#page8 .map-section .city4{
    top: 30%;
    width: 20%;
    left: 25%;
}


.plane {
    z-index: 999;
    pointer-events: none;
    width: 100%;
    height: auto;
    position: absolute;
    top: 43%;
    right: 10%;
}

/* 彈出視窗樣式 */
.popup {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, 0);
    width: 70vw;
    background-color: #fff;
    border: 2px solid #61C4C3;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 8px;
    z-index: 100;
    writing-mode: horizontal-tb;
    text-align: left;
    display: none;

}

.popup.show {
    z-index: 9999;
    display: block;
}

/* 上方欄與關閉按鈕 */
.popup-header {
    display: flex;
}

.close-btn {
    text-align: left;
    font-size: 5vw;
    font-weight: bold;
    cursor: pointer;
    color: #61C4C3;
}

.popup-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 1vh;
    padding-bottom: 5vh;
    padding-right: 1vw;
    gap: 1vw;

}


.popup-image {
    width: 45%;
    height: 45%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    /* 確保圖片不會超出容器 */
}

.popup-image img {
    width: 100%;
    height: 100%;
    /* 改為 100% 高度來填充容器 */
    z-index: 1;
    position: relative;
    object-fit: cover;
    /* 保持圖片的比例，並裁剪圖片填滿容器 */
}

.popup-description {
    width: 50%;
    height: auto;
}

.popup-content h4 {
    margin: 0;
    color: #7BAAB4;
    font-size: 3.5vw;
    letter-spacing: 0.6vw;


}

.popup-content p {
    font-size: 2.5vw;
    margin-top: 5px;
    font-weight: 100;
}

.popup-footer {
    position: absolute;
    bottom: 7%;
    right: 8%;
}
#popup-link{
    font-size: 2.5vw;
    color: #7BAAB4;
    font-weight: 100;
}

.wave-block{
    pointer-events: none;
    z-index: 9;
    position: absolute;
    top: 38%;
}

.wave-block .wave{
    pointer-events: none;
    height: 3vw;
    width: 100vw;
    background-size: auto 100% ;
    animation: revealThenHide 1.5s ease-out infinite;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%, transparent 100%);
    -webkit-mask-size: 0% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-image: linear-gradient(to right, transparent 0%, black 50%, transparent 100%);
    mask-size: 0% 100%;
    mask-repeat: no-repeat;
}
@keyframes revealThenHide {
  0% {
    mask-size: 0% 100%;
    mask-position: left;
  }
  50% {
    mask-size: 100% 100%;
    mask-position: right;
  }
  100% {
    mask-size: 0% 100%;
    mask-position: right;
  }
}
.wave-block .wave:nth-child(1){
    width: 20vw;
    margin-left: 10vw;
    background-image: url('../img/index/wave2.png');
    animation-delay: 0.5s;
}
.wave-block .wave:nth-child(2){
    width: 50vw;
    margin-top: 1%;
    margin-left: 1vw;
    background-image: url('../img/index/wave3.png');
}
.wave-block .wave:nth-child(3){
    width: 20vw;
    margin-top: 10%;
    margin-left: 70vw;
    background-image: url('../img/index/wave0.png');
    animation-delay: 0.3s;
}
.wave-block .wave:nth-child(4){
    width: 50vw;
    margin-top: 50%;
    margin-left: 50vw;
    background-image: url('../img/index/wave1.png');
    animation-delay: 1s;
}