/**
 * 學習熱點列表頁面 — UI/UX 樣式
 * 模仿 course.css 風格
 */

/* ========================================
   0. Design Tokens
   ======================================== */
:root {
    --hotspot-primary: #0891b2;
    --hotspot-primary-light: #ecfeff;
    --hotspot-text: #1e293b;
    --hotspot-text-secondary: #64748b;
    --hotspot-border: #e2e8f0;
    --hotspot-bg-subtle: #f8fafc;
    --hotspot-radius: 12px;
    --hotspot-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

/* ========================================
   1. Page Layout
   ======================================== */
.rbt-team-area.rbt-section-gap {
    padding-top: 30px;
}

/* ========================================
   2. Hotspot Card Grid
   ======================================== */
.hotspot-grid-column {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ========================================
   3. Hotspot Card
   ======================================== */
.hotspot-card {
    background: #fff;
    border-radius: var(--hotspot-radius);
    border: 1px solid var(--hotspot-border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
}
.hotspot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-color: #a5f3fc;
}

/* 圖片 */
.hotspot-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.hotspot-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.hotspot-card:hover .hotspot-card__img img {
    transform: scale(1.04);
}
.hotspot-card__img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.12), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.hotspot-card:hover .hotspot-card__img::after {
    opacity: 1;
}

/* Category badge on image */
.hotspot-card__category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(8,145,178,0.9);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* 內容 */
.hotspot-card__body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 場域名稱 */
.hotspot-card__title {
    font-family: var(--hotspot-font);
    font-size: 17px;
    font-weight: 700;
    color: var(--hotspot-text);
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hotspot-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.hotspot-card:hover .hotspot-card__title a {
    color: var(--hotspot-primary);
}

/* 資訊列 */
.hotspot-card__info {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 10px;
}
.hotspot-card__info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--hotspot-font);
    font-size: 14px;
    color: var(--hotspot-text-secondary);
    line-height: 1.5;
    padding: 3px 0;
}
.hotspot-card__info-item i {
    color: var(--hotspot-primary);
    font-size: 14px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    opacity: 0.7;
    margin-top: 3px;
}
.hotspot-card__info-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 底部 */
.hotspot-card__footer {
    padding-top: 8px;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}
.hotspot-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hotspot-primary);
    background: none;
    padding: 4px 0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.hotspot-view-btn:hover {
    color: #0e7490;
    gap: 8px;
}

/* 空狀態 */
.hotspot-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--hotspot-text-secondary);
}
.hotspot-empty-state i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* ========================================
   4. Loading Spinner
   ======================================== */
.is-display-41 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

/* ========================================
   5. Responsive
   ======================================== */
@media (max-width: 768px) {
    .hotspot-grid-column {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
