@font-face {
    font-family: 'MYuenHK';
    src: url('path/to/MYuenHK.ttf') format('truetype');
}

@font-face {
    font-family: 'Segoe Script';
    src: url('path/to/SegoeScript.ttf') format('truetype');
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.header-with-frame {
    position: relative;
    background-color: #000; /* 保留全黑背景 */
    color: #fff;
    padding: 30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden; /* 確保背景圖案不會超出邊界 */
    border-bottom: 5px solid #383737; /* header下方的灰色線 */
}

.header-with-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Bluegold_pattern.jpg') repeat; /* 添加背景圖案 */
    background-size: cover; /* 調整背景圖案大小以覆蓋整個header */
    opacity: 1; /* 設置透明度，0.5是50%透明度，可以根據需要調整 */
    z-index: 0; /* 將背景圖案置於其他元素之下 */
}

.header-with-frame::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Dragonnnnnnnn.png') no-repeat center center; /* 添加背景圖片 */
    background-size: cover; /* 調整背景圖案大小以覆蓋整個header */
    opacity: 1; /* 設置透明度 */
    z-index: 1; /* 確保這個背景圖案在之前的背景圖案之上 */
}

.logo-title {
    position: relative;
    z-index: 2; /* 確保文字和圖標在背景圖案之上 */
    display: flex;
    align-items: center;
    gap: 50px; /* 調整Logo與導航菜單的間距 */
}

.logo {
    width: 200px; /* 調整Logo的寬度為200px */
    height: auto;
}

nav {
    position: relative; /* 確保偽元素正確定位 */
    padding: 10px; /* 為透明框創建內邊距 */
    background-color: rgba(255, 255, 255, 0.425); /* 添加半透明背景 */
    border: 2px solid rgba(255, 255, 255, 0.238); /* 半透明邊框 */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 50px; /* 增加導航項目之間的間距 */
}

nav ul li {
    display: inline-block; /* 使每個導航項目成為行內塊元素 */
    position: relative; /* 確保偽元素正確定位 */
}

nav ul li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -15px; /* 調整分隔線的位置 */
    width: 2px; /* 設置分隔線的寬度 */
    height: 100%; /* 設置分隔線的高度 */
    background-color: rgba(255, 255, 255, 0.2); /* 半透明背景 */
}

nav ul li a {
    position: relative;
    color: #ffffff;
    text-decoration: none;
    font-family: 'MYuenHK', Arial, sans-serif; /* 設置導航字體 */
    font-size: 16px; /* 調整字體大小為16px */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* 添加陰影效果 */
    padding: 5px 20px;
    display: flex;
    align-items: center; /* 確保圖標和文字垂直居中 */
    transition: color 0.3s ease; /* 添加平滑過渡效果 */
}

nav ul li a::before {
    content: '';
    display: inline-block;
    width: 30px; /* 設置圖標寬度 */
    height: 30px; /* 設置圖標高度 */
    margin-right: 10px; /* 調整圖標和文字之間的間距 */
    background-size: contain;
    background-repeat: no-repeat;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px; /* 調整藍光位置 */
    left: 0;
    right: 0;
    height: 4px; /* 調整藍光高度，使其更柔和 */
    background: linear-gradient(to right, transparent, rgba(230, 116, 2, 0.848), transparent); /* 添加柔和藍光效果 */
    border-radius: 1px; /* 讓藍光邊緣更加柔和 */
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease; /* 添加更平滑的過渡效果 */
    transform: scaleX(0); /* 初始縮放效果 */
}

nav ul li a:hover::after {
    opacity: 0.8; /* 當鼠標移動到鏈接上時顯示藍光 */
    transform: scaleX(1); /* 展開藍光效果 */
}

nav ul li a[href="index.html"]::before {
    background-image: url('home_icon.png'); /* 設置home圖標 */
}

nav ul li a[href="about.html"]::before {
    background-image: url('about_icon.png'); /* 設置about圖標 */
}

nav ul li a[href="products.html"]::before {
    background-image: url('product_icon.png'); /* 設置product圖標 */
}

nav ul li a[href="blog.html"]::before {
    background-image: url('blog_icon.png'); /* 設置blog圖標 */
}

nav ul li a[href="about.html#contact"]::before {
    background-image: url('contact_icon.png'); /* 設置contact圖標 */
}


.search-container {
    position: relative;
    z-index: 2; /* 確保文字和圖標在背景圖案之上 */
    display: flex;
    align-items: center;
}

.search-icon-left {
    width: 50px; /* 設置圖標寬度 */
    height: 50px; /* 設置圖標高度 */
    margin-right: 10px; /* 調整圖標與搜尋欄的間距 */
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #fff; /* 設置背景顏色為白色 */
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px;
    position: relative; /* 設置相對定位 */
}

.search-bar input[type="text"] {
    border: none; /* 移除邊框 */
    font-size: 14px;
    background-color: transparent; /* 設置背景為透明 */
    outline: none; /* 移除輸入框的默認輪廓 */
    padding-left: 30px; /* 增加內邊距以避免遮蔽放大鏡 */
}

.search-bar img {
    position: absolute; /* 設置絕對定位 */
    left: 7px; /* 距離左側10像素 */
    width: 16px; /* 調整圖示寬度 */
    height: 16px; /* 調整圖示高度 */
    top: 6px;
}


.footer-with-frame {
    position: relative;
    background-color: #000; /* 保留全黑背景 */
    color: #fff;
    text-align: right; /* 將文字向右對齊 */
    padding: 15px 20px; /* 增加內邊距以確保文字不貼邊 */
    border-top: 5px solid #383737; /* footer上方的灰色線 */
}

.footer-with-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Blackgold_pattern.jpg') repeat; /* 添加背景圖案 */
    background-size: cover; /* 調整背景圖案大小以覆蓋整個footer */
    opacity: 1; /* 設置透明度，0.5是50%透明度，可以根據需要調整 */
    z-index: 0; /* 將背景圖案置於其他元素之下 */
}

.footer-content {
    position: relative;
    z-index: 2; /* 確保footer內容在背景圖案之上 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-icons {
    display: flex;
    gap: 10px; /* 增加圖標之間的間距 */
}

.footer-icons img {
    width: 30px; /* 設置圖標寬度 */
    height: 30px; /* 設置圖標高度 */
}

#video {
    width: 100%;
    height: 101.8vh; /* 設置影片高度為視窗高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black; /* 設置背景顏色為黑色 */
}

#portfolio-video {
    width: 100%;
    height: auto; /* 保持影片等比縮放 */
    max-width: 1920px;
    max-height: 1080px;
}

.full-screen-image {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
}

.line-top {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 830px;
    background-color: white; /* 設置為透明 */
    opacity: 0.12;
    z-index: 2; /* 設置為與圖片同層 */
    top: 120;
}

video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.video-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; /* 確保容器高度等於影片高度 */
}

.video-container video {
    width: 100%; /* 讓影片自適應容器寬度 */
}

.transparent-rectangle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5); /* 設置背景顏色及透明度，這裡為50%透明 */
    border: 2px solid rgba(255, 255, 255, 0.75); /* 設置邊框及其透明度，這裡為75%透明 */
    width: 80%; /* 根據需要調整長方形的寬度 */
    height: 80%; /* 根據需要調整長方形的高度 */
    display: flex;
    flex-direction: column; /* 設置為縱向排列 */
    justify-content: flex-start; /* 水平對齊方式 */
    align-items: flex-start; /* 垂直對齊方式 */
    padding: 20px; /* 添加內邊距以確保文字不貼邊 */
    z-index: 1; /* 確保長方形顯示在影片上方 */
}

.rectangle-title {
    margin: 1;
    color: #000000; /* 標題文字顏色 */
    font-size: 50px; /* 調整標題文字大小 */
    text-align: left; /* 標題文字左對齊 */
    font-family: 'Segoe Script', Arial, sans-serif;
    margin-bottom: 0px; /* 添加上邊距以確保透明線不貼著標題文字 */
}

.transparent-line {
    width: 65%; /* 設置透明線的寬度 */
    height: 2px; /* 設置透明線的高度 */
    background-color: rgba(255, 255, 255, 0.5); /* 設置透明線的背景顏色及透明度 */
    margin-top: 15px; /* 添加上邊距以確保透明線不貼著標題文字 */
}

.rectangle-text {
    margin-top: 30px; /* 添加上邊距以確保文字不貼著透明線 */
    color: #000000; /* 設置文字顏色為白色 */
    font-size: 19px; /* 調整文字大小 */
    text-align: left; /* 設置文字左對齊 */
    font-family: 'MYuenHK', Arial, sans-serif;
    line-height: 1.5; /* 設置行高以提高可讀性 */
}

.content-wrapper {
    display: flex; /* 設置為橫向排列 */
    justify-content: space-between; /* 在橫向上分散對齊 */
    align-items: flex-start; /* 在縱向上頂部對齊 */
    width: 100%; /* 設置寬度為100% */
}

.profile-photo {
    margin-left: 20px; /* 與文字區域保持一些間距 */
    align-self: flex-start; /* 將圖片與文字區域頂部對齊 */
    width: 350px; /* 設置圖片寬度 */
    height: auto; /* 保持圖片的等比縮放 */
    border-radius: 0px; /* 為圖片添加圓角 */
    border: 2px solid rgba(255, 255, 255, 0.75); /* 為圖片添加邊框 */
    transform: translate(-30px, -30px); /* 向左和向上移動圖片 */
}
.new-image-container {
    margin-top: 0px; /* 與上方內容保持一些間距 */
    text-align: center; /* 讓圖片居中顯示 */
}

.new-image {
    display: inline-block;
    width: 100%; /* 根據需要調整圖片寬度 */
    height: auto; /* 保持圖片等比縮放 */
}
.black-bar {
    width: 100%;
    height: 50px; /* 你可以根據需要調整這個高度 */
    background-color: #000; /* 黑色背景 */
    margin-top: -10px; /* 與上方內容保持一些間距 */
}

.new-image-container,
.second-new-video-container {
    margin-top: 0px; /* 與上方內容保持一些間距 */
    text-align: center; /* 讓圖片和視頻居中顯示 */
    position: relative; /* 確保子元素可以絕對定位 */
}

.new-image {
    display: inline-block;
    width: 100%; /* 根據需要調整圖片寬度 */
    height: auto; /* 保持圖片等比縮放 */
    border-radius: 0px; /* 添加圓角效果 */
}

video {
    display: inline-block;
    width: 100%; /* 根據需要調整視頻寬度 */
    height: auto; /* 保持視頻等比縮放 */
    border-radius: 0px; /* 添加圓角效果 */
}

.overlay-icons {
    position: absolute; /* 絕對定位，確保圖案疊加在視頻上 */
    top: 0; /* 從視頻頂部開始 */
    left: 0; /* 從視頻左邊緣開始 */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around; /* 根據需要調整圖案之間的間距 */
    align-items: center;
    pointer-events: none; /* 確保圖案不會干擾視頻播放 */
}

.overlay-icon {
    width: 100px; /* 根據需要調整圖案大小 */
    height: 100px; /* 根據需要調整圖案大小 */
    opacity: 0; /* 初始狀態設置為隱藏 */
    animation: show-hide 25s forwards; /* 設置動畫，22秒內顯示並隱藏 */
    pointer-events: all; /* 允許圖標響應鼠標事件 */
}

/* 定義動畫 */
@keyframes show-hide {
    0% { opacity: 0; } /* 開始時隱藏 */
    25% { opacity: 1; } /* 顯示 */
    75% { opacity: 1; } /* 持續顯示 */
    100% { opacity: 0; } /* 最後隱藏 */
}

/* 為每個圖案設置不同的動畫延遲時間 */
.overlay-icon:nth-child(1) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(2) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(3) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(4) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(5) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(6) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(7) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(8) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(9) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(10) {
    animation-delay: 10s;
}

.overlay-icon:nth-child(11) {
    animation-delay: 10s;
}
.certificate-container {  /* Certificate開始 */
    position: relative;
    text-align: center;
}

.background-image {
    width: 100%;
    height: auto;
    z-index: 1;
}

.certificate-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 100%; /* 確保內容在容器內 */
    overflow: hidden; /* 隱藏超出部分 */
}

.certificate-carousel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%; /* 確保輪播寬度為100% */
}

.certificate {
    flex: 0 0 100%;
    transition: transform 0.5s ease-in-out;
}

.certificate img {
    max-width: 70%; /* 設置為100%以保持圖片在容器內 */
    height: auto;
    border: 5px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.prev-button, .next-button {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.prev-button {
    left: 90px;
}

.next-button { /* Certificate結束 */
    right: 90px;
}

.contact-form { /* Contact開始 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%; /* 根據需要調整寬度 */
    max-width: 500px; /* 設置最大寬度 */
}

.contact-form h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-family: 'Arial', sans-serif;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

.contact-form button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #555;
} /* Contact結束 */

/* 視差滾動容器的樣式 *//* Product的base.jpg(首頁)開始 */
.parallax-container {
    position: relative;
    height: 600px; /* 根據需要調整高度 */
    overflow: hidden;
}

/* 使用背景圖片創建視差滾動效果 */
.parallax {
    background-image: url('Base3.jpg'); /* 替換為你的圖片路徑 */
    height: 100%;
    background-attachment: fixed; /* 固定背景圖片 */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    flex-direction: column; /* 垂直佈局以便更好地放置文本和線條 */
}

/* 包含文字和透明線的容器 */
.parallax-content {
    text-align: center; /* 內容居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 居中文字的樣式 */
.parallax-text {
    color: white; /* 字體顏色 */
    font-size: 3em; /* 字體大小 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* 添加陰影效果 */
    text-align: center; /* 文字居中 */
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 30px; /* 確保與透明線之間有合理的距離 */
}

/* 透明線的樣式 */
.transparent-line1 {
    width: 50%; /* 根據需要調整寬度 */
    height: 2px; /* 調整高度 */
    background-color: rgba(255, 255, 255, 0.5); /* 半透明白色背景 */
    margin-top: 10px; /* 確保透明線與文字間距合理 */
} 
/* Product的base.jpg(首頁)結束 */

/* Polaroid 風格的畫廊樣式 */
.gallery { /* gallery外框開始 */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    cursor: pointer;
}

.polaroid { /* gallery外框長度 */
    position: relative;
    width: 250px;
    height: 300px;
    padding: 50px;
    background: linear-gradient(to bottom, orange 58%,white 42%); /* 上半部橙色，下半部白色 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.polaroid::before {
    content: "";
    position: absolute;
    top: 12.5%; /* 根據需要調整位置 */
    left: 0;
    width: 100%;
    height: 182.9px; /* 調整黑色條的高度 */
    background: black;
}

.polaroid img {
    width: 130%;
    height: auto;
    border-bottom: 1px solid #ddd;
    position: relative;
    left: -37px;
}

.polaroid .caption {
    padding: 50px;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

.gallery-item:hover .polaroid {
    transform: scale(1.05);
}

/* 模態框樣式 */ /* gallery開始 */
.modal {
    display: none; /* 初始狀態為隱藏 */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9); /* 背景顏色 */
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%; /* 調整寬度 */
    max-width: 900px; /* 最大寬度 */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    top: 90px;
    position: relative;
}

#modal-caption {
    margin: 20px auto;
    display: block;
    width: 90%;
    max-width: 900px;
    text-align: center;
    color: #ccc;
    padding: 20px; /* 增加內邊距 */
    background-color: rgba(0, 0, 0, 0.7); /* 半透明背景 */
    border-radius: 10px; /* 圓角 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    top: 100px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
/* gallery結束 */
