/* 下載卡片樣式 */
.download-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.download-card:hover::before {
    opacity: 1;
}

.download-card-icon-container {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.download-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.download-card:hover .download-card-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
}

.download-card-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.download-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.download-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.5rem;
}

.download-card-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.download-card-footer {
    margin-top: auto;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.download-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.download-btn:hover i {
    transform: translateY(2px);
}

/* 下載須知區塊 */
.download-notice {
    border-top: 2px solid #f0f0f0;
}

.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    height: 100%;
    transition: all 0.3s ease;
}

.notice-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.notice-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.notice-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.notice-content p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.5;
}

/* 檔案類型圖示樣式變化 */
.download-card[data-file-type="pdf"] .download-card-icon {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

.download-card[data-file-type="pdf"]:hover .download-card-icon {
    box-shadow: 0 6px 24px rgba(220, 53, 69, 0.4);
}

.download-card[data-file-type="doc"] .download-card-icon,
.download-card[data-file-type="docx"] .download-card-icon {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.3);
}

.download-card[data-file-type="doc"]:hover .download-card-icon,
.download-card[data-file-type="docx"]:hover .download-card-icon {
    box-shadow: 0 6px 24px rgba(13, 110, 253, 0.4);
}

.download-card[data-file-type="xls"] .download-card-icon,
.download-card[data-file-type="xlsx"] .download-card-icon {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.3);
}

.download-card[data-file-type="xls"]:hover .download-card-icon,
.download-card[data-file-type="xlsx"]:hover .download-card-icon {
    box-shadow: 0 6px 24px rgba(25, 135, 84, 0.4);
}

.download-card[data-file-type="zip"] .download-card-icon,
.download-card[data-file-type="rar"] .download-card-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
}

.download-card[data-file-type="zip"]:hover .download-card-icon,
.download-card[data-file-type="rar"]:hover .download-card-icon {
    box-shadow: 0 6px 24px rgba(255, 193, 7, 0.4);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .download-card-title {
        font-size: 1.1rem;
        min-height: auto;
    }

    .download-card-icon {
        width: 60px;
        height: 60px;
    }

    .download-card-icon i {
        font-size: 2rem;
    }

    .notice-item {
        padding: 1rem;
    }

    .notice-icon {
        width: 40px;
        height: 40px;
    }

    .notice-icon i {
        font-size: 1.25rem;
    }

    .notice-content h5 {
        font-size: 0.9rem;
    }

    .notice-content p {
        font-size: 0.8rem;
    }
}

/* 載入動畫 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.download-card-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* 下載進度指示器（可選） */
.download-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    overflow: hidden;
}

.download-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* 空狀態樣式改進 */
.download-card + .col-12 .text-center {
    padding: 4rem 2rem;
}
