/* 重置基本樣式並設置全屏顯示 */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* 防止水平滾動 */
    scroll-behavior: smooth; /* 添加平滑滾動效果 */
    background-color: #fff;
    color: #333;
    width: 100%;
    max-width: 100vw; /* 限制最大寬度為視窗寬度 */
}

/* 修復HTML元素的基本限制 */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* 背景圖片容器樣式 */
.bg-image {
    position: fixed; /* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1; /* 置於最底層 */
}

/* 背景圖片樣式 */
.bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保圖片填滿容器且不變形 */
    object-position: center; /* 圖片居中顯示 */
}

/* 遮罩層樣式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(51, 37, 37, 0.3); /* 灰色遮罩，透明度 0.4 */
    z-index: -1; /* 置於背景圖片之上 */
}

/* 統一基本導覽列樣式 (用於所有頁面) */
.nav-bar {
    position: fixed; /* 預設為固定定位，跟隨視窗滾動 */
    top: 50px;
    right: 40px;
    z-index: 100;
    display: flex;
    justify-content: center;
    transition: opacity 0.5s ease; /* 添加透明度過渡效果 */
}

/* 添加導覽列懸停區域 */
.nav-hover-area {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%; /* 使用100%寬度覆蓋整個頂部區域 */
    height: 150px; /* 導覽列高度加上額外空間 */
    z-index: 99;
    pointer-events: none; /* 默認不接收滑鼠事件，只在導覽列隱藏時啟用 */
}

/* 當滑鼠懸停在懸停區域上時，確保導覽列顯示 */
.nav-hover-area:hover ~ .nav-bar,
.nav-bar:hover {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 當在影片幻燈片上時，確保導覽列懸停區域不會干擾 */
.carousel-slide:nth-child(2):hover ~ .nav-hover-area,
.carousel-slide:nth-child(2):hover ~ .logo-hover-area {
    pointer-events: none !important;
    z-index: -1 !important;
}

/* 視頻容器的特定樣式調整，確保最大相容性 */
.carousel-slide:nth-child(2) {
    position: relative;
    z-index: 5;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-item a {
    font-family: 'Frank Ruhl Libre', serif;
    color: #fff;
    text-decoration: none;
    font-size: 1.6rem; /* 字體調整 */
    padding: 10px;
    display: block;
    transition: all 0.5s ease; /* 增加過渡時間 */
    text-align: center;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1),
                4px 4px 8px rgba(0, 0, 0, 0.6),
                5px 5px 10px rgba(0, 0, 0, 0.4); /* 調整陰影向右下方 */
}

.nav-item > a {
    font-weight: 500;
}

.nav-item a:hover {
    color: rgba(255, 255, 255, 0.7);
    transform: translateY(-3px); /* A hover 時微微上移 */
}

/* 下拉選單樣式 */
.dropdown {
    position: absolute;
    top: 90%; /* 調整下拉選單位置往上移 */
    left: 0; /* 改為左側0，與導覽列選項左側切齊 */
    transform: translateX(0); /* 移除水平位移 */
    background-color: rgba(255, 255, 255, 0.5);
    width: auto; /* 根據內容自動調整寬度 */
    min-width: 0px; /* 設定最小寬度 */
    border-radius: 0; /* 取消圓角 */
    padding: 10px 0;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* 減淡陰影 */
    list-style: none;
    z-index: 1000; /* 確保下拉選單顯示在最上層 */
}

.dropdown li {
    padding: 0;
    margin: 0;
}

.dropdown li a {
    font-family: 'Frank Ruhl Libre', serif;
    padding: 8px 15px; /* 減少右側內距使文字更靠左 */
    font-size: 1rem;
    white-space: nowrap; /* 不允許文字換行 */
    overflow: visible; /* 確保文字不被截斷 */
    text-align: left; /* 文字左對齊 */
    color: #000; /* 預設黑色文字 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* 添加較淡的文字陰影 */
}

.dropdown li a:hover {
    background-color: rgb(88, 49, 25, 0.8); /* 改為深棕色背景 */
    color: #fff; /* hover時改為白色文字 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); /* hover時的文字陰影 */
}

.nav-item:hover .dropdown {
    display: block;
}

/* 調整 logo 位置以適應新的布局 - 添加過渡效果 */
.logo {
    position: fixed;
    top: 20px;
    left: 60px;
    z-index: 101; /* 確保 logo 顯示在最上層，甚至超過導覽列 */
    max-width: 200px;
    transition: opacity 0.5s ease; /* 添加透明度過渡效果 */
}

/* Logo 圖片樣式 */
.logo img {
    width: 180px; /* 加大 logo 寬度 */
    height: auto; /* 保持圖片比例 */
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.4))
            drop-shadow(-1px -1px 2px rgba(0, 0, 0, 0.3))
            drop-shadow(0px 0px 5px rgba(255, 255, 255, 0.5));
}

/* Logo 懸停區域 */
.logo-hover-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px; /* logo區域寬度 */
    height: 120px; /* logo區域高度 */
    z-index: 99;
    pointer-events: none; /* 默認不接收滑鼠事件，只在logo隱藏時啟用 */
}

/* 當滑鼠懸停在logo懸停區域上時，確保logo顯示 */
.logo-hover-area:hover ~ .logo,
.logo:hover {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 主視覺區域 */
.main-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 0;
}

.hero-content {
    width: 80%;
    color: #fff;
    z-index: 1;
    text-align: left;
    margin-left: 100px;
    margin-bottom: 50px; /* 減少底部邊距 */
    margin-top: 150px; /* 增加頂部邊距使內容往下移更多 */
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5),
                -1px -1px 2px rgba(0, 0, 0, 0.3),
                0px 0px 8px rgba(255, 255, 255, 0.3);
}

.hero-content h3 {
    font-size: 1.8rem;
    font-weight: 300;
    font-style: italic;
    margin-top: 0;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5),
                -1px -1px 2px rgba(0, 0, 0, 0.3),
                0px 0px 8px rgba(255, 255, 255, 0.3);
}

/* 中間內容區域輪播樣式 */
.content-section {
    background-color: #fff;
    padding: 0;
    position: relative;
    width: 100%;
    max-width: 100vw; /* 限制最大寬度 */
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box; /* 確保padding和border包含在寬度內 */
}

/* 輪播容器樣式 */
.content-carousel {
    width: 100%;
    max-width: 100vw; /* 限制最大寬度 */
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    /* 設定固定高度以匹配YouTube影片 */
    height: 500px;
}

.carousel-container {
    display: flex;
    width: 100%;
    max-width: 100vw; /* 限制最大寬度 */
    height: 100%;
    transition: transform 0.5s ease;
    box-sizing: border-box;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100vw; /* 限制每個slide的最大寬度 */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden; /* 防止slide內容溢出 */
}

/* 影片容器樣式 */
.video-container {
    width: 100%;
    max-width: 100vw; /* 限制最大寬度 */
    height: 100%;
    padding: 0;
    background-color: #6b5a4a; /* 棕色背景填充兩側空白 */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
    pointer-events: auto;
    max-height: 500px; /* 確保容器高度固定 */
    box-sizing: border-box;
    overflow: hidden; /* 防止內容溢出 */
}

.video-container:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 11;
    cursor: pointer;
}

/* 16:9 影片包裝容器 */
.video-wrapper {
    width: auto;
    max-width: 100%; /* 限制最大寬度 */
    height: 100%;
    max-height: 500px; /* 與容器相同的最大高度 */
    aspect-ratio: 16/9; /* 設定 16:9 的比例 */
    background-color: #6b5a4a; /* 統一使用棕色背景 */
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    box-sizing: border-box;
    border: none; /* 移除iframe的預設邊框 */
}

/* 移除舊的 iframe 和 ::after 樣式 */
.video-container::after {
    display: none;
}

/* 確保iframe正常顯示 */
.video-container iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 確保YouTube播放器iframe可見 */
#youtubePlayer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background-color: transparent;
}

/* 輪播控制按鈕 */
.carousel-controls {
    position: absolute;
    width: 100%;
    max-width: 100vw; /* 限制最大寬度 */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
    pointer-events: none; /* 新增：確保控制容器本身不攔截點擊事件 */
    box-sizing: border-box;
}

.carousel-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 0%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
    pointer-events: auto; /* 新增：確保按鈕可以接收點擊事件 */
    flex-shrink: 0; /* 防止按鈕被壓縮 */
    box-sizing: border-box;
}

.carousel-btn.next-btn {
    margin-right: 50px;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 輪播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw; /* 限制最大寬度 */
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
    pointer-events: none; /* 新增：確保指示器容器不攔截點擊事件 */
    box-sizing: border-box;
    padding: 0 20px; /* 添加內邊距防止貼邊 */
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    pointer-events: auto; /* 新增：確保指示器本身可以接收點擊事件 */
    flex-shrink: 0; /* 防止指示器被壓縮 */
    box-sizing: border-box;
}

.indicator.active {
    background-color: white;
}

/* 原有內容容器樣式修改 */
.content-container {
    display: flex;
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden; /* 防止內容溢出 */
}

/* 調整圖片容器高度 */
.clinic-image {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}

.clinic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* 移除圖片下方可能的間隙 */
}

/* 調整文字描述區域高度 */
.clinic-description {
    width: 50%;
    height: 100%;
    background-color: #6b5a4a;
    color: #fff;
    padding: 60px 40px;
    display: flex;
    align-items: flex-start; /* 改為靠上對齊 */
    overflow-y: auto; /* 如果文字太多，允許滾動 */
    box-sizing: border-box;
    overflow-x: hidden; /* 防止水平溢出 */
    position: relative; /* 確保 z-index 生效 */
    z-index: 10; /* 確保在背景之上 */
}

.clinic-description p {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;
    transition: transform 0.6s ease, opacity 0.8s ease;
    /* 預設狀態，顯示但透明度為1，取消隱藏效果以確保文字可見 */
    opacity: 1 !important; /* 強制不透明度為 1 */
    visibility: visible !important; /* 強制可見 */
    transform: none; 
    margin-top: 20px; 
    color: #fff !important; /* 強制白色文字 */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* 增加陰影確保在淺色背景也可見 */
}

/* 保持 animated 類別，但不再依賴它來顯示文字 */
.clinic-description p.animated {
    opacity: 1;
    transform: none;
}

/* 引言區域 */
.quote-section {
    width: 100%;
    position: relative;
    padding: 180px 0; /* 增加上下間距 */
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-section::before {
    content: none; /* 移除遮罩 */
}

.quote-container {
    width: 80%;
    max-width: 1000px;
    position: relative;
    z-index: 1;
    padding: 0 30px 0 50px; /* 調整左側內邊距，給邊框留出空間 */
}

.quote-container p {
    color: #fff;
    font-size: 2.2rem; /* 增大字體 */
    font-style: italic;
    text-align: left; /* 改為左對齊 */
    margin: 0;
    padding: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1),
                4px 4px 8px rgba(0, 0, 0, 0.6),
                5px 5px 10px rgba(0, 0, 0, 0.4); /* 調整陰影向右下方 */
    letter-spacing: 1.2px;
    line-height: 1.5;
    font-weight: 500;
}

/* 頁尾樣式 */
.static-footer {
    position: relative;
    bottom: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    z-index: 10;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info p {
    margin: 3px 0;
    font-size: 0.85rem;
}

.footer-info a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 5px;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* 返回頂部按鈕樣式 */
#backToTopBtn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 0; /* 取消圓角 */
    font-size: 18px;
    width: 50px;
    height: 50px;
    display: none;
    transition: background-color 0.3s ease;
}

#backToTopBtn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 台灣網站按鈕樣式 */
.taiwan-site-container {
    position: fixed;
    bottom: 170px;
    right: 30px;
    z-index: 99;
}

#taiwanSiteBtn {
    border: none;
    outline: none;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 10px;
    border-radius: 0;
    width: 50px;
    height: 50px;
    display: block;
    transition: background-color 0.3s ease;
}

#taiwanSiteBtn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

#taiwanSiteBtn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 預約按鈕樣式 */
#bookingBtn {
    position: fixed;
    bottom: 240px; /* 位置在台灣按鈕上方，調整位置 */
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 10px;
    border-radius: 0;
    width: 50px;
    height: 50px;
    display: block; /* 常亮顯示 */
    transition: background-color 0.3s ease;
}

#bookingBtn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

#bookingBtn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 預約按鈕容器 */
.booking-container {
    position: fixed;
    bottom: 240px; /* 更新位置，與按鈕保持一致 */
    right: 30px;
    z-index: 99;
    display: flex;
    align-items: center;
}

/* 預約彈出選項 */
.booking-popup {
    position: absolute;
    right: 60px; /* 位於按鈕左側 */
    top: -50px; /* 確保與按鈕上緣對齊 */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.5s ease; /* 延長過渡時間，使動畫更平滑 */
    display: flex;
    align-items: center; /* 垂直居中 */
    height: 50px; /* 與按鈕同高 */
    overflow: hidden;
    width: 0;
}

.booking-container:hover .booking-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    width: 150px; /* 稍微減小寬度 */
}

/* 添加自動彈出時的動畫效果 */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* 當預約按鈕彈出時添加脈動效果 */
.booking-popup[style*="opacity: 1"] {
    animation: pulse 2s infinite;
}

.booking-option {
    font-family: 'Dancing Script', cursive;
    color: white;
    text-decoration: none;
    padding: 0 20px;
    white-space: nowrap;
    font-size: 24px; /* 增加字體大小 */
    transition: background-color 0.3s ease;
    text-align: center;
    height: 100%; /* 填滿高度 */
    line-height: 50px; /* 垂直居中文字 */
    width: 100%;
}

.booking-option:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 首頁專用樣式 */
.home-page .page-content {
    margin-top: 150px;
}

/* 添加CSS類用於控制透明度 */
.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

/* 行動版選單按鈕樣式 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* 響應式設計增強 */
@media (max-width: 992px) {
    .content-carousel {
        height: auto;
        min-height: 500px;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .content-container {
        flex-direction: column;
        max-width: 100%;
        overflow: hidden;
    }
    
    .clinic-image, .clinic-description {
        width: 100%;
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
    }
    
    .clinic-image {
        min-height: 250px;
        overflow: hidden;
    }
    
    .clinic-description {
        padding: 40px 20px;
        overflow-x: hidden;
    }
    
    .carousel-slide {
        height: auto;
        max-width: 100vw;
        overflow: hidden;
        min-height: 500px; /* 確保有足夠高度 */
    }
    
    .video-container {
        height: 400px;
        min-height: 400px; /* 確保最小高度 */
        max-width: 100vw;
        overflow: hidden;
        background-color: #6b5a4a; /* 棕色背景 */
        width: 100%;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .video-container iframe {
        height: 100%;
        max-height: 400px;
        width: 100%;
        max-width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        border: none;
    }
    
    .video-wrapper {
        max-width: 100%;
        width: 100%;
        height: 100%;
        background-color: #6b5a4a; /* 棕色背景 */
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        aspect-ratio: 16/9;
    }
    
    .hero-content {
        margin-left: 50px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .quote-container {
        width: 85%;
        padding: 0 25px 0 40px;
    }
    
    .quote-container p {
        font-size: 2rem;
    }
    
    .nav-container {
        height: 85px;
    }
    
    .popup {
        right: 20px;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        z-index: 1001 !important;
        width: 30px !important;
        height: 24px !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        cursor: pointer !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background-color: #fff !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-bar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        z-index: 1000;
        transition: right 0.3s ease;
        padding-top: 60px;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    .nav-bar.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-item {
        margin: 10px 0;
        width: 100%;
    }
    
    .nav-item a {
        text-align: left;
        padding: 12px 20px;
        font-size: 1.2rem;
        font-family: 'Frank Ruhl Libre', serif; /* 確保使用相同字體 */
        color: #fff;
        text-decoration: none;
        display: block;
        transition: all 0.5s ease;
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1),
                    4px 4px 8px rgba(0, 0, 0, 0.6),
                    5px 5px 10px rgba(0, 0, 0, 0.4);
    }
    
    .nav-item a:hover {
        color: rgba(255, 255, 255, 0.7);
        transform: translateY(-3px);
    }
    
    /* 下拉選單樣式調整 */
    .dropdown {
        position: static;
        width: 100%;
        background-color: rgba(50, 50, 50, 0.8);
        box-shadow: none;
        padding: 0;
    }
    
    .dropdown li a {
        padding: 10px 40px;
        font-size: 1rem;
        font-family: 'Frank Ruhl Libre', serif; /* 確保使用相同字體 */
        color: #fff;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .dropdown li a:hover {
        background-color: rgb(88, 49, 25, 0.8);
        color: #fff;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    /* 點擊觸發下拉選單 */
    .nav-item:hover .dropdown {
        display: none;
    }
    
    .nav-item.active .dropdown {
        display: block;
    }
    
    /* 其他響應式樣式調整 */
    .content-carousel {
        min-height: 450px;
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .carousel-container {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .carousel-slide {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        flex: 0 0 100%;
        min-height: 450px; /* 確保有足夠高度 */
    }
    
    .content-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        flex-direction: column;
    }
    
    /* 輪播控制按鈕手機版調整 */
    .carousel-controls {
        padding: 0 10px; /* 減少左右內邊距 */
        width: 100%;
        max-width: 100vw;
    }
    
    .carousel-btn {
        width: 40px; /* 縮小按鈕尺寸 */
        height: 40px;
        font-size: 20px; /* 縮小字體 */
    }
    
    .carousel-btn.next-btn {
        margin-right: 10px; /* 減少右邊距 */
    }
    
    /* 輪播指示器手機版調整 */
    .carousel-indicators {
        padding: 0 10px; /* 減少左右內邊距 */
        bottom: 15px; /* 稍微往上移 */
    }
    
    .indicator {
        width: 10px; /* 縮小指示器 */
        height: 10px;
    }
    
    .clinic-image {
        min-height: 200px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .clinic-image img {
        width: 100%;
        max-width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .clinic-description {
        width: 100%;
        max-width: 100%;
        padding: 40px 20px;
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    .video-container {
        height: 350px;
        min-height: 350px; /* 確保最小高度 */
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        background-color: #6b5a4a; /* 棕色背景 */
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .video-container iframe {
        max-height: 350px;
        width: 100%;
        max-width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        border: none;
        z-index: 10;
    }
    
    .video-wrapper {
        width: 100%;
        max-width: 100%;
        height: 100%;
        background-color: #6b5a4a; /* 棕色背景 */
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        aspect-ratio: 16/9;
    }
    
    .logo {
        left: 20px;
        top: 15px;
    }
    
    .logo img {
        width: 150px;
    }
    
    .hero-content {
        width: 90%;
        margin-left: 20px;
        margin-top: 180px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content h3 {
        font-size: 1.2rem;
    }
    
    .quote-section {
        padding: 120px 0;
    }
    
    .quote-container {
        width: 90%;
        padding: 0 20px 0 30px;
        border-left: 4px solid rgba(255, 255, 255, 0.8);
    }
    
    .quote-container p {
        font-size: 1.7rem;
        letter-spacing: 1px;
    }
    
    /* 頁尾樣式調整 */
    .footer-info p:not(.mobile-footer-contact) {
        display: block;
        margin-bottom: 10px;
    }
    
    /* 彈出訊息調整 */
    .popup {
        right: 10px;
        bottom: 80px;
        max-width: 260px;
        padding: 15px 20px;
    }
    
    /* 按鈕位置調整 */
    .booking-container {
        bottom: 210px;
        right: 15px;
    }
    
    #bookingBtn {
        bottom: 210px;
        right: 15px;
    }
    
    .taiwan-site-container {
        bottom: 140px;
        right: 15px;
    }
    
    #backToTopBtn {
        bottom: 70px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .content-carousel {
        min-height: 400px;
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .carousel-container {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .carousel-slide {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        flex: 0 0 100%;
        min-height: 400px; /* 確保有足夠高度 */
    }
    
    .content-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* 480px以下進一步縮小控制按鈕 */
    .carousel-controls {
        padding: 0 5px; /* 進一步減少內邊距 */
    }
    
    .carousel-btn {
        width: 35px; /* 進一步縮小 */
        height: 35px;
        font-size: 18px;
    }
    
    .carousel-btn.next-btn {
        margin-right: 5px;
    }
    
    .carousel-indicators {
        padding: 0 5px;
        bottom: 10px;
    }
    
    .indicator {
        width: 8px; /* 進一步縮小指示器 */
        height: 8px;
        gap: 8px; /* 減少間距 */
    }
    
    .clinic-image {
        min-height: 180px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .clinic-image img {
        width: 100%;
        max-width: 100%;
    }
    
    .clinic-description {
        padding: 30px 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    .video-container {
        height: 280px;
        min-height: 280px; /* 調整小螢幕的最小高度 */
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        background-color: #6b5a4a; /* 棕色背景 */
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .video-container iframe {
        max-height: 280px;
        width: 100%;
        max-width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        border: none;
        z-index: 10;
    }
    
    .video-wrapper {
        width: 100%;
        max-width: 100%;
        height: 100%;
        background-color: #6b5a4a; /* 棕色背景 */
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        aspect-ratio: 16/9;
    }
    
    .quote-container {
        width: 95%;
        padding: 0 15px 0 25px;
        border-left: 3px solid rgba(255, 255, 255, 0.8);
    }
    
    .quote-container p {
        font-size: 1.4rem;
        letter-spacing: 0.8px;
    }
    
    .nav-item {
        margin: 0 8px;
    }
    
    .nav-item a {
        font-size: 1rem;
    }
    
    .hero-content {
        margin-top: 150px;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .hero-content h3 {
        font-size: 1rem;
    }
    
    .logo img {
        width: 120px;
    }
    
    /* 彈出訊息進一步調整 */
    .popup {
        max-width: 220px;
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    /* 按鈕進一步調整 */
    #taiwanSiteBtn, #bookingBtn {
        width: 45px;
        height: 45px;
        padding: 8px;
    }
    
    #taiwanSiteBtn img, #bookingBtn img {
        width: 28px;
        height: 28px;
    }
    
    #backToTopBtn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .booking-option {
        font-size: 20px;
    }
    
    .booking-container:hover .booking-popup {
        width: 120px;
    }
}

/* 彈出訊息樣式 */
.popup {
    position: fixed;
    bottom: 30px;
    right: 100px; /* 從30px改為100px，往左移動 */
    background: rgba(255,255,255,0.95);
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    font-size: 1rem;
    max-width: 350px;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.popup.hidden {
    opacity: 0;
    pointer-events: none;
}

#popup-text {
    margin: 0;
    line-height: 1.5;
    color: #333;
}

/* 事件彈出視窗樣式 */
.event-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.event-popup.hidden {
    opacity: 0;
    pointer-events: none;
}

.event-popup-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.close-event-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #8B5A2B;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-event-popup:hover {
    color: #000;
    transform: scale(1.1);
}

.event-popup h3 {
    color: #8B5A2B;
    margin: 0 0 5px;
    font-size: 1.2rem;
}

.event-popup h2 {
    color: #333;
    margin: 0 0 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.event-subtitle {
    color: #666;
    font-style: italic;
    margin: 0 0 20px;
    font-size: 1.1rem;
}

.event-date {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 0 20px;
    font-weight: 500;
    color: #333;
}

.event-description {
    margin: 0 0 10px;
    line-height: 1.5;
    color: #555;
}

.event-highlights {
    margin: 20px 0;
    padding-left: 20px;
}

.event-highlights li {
    margin-bottom: 8px;
    color: #555;
}

.event-details-btn {
    display: block;
    background-color: #8B5A2B;
    color: white;
    padding: 12px 0;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 25px;
    transition: all 0.3s ease;
}

.event-details-btn:hover {
    background-color: #6b4520;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 行動裝置適配 */
@media (max-width: 768px) {
    .event-popup-content {
        padding: 20px;
        width: 95%;
    }
    
    .event-popup h2 {
        font-size: 1.3rem;
    }
    
    .event-subtitle {
        font-size: 1rem;
    }
}

/* 頁尾聯絡資訊在行動版的樣式 */
.mobile-footer-contact {
    margin: 5px 0;
}

@media (min-width: 769px) {
    .mobile-footer-contact {
        display: inline;
    }
    
    .mobile-footer-contact:first-of-type:after {
        content: " | ";
    }
}
