/* 列表式活動卡片 */
.event-list-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.event-list-img {
    position: relative;
    width: 350px;
    min-width: 350px;
    height: 233px;
    overflow: hidden;
    margin: 20px;
    border-radius: 8px;
}

.event-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-duration {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Hover 效果：整張圖片變黑並顯示資訊 */
.event-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.event-list-img:hover .event-img-overlay {
    opacity: 1;
}

.event-overlay-info {
    display: flex;
    gap: 40px;
    color: #fff;
}

.event-price,
.event-quota {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 右側文字內容 */
.event-list-content {
    padding: 20px 30px 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-list-content .btn {
    max-width: 120px;
}

.event-list-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-list-location {
    font-size: 0.9rem;
    color: #666;
}

.event-list-location i {
    margin-right: 5px;
    color: var(--primary-color);
}

.event-list-date {
    font-size: 0.9rem;
    color: #666;
    border-bottom: 1px dotted #dfdfdf;
}

.event-list-date span {
    white-space: nowrap;
}

.event-list-desc {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 區隔標題裝飾線 */
.section-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 40px 0 30px;
}

.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* RWD 響應式 */
@media (max-width: 768px) {
    .event-list-item {
        flex-direction: column;
    }

    .event-list-img {
        width: 100%;
        min-width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
        margin: 0;
        border-radius: 0;
    }

    .event-list-content {
        padding: 20px;
    }

    .event-list-content .btn {
        max-width: 100%;
    }
}

/* ===== 手機版篩選區樣式 =====
 * 用於：活動列表頁（有篩選功能）
 */

/* 篩選區塊基本樣式 */
.filter-container {
    margin-bottom: 20px;
}

.filter-section {
    border-bottom: 1px solid #e0e0e0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    cursor: pointer;
    font-weight: 600;
}

.filter-header:hover {
    opacity: 0.7;
}

.filter-arrow {
    transition: transform 0.3s ease;
}

.filter-content {
    padding-bottom: 1rem;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.filter-section.collapsed .filter-content {
    max-height: 0;
    padding-bottom: 0;
}

/* Checkbox 樣式 */
.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #333;
    border-radius: 3px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-checkbox input:checked~.checkmark {
    background-color: #333;
}

.filter-checkbox input:checked~.checkmark::after {
    content: '';
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 3px;
}

/* 桌機版：預設展開，垂直排列 */
@media (min-width: 992px) {
    .filter-content {
        max-height: 500px;
    }

    .mobile-filter-section {
        display: none !important;
    }
}

/* 手機版篩選區樣式 */
@media (max-width: 991px) {
    .mobile-filter-section .filter-checkbox {
        white-space: nowrap;
    }

    .mobile-filter-section .filter-content {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 16px;
    }

    .mobile-filter-section .filter-section.collapsed .filter-content {
        max-height: 0 !important;
        padding-bottom: 0;
        display: none;
    }

    .mobile-filter-section .checkmark {
        width: 20px;
        height: 20px;
    }

    .mobile-filter-section .filter-checkbox input:checked~.checkmark::after {
        width: 5px;
        height: 10px;
        margin-bottom: 2px;
    }

    /* 手機版箭頭：收合時向下，展開時向上 */
    .mobile-filter-section .filter-arrow {
        transform: rotate(0deg);
    }

    .mobile-filter-section .filter-section:not(.collapsed) .filter-arrow {
        transform: rotate(180deg);
    }

    /* 分類按鈕箭頭固定向下 */
    .mobile-filter-section .category-trigger-section .filter-arrow {
        transform: rotate(0deg) !important;
    }
}

/* ===== 全站捲軸樣式 ===== */
/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* ===== 分類選單底部彈出面板樣式 =====
 * 共用於：活動分類、部落格分類
 */

/* 遮罩層 */
.category-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.category-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 底部面板 */
.category-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-panel.active {
    transform: translateY(0);
}

.category-panel-header {
    position: relative;
    padding: 12px 20px 16px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.category-panel-drag {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 0 auto 12px;
}

.category-panel-title {
    font-size: 18px;
    font-weight: 600;
}

.category-panel-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
}

.category-panel-body {
    flex: 1 1 0;
    min-height: 0;
    max-height: calc(85vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px 30px;
}

.category-panel-body aside {
    display: block;
}

/* 分類觸發按鈕（手機版） */
.mobile-category-trigger {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 16px;
}

.mobile-category-trigger .category-header,
.category-trigger-section .filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    cursor: pointer;
    font-weight: 600;
}

.mobile-category-trigger .category-header:hover,
.category-trigger-section .filter-header:hover {
    opacity: 0.7;
}

.mobile-category-trigger .category-arrow {
    transition: transform 0.3s ease;
}

.category-trigger-section .filter-header {
    border-bottom: none;
}

/* 手機版搜尋框樣式 */
.mobile-search-bar input.form-control::placeholder {
    font-size: 0.9rem !important;
    color: #999 !important;
}

.mobile-search-bar input.form-control::-webkit-input-placeholder {
    font-size: 0.9rem !important;
    color: #999 !important;
}

.mobile-search-bar input.form-control::-moz-placeholder {
    font-size: 0.9rem !important;
    color: #999 !important;
    opacity: 1;
}

.mobile-search-bar input.form-control:-ms-input-placeholder {
    font-size: 0.9rem !important;
    color: #999 !important;
}

/* 桌機版隱藏 */
@media (min-width: 992px) {

    .category-panel-overlay,
    .category-panel,
    .mobile-category-trigger {
        display: none !important;
    }
}