/* Archive Library Styles */

.archive_library_section {
    position: relative;
    padding: 3rem 0;
}

/* Categories Grid */
.archive_library_section .archive-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .archive_library_section .archive-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .archive_library_section .archive-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .archive_library_section .archive-categories-grid {
        grid-template-columns: 1fr;
    }
}

.archive_library_section .archive-category-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.archive_library_section .archive-category-item:hover {
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.archive_library_section .archive-cat-icon {
    margin-bottom: 1rem;
    color: var(--ths-primary-color, #2a9429);
}

.archive_library_section .archive-cat-icon img {
    max-width: 64px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.archive_library_section .archive-cat-icon svg {
    width: 64px;
    height: 64px;
}

.archive_library_section .archive-cat-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.archive_library_section .archive-cat-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Modal Content */
.archive_library_section .archive-library-popup .modal {
    max-width: 900px;
    width: 90%;
    padding: 3rem 2rem;
    background: #fff;
    border-radius: 12px;
}

.archive_library_section .archive-modal-title {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 1rem;
}

/* Files Grid in Modal */
.archive_library_section .archive-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.archive_library_section .archive-file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background 0.2s;
}

.archive_library_section .archive-file-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
    text-decoration: none;
}

.archive_library_section .archive-file-icon {
    color: #6c757d;
    margin-bottom: 0.75rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive_library_section .archive-file-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.archive_library_section .archive-file-item:hover .archive-file-icon {
    color: var(--ths-primary-color, #2a9429);
}

.archive_library_section .archive-file-name {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    word-break: break-word; /* Handle long filenames */
}

.archive_library_section .archive-file-type {
    font-size: 0.75rem;
    color: #adb5bd;
    text-transform: uppercase;
}
