/* Custom css */
.top-a .mod-menu, 
.top-a .menu-horizontal {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important; /* 關鍵：讓所有選單項目置中 */
    align-items: center !important;     /* 垂直置中 */
    gap: 2rem;                          /* 選單項目之間的左右間距 */
    list-style: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
}

/* 確保選單裡的單個項目不會有靠左的預設邊距 */
.top-a .mod-menu li {
    position: relative !important;
    margin: 0 !important;
}

/* 修正連結的內距，讓點擊範圍更大 */
.top-a .mod-menu li a {
    display: inline-block;
    padding: 0.5rem 1rem;
}

/* 1. 初始化 body 容器，為偽元素做準備 */
body {
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 2. 使用 ::before 建立一個獨立的背景層，並單獨控制透明度 */
body::before {
    content: "";
    position: fixed; /* 固定背景，不隨網頁捲動 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* z-index: -1; */
    /* 關鍵：確保背景圖在所有文字和內容的「最底層」 */
    
    /* 您的背景圖片設定（建議改用更安全的相對路徑 ../） */
    background-image: url('https://ctea.venusgroups.com/media/templates/images/Bottom_texture.jpg') !important; 
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
    
    /* 💡 在這裡控制圖片的透明度：0.0 是完全透明，1.0 是不透明 */
    opacity: 0.4 !important; 
}

/* 3. 挖空 Cassiopeia 原本的純白背景，讓下方的半透明底圖顯現出來 */
.body-innerwrapper,
.site-inline,
main#content {
    background: transparent !important; 
    background-color: transparent !important;
}

/* 4. （選填）如果您想讓主內文區塊帶有微微的白色基底，確保文字閱讀舒適 */
.site-inline {
    background: rgba(255, 255, 255, 0.7) !important; /* 70% 的白底 */
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    border-radius: 4px;
}

/* 1. 強制移除所有導覽列選單、連結、按鈕在任何狀態下的底線裝飾 */
.mod-menu a, 
.mod-menu button,
.container-nav a, 
.container-nav button {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* 2. 徹底消除滑鼠滑過(Hover)及選定(Active)時由偽元素產生的底線線條 */
.mod-menu li a::after, 
.mod-menu li a::before,
.mod-menu li button::after,
.mod-menu li button::before,
.container-nav .mod-menu > li > a:hover::after,
.container-nav .mod-menu > li.active > a::after { 
    background: none !important; 
    display: none !important;
    height: 0 !important;
}

/* 1. 強力實現 100% 畫面滿寬與純黑背景 */
.container-bottom-a {
    grid-column: full-start / full-end !important; /* 突破 Cassiopeia 網格限制 */
    width: 100vw !important;                      /* 鎖定瀏覽器寬度 */
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;     /* 強制向左拉伸至螢幕邊緣 */
    margin-right: calc(50% - 50vw) !important;    /* 強制向右拉伸至螢幕邊緣 */
    background-color: #000000 !important;         /* 滿版純黑色 */
    padding: 30px 0 !important;                   /* 上下留白，讓排版有呼吸感 */
    color: #ffffff;
}

/* 2. 限制內部文字區塊的最大寬度，使其水平居中 */
.custom-full-footer {
    max-width: 1320px !important;                 /* 跟隨 Cassiopeia 預設的主內文寬度 */
    margin: 0 auto !important;                    /* 區塊置中 */
    padding: 0 15px !important;                   /* 左右安全防貼邊內距 */
    color: #ffffff !important;                    /* 文字全白 */
}

/* 3. 使用 Flexbox 靈活排版，取代傳統 row/col 避免錯位 */
.footer-content-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
}

/* 4. 定義三欄的寬度與間距 */
.footer-col {
    flex: 0 0 33.333% !important;                 /* 精準平分 3 欄 */
    max-width: 33.333% !important;
    padding: 10px 15px !important;                /* 保持您要的內距 */
    box-sizing: border-box !important;
}

/* 5. 清除清單與標題的預設樣式 */
.footer-title {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.1rem;
}
.footer-list {
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.footer-list li {
    margin-bottom: 8px;                           /* 讓清單項目之間有一點空隙 */
    line-height: 1.5;
}
.footer-list em {
    width: 20px;                                  /* 固定圖示寬度，讓文字對齊 */
    margin-right: 5px;
}
.en-address {
    padding-left: 25px;                           /* 讓英文地址的第二行與圖示對齊 */
    display: inline-block;
}

/* 6. 手機版自動變成垂直單欄排列（RWD 響應式優化） */
@media (max-width: 768px) {
    .footer-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }
}

/* 💻 當螢幕寬度大於平板時，讓聯絡人資訊與聯絡表單左右並排 */
@media (min-width: 768px) {
    .contact {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 40px !important;
    }
    /* 左側聯絡詳細資料佔 45% */
    .contact .contact-details {
        flex: 1 1 45% !important;
    }
    /* 右側聯絡表單佔 50% */
    .contact .contact-form {
        flex: 1 1 50% !important;
        background-color: #f9fafb; /* 幫表單加個淡淡的灰色背景外框 */
        padding: 25px;
        border-radius: 8px;
    }
}

/* 美化輸入框與送出按鈕 */
.contact-form .form-control {
    border: 1px solid #d1d5db !important;
    padding: 10px !important;
    border-radius: 4px !important;
}
.contact-form button.btn-primary {
    background-color: #000000 !important; /* 按鈕改成黑色 */
    border-color: #000000 !important;
    padding: 10px 25px !important;
}

/* 讓聯絡頁面主容器最大寬度加大 */
.com-contact.contact {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

/* 將所有輸入框（姓名、電郵、主題、訊息）拉寬至 100% */
.contact-form .form-group input,
.contact-form .form-group textarea,
.contact-form .form-select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #cccccc !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
}

/* 增加輸入框之間的上下間距 */
.contact-form .form-group {
    margin-bottom: 20px !important;
}

/* 調整留言訊息框的預設高度 */
.contact-form textarea {
    min-height: 150px !important;
}

/* 加大並美化傳送按鈕 */
.contact-form .btn-primary {
    padding: 12px 35px !important;
    font-size: 1.1rem !important;
    border-radius: 6px !important;
    cursor: pointer;
}

/* 1. 縮減導覽列主容器的上下邊距與最小高度（原約 60-70px 降至 70%） */
.header .navbar {
    padding-top: 0.35rem !important;    /* 原預設為 0.5rem 或更高，調整為 70% */
    padding-bottom: 0.35rem !important;
    min-height: auto !important;         /* 取消原預設的最小高度限制 */
}

/* 2. 縮減選單中單個項目（文字連結）的上下內距（大約是原來的 70%） */
.header .mod-menu a, 
.header .navbar-nav .nav-link {
    padding-top: 0.4rem !important;     /* 原預設為 0.5rem - 0.6rem */
    padding-bottom: 0.4rem !important;
    line-height: 1.2 !important;        /* 稍微壓縮行高，確保不會撐大高度 */
}

/* 3. 如果您有用下拉選單（子選單），同步微調切換按鈕的間距 */
.header .navbar-nav .nav-item .mm-toggler {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
}

/* 4. 微調 Logo 或網站名稱（Brand）的高度，避免它將整行導覽列撐高 */
.header .navbar-brand {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 翻轉卡片外框 */
.flip-box {
  background-color: transparent;
  width: 300px; /* 可自訂寬度 */
  height: 300px; /* 可自訂高度 */
  perspective: 1000px; /* 3D 視角效果 */
  margin: 15px auto;
}

/* 內層容器（負責旋轉） */
.flip-box-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* 滑鼠懸停時觸發翻轉 180 度 */
.flip-box:hover .flip-box-inner {
  transform: rotateY(180deg);
}

/* 正面與反面的共有設定 */
.flip-box-front, .flip-box-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* 隱藏背面 */
  backface-visibility: hidden;
  border-radius: 8px; /* 圓角效果 */
  overflow: hidden;
}

/* 正面設定 */
.flip-box-front {
  background-color: #bbb;
  color: black;
}

/* 反面設定 */
.flip-box-back {
  background-color: #2196F3; /* 反面背景顏色 */
  color: white;
  transform: rotateY(180deg); /* 預先翻轉 180 度隱藏 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

a, 
a:visited, 
a:hover, 
a:active, 
a:focus {
    text-decoration: none !important;
    color: inherit !important;
}


/* 1. 修改「一般分頁按鈕」的背景色與文字顏色 */
.pagination .page-item .page-link {
    background-color: #f3f4f6 !important; /* 預設改為淺灰色 */
    color: #111827 !important;            /* 文字改為深灰色 */
    border-color: #e5e7eb !important;      /* 邊框顏色 */
}

/* 2. 修改「當前選中的頁碼（Active）」背景色 */
.pagination .page-item.active .page-link {
    background-color: #000000 !important; /* 當前頁碼改為純黑色 */
    color: #ffffff !important;            /* 文字改為白色 */
    border-color: #000000 !important;
}

/* 3. 修改「滑鼠懸停（Hover）」按鈕時的背景色 */
.pagination .page-item .page-link:hover {
    background-color: #e5e7eb !important; /* 懸停時顏色加深 */
    color: #000000 !important;            /* 文字顏色 */
    border-color: #d1d5db !important;
}

/* 4. 修改「停用/無法點擊的按鈕」（例如在第一頁時的"上一頁"按鈕） */
.pagination .page-item.disabled .page-link {
    background-color: #f9fafb !important; /* 極淡的灰色 */
    color: #9ca3af !important;            /* 灰色字 */
    border-color: #e5e7eb !important;
}


/* 縮減頁尾區塊的上下高度 */
.footer {
    text-align: center !important;
    padding-top: 5px !important;    /* 縮小上方間距（預設較高） */
    padding-bottom: 5px !important; /* 縮小下方間距 */
    min-height: auto !important;     /* 取消可能存在的最小高度限制 */
}

/* 確保頁尾內的容器與文字寬度填滿以利置中 */
.footer .container, 
.footer .mod-footer,
.footer .custom {
    display: block !important;
    text-align: center !important;
    margin: 0 auto !important;
}

/* 移除頁尾內部模組預設的下邊距，避免撐開高度 */
/*
.footer .mod-footer,
.footer .custom,
.footer p {
    margin-bottom: 0 !important;
}
*/

/* 強制恢復文章內所有超連結的點擊功能 */
.com-content-article a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* 1. 讓 Carousel 的分頁容器啟用 CSS 計數器 */
.sppb-carousel-indicators, 
.owl-dots {
    counter-reset: carousel-counter;
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
}

/* 2. 移除原本的圓點樣式，改為方塊或圓角數字鈕 */
.sppb-carousel-indicators li, 
.owl-dots .owl-dot span {
    counter-increment: carousel-counter;
    width: auto !important;
    height: auto !important;
    background: #f0f0f0 !important; /* 未選中時的按鈕背景色 */
    color: #333333 !important;      /* 未選中時的數字顏色 */
    padding: 6px 12px !important;    /* 按鈕大小內距 */
    border-radius: 4px !important;   /* 按鈕圓角 (改為 0 則變正方形) */
    text-indent: 0 !important;       /* 取消系統預設的隱藏文字 */
    font-size: 14px !important;      /* 數字字體大小 */
    font-weight: bold !important;
    transition: all 0.2s ease;
}

/* 3. 利用 :before 偽元素自動塞入數字 */
.sppb-carousel-indicators li:before, 
.owl-dots .owl-dot span:before {
    content: counter(carousel-counter);
    display: inline-block;
}

/* 4. 當前選中（Active）以及滑鼠移上去（Hover）時的按鈕顏色 */
.sppb-carousel-indicators li.active, 
.owl-dots .owl-dot.active span,
.sppb-carousel-indicators li:hover,
.owl-dots .owl-dot:hover span {
    background: #007bff !important; /* 選中時的背景色（可改為您網站的主色） */
    color: #ffffff !important;      /* 選中時的數字顏色 */
}

.sidebar-left {
    position: -webkit-sticky; /* 支援 Safari 瀏覽器 */
    position: sticky;
    top: 20px; /* 距離瀏覽器頂部多高時開始固定 */
    z-index: 100;
}