/*---------------- Logo ----------------*/

.MyLogo {
    position: absolute;
    bottom: 0%;
    z-index: 101;
    left: 12%;
    width: 48%;
}


/*---------------- 選單 ----------------*/
.mobile-menu-btn {
    display: none;
}

@media (max-width: 1470px) {
    .navbar-collapse.navbar-animate-fadein {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block !important;
    }
}

@media (max-width: 586px) {

    .row-pill,
    .row-pill > .bg-cover,
    .row-pill > img {
        border-radius: 0rem !important;
    }

    .px-3 {
        padding-left: 0.5rem !important;
        padding-right: 0 !important;
    }

    .mt-4 {
        margin-top: 0 !important;
    }

    .mx-4 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.navbar {
    height: 90px !important;
}

.accordion-header .accordion-button::after {
    position: absolute;
    right: 1.25rem;
    margin-left: 0;
}

.sidebar-menu {
    background-color: #ededed;
    padding: 35px 25px;
    border-radius: 0px;
}

.sidebar-menu ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.sidebar-menu .menu-heading {
    font-weight: 600;
    color: #2b2b2b;
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.sidebar-menu .sub-menu {
    padding-left: 0px;
    margin-bottom: 12px;
}

.sidebar-menu .sub-menu li a {
    display: block;
    padding: 2px 0 2px 10px;
    color: #555555;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.sidebar-menu .sub-menu li a:hover {
    color: #0056b3;
}

.sidebar-menu .single-link {
    display: block;
    font-weight: 600;
    color: #2b2b2b;
    text-decoration: none;
    padding: 8px 0;
    font-size: 1.05rem;
}

.sidebar-menu .single-link:hover {
    color: #0056b3;
}

#header {
    display: none;
}

@media (max-width: 991.98px) {
    .mobile-header-bar {
        display: flex !important;
    }
}

/*---------------- 版面 ----------------*/
.container {
    max-width: 70% !important;
}

@media (max-width: 1180px) {
    .container {
        max-width: 90% !important;
    }
}

@media (max-width: 991px) {
    .container {
        max-width: 100% !important;
    }
}

/*---------------- 文字樣式 ----------------*/

/* 覆蓋 Bootstrap 5 的全域字型變數，強制將英文字型與微軟正黑體綁定 */
:root {
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* 確保 body 確實套用該變數 */
body {
    font-family: var(--bs-font-sans-serif);
}

a:link.one {
    color: #000 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
    -webkit-transition: all 0.3s !important;
    -moz-transition: all 0.3s !important;
}

a:visited.one {
    color: #000 !important;
    text-decoration: none !important;
}

a:hover.one {
    color: #2768a0 !important;
    text-decoration: none !important;
}

a:link.two {
    color: #fff !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
    -webkit-transition: all 0.3s !important;
    -moz-transition: all 0.3s !important;
}

a:visited.two {
    color: #fff !important;
    text-decoration: none !important;
}

a:hover.two {
    color: #8cdbff !important;
    text-decoration: none !important;
}

a.text-success-hover:focus,
a.text-success-hover:hover {
    color: #2768a0 !important;
}

.TextBlock {
    white-space: nowrap;
    display: inline-block;
}

a {
    overflow-wrap: break-word;
    /* 長單字自動換行 */
    word-break: break-all;
    /* 強制截斷過長字元並換行 */
    display: inline-block;
    /* 確保換行行為正常運作 */
}

/*---------------- 其他 ----------------*/

.btn-close2 {
    position: absolute;
    top: 10px;
    right: 10px;
}

.bg-orange {
    background-color: #ff8e41;
}

.logobg {
    background-color: #2768a0 !important;
}

/*---------------- Google行事曆 ----------------*/

.calendar-container {
    max-width: 100%;
    margin: 0 auto;
}

.responsive-iframe {
    position: relative;
    padding-bottom: 78%;
    height: 0;
    overflow: hidden;
}

.responsive-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/*---------------- 首頁logo動畫 ----------------*/

.hero-section {
    position: relative;
    height: 50vh;
    width: 100%;
    overflow: hidden;
    background-color: #000c1a;
}

.carousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.bubble-track {
    position: absolute;
    bottom: -300px;
    will-change: transform;
    animation: pureRiseUp 2.2s infinite linear;
}

@keyframes pureRiseUp {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translate3d(0, -110vh, 0);
        opacity: 0;
    }
}

.bubble-real {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    will-change: transform, opacity;
}

@keyframes shake-A {
    0% {
        transform: translate3d(-100px, 0, 0) rotate(0deg) skewX(15deg) scale(0.5);
    }

    50% {
        transform: translate3d(20px, 0, 0) rotate(180deg) skewX(-10deg) scale(1.1);
    }

    100% {
        transform: translate3d(140px, 0, 0) rotate(360deg) skewX(15deg) scale(0.7);
    }
}

@keyframes shake-B {
    0% {
        transform: translate3d(80px, 0, 0) rotate(0deg) skewX(-10deg) scale(0.6);
    }

    50% {
        transform: translate3d(-40px, 0, 0) rotate(-160deg) skewX(15deg) scale(1.0);
    }

    100% {
        transform: translate3d(-100px, 0, 0) rotate(-320deg) skewX(-5deg) scale(0.8);
    }
}

@keyframes shake-C {
    0% {
        transform: translate3d(-50px, 0, 0) rotate(45deg) skewX(5deg) scale(0.4);
    }

    50% {
        transform: translate3d(60px, 0, 0) rotate(90deg) skewX(-5deg) scale(1.1);
    }

    100% {
        transform: translate3d(-30px, 0, 0) rotate(135deg) skewX(10deg) scale(0.5);
    }
}

.b1 {
    left: 5%;
    width: 120px;
    height: 120px;
    animation-duration: 1.8s;
    opacity: 0.7;
}

.b1 .bubble-real {
    animation: shake-A 1.4s infinite ease-in-out alternate;
}

.b2 {
    left: 20%;
    width: 180px;
    height: 180px;
    animation-duration: 2.6s;
    animation-delay: 0.7s;
    opacity: 0.35;
}

.b2 .bubble-real {
    animation: shake-B 1.9s infinite ease-in-out alternate;
}

.b3 {
    left: 35%;
    width: 90px;
    height: 90px;
    animation-duration: 1.5s;
    animation-delay: 0.3s;
    opacity: 0.8;
}

.b3 .bubble-real {
    animation: shake-C 1.1s infinite ease-in-out alternate;
}

.b4 {
    left: 52%;
    width: 150px;
    height: 150px;
    animation-duration: 2.9s;
    animation-delay: 1.2s;
    opacity: 0.2;
}

.b4 .bubble-real {
    animation: shake-A 2.2s infinite ease-in-out alternate;
}

.b5 {
    left: 62%;
    width: 110px;
    height: 110px;
    animation-duration: 2.0s;
    animation-delay: 0.5s;
    opacity: 0.75;
}

.b5 .bubble-real {
    animation: shake-B 1.3s infinite ease-in-out alternate;
}

.b6 {
    left: 78%;
    width: 160px;
    height: 160px;
    animation-duration: 2.4s;
    animation-delay: 0.9s;
    opacity: 0.4;
}

.b6 .bubble-real {
    animation: shake-C 1.7s infinite ease-in-out alternate;
}

/*---------------- 監理事會成員 ----------------*/

.avatar-xxl {
    width: 13rem !important;
    height: 15rem !important;
}

/*---------------- Unite Gallery ----------------*/

.ug-lightbox .ug-lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.8) !important;
    opacity: 1 !important;

}

/*---------------- 標題文字 ----------------*/

/* CSS 部分 */
.motion-all-skew {
    display: inline-block;
    /* 讓背景寬度完美貼合文字 */
    position: relative;
    padding: 4px 30px;
    /* 上下左右內距 */
    color: #ffffff;
    /* 文字顏色 */

    /* 運動感關鍵：字體一定要夠粗、帶點字距，傾斜才好看 */
    font-weight: 900;
    letter-spacing: 2px;
    z-index: 1;

    /* 讓整個區塊（包含文字與偽元素）一起向左傾斜 15 度 */
    transform: skewX(-15deg);
}

/* 產生傾斜的漸層內圖色 */
.motion-all-skew::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* 經典運動感漸層：極速橘紅到烈焰黃 */
    background: linear-gradient(135deg, #ff0092 0%, #3692ff 100%);
    border-radius: 4px;
    /* 微幅圓角讓邊緣更精緻 */
    z-index: -1;
}

/*---------------- swiper-slide ----------------*/

/* 1. 統一設定所有輪播卡片的高度 */
.swiper-white .swiper-slide {
    height: 250px;
    /* 這裡可以調整你希望的圖片統一高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 2. 強制圖片填滿容器且不變形（克服原圖大小不一） */
.swiper-white .swiper-slide img.img-fluid {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    /* 自動裁切多餘部分，保持圖片比例 */
}

/*---------------- 自訂清單顯示：第一條、 ----------------*/

/* 1. 初始化清單，隱藏預設的 1. 2. 3. 數字 */
ol.law-list {
    list-style-type: none;
    padding-left: 0;
    counter-reset: law-counter;
    /* 建立一個名為 law-counter 的計數器 */
}

/* 2. 設定每一個 li 項目的計數機制 */
ol.law-list > li {
    counter-increment: law-counter;
    /* 每次遇到 li，計數器就加 1 */
    position: relative;
    padding-left: 5.5rem;
    /* 根據前綴字寬度留出左邊距，確保內文對齊 */
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 3. 使用偽元素 ::before 產生「〔第一條、〕」的格式 */
ol.law-list > li::before {
    /* 核心：使用 cjk-ideographic 將數字轉換為中文數字（一、二、三...） */
    content: "第"counter(law-counter, cjk-ideographic) "條、";

    /* 定位設定，讓前綴字固定在左側 */
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

/* 1. 隱藏預設清單符號，並建立計數器 */
ol.sub-list {
    list-style-type: none;
    padding-left: 0;
    counter-reset: sub-counter;
    /* 建立名為 sub-counter 的計數器 */
}

/* 2. 設定每個項目的間距與對齊 */
ol.sub-list > li {
    counter-increment: sub-counter;
    /* 計數器每次加 1 */
    position: relative;
    padding-left: 2.5rem;
    /* 留出左邊距給 (1)、 放，確保多行文字時能整齊靠左對齊 */
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 3. 使用 ::before 偽元素產生 (1)、 格式 */
ol.sub-list > li::before {
    /* decimal 代表普通的阿拉伯數字 (1, 2, 3...) */
    content: "("counter(sub-counter, decimal) ")、";

    /* 絕對定位，讓符號乖乖待在左側 */
    position: absolute;
    left: 0;
    top: 0;
}

ol.matches-list {
    list-style-type: none;
    padding-left: 0;
    counter-reset: law-counter;
    /* 建立一個名為 law-counter 的計數器 */
}

/* 2. 設定每一個 li 項目的計數機制 */
ol.matches-list > li {
    counter-increment: law-counter;
    /* 每次遇到 li，計數器就加 1 */
    position: relative;
    padding-left: 3rem;
    /* 根據前綴字寬度留出左邊距，確保內文對齊 */
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 3. 使用偽元素 ::before 產生「〔第一條、〕」的格式 */
ol.matches-list > li::before {
    /* 核心：使用 cjk-ideographic 將數字轉換為中文數字（一、二、三...） */
    content: ""counter(law-counter, cjk-ideographic) "、";

    /* 定位設定，讓前綴字固定在左側 */
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

/*---------------- 切換成績查詢 ----------------*/

.custom-table-container {
    border: 2px solid #999;
    overflow: hidden;
}

.custom-table thead {
    background-color: #3399ff;
    color: white;
}

.custom-table th,
.custom-table td {
    vertical-align: middle;
    border-color: #dee2e6;
    padding: 8px;
}

/*---------------- 線上留言 ----------------*/

.required::before {
    content: "*";
    color: #dc3545;
    margin-right: 4px;
}

.btn-submit {
    background-color: #8c624d;
    color: white;
}

.btn-submit:hover {
    background-color: #714e3d;
    color: white;
}

.btn-reset {
    background-color: #6c5347;
    color: white;
}

.btn-reset:hover {
    background-color: #544037;
    color: white;
}

/* 模擬圖形驗證碼的樣式 */
.captcha-code {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 3px;
    background-color: #2768a0;
    padding: 8px 14px;
    border-radius: 4px;
    user-select: none;
    /* 防止使用者直接複製驗證碼 */
    cursor: pointer;
    /* 滑鼠移上去顯示手指，提示可以點擊點換 */
}

/* 當 Accordion 展開時（即按鈕沒有 .collapsed 類別時） */
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff; /* 這裡設定你想要的淡藍色底色 */
    color: #0c63e4;            /* 展開時的文字顏色（可依喜好調整） */
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125); /* 保留底部細線 */
    font-weight: bold;
}

/* 自訂點擊時的外框陰影顏色（選填，讓視覺更一致） */
.accordion-button:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* 點擊時的淡藍色外框 */
}
