@charset "UTF-8";

/* ==========================================================================
   [PK自訂樣式]
   PK-DW.css - Styles for Download Center
   Breadcrumb 、 Pagination 、 Classification 容器樣式已移至 pk-style.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   2. Search Bar
   Styles moved to pk-style.css (Global Component)
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   3. Tabs Design (Modern & Clean)
   -------------------------------------------------------------------------- */
.dw-tabs-container {
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.dw-tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.dw-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.dw-tabs-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.dw-tabs-wrapper::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.dw-tabs-list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 8px;
    min-width: max-content;
}

.dw-tab-item {
    flex-shrink: 0;
}

.dw-tab-link {
    display: block;
    padding: 16px 32px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.dw-tab-link:hover {
    color: #256C53;
    background: rgba(37, 108, 83, 0.05);
    text-decoration: none;
}

.dw-tab-item.active .dw-tab-link {
    color: #256C53;
    border-bottom-color: #256C53;
}

@media (max-width: 768px) {
    .dw-tab-link {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* --------------------------------------------------------------------------
   4. Tab Content & File Cards
   -------------------------------------------------------------------------- */
.dw-tab-content {
 
}

.dw-tab-pane {
    display: none;
}

.dw-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dw-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .dw-files-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   5. File Card Design
   -------------------------------------------------------------------------- */
.dw-file-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dw-file-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: #256C53;
}

/* Card Header */
.dw-file-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e5e5;
}

.dw-file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #256C53;
    border-radius: 10px;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
}

.dw-file-icon::after {
    content: "";
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
}

/* SVG Icons using CSS background */
.dw-icon-pdf::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cpath d='M10 12h4'%3E%3C/path%3E%3Cpath d='M10 16h4'%3E%3C/path%3E%3C/svg%3E");
}

.dw-icon-image::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'%3E%3C/circle%3E%3Cpolyline points='21 15 16 10 5 21'%3E%3C/polyline%3E%3C/svg%3E");
}

.dw-icon-archive::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='21 8 21 21 3 21 3 8'%3E%3C/polyline%3E%3Crect x='1' y='3' width='22' height='5'%3E%3C/rect%3E%3Cline x1='10' y1='12' x2='14' y2='12'%3E%3C/line%3E%3C/svg%3E");
}

.dw-icon-file::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3C/svg%3E");
}

.dw-file-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dw-file-type {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dw-file-lang {
    font-size: 12px;
    color: #777;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dw-file-lang:before {
    content: "🌐";
    font-size: 12px;
}

/* Card Body */
.dw-file-body {
    padding: 20px;
    flex: 1;
}

.dw-file-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

.dw-file-models {
    margin-top: 15px;
}

.dw-models-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dw-models-label .dw-icon-tags {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23256C53' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'%3E%3C/path%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.dw-models-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dw-model-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f9f6;
    color: #256C53;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #d4ede4;
}

.dw-model-more {
    display: inline-block;
    padding: 4px 10px;
    background: #f5f5f5;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

/* Card Footer */
.dw-file-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.dw-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #256C53;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dw-download-btn .dw-icon-download {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.dw-download-btn:hover {
    background: #1e5643;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 108, 83, 0.3);
    color: #fff !important;
    text-decoration: none;
}

.dw-download-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .dw-file-card {
        border-radius: 8px;
    }
    
    .dw-file-header {
        padding: 15px;
    }
    
    .dw-file-icon {
        width: 40px;
        height: 40px;
    }
    
    .dw-file-icon::after {
        width: 24px;
        height: 24px;
    }
    
    .dw-file-body {
        padding: 15px;
    }
    
    .dw-file-name {
        font-size: 15px;
    }
    
    .dw-download-btn {
        font-size: 14px;
        padding: 11px 18px;
    }
}

/* --------------------------------------------------------------------------
   6. No Data State
   -------------------------------------------------------------------------- */
.error {
    padding: 60px 20px;
}

.error img {
    max-width: 200px;
    margin: 0 auto 20px;
    opacity: 0.7;
}

.error-txt {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* --------------------------------------------------------------------------
   8. Loading State (Optional Enhancement)
   -------------------------------------------------------------------------- */
.dw-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.dw-loading:before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #256C53;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   9. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .dw-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .classification .breadcrumb {
        padding: 20px 0;
        font-size: 0.9em;
    }
    
    .dw-search-container {
        margin-bottom: 30px;
    }
    
    .dw-tabs-container {
        margin-bottom: 30px;
    }
    
    .dw-tab-content {
        padding-top: 20px;
    }
}

/* --------------------------------------------------------------------------
   10. Utility Classes
   -------------------------------------------------------------------------- */
.dw-mt-1 { margin-top: 10px !important; }
.dw-mt-2 { margin-top: 20px !important; }
.dw-mt-3 { margin-top: 30px !important; }
.dw-mb-1 { margin-bottom: 10px !important; }
.dw-mb-2 { margin-bottom: 20px !important; }
.dw-mb-3 { margin-bottom: 30px !important; }

/* --------------------------------------------------------------------------
   11. Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .dw-search-container,
    .dw-tabs-container {
        display: none;
    }
    
    .dw-file-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .dw-download-btn {
        display: none;
    }
}