/* -------------------- 字體 & 動畫 -------------------- */

@font-face {
    font-family: 'LXGW WenKai Light';
    src: url('/fonts/LXGWWenKai-Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'LXGW WenKai Regular';
    src: url('/fonts/LXGWWenKai-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 打字機動畫 */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* 游標閃爍效果 */
@keyframes blink {
    50% { border-color: transparent; }
}

@keyframes blinkCursor {
    from { border-color: white; }
    to { border-color: transparent; }
}

/* -------------------- 全局變數 -------------------- */
:root {
    --scroll-y: 0px;
    --parallax-factor: -0.3; /* 設定視差速度 */
}

/* -------------------- 全局樣式 -------------------- */
html, body {
    overflow-x: hidden; /* 隱藏 X 軸滾動 */
    width: 100%; /* 確保寬度不超過視口 */
    margin: 0;
    padding: 0;
}
h1{
  margin: 0;
  text-align: center;
}
body {
    font-family: 'LXGW WenKai Regular', sans-serif;
    background-color: white;
    width: 100%;
    margin: 0;
    padding: 0;
}
* {
    box-sizing: border-box; /* 確保寬度不會被 padding/border 增加 */
}
p{
  margin: 5px;
}
h2{
  font-family: 'LXGW WenKai Light', sans-serif;
  font-weight: normal;
  font-style: normal;
  text-align: center;
}
.d-flex{
    display: flex;
    justify-content: center;
    white-space: nowrap;
    height:auto;
    margin: 0 auto;
}
.image{
    display: inline-block;
    min-height: 300px;
    min-width: 20%;
    padding: 3em;
    margin: 0.5em;
    display: inline-block;
    position: relative;

}
.image2{
    width: 100%;
    height: auto;
    no-repeat center;

}
/* -------------------- 主要容器 -------------------- */

header {
    font-family: 'LXGW WenKai Light', sans-serif;
    color: white;
    background-color: black;
}

/* 頁首打字機效果 */
.header-typewriter {
    position: fixed;
    width: 100%;
    max-height: 36px;
    background-color: black;
    color: white;
    font-size: 20px;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    z-index: 500;
    padding: 0 70px;
    display: inline-block;
    transform: scaleX(1);
}

#typewriter-text {
    font-family: 'LXGW WenKai Light', sans-serif;
    font-weight: 100;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
    border-right: 2px solid white;
    padding-right: 5px;
    animation: blinkCursor 0.6s infinite alternate;
}

/* -------------------- 視差滾動區 -------------------- */

.perspective-container {
    position: relative;
    width: 100％;
    height: 350px;
    overflow: hidden;
}

/* 視差背景 */
.parallax {
    width: 100%;
    height: 350px;
    display: block;
    color: black;
    background-image: url("https://res.cloudinary.com/dyjvqds92/image/upload/v1755339900/A04211927_y2083o2_pjzuzm.jpg");
    background-repeat: repeat;
    opacity: 50%;
    overflow: hidden;
}

.parallax-bg  {
    position: relative;
    width: 100%;
    height: auto;
    background-size: contain;

}
transform: translateY(calc(var(--scroll-y) * var(--parallax-factor)));
transition: transform 0.1s ease-out;
z-index: 1;
.parallax-bg img{
  width: 100%;
  height: auto;
  no-repeat center;
}

/* 視差內容 */
.parallax-content {
    top: 70px;
    position: absolute;
    width: 100%;
    padding: 20px;
    color: white;
    text-align: center;
    z-index: 5;
    margin: 0 auto;
    background-repeat: repeat;
}

/* -------------------- 動畫文字 -------------------- */

.animated-text {
    text-decoration: none;
    color: white;
    font-size: 70px;
    font-family: 'LXGW WenKai Regular', sans-serif;
    font-weight: 100;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
    animation: typing 3s steps(30) forwards;
    margin: -20px auto;
}

.animated-text:hover {
    cursor: pointer;
    color: #DADADA;
}

/* -------------------- 漢堡選單按鈕 -------------------- */

.btncontainer {

}

/* 漢堡按鈕 */
.menu-btn {
    position: fixed;
    top: -7px;
    left: 10px;
    background: transparent;
    border: none;
    font-size: 36px;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* 按鈕點擊時旋轉 */
.menu-btn.active {
    transform: rotate(90deg);
    color: #f0a500;
}

/* -------------------- 導覽列 -------------------- */

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 35px;
}

nav ul li a {
    text-decoration: none;
    color: #BBBBBB;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

nav ul li a:hover {
    opacity: 50%;
}


/*--------------------------- */
#previewContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none; /* 預設不顯示 */
}

#previewContainer.show {
  display: flex;
}

.preview-image {
  max-width: 80%;
  max-height: 80%;
  margin-bottom: 1rem;
}

.go-to-allworks {
  padding: 10px 20px;
  font-size: 1rem;
  background: white;
  color: black;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}
.item_name {
  cursor: pointer;
  text-decoration: underline;
}

.work-item {
  cursor: pointer;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}



.popup-inner {
  max-width: 400px;
}
.content{
    max-width: 90%;
    margin: 20px auto;
    padding: 10px;
}
.text1{
    font-family: 'LXGW WenKai Regular', sans-serif;
    text-align: center;
    font-size: 16px;
    color: black;
    display: block;
    transition: 0.1s;
    margin:10px 0;
}


/* 設置滾動區塊容器 */
.scroll-container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;

}

/* 設置滾動內容區塊 */
.scroll-content {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    max-width: 1000px;
    padding: 0px;
    cursor: grab;
    margin:0 auto;
    user-select: none;
    height: 100%;
}

/* 拖動時的鼠標效果 */
.scroll-content:active {
    cursor: grabbing;
}

/* 隱藏滾動條（適用於 Chrome、Edge、Safari） */
.scroll-content::-webkit-scrollbar {
    display: none;
}

/* 隱藏滾動條（適用於 Firefox） */
.scroll-content {
    scrollbar-width: none;
}

/* 隱藏滾動條（適用於 IE 和 Edge） */
.scroll-content {
    -ms-overflow-style: none;
}

/* 設置滾動項目 */
.item {
    flex: 0 0 auto;
    width: 200px;
    background: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    margin: 20px;
    user-select: none;
}

/* 強制圖片區塊為正方形 */
.item_img {
    width: 100%;
    padding-top: 100%; /* ✅ 正方形比例 */
    position: relative;
    overflow: hidden;
}

.item_img img {
    position: absolute; /* ✅ 完全蓋住容器 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.3);
}
.item_p{
  padding: 10px 5px;
  font-size: 16px;
  color: #333;
}
.item p {
  height: auto;; /* 下半部分是文字 */
  margin:0px;
  padding:0;
}
.item_name{
  margin: 10px 0;
}
.item_tag{
  margin-bottom:5px;
}

/* 滾動按鈕 */
.scroll-container button {
    background-color: transparent;
    color: black;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 5px;
}

/* 滑鼠懸停按鈕 */
.scroll-container button:hover {
  color: linear-gradient(90deg, #005bea, #00c6fb);
  transform: scale(1.3);
}



.text2{
  font-family: 'LXGW WenKai Regular', sans-serif;
  font-size: 16px;
  color: black;
  display: block;
  transition: 0.1s;
  margin:10px 0;
}


.containerhead{
    width:100%;
    height:auto;
    background-color:black;
}

.container {
    max-width: 100%;
    border-radius: 0px;
    background-color: #EAEAEA;
}
.containerfoot {
    border-radius: 0px;
    font-size: 13px;
    margin:10px 0;
}
.container2 {
    min-height: 1px;
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    background-color: black;
}



.jumbotron {
    position: relative;
    width: 100%;
    height: auto;
    background-repeat: repeat;
    no-repeat center;
    object-fit: cover;
    transform: translateY(calc(var(--scroll-y) * var(--parallax-factor)));
    transition: transform 0.1s ease-out;
}

.jumbotron img{
    width: 100%;
    height: auto;
    no-repeat center;
}




/* sidebar */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
}


/* 當側邊欄打開時，顯示遮罩層 */
.sidebar.open {
    width: 250px;
}

/* 側邊欄基礎樣式 */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    overflow-x: hidden;
    transition: 0.4s;
    padding-top: 60px;
    z-index: 1002;
}

/* 側邊欄連結樣式 */
.sidebar a {
    padding: 5px 20px;
    text-decoration: none;
    font-family: 'LXGW WenKai Regular', sans-serif;
    text-align: justify;
    font-size: 18px;
    font-weight: 300;
    color: black;
    display: block;
    transition: 0.1s;
    text-align: left;
}

/* 滑鼠懸停時變色 */
.sidebar a:hover {
    cursor: pointer;
    color: linear-gradient(90deg, #005bea, #00c6fb);
    transform: scale(0.95);
}

/* 確保 .dropdown 是相對定位 */
.dropdown {
    position: relative;
    display: block;
}

/* 設定按鈕 */
.dropdown-btn {
    padding: 5px 20px;
    background: transparent;
    border: none;
    text-decoration: none;
    font-family: 'LXGW WenKai Regular', sans-serif;
    text-align: justify;
    font-size: 18px;
    font-weight: 300;
    color: black;
    display: block;
    transition: 0.1s;
    text-align: left;
}
.dropdown-btn:hover{
    cursor: pointer;
    color: linear-gradient(90deg, #005bea, #00c6fb);
    transform: scale(0.95);
}
.dropdown-btn-inside {
    padding: 5px 20px;
    background: transparent;
    border: none;
    text-decoration: none;
    font-family: 'LXGW WenKai Regular', sans-serif;
    text-align: justify;
    font-size: 18px;
    font-weight: 300;
    color: black;
    display: block;
    transition: 0.1s;
    text-align: left;
}
.dropdown-btn-inside:hover{
    cursor: pointer;
    color: linear-gradient(90deg, #005bea, #00c6fb);
    transform: scale(0.95);
}
/* 設定選單初始狀態（隱藏） */
.dropdown-content {
    margin: auto 40px auto 30px;
    display: none;
    position: static;
    background-color: transparent;
    min-width: 150px;
    overflow: hidden;
    transition: height 0.3s ease-out;
}

/* 選單內的選項 */
.dropdown-content a {
    display: block;
    padding: 10px;
    color: black;
    text-decoration: none;
}

/* 滑鼠移動到選項時的效果 */
.dropdown-content a:hover {
    margin-left: 10px;
    cursor: pointer;
    color: linear-gradient(90deg, #005bea, #00c6fb);
    transform: scale(0.95);
}
/* 初始向下 */
.arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
    transition: transform 0.3s ease;
}
/* 旋轉 180 度，變成向上箭頭 */
.dropdown.active .arrow {
    transform: rotate(180deg);
}
.dropdown.active .dropdown-content {
    display: block; /* 展開時顯示 */
}



.overlay.open {
    display: block;
}

/* 調整側欄內的 X 按鈕 */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 40px;
    color: gray;
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    transition: transform 0.2s;
}

/* X 按鈕 hover 效果 */
.close-btn:hover {
    transform: scale(1.2);
    color: #EFEFEF;
}


.menu-btn:hover {
    opacity: 50%;
}

.section {
    height: 300px;
    width: 100%;
    display: flex;
    gap: 10px;
    white-space: nowrap;
    margin:20px 0px;
}
.tilt-box {
    width: 500px;
    height: 300px;
    justify-content: center;
    margin: 0 auto;
    background: url('https://res.cloudinary.com/dyjvqds92/image/upload/v1741267233/11_ftj6rq.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) ;
}
.parallaxblock{
    min-height: 500px;
}
.parallaxtext{
    min-height: 500px;
}

footer {
    max-width: 90%;
    margin: 20px auto;
    padding: 10px;
}
