html {
    font-size: 18px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html {
        font-size: 1em;
    }
    #navbar_collapse {
        width: 100%;
    }
}

:root {
    --ytlee-blue: rgb(0, 96, 180);
    --ytlee-blue-hover: rgba(0, 96, 180, 0.7);
    --ytlee-footer: rgb(245,245,240);
    --ytlee-footer2: rgba(245,245,240,0.8);
    --ytlee-footer3: rgb(235,235,230);
    --ytlee-search-green: rgb(108, 214, 194);
    --ytlee-search-green-light: rgba(108, 214, 194, 0.5);
    /*rgb(241,214,207);*/
    /*rgb(245,245,240);*/
    /*rgb(252,245,210);*/
    /*rgb(215,236,247);*/
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

td {
    vertical-align: middle;
}

/*----------body背景圖----------*/
.ytlee-body-bg {
    width: 100%;
    height: 30vh; /* 設定背景容器高度 */
    background-image: url('/img/body_bg.png');
    background-size: contain;
    background-position: left bottom;
    background-repeat: no-repeat;
    margin-top: -5vh;
    margin-bottom: -5vh;
    z-index: -1;
    position: relative;
}

/*body {
    background-image: url("/img/bg.jpg");
    background-size: cover;
    background-repeat: no-repeat;
}*/

/* 波浪背景圖 */
.ytlee-content-bg {
    position: relative;
    min-height: 100vh;
}

    .ytlee-content-bg::before {
        content: '';
        position: absolute;
        left: 0;
        top: 10vh;
        width: 100%;
        height: 100%;
        background-image: url('/img/wave.svg');
        background-size: 100% 100%; /* 確保填滿偽元素寬度和高度 */
        background-repeat: no-repeat;
        z-index: -1; /* 確保背景在內容下方 */
        pointer-events: none; /* 防止背景干擾其他操作 */
    }

/*----------nav bar----------*/
.ytlee-nav-title {
    font-weight:bolder;
    color:rgb(81,39,25);
    margin-right:1em;
}

/* 主選單 dropdown設定 */
.dropdown-item {
    font-weight: bold;
}

/* 主選單 hover 時的變色效果 */
.navbar-nav .nav-link, .accordion-button {
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover, .accordion-button:hover {
    background-color: var(--ytlee-blue);
    color: white;
}

/* 搜尋框樣式 */
.ytlee-nav-search-border {
    border: 2px solid rgb(108, 214, 194);
    border-radius: 0.3rem;
}

.ytlee-nav-search-btn {
    background-color: rgb(108, 214, 194);
    border: none;
    color: white;
}

    .ytlee-nav-search-btn:hover {
        background-color: rgba(108, 214, 194, 0.8);
        box-shadow: 0 0 5px rgb(108, 214, 194);
    }

.ytlee-nav-search-border:focus {
    border: 2px solid rgb(108, 214, 194);
    box-shadow: 0 0 5px rgb(108, 214, 194);
}

/* 搜尋框：僅大螢幕初始化隱藏樣式 */
@media (min-width: 992px) {
    #search {
        max-width: 0;
        opacity: 0;
        transition: all 0.5s ease;
        overflow: hidden;
        border: 2px solid rgb(108, 214, 194);
        padding: 0;
    }

        /* 搜尋框展開狀態 */
        #search.active {
            max-width: 12vw;
            opacity: 1;
            padding: 0.5rem;
        }

    .ytlee-nav-search-btn {
        border-radius: 0.3rem !important;
    }
}


/* 漢寶圖樣式 */
.navbar-toggler:focus {
    border-color: var(--ytlee-blue);
    border-width: 3px;
    box-shadow: none;
}

/* 社群連結樣式 */
.ytlee-nav-logo {
    display: inline-block;
    max-width: 3.5rem;
    max-height: auto;
}

/* nav bar容器樣式 */
#navbar_collapse {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 20%;
    height: 100%;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

@media (max-width: 1200px) {
    #navbar_collapse {
        width: 25%;
    }
}

@media (max-width: 992px) {
    #navbar_collapse {
        width: 35%;
    }
}

@media (max-width: 660px) {
    #navbar_collapse {
        width: 40%;
    }
}

@media (max-width: 576px) {
    #navbar_collapse {
        width: 60%;
    }
}

@media (max-width:360px) {
    #navbar_collapse {
        width: 100%;
    }
}

/* nav bar背景圖 */
/*.ytlee-nav-bgimg {
    background-image: url(/img/index_background.jpg);
    background-position: right 95%;
    background-repeat: no-repeat;
    background-size: contain;
}*/

/* 在lg螢幕以下時 */
/*@media (max-width: 991px) {
    .ytlee-nav-bgimg {
        background-size: auto 10%;
        background-position: right bottom;
    }

    #navbar_collapse {
        width: 70%;
    }
}*/

/* 摺疊選單樣式*/
.accordion-button {
    font-size: 1.25rem;
    padding-left: 2rem;
    padding-bottom: 1rem;
    margin-top: 0;
    margin-bottom: 0;
    box-sizing: border-box;
    box-shadow: none !important;
    border: none !important;
}

    .accordion-button:not(.collapsed) {
        background-color: var(--ytlee-blue);
        color: white;
    }

/* 增加每個選單項目之間的間距 */
.accordion.accordion-flush .accordion-item {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    background-color: var(--ytlee-footer);
}

/* 無下箭頭的摺疊選單樣式 */
.ytlee-no-arrow.accordion-button::after {
    display: none;
}

/* 點擊樣式 (移除藍色背景與陰影) */
.accordion-body .list-unstyled li:focus,
.accordion-body .list-unstyled li:active,
.accordion-body .list-unstyled a:focus,
.accordion-body .list-unstyled a:active {
    background-color: transparent !important; /* 移除點擊時的藍色背景 */
    color: inherit; /* 保持文字顏色 */
    outline: none; /* 移除外框 */
    box-shadow: none; /* 移除陰影 */
}

/* 滑鼠懸停樣式 (hover) */
.accordion-body .list-unstyled a:hover {
    color: rgb(0, 96, 180); /* 改變文字顏色 */
    text-decoration: underline; /* 增加文字底線 */
    transform: scale(1.05); /* 文字放大效果 */
    transition: transform 0.2s ease, color 0.2s ease; /* 添加過渡效果 */
}


/* 會員工具 選單 */
.ytlee-nav-member-dropdown {
    position: relative;
    display: inline-block;
}

.ytlee-nav-member-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 1000;
}

    .ytlee-nav-member-dropdown-content a {
        display: block;
        padding: 10px 15px;
        text-decoration: none;
        color: black;
        transition: background-color 0.2s;
    }

.ytlee-nav-member-dropdown:hover .ytlee-nav-member-dropdown-content {
    display: block;
}

.ytlee-nav-member-dropdown-content a:hover {
    background-color: var(--ytlee-blue);
    color: white;
}


/*----------footer----------*/
.ytlee-footer-bg {
    background-color: var(--ytlee-footer);
}

.ytlee-footer-bg2 {
    background-color: var(--ytlee-footer2);
}

.ytlee-footer-bg3 {
    background-color: var(--ytlee-footer3);
}

.ytlee-footer-logo {
    min-width: auto;
    min-height: auto;
}

/*----------header樣式----------*/
.text-shadow {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8), -2px -2px 5px rgba(0, 0, 0, 0.5);
}

/*----------back to top按鈕----------*/
.ytlee-back-to-top {
    position: fixed;
    width: 50px;
    height: 50px;
    right: 10px;
    bottom: 30px;
    z-index: 99;
    background: rgba(0, 96, 180, 0.3);
}

    .ytlee-back-to-top:hover {
        background-color: rgba(0, 96, 180, 0.85);
        color: white;
        transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 0 10px rgba(0, 96, 180, 0.85);
    }

/*----------pagination換頁按鈕----------*/
.pagination .page-link {
    color: var(--ytlee-blue); /* 主題色字體 */
    border-color: var(--ytlee-blue); /* 主題色邊框 */
    transition: background-color 0.3s ease, color 0.3s ease;
}

    .pagination .page-link:hover {
        background-color: var(--ytlee-blue);
        color: white; /* 改為白字 */
    }

.pagination .page-item {
    margin: 0 4px;
}

    .pagination .page-item.active .page-link {
        background-color: var(--ytlee-blue);
        border-color: var(--ytlee-blue);
        color: white;
    }

    /* 當按鈕被禁用時 */
    .pagination .page-item.disabled .page-link {
        background-color: var(--disabled-bg); /* 淺灰色底色 */
        color: var(--disabled-text); /* 略深的灰色文字 */
        pointer-events: none; /* 禁用點擊 */
    }

        /* 禁用狀態下不顯示 hover 效果 */
        .pagination .page-item.disabled .page-link:hover {
            background-color: var(--disabled-bg); /* 保持淺灰色底色 */
            color: var(--disabled-text); /* 保持略深的灰色文字 */
        }

/*----------details共用樣式----------*/
.ytlee-details-title {
    color: var(--ytlee-blue);
    font-weight: bolder;
    margin-bottom: 20px;
}

.ytlee-details-subtitle {
    color: rgba(0, 96, 180, 0.6);
    font-weight: bold;
    margin-bottom: 20px;
}

.ytlee-details-img-container {
    position: relative;
    overflow: hidden;
    height: auto;
}

.ytlee-details-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

    .ytlee-details-img:hover {
        transform: scale(1.05);
    }

.ytlee-details-img-nohover {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* 活動內容的樣式 */
.ytlee-details-content p, .ytlee-details-content pre {
    white-space: normal; /* 保留空格和換行 */
    margin-bottom: 0px;
    font-size: 1.2em;
    line-height: 2;
    color: #333;
}

.ytlee-details-content li {
    font-size: 1.2em;
}

/*子頁按鈕樣式*/
.ytlee-btn-md {
    background-color: var(--ytlee-blue);
    border: none;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--ytlee-blue-hover);
}

.ytlee-details-content-title {
    background: linear-gradient(120deg, var(--ytlee-blue) 70%, #ffffff 120%);
    color: #ffffff;
    font-weight: bold;
    font-size: 1.8rem;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-align: center;
}


.ytlee-details-content-subtitle {
    color: var(--ytlee-blue);
    font-size: 1.4rem;
    padding: 5px 15px;
    border-left: 5px solid var(--ytlee-blue);
    margin-top: 15px;
    display: inline-block;
    background-color: rgba(0, 96, 180, 0.1);
}

strong1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: orange;
}

strong2 {
    font-weight: bold;
    color: orange;
}

strong3 {
    font-weight: bold;
}

/* 美化表格樣式 */
/* 表格樣式 */
.table-hover tbody tr:hover {
    background-color: rgba(0, 96, 180, 0.1) !important; /* 藍色懸停效果 */
}

.table-bordered {
    border-color: rgb(0, 96, 180) !important;
}

    .table-bordered th, .table-bordered td {
        border-color: rgb(0, 96, 180) !important;
    }


/*----------sidebar(左側選單)共用樣式----------*/
.ytlee-sidebar {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

/* Sidebar 標題樣式 */
.ytlee-sidebar-title {
    color: var(--ytlee-blue);
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* 子選單樣式 */
.ytlee-sub-nav {
    background-color: rgba(249, 249, 249, 0.8);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

    /* Active 項目的樣式 */
    .ytlee-sub-nav .list-group-item.active {
        background: linear-gradient(to top left, white, var(--ytlee-blue));
        color: white !important;
    }


/* 選單項目樣式 */
.list-group-item {
    border: none;
    background-color: transparent;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(0, 96, 180, 0.3);
}

    /* 對於有 a 標籤的 list-group-item，移除 padding，讓 a 標籤自己長 padding */
    .list-group-item:has(a) {
        padding: 0;
    }

    /* 移除最後一項的底線 */
    .list-group-item:last-child {
        border-bottom: none;
    }

    /* 每個選單項目的間距 */
    .list-group-item:not(:last-child) {
        margin-bottom: 1rem;
    }

    /* 選單項目文字樣式 */
    .list-group-item a {
        color: inherit;
        text-decoration: none;
        display: block;
        transition: color 0.3s ease;
        padding: 0.75rem 1rem;
        padding-bottom: 0.75rem;
    }

    /* 選單項目底線效果 */
    .list-group-item::after {
        content: '';
        display: none;
    }

    .list-group-item:hover::after {
        background-color: white;
    }

    /* 變色動畫效果套用在整個 li */
    .list-group-item:hover {
        background-color: var(--ytlee-blue);
    }

        .list-group-item:hover a {
            color: white;
        }

/* 在大於lg螢幕時，側邊欄隨滾動固定位置 */
@media (min-width: 992px) {
    .ytlee-sub-nav {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* 在小於lg螢幕時，先不顯示選單(隱藏背景色) */
@media (max-width: 991.98px) {
    .ytlee-sub-nav {
        padding: 0; 
    }

        .ytlee-sub-nav .collapse {
            display: none;
        }

            .ytlee-sub-nav .collapse.show {
                display: block;
            }
}

/*----------breadcrumb網站地圖----------*/
.ytlee-breadcrumb-icon {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    vertical-align: middle;
}


/*----------partial-view----------*/
.ytlee-partial-view {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 576px) {
    .ytlee-partial-view {
        margin-left: 20px;
        margin-right: 20px;
    }
}

.ytlee-partial-view-title {
    color: var(--ytlee-blue);
    font-weight: bold;
    font-size: 2rem;
    text-align: start;
    margin-bottom: 1rem;
}

.ytlee-partial-view-title-for-donationrules {
    color: var(--ytlee-blue);
    font-weight: bold;
    font-size: 1rem;
    text-align: start;
    margin-bottom: 1rem;
}

/* 美化表格樣式 */
/* 表格樣式 */
.table-hover tbody tr:hover {
    background-color: rgba(0, 96, 180, 0.1) !important; /* 藍色懸停效果 */
}

.table-bordered {
    border-color: rgb(0, 96, 180) !important;
}

    .table-bordered th, .table-bordered td {
        border-color: rgb(0, 96, 180) !important;
    }

.bg-primary {
    background-color: rgb(0, 96, 180) !important;
}

.ytlee-partial-view-title {
    color: rgb(0, 96, 180);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/* DataTables 搜尋框樣式 */
div.dt-container .dt-search input {
    border: 1px solid rgb(0, 96, 180);
    border-radius: 3px;
    padding: 5px;
    background-color: transparent;
    color: inherit;
    margin-left: 3px;
}

    div.dt-container .dt-search input:focus {
        outline: none; /* 移除預設的黑色粗框 */
        box-shadow: 0 0 5px var(--ytlee-blue);
    }

/* 調整排序符號的顏色 */
table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
    opacity: 0.8;
}

/* 解決底部灰色邊框問題 */
.table-bordered {
    border-bottom-color: rgb(0, 96, 180) !important;
}

.ytlee-partial-view #major_events tbody td {
    font-size: 0.9em;
}

.ytlee-hover-word {
    transition: transform 0.2s ease-in-out;
    display: inline-block; /* 確保 transform 不會影響內聯元素 */
}

    .ytlee-hover-word:hover {
        transform: scale(1.1);
    }

@media (max-width: 576px) {
    .ytlee-partial-view #major_events {
        font-size: 0.75em;
    }
}

.ytlee-btn-search-green {
    color: var(--ytlee-search-green);
    padding: 0px;
}

    .ytlee-btn-search-green:hover {
        color: darkgreen;
    }

/*----------圖片放大模組----------*/
/* 圖片容器 */
.ytlee-img-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 圖片 hover 放大效果 */
.ytlee-hover-img {
    transition: transform 0.3s ease-in-out;
    display: block;
    width: 100%;
}

    .ytlee-hover-img:hover {
        transform: scale(1.01);
        filter: brightness(0.90);
    }

/* 確保 Modal 的高度適應圖片內容 */
#image_modal .modal-content {
    max-height: 90vh;
    overflow: hidden;
}

/* 確保圖片完整顯示 */
#image_modal img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
}

/* 放大鏡圖示樣式 */
.ytlee-overlay-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: rgba(0, 96, 180, 0.9);
    font-size: 2rem;
    opacity: 0; /* 初始隱藏 */
    transition: opacity 0.3s ease-in-out; /* 淡入效果 */
}

/* 當 hover 圖片時顯示放大鏡 */
.ytlee-img-container:hover .ytlee-overlay-icon {
    opacity: 1; /* 淡入顯示 */
}
