/* ===================================================================
===== 來自 index.html 的主要 CSS 樣式 (已針對現代運動主題優化) =====
===== ★ 狀態: 所有與搜尋結果 (Search Result) 相關的樣式已移除。 ★ =====
===================================================================
*/

    /* ===== CSS Variables for Theme (保留) ===== */
    :root {
        /* Primary Colors */
        --primary-color: #00A39C;
        --primary-dark: #008B85;
        --primary-light: #E8F5F4;
        --primary-gradient: linear-gradient(135deg, #00A39C 0%, #00C9BF 100%);

        /* Secondary Colors */
        --secondary-color: #FF6B6B;
        --accent-color: #4ECDC4;

        /* Neutral Colors */
        --text-primary: #1A202C;
        --text-secondary: #4A5568;
        --text-muted: #718096;
        --text-light: #A0AEC0;

        /* Background Colors */
        --bg-primary: #FFFFFF;
        --bg-secondary: #F7FAFC;
        --bg-tertiary: #EDF2F7;
        --bg-card: #FFFFFF;
        --bg-input: #FFFFFF;

        /* Status Colors */
        --success: #48BB78;
        --warning: #F6AD55;
        --danger: #FC8181;
        --info: #63B3ED;

        /* Shadows */
        --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
        --shadow-md: 0 4px 10px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        --shadow-xl: 0 25px 35px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 163, 156, 0.08);
        --shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.08), 0 10px 10px rgba(0, 0, 0, 0.04);

        /* Border Radius */
        --radius-sm: 6px;
        --radius-md: 12px;
        --radius-lg: 16px;
        --radius-xl: 24px;
        --radius-full: 9999px;

        /* Transitions */
        --transition-fast: 150ms ease;
        --transition-base: 250ms ease;
        --transition-slow: 350ms ease;

        /* Z-index */
        --z-dropdown: 1000;
        --z-sticky: 1020;
        --z-fixed: 1030;
        --z-modal-backdrop: 1040;
        --z-modal: 1050;
        --z-popover: 1060;
        --z-tooltip: 1070;
    }

    /* ===== Global Styles (保留) ===== */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
        /* background: linear-gradient(to bottom, #FFFFFF, #F8FAFB); */
        background: #FFFFFF;
        color: var(--text-primary);
        line-height: 1.6;
        /* 避免頁面級別滾動條 */
        overflow-x: hidden;
    }

    .main-content {
        margin: 0 auto;
        padding: 0 24px;
        overflow-x: visible;
    }

    /* ===== Date Timeline Styles (保留) ===== */
    #date-timeline-container {
        width: 100%;
        overflow-x: auto;
        margin-bottom: 24px;
        padding: 0 0 10px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--bg-tertiary);
    }
    #date-timeline-container::-webkit-scrollbar { display: none; }

    .timeline-wrapper {
        display: flex;
        gap: 10px;
        padding: 8px 0;
        min-width: fit-content;
    }

    .timeline-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 15px;
        border-radius: var(--radius-md);
        background: var(--bg-secondary);
        border: 2px solid var(--bg-tertiary);
        cursor: pointer;
        transition: all var(--transition-base);
        min-width: 80px;
        flex-shrink: 0;
    }

    .timeline-item:hover {
        border-color: var(--primary-light);
        background: var(--bg-tertiary);
    }

    .timeline-item.active {
        background: var(--primary-gradient);
        color: white;
        border-color: var(--primary-color);
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px);
    }

    .timeline-item.active .day-name, .timeline-item.active .day-number {
        color: white !important;
    }

    .day-name {
        font-size: 15px;
        font-weight: 500;
        color: var(--text-secondary);
        margin-bottom: 2px;
    }

    .timeline-item.active .day-name {
        color: white !important;
    }
    .timeline-item .day-name.compact {
        font-size: 12px;
        line-height: 1.2;
    }

    .day-number {
        font-size: 20px;
        font-weight: 800;
        color: var(--text-primary);
    }

    .month-separator {
        display: none;
    }


    /* RWD 調整 timeline 左右 padding，使其與 venue-grid 對齊 */
    @media (max-width: 1280px) {
        #date-timeline-container {
            margin: 0 -16px;
            padding: 0 16px 10px 16px;
        }
        .timeline-wrapper {
            padding: 8px 0;
        }
        .venue-grid, .cards-grid {
             padding-left: 16px;
             padding-right: 16px;
        }
    }
    /* ===== Date Timeline Styles END ===== */


    /* ===== Header Navigation (保留) ===== */
  

    .location-icon {
        color: var(--primary-color);
        font-size: 20px;
    }

    .location-text {
    color: #1A202C !important; /* 選擇框內的文字改回深色 */
}

    /* ===== Hero Section (保留) ===== */
    .hero-section {
        padding: 30px 12px 20px;
        max-width: 1280px;
        margin: 0 auto;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(32px, 5vw, 48px);
        font-weight: 800;
        margin-bottom: 16px;
        background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        line-height: 1.2;
    }

    /* ===== Feature Promo Section (新增/優化 - 現代運動風) ===== */
    /* .feature-promo-section {
        position: relative;
        height: 550px;
        background-color: #1a1a1a;
        margin-bottom: 50px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
    } */

    .promo-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('https://images.pexels.com/photos/17952398/pexels-photo-17952398.jpeg');
        background-size: cover;
        background-position: center;
        z-index: 1;
        transform: scale(1.05);
        transition: transform 5s ease-out;
    }

    .feature-promo-section:hover .promo-background {
        transform: scale(1.0);
    }

    .promo-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0) 100%);
        z-index: 2;
    }

    .promo-content {
        position: relative;
        z-index: 3;
        max-width: 1280px;
        width: 100%;
        margin: 0 auto;
        padding: 0 40px;
        color: white;
    }

    .promo-title {
        font-size: clamp(40px, 6vw, 68px);
        font-weight: 900;
        margin-bottom: 24px;
        line-height: 1.1;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .promo-subtitle {
        font-size: clamp(18px, 2.5vw, 26px);
        font-weight: 400;
        margin-bottom: 40px;
        max-width: 700px;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.95);
    }

    .promo-button {
        display: inline-block;
        padding: 16px 40px;
        background: var(--primary-dark);
        color: white;
        border: none;
        border-radius: var(--radius-full);
        font-size: 20px;
        font-weight: 800;
        cursor: pointer;
        transition: all var(--transition-base);
        text-decoration: none;
        box-shadow: 0 8px 15px rgba(88, 207, 138, 0.5);
    }

    .promo-button:hover {
        background: #e65c5c;
        box-shadow: 0 12px 20px rgba(255, 107, 107, 0.7);
        transform: translateY(-4px);
    }
    /* ===== Feature Promo Section (優化) 結束 ===== */

    /* ===== Content Cards Section Header (優化) ===== */
    .content-section {
        width: 100%;
        margin: 0 auto;
        padding: 0;
        overflow-x: visible;
    }

    .section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 40px 0 16px 0;
        border-bottom: 2px solid var(--bg-tertiary);
        margin-bottom: 32px;
        min-width: auto;
    }

    .section-header-title {
        font-size: 24px !important;
        font-weight: 800;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        background: var(--primary-gradient);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: var(--shadow-md);
        transform: rotate(-5deg);
        transition: transform var(--transition-base);
    }

    .section-header:hover .section-icon {
        transform: rotate(0deg) scale(1.05);
    }

    .view-all {
        color: var(--color-accent);
        text-decoration: none;
        font-weight: 700;
        font-size: 15px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        /* gap: 6px; */
        padding: 10px;
        border-radius: 6px;
        /* background: var(--primary-50); */
    }

    .view-all:hover {
        background: var(--color-accent);
        color: white;
    }

    /* ===== Search Card Styles (Modal 化後的新樣式) - 移除相關樣式，但保留不依賴篩選的樣式部分 */
    .form-control-nest input,
    .form-control-nest select {
        flex-grow: 1;
        width: 100%;
        border: none;
        outline: none;
        background-color: transparent;
        font-size: 16px;
        color: var(--text-primary);
        padding: 0;
        appearance: none;
        height: auto;
    }
    
    /* District Selection Styles (移除行政區篩選相關樣式) */
    .city-modal-list {
        display: grid;
        /* border-radius: 50px; */
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
        /* padding: 20px; */
    }
    .city-item {
        padding: 12px;
        background: var(--bg-secondary);
        border: 2px solid transparent;
        border-radius: var(--radius-md);
        text-align: center;
        font-weight: 500;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all var(--transition-base);
        text-decoration: none;
    }
    .city-item.active {
        background: var(--primary-gradient);
        color: white;
        border-color: var(--primary-color);
    }


    /* ===== Venue Card Styles (優化/壓縮) (保留) ===== */
    /* 在桌機模式下，10宮格 */
    .venue-grid, .cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, 240px);
        gap: 36px;
        width: 100%;             
        min-width: 0;            
        overflow-x: hidden;     
        justify-content: flex-start;
        align-items: flex-start;
    }


    .venue-card-vertical {
        background: var(--bg-card);
        overflow: hidden;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-md);
        transition: all var(--transition-base);
        cursor: pointer;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        position: relative;
        min-width: 240px;
        width: 240px;
        min-height: 300px;
        flex-shrink: 0;
    }

    /* 新增強烈的 Hover 效果 */
    .venue-card-vertical:hover {
        box-shadow: var(--shadow-xl);
    }


    .host-role-badge {
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: bold;
        color: white;
        z-index: 10;
        line-height: 1;
    }

    /* 【定位復原】角色標籤定位在圖片右下角 */
    .image-bottom-right-badge {
        position: absolute;
        bottom: 8px;
        right: 8px;
    }

    /* 【定位復原】活動/課程剩餘數量標籤定位在圖片右上角 */
    .image-top-right-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 10;
    }


    /* 角色特定顏色 (復原) */
    .host-badge-customer-img {
        background-color:  rgba(43,108,176,0.8);
    }

    .host-badge-store-img {
        background-color: rgba(0,163,156,0.8);
    }

    .venue-image {
        position: relative;
        width: 100%;
        padding-top: 60%;
        overflow: hidden;
        background: var(--bg-secondary);
        background-size: cover;
        background-position: center;
        transition: transform var(--transition-slow);
        position: absolute;
        top: 0;
        left: 0;
    }

    .venue-card-vertical > .venue-image {
        position: relative;
        width: 100%;
        padding-top: 60%;
        border-top-left-radius: var(--radius-sm);
        border-top-right-radius: var(--radius-sm);
    }

    .venue-card-vertical:hover .venue-image {
        transform: scale(1.05);
    }

    /* 價格標籤 (Badge) - 恢復到上一個版本的非透明設定 */
    .venue-card-vertical .venue-image .venue-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        border-radius: var(--radius-full);
        font-size: 11px;
        font-weight: 700;
        color: white;
        backdrop-filter: blur(5px);
        box-shadow: var(--shadow-sm);
        z-index: 10;
        background: rgba(245, 158, 11, 0.95);
        border: none;
    }

    /* 額滿/剩餘標籤 (Group Session Badge) - 恢復到上一個版本的非透明設定 */
    .group-session-badge {
        padding: 4px 8px;
        border-radius: var(--radius-full);
        font-size: 11px;
        font-weight: 700;
        color: white;
        z-index: 10;
        backdrop-filter: blur(5px);
        box-shadow: var(--shadow-sm);
    }

    /* 狀態顏色 - 恢復到上一個版本的非透明設定 */
    .badge-success { background: rgba(76, 217, 100, 0.9); }
    .badge-warning { background: rgba(255, 149, 0, 0.9); }
    .badge-danger { background: rgba(255, 59, 48, 0.9); }

    /* NEW: 課程梯次報名狀態標籤 */
    .course-detail-card .registration-status-badge {
        font-size: 0.8rem;
        font-weight: 700;
        padding: 4px 8px;
        border-radius: 4px;
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 3;
        color: white;
        box-shadow: var(--shadow-xs);
    }
    .status-full { background: var(--danger); }
    .status-warning { background: var(--warning); }
    .status-success { background: var(--primary-color); }
    .status-pending { background: var(--text-muted); }

    .course-detail-card.disabled .registration-status-badge {
        background: var(--text-light);
    }


    .venue-info {
        padding: 12px;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .venue-name {
        font-size: 16px;
        font-weight: 800;
        color: var(--text-primary);
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .venue-rating {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 13px;
        color: var(--text-secondary);
    }

    .stars {
        color: #FFC107;
    }

    /* .venue-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: auto;
    }

    .venue-meta > span {
        padding: 3px 8px;
        background: var(--bg-secondary);
        border-radius: var(--radius-full);
        font-size: 11px;
        font-weight: 500;
        color: var(--text-secondary);
        display: inline-block;
        line-height: 1.2;
    } */

    .level-tag {
        border: 1px solid var(--primary-color);
        background: var(--primary-light) !important;
        color: var(--primary-color) !important;

    }

    /* 課程/活動標籤特定的顏色，用於區分 */
    .course-tag {
        border: 1px solid var(--secondary-color);
        background: #FFECEC !important;
        color: var(--secondary-color) !important;
    }


    /* ===== Time Slots (租借時段樣式 - 壓縮) (保留) ===== */
    .time-slots-grouped {
        padding-top: 10px;
    }

    .service-time-row {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 6px;
    }

    .service-time-label {
        width: 24px !important;
        height: 24px !important;
        line-height: 24px !important;
        text-align: center;
        border-radius: 50%;
        font-size: 0.9rem;
        font-weight: 300;
        color: white !important;
        background: var(--primary-gradient) !important;
        border: none !important;
        flex-shrink: 0;
    }
    /* 桌球標籤樣式 (保留) */
    .service-time-label-tabletennis {
        background: linear-gradient(135deg, var(--info) 0%, #4299E1 100%) !important;
    }
    /* 課程標籤樣式 (新增) */
    .service-time-label-course {
         background: linear-gradient(135deg, var(--secondary-color) 0%, #FF8A8A 100%) !important;
    }

    .service-time-slots-container {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .time-slot-box, .time-slot-more, .time-slot {
        padding: 3px 6px !important;
        border: 1.5px solid var(--primary-color) !important;
        border-radius: var(--radius-sm) !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        color: var(--primary-color) !important;
        white-space: nowrap;
        display: inline-block;
    }

    /* 課程時段樣式 (新增) */
    .time-slot-box-course {
        border-color: var(--secondary-color) !important;
        color: var(--secondary-color) !important;
        /* background: #FFECEC !important; */
    }

    .time-slot-more {
        padding: 3px 7px !important;
        background: var(--bg-secondary) !important;
        color: var(--text-secondary) !important;
        border: 1px solid var(--bg-tertiary) !important;
        white-space: nowrap;
    }

    /* 桌球時段樣式 (保留) */
    .time-slot-box-tabletennis {
        border-color: #4299E1 !important;
        color: #4299E1 !important;
        background: #EBF8FF !important;
    }

    .service-slot-none {
        font-size: 12px;
        color: var(--text-light);
    }

    /* ===== Loading States (保留) ===== */
    .loading-container {
        display: flex;
        flex-direction: column;
        align-items: center;      /* 水平置中內部的內容 */
        justify-content: center;   /* 垂直置中內部的內容 */
        
        /* 關鍵點：確保容器有足夠的佔用空間 */
        min-height: 200px;        /* 你原本設定的高度 */
        width: 100%;              /* 讓寬度填滿 */
        
        /* 如果它是 Grid 的子元素 */
        grid-column: 1 / -1; 
        
        /* 移除不必要的 margin 避免偏移，或者改用 auto */
        margin: 0 auto;           
        padding: 60px 24px;

        background: #f8f9fa; border-radius: 16px; border: 2px dashed #dee2e6; 
    }

    .loading-spinner {
        width: 48px;
        height: 48px;
        border: 4px solid var(--bg-tertiary);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .loading-text {
        margin-top: 16px;
        font-size: 16px;
        color: var(--text-secondary);
        font-weight: 500;
    }

    /*
    ===================================================================
    ===== 活動/課程詳細資訊 Modal 樣式 (保留) =====
    ===================================================================
    */

    /* Modal 內容區塊標題 */
    .activity-section .section-title, .course-section .section-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-primary);
        padding-bottom: 8px;
        border-bottom: 3px solid var(--primary-color);
        display: inline-block;
    }

    /* 資訊標籤 */
    .detail-label {
        display: block;
        font-size: 0.9rem;
        font-weight: 600;
        color: #4A5568; /* text-secondary */
        margin-bottom: 0px;
    }

    /* 資訊值 */
    .detail-value {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0;
        padding: 8px 12px;
        background-color: var(--bg-tertiary); 
        border-radius: 8px;
    }

    /* 內容/規則輸入框模擬 */
    .detail-content-box {
        min-height: 80px;
        padding: 12px;
        background-color: #F7FAFC; /* bg-secondary */
        border: 1px solid var(--bg-tertiary);
        border-radius: 8px;
        /* color: #4A5568; */
        background-color: var(--bg-tertiary); 
        font-size: 1.1rem;
        font-weight: 700;
        white-space: pre-wrap; /* 處理換行和空白 */
    }

    /* 等級標籤樣式 */
    .level-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 0;
    }

    .level-tag {
        padding: 6px 14px;
        border-radius: 9999px;
        font-size: 0.85rem;
        font-weight: 600;
        border: 1px solid #718096; /* text-muted */
        color: #718096;
        cursor: default;
        transition: all 0.2s ease;
    }

    .level-tag.active {
        border-color: var(--primary-color);
        background-color: var(--primary-light); /* primary-light */
        color: var(--primary-color);
    }

    /* 課程專用標題樣式 (新增) */
    .course-section .section-title {
        border-bottom-color: var(--secondary-color);
    }

    /* NEW: 課程梯次卡片樣式 (修改以支援多選和視覺提示) */

    .course-detail-card-wrapper {
        position: relative;
        margin-bottom: 20px;
        /* 新增 Hover 效果，使其邊框變色 */
        transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
        border: 1px solid transparent;
        border-radius: var(--radius-md);
    }

    /* Hover 效果：非禁用狀態下，增加陰影和邊框色，強烈暗示可選 */
    .course-detail-card-wrapper:hover .course-detail-card:not(.disabled) {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-sm);
        background-color: var(--primary-light);
    }

    .course-detail-card {
        border: 1px solid var(--bg-tertiary);
        border-radius: var(--radius-md);
        padding: 20px;
        background: var(--bg-card);
        box-shadow: none;
        transition: all var(--transition-fast);
        cursor: pointer;
        position: relative;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* 選擇框樣式 */
    .course-detail-card-wrapper input[type="checkbox"] {
        /* 隱藏原生 checkbox，使用樣式模擬 */
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        opacity: 0;
        margin: 0;
        padding: 0;
        z-index: 2; /* 確保點擊事件被捕獲 */
        cursor: pointer;
    }

    /* 新增：右上角 Checkmark 圖標 */
    .course-select-icon {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        color: var(--primary-color);
        opacity: 0.3; /* 預設半透明提示可選 */
        transition: opacity var(--transition-fast), transform var(--transition-fast);
        z-index: 3;
        pointer-events: none; /* 確保不阻擋底下 checkbox 的點擊 */
    }

    /* 邊框和背景變色效果 (當選中時) */
    .course-detail-card-wrapper input[type="checkbox"]:checked + .course-detail-card {
        border-color: var(--primary-color);
        background: var(--primary-light);
        box-shadow: var(--shadow-sm);
    }

    /* 選中時：圖標變為實心 */
    .course-detail-card-wrapper input[type="checkbox"]:checked + .course-detail-card .course-select-icon {
        opacity: 1; /* 實心顯示 */
        transform: scale(1.1);
        text-shadow: 0 0 5px rgba(0, 163, 156, 0.2);
    }

    /* 禁用狀態 */
    .course-detail-card.disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background-color: var(--bg-secondary) !important;
        border-color: var(--bg-tertiary) !important;
        /* 移除禁用卡片的 Hover 效果 */
        box-shadow: none !important;
    }

    .course-detail-card.disabled input[type="checkbox"] {
        cursor: not-allowed;
        pointer-events: none; /* 禁用點擊 */
    }

    .course-detail-card .detail-value {
        padding: 6px 10px;
        font-size: 1rem;
        font-weight: 600;
    }
    .course-detail-card .course-price-info {
        display: flex;
        align-items: flex-end;
        gap: 8px;
        font-weight: 700;
        color: var(--text-primary);
    }
    .course-detail-card .main-price {
        font-size: 1.8rem;
        color: var(--secondary-color);
    }
    .course-detail-card .original-price {
        font-size: 0.9rem;
        color: var(--text-muted);
        text-decoration: line-through;
        margin-bottom: 0.3rem;
    }

    /* 費用卡片樣式 */
    .price-card {
        padding: 20px;
        border: 1px solid var(--bg-tertiary);
        border-radius: 12px;
        text-align: center;
        transition: transform 0.2s, box-shadow 0.2s;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: #FFFFFF;
    }

    .price-card.primary-border {
        border-color: var(--primary-color);
        border-width: 2px;
        box-shadow: 0 4px 10px rgba(0, 163, 156, 0.1);
    }
    .price-card.secondary-border {
        border-color: var(--secondary-color);
        border-width: 2px;
        box-shadow: 0 4px 10px rgba(255, 107, 107, 0.1);
    }

    .price-label {
        font-size: 1rem;
        color: var(--text-primary);
        font-weight: 700;
        margin-bottom: 4px;
    }

    /* 價格數字應該繼承自 .price-amount，而不是這裡的 .detail-value */
    .price-amount {
        font-size: 2rem;
        font-weight: 900;
        color: var(--primary-color);
        margin-bottom: 8px;
    }
    .price-card.secondary-border .price-amount {
         color: var(--secondary-color);
    }

    .price-meta {
        font-size: 0.85rem;
        color: #718096;
    }

    /* 課程優惠資訊特化樣式 (使其更緊湊) */
    .course-promotion-info {
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.4;
        color: var(--text-secondary);
    }
    .course-promotion-info strong {
        color: var(--primary-color);
    }
    .course-promotion-info .price-tag {
        font-weight: 700;
        color: var(--secondary-color);
    }
    .course-promotion-info .expired-tag {
        color: var(--text-muted);
        font-weight: 400;
        font-size: 0.8rem;
    }

    /* 報名表單樣式 (用於 registrationModal) */
    .registration-form-section {
        /* 確保內容有內距 */
        padding: 0 0 20px 0;
    }
    .form-group-item {
        padding: 10px 0;
    }
    .form-group-item label {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 6px;
    }
    .form-group-item input, .form-group-item select, .form-group-item textarea {
         border: 1px solid var(--bg-tertiary);
         border-radius: var(--radius-md);
         padding: 10px 12px;
         transition: all 0.2s;
         width: 100%;
    }
    .form-group-item input:focus, .form-group-item select:focus, .form-group-item textarea:focus {
         border-color: var(--primary-color);
         box-shadow: 0 0 0 3px var(--primary-light);
    }
    .reg-summary-alert {
        background: var(--primary-light);
        color: var(--text-primary);
        border-left: 4px solid var(--primary-color);
        padding: 15px;
        border-radius: var(--radius-md);
        margin-bottom: 20px;
    }
    /* NEW: 課程摘要警示框使用 secondary-color */
    .course-summary-alert {
        background: #FFECEC; /* 課程輕色 */
        color: var(--text-primary);
        border-left: 4px solid var(--secondary-color); /* 課程主色 */
        padding: 15px;
        border-radius: var(--radius-md);
        margin-bottom: 20px;
    }
    .reg-summary-alert strong {
        font-weight: 700;
        color: var(--primary-dark);
    }
    .course-summary-alert strong {
        font-weight: 700;
        color: var(--secondary-color);
    }

    /* MODAL 滑動動畫 CSS (保留) */
    .modal.slide-in-right .modal-dialog {
        transform: translate(100%, 0) !important;
        transition: transform 0.35s ease-out;
    }
    .modal.slide-in-right.show .modal-dialog {
        transform: translate(0, 0) !important;
    }

    .modal.slide-out-left .modal-dialog {
        transform: translate(0, 0) !important;
        transition: transform 0.35s ease-out;
    }
    .modal.slide-out-left.show .modal-dialog.slide-to-left {
        transform: translate(-100%, 0) !important;
    }
    .modal.slide-out-left.show .modal-dialog.slide-to-right {
        transform: translate(100%, 0) !important;
    }

/* ===================================================================
===== RWD 媒體查詢區塊
=================================================================== */

/*
=========================================================
★ 區塊 1: 平板模式 (Tablet) 及以下 (max-width: 1280px)
=========================================================
*/
@media (max-width: 1280px) {
    /* --- 全域佈局調整 --- */
    .main-content {
        padding: 0 16px;
    }

    .content-section {
        overflow-x: hidden;
        overflow-y: hidden;
        padding: 0;
    }

    .section-header {
        width: 100%;
        min-width: auto;
        padding: 40px 16px 16px 16px;
        margin-bottom: 32px;
    }

    /* --- 熱門場地/卡片區塊調整 (水平捲動) --- */
    .venue-grid, .cards-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        min-width: auto;
        grid-template-columns: none;
        padding: 0 16px 20px 16px;
    }

    .venue-grid::-webkit-scrollbar, .cards-grid::-webkit-scrollbar {
        display: none;
    }

    .venue-card-vertical {
        min-width: 240px;
        width: 240px;
        flex-shrink: 0;
    }

    /* 課程/活動 Modal 調整 (Tablet/Mobile) */
    .modal-body {
        overflow-y: auto;
    }
}


/*
=========================================================
★ 區塊 2: 手機模式 (Mobile) (max-width: 767.98px / 575.98px)
=========================================================
*/
@media (max-width: 767.98px) {

    .section-header {
        padding-left: 0 !important; /* 移除 Header 左側 16px */
        padding-right: 0 !important;
    }

    .venue-grid, .cards-grid {
        padding-left: 0 !important; /* 移除卡片容器左側 16px */
    }

    /* 課程/活動 Modal 調整 */
    .modal-body {
        padding: 1.5rem;
    }
    .activity-section .section-title {
        font-size: 1.3rem;
    }
    .price-amount {
        font-size: 1.8rem;
    }
}

@media (max-width: 575.98px) {
    /* 其他 Modal 全螢幕覆蓋 */
    #activityDetailModal.modal-fullscreen-sm-down .modal-dialog,
    #registrationModal.modal-fullscreen-sm-down .modal-dialog,
    #courseDetailModal.modal-fullscreen-sm-down .modal-dialog,
    #courseRegistrationModal.modal-fullscreen-sm-down .modal-dialog {
         margin: 0;
         width: 100%;
         max-width: 100%;
         height: 100%;
    }
}


/*
=========================================================
★ 區塊 3: 桌面模式 (Desktop) (min-width: 1281px)
=========================================================
*/
@media (min-width: 1281px) {
    /* --- Modal 尺寸恢復 --- */
    #activityDetailModal.modal-fullscreen-sm-down .modal-dialog,
    #registrationModal.modal-fullscreen-sm-down .modal-dialog,
    #courseDetailModal.modal-fullscreen-sm-down .modal-dialog,
    #courseRegistrationModal.modal-fullscreen-sm-down .modal-dialog {
         margin: 1.75rem auto;
         max-width: 1140px;
         height: auto;
    }
}


/* ------------------------------------------------------------- */
/* 來自您提供的 index.css 的額外樣式，現已合併 */
/* ------------------------------------------------------------- */

/* 分頁按鈕樣式 - 企業級設計 (採用新版) */



  .tab-content {
    display: none;
  }

  .tab-content.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* 載入狀態優化 (採用新版) */
  #venue-cards-container.loading {
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gray-500);
    font-size: 16px;
    font-weight: 600;
  }
  
  /* 圖片載入完成後顯示的 CSS (從舊版優化並保留) */
  .venue-card-vertical .venue-image.loaded {
      opacity: 1; 
  }

  /* 統計數據區塊 (採用新版) */
  .stats-section {
    /* background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%); */
    background: var(--color-accent);
    padding: 60px 32px;
    margin: 60px 0;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.2);
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .stat-item {
    text-align: center;
    color: white;
  }

  .stat-value {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
  }

  .stat-label {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.5px;
  }

  /* 信任標章 (採用新版) */
  .trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 40px 32px;
    background: var(--gray-50);
    border-radius: 20px;
    margin: 40px 0;
  }

  .trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    color: var(--gray-700);
  }

  .trust-badge .material-icons {
    color: var(--primary-600);
    font-size: 28px;
  }

  @media (max-width: 768px) {


    .tab-button {
      padding: 14px 12px;
      font-size: 14px;
      flex-direction: column;
      gap: 6px;
      border-radius: 12px 12px 0 0;
    }

    .tab-button .material-icons {
      font-size: 20px;
    }

    .stats-section {
      padding: 40px 20px;
      margin: 40px 0;
    }

    .stats-grid {
      gap: 30px;
    }

    .stat-value {
      font-size: 36px;
    }

    .trust-badges {
      gap: 20px;
      padding: 30px 20px;
    }

    .trust-badge {
      padding: 12px 20px;
      font-size: 14px;
    }
  }

  /* Service Card 樣式 */
#service-cards-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 1rem 25px;
    scrollbar-width: none; /* Firefox */
}
#service-cards-container::-webkit-scrollbar { display: none; } /* Chrome */

.service-card {
    flex: 0 0 100px; /* 固定寬度 */
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.service-card:active {
    transform: scale(0.95);
}

.service-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* 圓形設計 */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid #fff;
    background: #f8f9fa;
}

.service-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-name {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
}

/* 針對特定區塊 */
#venue-section {
    scroll-margin-top: 75px; /* Header 高度 75px */
}

#course-section {
    scroll-margin-top: 75px; /* Header 高度 75px */
}

#group-session-section {
    scroll-margin-top: 75px; /* Header 高度 75px */
}

html {
    scroll-behavior: smooth;
}