/* ============================================================
   資源下載頁專屬樣式（BEM 命名）
   ============================================================ */

/* ===== Hero ===== */
.hero--articles {
    background: linear-gradient(135deg, var(--hero-dark) 30%, #1e3a8a);
    color: #fff;
    text-align: center;
}
.hero--articles .hero__title {
    color: #fff;
    font-size: 48px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}
.hero--articles .hero__title i {
    color: #60a5fa;
    margin-right: 10px;
}
.hero--articles .hero__desc {
    color: #cbd5e1;
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== 資源列表 ===== */
.resources {
    padding: 60px 10%;
    background: #f8fafc;
}

/* 區塊標題 */
.resources__featured {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    transition: 0.3s;
}
.resources__featured:hover {
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.1);
}
.resources__featured-img {
    width: 40%;
    background: linear-gradient(135deg, #1e293b, #334155);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 60px;
    min-height: 250px;
    flex-shrink: 0;
}
.resources__featured-body {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.resources__featured-title {
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--text-dark);
    line-height: 1.3;
}
.resources__featured-desc {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.resources__featured-link {
    color: var(--btn-blue);
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.9rem;
}
.resources__featured-link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* ===== 單篇文章卡片（BEM: .article） ===== */
.article {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.article:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.12);
}
.article__img {
    height: 180px;
    background: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 40px;
    position: relative;
}
.article__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article__img-icon {
    font-size: 40px;
}
.article__body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.article__meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
}
.article__meta .tag {
    background: var(--bg-light-blue);
    color: var(--btn-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
}
.article__title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.4;
}
.article__desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 15px;
}
.article__link {
    color: var(--btn-blue);
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}
.article__link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* 空狀態 */
.article--empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    background: transparent;
    box-shadow: none;
}
.article--empty:hover {
    transform: none;
    box-shadow: none;
}
.article--empty .article__body {
    align-items: center;
    justify-content: center;
}

/* ===== 分頁 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 20px;
}
.pagination__btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-weight: bold;
    color: var(--text-gray);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
}
.pagination__btn:hover,
.pagination__btn--active {
    background: var(--btn-blue);
    color: #fff;
    border-color: var(--btn-blue);
}

/* ===== 底部 CTA ===== */
.articles__cta {
    background: var(--hero-dark);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}
.articles__cta-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #dbeafe;
}
.articles__cta-desc {
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 1rem;
}
.articles__cta-btn {
    display: inline-block;
    background: var(--btn-blue);
    color: #fff;
    padding: 12px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
}
.articles__cta-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}
.articles__cta-btn i {
    margin-left: 8px;
}

/* ===== 資源卡片網格 ===== */
.resources__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.resources__card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.resources__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.10);
}
.resources__card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--btn-blue);
    flex-shrink: 0;
}
.resources__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.resources__card-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.resources__card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.4;
}
.resources__card-title a {
    color: inherit;
    text-decoration: none;
}
.resources__card-title a:hover {
    color: var(--btn-blue);
}
.resources__card-desc {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.resources__card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--border-light);
}
.resources__card-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.resources__card-btn--detail {
    background: var(--bg-light-blue);
    color: var(--btn-blue);
}
.resources__card-btn--detail:hover {
    background: #dbeafe;
}
.resources__card-btn--download {
    background: var(--btn-blue);
    color: #fff;
}
.resources__card-btn--download:hover {
    background: #1d4ed8;
}
.resources__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    grid-column: 1 / -1;
}

/* ===== 響應式 ===== */
@media (max-width: 992px) {
    .resources__featured {
        flex-direction: column;
    }
    .resources__featured-img {
        width: 100%;
        height: 200px;
    }
}
@media (max-width: 768px) {
    .hero--articles {
        padding: 60px 20px;
    }
    .hero--articles .hero__title {
        font-size: 32px;
    }
    .hero--articles .hero__desc {
        font-size: 15px;
    }
    .resources {
        padding: 40px 5%;
    }
    .resources__grid {
        grid-template-columns: 1fr;
    }
    .resources__featured-body {
        padding: 24px;
    }
    .resources__featured-title {
        font-size: 20px;
    }
}
