/* ============================================================
   Download Page Styles
   ============================================================ */

/* Card */
.download-item {
    background: #fff;
    border-radius: var(--border-radius, 8px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.download-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10) !important;
}

/* 卡片內層 */
.download-card-inner {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 第一列：icon + 標題 */
.download-row-top {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

/* 第二列：meta + 按鈕 */
.download-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.download-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

/* File icon wrapper */
.download-icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--cream-bg, #FAF9F6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-icon-wrap i {
    font-size: 1.9rem;
}

/* Title */
.download-title {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    color: var(--dark-blue, #003366);
    font-size: 1rem;
    line-height: 1.5;
    min-width: 0;
    word-break: break-word;
}

/* Category badge tags */
.badge-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Download button */
.btn-download {
    display: inline-flex;
    align-items: center;
    background-color: var(--nav-bg, #11A79C);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.btn-download:hover:not(.disabled) {
    background-color: var(--primary-green-hover, #7BC99E);
    color: var(--charcoal, #2C3E35);
    transform: scale(1.04);
}

/* Category tabs — 手機可橫向捲動 */
.news-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    justify-content: flex-start;
}

.news-tabs::-webkit-scrollbar {
    display: none;
}

.news-tab-btn {
    flex-shrink: 0;
}

/* ============================================================
   Mobile (≤ 576px)
   ============================================================ */
@media (max-width: 576px) {
    .download-card-inner {
        padding: 16px;
        gap: 10px;
    }

    .download-icon-wrap {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .download-icon-wrap i {
        font-size: 1.5rem;
    }

    .download-title {
        font-size: 0.95rem;
    }

    /* 下載按鈕手機全寬，易於點擊 */
    .download-row-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .download-action {
        width: 100%;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 1rem;
        border-radius: 10px;
    }
}
