/* ===== GLOBAL STYLES ===== */
body {
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

footer {
    padding: 45px;
    font-size: 15px;
}
#header-height{
    background-color: #000;
    height: 100px;
}
.container{
    max-width: 1200px;
}
/* ===== DESKTOP NAVBAR STYLES ===== */
.navbar-custom {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    transition: all 0.3s ease;
    background: transparent;
    padding: 45px 45px 0 45px;

}

.navbar-custom.active{
    background: #000!important;
    position: relative!important;
    z-index: 10000!important;
}

.navbar-custom.scrolled .navbar-brand,
.navbar-custom.scrolled .nav-link {
    color: #000 !important;
}

.navbar-custom.scrolled .nav-link::after {
    background-color: #000;
}

.navbar-custom.menu-open .navbar-brand,
.navbar-custom.menu-open .nav-link {
    color: #fff !important;
}

.navbar-custom.menu-open .nav-link::after {
    background-color: #fff !important;
}

/* Navbar background overlay */
.navbar-custom .nav-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: transparent;
    z-index: -1;
    transition: opacity 0.5s ease;
    overflow: hidden;
    opacity: 0;
}

.navbar-custom .nav-background.show {
    background: rgba(0, 0, 0, 1);
    opacity: 1;
}

.navbar-custom.scrolled .nav-background.show {
    background: rgba(255, 255, 255, 1);
    opacity: 1;
}

/* Navbar elements */
.navbar-brand {
    color: #fff !important;
    font-weight: bold;
    font-size: 1.5rem;
}
.navbar-brand img{
    max-width: 220px;
}
.navbar-custom .navbar-brand .logo-black, .mobile-navbar .mobile-navbar-brand .logo-white{
    display: block;
}
.navbar-custom .navbar-brand .logo-black, .mobile-navbar .mobile-navbar-brand .logo-black{
    display: none;
}
.navbar-custom.scrolled .navbar-brand .logo-white, .mobile-navbar.scrolled .mobile-navbar-brand .logo-white{
    display: none;
}
.navbar-custom.scrolled .navbar-brand .logo-black, .mobile-navbar.scrolled .mobile-navbar-brand .logo-black{
    display: block;
}
.nav-item{
    margin: 0 48px;
}
.nav-item a{
    text-transform: uppercase!important;
}
.nav-link {
    color: #fff !important;
    position: relative;
    transition: all 0.3s ease;
    padding: 20px 0 !important;
    margin: 0;
    font-size: 16px;
}

.nav-link.active {
    color: #ccc !important;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 5px !important;
    background-color: #fff;
    transition: width 0.3s ease;
    margin-left: 0!important;
}

.nav-link.active::after {
    background-color: #ccc !important;
    width: 100%;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-expand-lg .navbar-nav {
    align-items: center;
}

/* Dropdown styles */
.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-toggle::after{
    border: none!important;
}
.dropdown-menu {
    background: transparent;
    border: none;
    border-radius: 0;
    padding-top: 30px;
    width: auto;
    left: 0;
    position: fixed;
    top: 100%;
    height: 0;
    z-index: 9998;
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown-menu.active {
    height: auto;
    opacity: 1;
    display: block;
}

.dropdown-menu .row {
    margin: 0;
}

.dropdown-menu .col {
    padding: 0 30px;
}

.navbar-custom .dropdown-item {
    color: #898989;
    padding: 10px 0 0 0;
    border-bottom: 0;
    transition: all 0.3s ease;
    background-color: transparent !important;
    font-size: 16px;
}
.navbar-custom .dropdown-item:first-child{
    padding-top: 0;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item.active {
    color: #fff;
}

.navbar-custom.scrolled .dropdown-item:hover,
.navbar-custom.scrolled .dropdown-item.active {
    color: #000;
}

/* Search styles */
.search-container {
    position: relative;
}

.dropdown.search-container {
    position: inherit !important;
}

.search-container .dropdown-menu.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.navbar-custom .form-control.search-input {
    border: 0 !important;
    border-bottom: 5px solid #fff !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 300px;
    box-shadow: none !important;
    padding-left: 40px !important;
    padding-bottom: 5px !important;
}

.navbar-custom.scrolled .form-control.search-input {
    border-bottom: 1px solid #000 !important;
}

.navbar-custom .search-btn {
    transform: none !important;
    margin: 0;
    border-radius: 0 !important;
    color: #fff !important;
    background: transparent !important;
    position: absolute;
    top: -10px;
    left: 0;
    text-align: left;
    width: 40px;
}

.navbar-custom.scrolled .search-btn {
    color: #000 !important;
}

.search-input {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 40px 10px 15px;
    border-radius: 25px;
    width: 100%;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Language buttons */
.navbar-custom .btn-lang {
    color: #fff !important;
    text-decoration: none;
    margin: 0 5px;
}

.navbar-custom.scrolled .btn-lang {
    color: #000 !important;
}

.navbar-custom .btn-lang:hover,
.navbar-custom .btn-lang.active {
    color: #ccc !important;
}

.navbar-custom .lang-container {
    color: #fff !important;
}

.navbar-custom.scrolled .lang-container {
    color: #000 !important;
}

/* ===== MOBILE NAVBAR STYLES ===== */
.mobile-navbar {
    background: #000000;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1150;
    transition: all 0.3s ease;
}

.mobile-navbar.mobile-menu-open {
    background: rgba(0, 0, 0, 0.9);
}

.mobile-navbar-brand {
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
}
.mobile-navbar-brand img{
    max-width: 180px;
}

.mobile-navbar-brand span {
    font-size: 0.8rem;
    display: block;
    margin-top: -5px;
    letter-spacing: 2px;
}

/* Mobile buttons */
.mobile-navbar .mobile-hamburger-btn,
.mobile-navbar .mobile-search-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1060;
    position: relative;
}
.mobile-navbar.scrolled .mobile-hamburger-btn,
.mobile-navbar.scrolled .mobile-search-btn {
    color: #000!important;
}
.mobile-hamburger-btn {
    transition: transform 0.3s ease;
}

.mobile-hamburger-btn.mobile-active {
    color: white;
}

/* Mobile side menu */
.mobile-side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 1055;
    transition: left 0.3s ease;
    padding-top: 80px;
    overflow-y: auto;
}

.mobile-side-menu.mobile-show {
    left: 0;
}

.mobile-side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-side-menu a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: background 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
}

.mobile-side-menu a:hover {
    background: #333;
}

.mobile-side-menu .mobile-has-submenu > a {
    position: relative;
}

.mobile-side-menu .mobile-has-submenu > a::after {
    content: '>';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile submenu */
.mobile-submenu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 1056;
    transition: left 0.3s ease;
    padding-top: 80px;
    overflow-y: auto;
}

.mobile-submenu.mobile-show {
    left: 0;
}

.mobile-submenu-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    color: white;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    justify-content: center;
}

.mobile-submenu-back {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin-right: 1rem;
    cursor: pointer;
    position: absolute;
    left: 1.5rem;
}

.mobile-submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-submenu a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: background 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
}

.mobile-submenu a:hover {
    background: #333;
}

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1170;
    display: none;
    padding: 2rem;
}

.mobile-search-overlay.mobile-show {
    display: block;
}

.mobile-search-content {
    max-width: 600px;
    margin: 0 auto;
    padding-top: 100px;
}

.mobile-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 50px;
    font-size: 1.2rem;
    border: none;
    border-bottom: 5px solid white;
    background: transparent;
    color: white;
    outline: none;
}

.mobile-search-input::placeholder {
    color: #ccc;
}

.mobile-search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile language buttons */
.mobile-btn-lang {
    color: white !important;
    text-decoration: none;
    margin: 0 10px;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.mobile-btn-lang:hover,
.mobile-btn-lang.active {
    color: #ccc !important;
}

.mobile-lang-container {
    text-align: center;
    padding: 1rem 0;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1054;
    display: none;
}

.mobile-menu-overlay.mobile-show {
    display: block;
}

/* ===== CAROUSEL STYLES ===== */
.carousel-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: #000; /* 設定黑色背景避免白色閃爍 */
}

/* 防止輪播轉換時的白色閃爍 */
.carousel.slide.carousel-fade {
    background: #000;
}

.carousel-inner {
    background: #000; /* 確保內層容器也是黑色背景 */
}

/* YouTube container styles */
.youtube-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.youtube-container .embed-responsive {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-container .embed-responsive-item {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.youtube-container.active .embed-responsive-item {
    pointer-events: auto;
}

.youtube-container:not(.active) .embed-responsive-item {
    pointer-events: none;
}

/* Vimeo container styles */
.vimeo-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vimeo-container .vimeo-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-width: 177.77vh; /* 16:9 aspect ratio */
    min-height: 100vh;
}

.vimeo-container .vimeo-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.vimeo-container.active .vimeo-player {
    pointer-events: auto;
}

.vimeo-container:not(.active) .vimeo-player {
    pointer-events: none;
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .vimeo-container,
    .vimeo-container-alt {
        height: 100vh;
        height: 100dvh; /* 动态视口高度，更好的移动端支持 */
        width: 100vw;
        position: relative;
        overflow: hidden;
    }
    
    .vimeo-container .vimeo-player,
    .vimeo-container-alt .vimeo-player {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        min-width: 100vw;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .vimeo-container .vimeo-player iframe,
    .vimeo-container-alt .vimeo-player iframe {
        width: 100vw;
        height: 56.25vw;
        min-width: 177.78vh;
        min-height: 100vh;
        min-height: 100dvh;
        transform: translate(-50%, -50%);
    }
}

/* 超小屏幕额外调整 */
@media (max-width: 480px) {
    .vimeo-container .vimeo-player iframe,
    .vimeo-container-alt .vimeo-player iframe {
        min-width: 120vw;
    }
}

/* 竖屏移动设备优化 */
@media (max-width: 768px) and (orientation: portrait) {
    .vimeo-container .vimeo-player iframe,
    .vimeo-container-alt .vimeo-player iframe {
        top: 50%!important; left: 50%!important;
        width: 177.78vh;
        height: 100vh;
        min-width: 177.78vh;
        min-height: 100vh;
        transform: translate(-50%, -10%);
    }
}

/* 横屏移动设备优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .vimeo-container .vimeo-player iframe,
    .vimeo-container-alt .vimeo-player iframe {
        width: 100vw;
        height: 56.25vw;
        min-width: 100vw;
        min-height: 100vh;
    }
}

.carousel-item {
    height: 100vh;
    position: relative;
    background: #000; /* 確保每個carousel-item都有黑色背景 */
}

/* 優化轉換效果，避免白色閃爍 */
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
    background: #000;
}

/* 確保轉換過程中的不透明度處理 */
.carousel-fade .carousel-item {
    opacity: 0.4;
    transition-property: opacity;
    transition-duration: 0.6s;
    background: #000;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    z-index: 1;
    opacity: 1;
    background: #000;
}

.carousel-fade .carousel-item-next:not(.carousel-item-start),
.carousel-fade .carousel-item-prev:not(.carousel-item-end) {
    transform: none;
    background: #000;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000; /* 避免載入時的白色背景 */
}

/* 確保圖片載入期間不會顯示白色 */
.carousel-item img {
    display: block;
    background-color: #000;
}

/* 確保視頻載入期間不會顯示白色 */
.carousel-item video {
    background-color: #000;
}

/* 確保視頻在重設時不會顯示跳躍 */
.carousel-item video.resetting {
    visibility: hidden;
}

/* 移動設備視頻播放按鈕 */
.mobile-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.mobile-play-button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.mobile-play-button i {
    color: white;
    font-size: 24px;
    margin-left: 3px; /* 視覺平衡 */
}

/* 視頻播放時隱藏播放按鈕 */
.carousel-item video.playing ~ .mobile-play-button {
    display: none;
}

.carousel-overlay {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
}

.carousel-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.carousel-subtitle {
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 0 9px rgba(0,0,0,0.6);
    text-decoration: none;
    color: #fff;
}

/* Progress bars */
.progress-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.progress-bar-item {
    height: 3px;
    width: 125px;
    background: rgba(255, 255, 255, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #1d2566;
    width: 0%;
    transition: width 0.1s linear;
}
.input-group{
    flex-wrap: nowrap;
    position: relative;
}
/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .carousel-title {
        font-size: 1.5rem;
    }
    
    .carousel-subtitle {
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        min-width: 250px;
    }
    
    .progress-bar-item {
        width: 40px;
    }
}

@media (min-width: 768px) {
    .mobile-navbar,
    .mobile-side-menu,
    .mobile-submenu,
    .mobile-menu-overlay,
    .mobile-search-overlay {
        display: none !important;
    }
}

@keyframes carousel-zoom-in {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.12);
  }
}
/* 只對圖片應用zoom效果，視頻保持靜止 */
.carousel-item.active img {
  animation: carousel-zoom-in 5s linear forwards;
}

/* 視頻不使用zoom動畫，避免移動感 */
.carousel-item.active video {
  transform: scale(1);
  /* 移除動畫，保持靜止 */
}

/* 隱藏首頁主輪播(mainCarousel)的視頻默認控制項，不影響其他頁面的 <video> */
#mainCarousel video::-webkit-media-controls {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-panel {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-play-button {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-enclosure {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-overlay-play-button {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-overlay-enclosure {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-timeline {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-current-time-display {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-time-remaining-display {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-mute-button {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-toggle-closed-captions-button {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-volume-slider {
  display: none !important;
}

#mainCarousel video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

/* 隱藏其他瀏覽器的視頻控制項 */
#mainCarousel video::-moz-media-controls {
  display: none !important;
}

#mainCarousel video::-ms-media-controls {
  display: none !important;
}

/* 確保首頁主輪播(mainCarousel)的視頻外觀乾淨 */
#mainCarousel video {
  outline: none !important;
}

#mainCarousel video:focus {
  outline: none !important;
}

/* 隱藏首頁主輪播的播放按鈕 overlay */
#mainCarousel video::before,
#mainCarousel video::after {
  display: none !important;
}

/* 只對首頁主輪播移除指針事件，不影響其他 carousel（例如 info.php 的 slideCarousel） */
#mainCarousel .carousel-item video {
  pointer-events: none !important;
}

/* 但保留carousel overlay的點擊事件 */
.carousel-overlay {
  pointer-events: auto !important;
}

/* 移除視頻可能的背景或邊框 */
video {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.top-title{
    background-color: #000;
    height: 200px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.top-title.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.top-title h5{
    color: #fff!important;
    margin: 40px 0!important;
    transition: all 0.3s ease;
}
.main-content{
    min-height: 50vh;
}
.py-50{
    padding-top: 50px!important;
    padding-bottom: 50px!important;
}
.pt-50{
    padding-top: 50px!important;
}
p{
    font-size: 16px;
    margin-bottom: 30px;
}
p:last-child{
    margin-bottom: 0;
}
ul{
    list-style: inside;
    margin-bottom: 30px;
}
.link-mail{
    color: #000!important;
    text-decoration: none!important;
}
.grey-bg{
    margin-top: 0;
    background-color: #141414;
    color: #fff!important;
}
.about-us p{
    color: #FFFFFF!important;
}
.google-map {
    --bs-aspect-ratio: 56.25%;
    width: 100%;
}
.load-more-btn:disabled{
    background-color: transparent!important;
}
@media (max-width: 1200px) {
    .nav-item{
        margin: 0 30px!important;
    }
}
@media (max-width: 992px) {
    .nav-item{
        margin: 0 10px!important;
    }
    .top-title{
        height: 150px;
    }


}
@media (max-width: 768px) {
   
    footer{
        padding: 20px 0;
    }
    .main-content{
        min-height: 70vh;
    }
    .google-map {
        --bs-aspect-ratio: 100%;
    }
}

.navbar-custom .dropdown-item,.nav-link,.text-address,.btn-lang {
    font-weight: bold;
}