:root {
    --gt-theme: #071127;
    --gt-header: #576d9e;
}

html, body {
    font-size: 1.2rem;
}

header {
    padding: 20px 10px 40px;
    background-color: #afdce6;
}

.navbar-nav .nav-item .active {
    /* border-bottom: 3px solid #f99528; */
    background-color: #fff;
    border-radius: 10px;
}

.navbar > .container-fluid {
    gap: 20px;
}

.float_fab {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    background-color:#2d824b;
    border-radius: 15px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 20px 10px;
    width: 100px;
    box-shadow: 3px 3px 3px #222;
    z-index: 11;
}

.float_fab img {
    width: 70%;
    margin: 0 auto;
}

.custom-divider {
    border: none;
    border-top: 2px solid #F1E5A1;
    opacity: 1;
    width: 80%;
    margin: 0;
}

.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
}

label.required::after {
    content: " *";
    /* 在文字後面加上星號，前面留一個空格比較美觀 */
    color: #dc3545;
    /* 這裡使用 Bootstrap 的紅色 (danger)，你也可以改用 'red' */
    font-weight: bold;
    /* 讓星號加粗更明顯 */
}

.footer_icon {
    width: 80px;
    height: auto;
    border: none;
    aspect-ratio: 1;
    object-fit: cover;
}

.footer_icon:active,
.footer_icon:focus {
    border: none;
}

footer a {
    color: #fff;
}

.select2-container .select2-selection--single {
    height: 45px;
}

.select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
}

.go-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.go-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(100, 100, 250, 0.4);
    background: linear-gradient(135deg, #5c7cea, #9666d2);
}

.go-to-top svg {
    width: 24px;
    height: 24px;
}
/*
.circle-list {
    list-style: none;
    counter-reset: main-counter;
    padding-left: 0;
}

.circle-list li {
    counter-increment: main-counter;
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 1.2rem;
}

.circle-list li::before {
    content: counter(main-counter);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 2px solid #222;
    background-color: #fff;
    color: #222;
    border-radius: 50%;
    font-weight: bold;
    font-family: Arial, sans-serif;
    margin-right: 12px;
    box-sizing: border-box;
    margin-top: -2px;
}

.circle-list ol {
    list-style: none;
    counter-reset: sub-counter;
    padding-left: 8px;
    margin-top: 12px;
    margin-bottom: 0;
}

.circle-list ol li {
    counter-increment: sub-counter;
    margin-bottom: 12px;
}

.circle-list ol li::before {
    content: counter(sub-counter);
    background-color: #222;
    color: #fff;
} */

/* =========================================
   1. 外層清單設定
========================================= */
.circle-list {
    list-style: none;
    counter-reset: main-counter;
    padding-left: 0;
}

/* 關鍵修正：拿掉 flex，改用 padding 擠出左側空間 */
.circle-list > li {
    position: relative;
    /* 設定絕對定位的基準點 */
    counter-increment: main-counter;
    padding-left: 52px;
    /* 40px(圈圈寬度) + 12px(右邊距) */
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 1.2rem;
}

/* 圈圈改用絕對定位，固定在左邊 */
.circle-list > li::before {
    content: counter(main-counter);
    position: absolute;
    left: 0;
    top: -2px;
    /* 視字體稍微微調，讓圈圈對齊第一行文字 */

    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--bgb_color, #222);
    background-color: var(--bg_color, #fff);
    color: var(--fc_color, #222);
    border-radius: 50%;
    font-weight: bold;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

/* =========================================
   2. 內層清單設定 (黑底白字)
========================================= */
.circle-list ol {
    list-style: none;
    counter-reset: sub-counter;
    padding-left: 0;
    /* 直接貼齊外層文字，不需要再縮 */
    margin-top: 12px;
    /* 與上方文字保持距離 */
    margin-bottom: 0;
}

/* 內層的 li 會自動繼承外層的 position: relative 跟 padding-left: 52px */
.circle-list ol > li {
    counter-increment: sub-counter;
    margin-bottom: 12px;

    position: relative;
    padding-left: 52px;
    /* 40px(圈圈寬度) + 12px(右邊距) */
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 1.2rem;
}

/* 覆蓋內層圈圈的顏色 */
.circle-list ol > li::before {
    content: counter(sub-counter);
    background-color: #222;
    color: #fff;

    position: absolute;
    left: 0;
    top: 2px;
    /* 視字體稍微微調，讓圈圈對齊第一行文字 */

    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid #222;
    border-radius: 50%;
    font-weight: bold;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.circle-list-f {
    list-style: none;
    counter-reset: main-counter-1;
    padding-left: 0;
}

/* 關鍵修正：拿掉 flex，改用 padding 擠出左側空間 */
.circle-list-f > li {
    position: relative;
    /* 設定絕對定位的基準點 */
    counter-increment: main-counter-1;
    padding-left: 52px;
    /* 40px(圈圈寬度) + 12px(右邊距) */
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 1.2rem;
}

/* 圈圈改用絕對定位，固定在左邊 */
.circle-list-f > li::before {
    content: counter(main-counter-1);
    position: absolute;
    left: 0;
    top: 2px;
    /* 視字體稍微微調，讓圈圈對齊第一行文字 */

    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid #222;
    background-color: #222;
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.circle-list-f2 {
    list-style: none;
    counter-reset: main-counter-1;
    padding-left: 0;
}

/* 關鍵修正：拿掉 flex，改用 padding 擠出左側空間 */
.circle-list-f2 > li {
    position: relative;
    /* 設定絕對定位的基準點 */
    counter-increment: main-counter-1;
    padding-left: 52px;
    /* 40px(圈圈寬度) + 12px(右邊距) */
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 1.2rem;
}

/* 圈圈改用絕對定位，固定在左邊 */
.circle-list-f2 > li::before {
    content: counter(main-counter-1);
    position: absolute;
    left: 0;
    top: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid #222;
    background-color: #efb31f;
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

/* 整個組合的外層容器：負責畫出黑色邊框與圓角 */
.custom-input-group {
	display: flex;
    align-items: stretch;
    border: 1px solid #000;
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
    max-width: 400px;
	width: 100%;
}

/* 左側區塊：負責排版綠色圈圈 */
.icon-left {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 綠色圈圈樣式 */
.green-circle {
    width: 40px;
    height: 40px;
    background-color: #9cd4a6;
    /* 淡淡的綠色 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* 中間真正的輸入框 */
.custom-input {
    border: none;
    outline: none;
    font-size: 1.2rem;
    padding: 10px;
    color: #f05a28;
	flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

/* 右側按鈕區塊 */
.icon-right-btn {
    background-color: #e0ddd5;
    /* 灰色背景 */
    border: none;
    border-left: 1px solid #000;
    /* 左邊加一條黑線分隔 */
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.icon-right {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
	flex: 0 0 auto;
}

.icon-right-btn:hover {
    background-color: #d1cece;
}

.cp {
	cursor: pointer;
}

.modal-pagination nav .d-none.d-sm-flex {
	gap: 1.5rem;
}

.paging div.d-none.flex-sm-fill.d-sm-flex.align-items-sm-center.justify-content-sm-between {
    gap: 1rem;
}

@keyframes gentleShake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(2deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-2deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.hover-shake {
    transition: all 0.3s ease;
}

.hover-shake:hover {
    animation: gentleShake 0.4s ease-in-out;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12) !important;
}

.hover-focus-card {
    transition: all 0.3s ease;
}

.hover-focus-card .card-icon {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-focus-card:hover .card-icon {
    transform: scale(1.1);
}

.j-rwd-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.j-rwd-table th,
.j-rwd-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.j-rwd-table thead {
    background-color: #222;
    color: #fff;
}

.j-rwd-table tr:nth-child(even) {
    background-color: #ccc;
}

.j-frame {
    padding: 30px;
    border: 1px solid #222;
    border-radius: 30px;
    background-color: #fff;
    position: relative;
}

/* =========================================
   Bootstrap 5 第三層下拉選單自訂樣式
========================================= */
@media (min-width: 1200px) {
    .dropdown-submenu {
        position: relative;
    }
    
	.dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%; /* 往右側展開 */
        margin-top: -1px;
        display: none; /* 預設隱藏 */
    }
    
	.dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}

@media (max-width: 1199.98px) {
    .dropdown-submenu > .dropdown-menu {
        display: block;
        position: static; 
        margin-left: 1.5rem;
        border: none;
        box-shadow: none;
        padding-top: 0;
    }
    
	.dropdown-submenu > .dropdown-toggle::after {
        display: none; 
    }
}

@media (max-width: 767px) {
    .j-rwd-table thead {
        display: none;
    }

    .j-rwd-table,
    .j-rwd-table tbody,
    .j-rwd-table tr,
    .j-rwd-table td {
        display: block;
        width: 100%;
    }

    .j-rwd-table tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 8px;
        overflow: hidden;
    }

    .j-rwd-table td {
        position: relative;
        padding-left: 40%;
        text-align: right;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .j-rwd-table td:last-child {
        border-bottom: none;
    }

    .j-rwd-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 35%;
        text-align: left;
        font-weight: bold;
        color: #555;
    }

	.float_fab {
		width: 60px;
		padding: 10px 3px;
		gap: 0.5rem;
		top: unset;
		bottom: 5%;
	}
}

@media screen and (max-width: 1199px) {
    .navbar-nav {
        margin-top: 20px !important;
    }
}

@media screen and (min-width: 1200px) and (max-width: 1400px) {
    html, body {
        font-size: 1.1rem;
    }
}

/* ==========================================
   桌機版樣式 (Desktop)
   ========================================== */
.donation-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fffcf4;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    border: 1px solid #f6e6cd;
    color: #4a3319;
    font-family: sans-serif;
}

.donation-table th {
    background-color: #fbdc9a;
    padding: 16px;
    font-weight: bold;
    border-bottom: 2px solid #f6e6cd;
}

.donation-table td {
    padding: 16px;
    border-bottom: 1px solid #f6e6cd;
    border-right: 1px solid #f6e6cd;
    font-weight: bold;
}

.donation-table td:last-child {
    border-right: none;
}

.donation-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    display: inline-block;
}

.badge-pink { background-color: #fce0df; color: #c44049; }
.badge-purple { background-color: #eae3f7; color: #5a3c9e; }
.badge-green { background-color: #dff5e3; color: #3d8a43; }

/* ==========================================
   手機版樣式 (Mobile - 768px 以下觸發)
   ========================================== */
@media (max-width: 768px) {
    .table-responsive {
        width: 100%;
    }

    .donation-table,
    .donation-table thead,
    .donation-table tbody,
    .donation-table th,
    .donation-table td,
    .donation-table tr {
        display: block;
    }

    .donation-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .donation-table {
        border: none;
        background-color: transparent;
    }

    .donation-table tr {
        margin-bottom: 1rem; /* 卡片間距 */
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid #f6e6cd;
    }

    .donation-table tbody tr:nth-child(3n+1) { background-color: #fffcf4; } /* 淺黃 */
    .donation-table tbody tr:nth-child(3n+2) { background-color: #f5faff; } /* 淺藍 */
    .donation-table tbody tr:nth-child(3n) { background-color: #fff5f7; }   /* 淺粉 */

    .donation-table td {
        border: none;
        border-bottom: 1px dashed #e8d8c1;
        position: relative;
        padding: 12px 16px 12px 40%;
        text-align: right;
    }

    .donation-table td:last-child {
        border-bottom: none;
    }

    .donation-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        width: 35%;
        text-align: left;
        font-weight: normal;
        color: #7a5c36;
    }
}
