/* ==========================================================================
   RS Post List — Scoped Styles (no global leaks)
   All selectors prefixed with .rs-postlist-wrap for max specificity
   ========================================================================== */

/* ---- Reset within scope ---- */
div.rs-postlist-wrap,
div.rs-postlist-wrap *,
div.rs-postlist-wrap *::before,
div.rs-postlist-wrap *::after {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* ---- Root ---- */
div.rs-postlist-wrap {
    display: block !important;
    width: 100% !important;
    font-family: 'Noto Sans TC', sans-serif !important;
}

/* ---- Grid: desktop 左大右三小 ---- */
div.rs-postlist-wrap .rs-postlist-grid {
    display: flex !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 20px !important;
}

/* ============================================================
   Featured Card (大卡)
   ============================================================ */
div.rs-postlist-wrap a.rs-postlist-featured {
    flex: 0 0 53.3% !important;
    min-height: 450px !important;
    padding: 32px !important;
    border-radius: 20px !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25) inset !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
    overflow: hidden !important;
    cursor: pointer !important;
    color: #fff !important;
    transition: none !important;
}

/* 漸層疊加層 */
div.rs-postlist-wrap a.rs-postlist-featured .rs-postlist-featured-overlay {
    position: absolute !important;
    inset: 0 !important;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 60%),
        linear-gradient(218deg, rgba(12, 7, 3, 0) 14%, rgba(244, 113, 22, 0.7) 100%),
        rgba(0, 0, 0, 0.20) !important;
    border-radius: inherit !important;
    pointer-events: none !important;
    display: block !important;
}

/* 文字內容層 */
div.rs-postlist-wrap a.rs-postlist-featured .rs-postlist-featured-content {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

/* Meta 行 (日期 + 分類) */
div.rs-postlist-wrap .rs-postlist-featured-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.50) !important;
}

div.rs-postlist-wrap .rs-postlist-featured-date-group {
    display: flex !important;
    align-items: flex-end !important;
    gap: 24px !important;
}

div.rs-postlist-wrap .rs-postlist-featured-date {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 32px !important;
    color: #fff !important;
}

div.rs-postlist-wrap .rs-postlist-featured-year {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 20.8px !important;
    color: #fff !important;
}

div.rs-postlist-wrap .rs-postlist-featured-cat {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 22.4px !important;
    letter-spacing: 1.4px !important;
    color: #fff !important;
}

/* Body (標題 + 摘要) */
div.rs-postlist-wrap .rs-postlist-featured-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

div.rs-postlist-wrap .rs-postlist-featured-title {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 23px !important;
    font-weight: 500 !important;
    line-height: 29.9px !important;
    letter-spacing: 2.3px !important;
    color: #fff !important;
    display: block !important;
}

div.rs-postlist-wrap .rs-postlist-featured-excerpt {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 25.6px !important;
    letter-spacing: 1.6px !important;
    color: rgba(255, 255, 255, 0.70) !important;
    display: block !important;
}

/* ============================================================
   Sidebar (右側三小卡容器)
   ============================================================ */
div.rs-postlist-wrap .rs-postlist-sidebar {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    min-width: 0 !important;
}

/* ============================================================
   Item Card (小卡)
   ============================================================ */
div.rs-postlist-wrap a.rs-postlist-item {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 32px !important;
    padding: 20px 10px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    color: #fff !important;
    transition: background 0.2s ease, backdrop-filter 0.2s ease !important;
}

div.rs-postlist-wrap a.rs-postlist-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
}

/* 小卡圖片 */
div.rs-postlist-wrap .rs-postlist-item-thumb {
    width: 200px !important;
    height: 112px !important;
    flex-shrink: 0 !important;
    border-radius: 4px !important;
    object-fit: cover !important;
    display: block !important;
    background: #384250 !important;
}

div.rs-postlist-wrap .rs-postlist-item-thumb--empty {
    display: block !important;
}

/* 小卡文字 */
div.rs-postlist-wrap .rs-postlist-item-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

div.rs-postlist-wrap .rs-postlist-item-meta {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

div.rs-postlist-wrap .rs-postlist-item-cat {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 22.4px !important;
    letter-spacing: 1.4px !important;
    color: #EE751F !important;
}

div.rs-postlist-wrap .rs-postlist-item-date {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 22.4px !important;
    letter-spacing: 1.4px !important;
    color: rgba(255, 255, 255, 0.70) !important;
}

div.rs-postlist-wrap .rs-postlist-item-title {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 28.8px !important;
    letter-spacing: 1.8px !important;
    color: #fff !important;
    display: block !important;
}

/* ============================================================
   Large Desktop (min-width: 1440px) — 左右欄間距 80px
   ============================================================ */
@media screen and (min-width: 1440px) {

    div.rs-postlist-wrap .rs-postlist-grid {
        gap: 80px !important;
    }
}

/* ============================================================
   Mobile (max-width: 1023px)
   ============================================================ */
@media screen and (max-width: 1023px) {

    div.rs-postlist-wrap .rs-postlist-grid {
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* 大卡 — 手機版 */
    div.rs-postlist-wrap a.rs-postlist-featured {
        flex: none !important;
        width: 100% !important;
        min-height: 248px !important;
        height: 248px !important;
        padding: 16px !important;
        border-radius: 6px !important;
        box-shadow: none !important;
    }

    div.rs-postlist-wrap a.rs-postlist-featured .rs-postlist-featured-overlay {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),
            rgba(0, 0, 0, 0.10) !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-content {
        gap: 8px !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-meta {
        padding-bottom: 8px !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-date-group {
        gap: 13px !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-date {
        font-family: 'Manrope', sans-serif !important;
        font-size: 18px !important;
        line-height: 18px !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-year {
        font-family: 'Manrope', sans-serif !important;
        font-size: 10px !important;
        line-height: 13px !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-cat {
        font-size: 10px !important;
        line-height: 16px !important;
        letter-spacing: 1px !important;
    }

    div.rs-postlist-wrap .rs-postlist-featured-title {
        font-size: 14px !important;
        font-weight: 500 !important;
        line-height: 18.2px !important;
        letter-spacing: 1.4px !important;
    }

    /* 手機大卡不顯示摘要 */
    div.rs-postlist-wrap .rs-postlist-featured-excerpt {
        display: none !important;
    }

    /* 小卡 — 手機版 */
    div.rs-postlist-wrap .rs-postlist-sidebar {
        gap: 0 !important;
    }

    div.rs-postlist-wrap a.rs-postlist-item {
        flex: none !important;
        gap: 16px !important;
        padding: 20px 0 !important;
        border-radius: 0 !important;
    }

    div.rs-postlist-wrap a.rs-postlist-item:hover {
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    div.rs-postlist-wrap .rs-postlist-item-thumb {
        width: 100px !important;
        height: 56px !important;
        border-radius: 5px !important;
    }

    div.rs-postlist-wrap .rs-postlist-item-info {
        gap: 4px !important;
    }

    div.rs-postlist-wrap .rs-postlist-item-meta {
        gap: 8px !important;
    }

    div.rs-postlist-wrap .rs-postlist-item-cat {
        color: #F47116 !important;
    }

    div.rs-postlist-wrap .rs-postlist-item-date {
        color: #858585 !important;
    }

    div.rs-postlist-wrap .rs-postlist-item-title {
        font-size: 16px !important;
        line-height: 32px !important;
        letter-spacing: 1.6px !important;
    }
}
