/* ===== EDOCMAN CATEGORIES LISTING STYLES ===== */

.edocman-categories-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Categories Grid Layout */
.edocman-categories-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.edocman-categories-grid.columns-1 { 
    grid-template-columns: 1fr; 
}
.edocman-categories-grid.columns-2 { 
    grid-template-columns: repeat(2, 1fr); 
}
.edocman-categories-grid.columns-3 { 
    grid-template-columns: repeat(3, 1fr); 
}
.edocman-categories-grid.columns-4 { 
    grid-template-columns: repeat(4, 1fr); 
}
.edocman-categories-grid.columns-5 { 
    grid-template-columns: repeat(5, 1fr); 
}

/* Category Item Card */
.edocman-category-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.edocman-category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edocman-category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.edocman-category-item:hover::before {
    opacity: 1;
}

/* Category Image */
.category-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: brightness(0.9);
}

.category-image:hover img {
    transform: scale(1.1);
    filter: brightness(1);
}

/* No Image Placeholder */
.category-no-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.category-no-image .image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    transition: all 0.3s ease;
}

.edocman-category-item:hover .category-no-image .image-placeholder {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
}

.category-no-image .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.category-no-image .placeholder-text {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Content */
.category-content {
    padding: 25px;
    position: relative;
}

.category-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
}

.category-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    background: linear-gradient(120deg, transparent 0%, transparent 50%, #667eea 50%);
    background-size: 240% 100%;
    background-position: 100% 0;
    transition: all 0.3s ease;
    background-clip: text;
    -webkit-background-clip: text;
}

.category-title a:hover {
    background-position: 0 0;
    color: #667eea;
}

.category-description {
    margin: 12px 0 20px 0;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Meta */
.category-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.category-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-meta span:hover {
    background: #e9ecef;
    color: #495057;
}

.category-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.category-meta .document-count {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.2);
}

.category-meta .subcategory-count {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border: 1px solid rgba(123, 31, 162, 0.2);
}

/* Category Actions */
.category-actions {
    margin-top: 20px;
}

.view-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.view-category-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.view-category-btn:hover::before {
    left: 100%;
}

.view-category-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.view-category-btn:hover .dashicons {
    transform: translateX(3px);
}

/* No Items State */
.edocman-no-items {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px dashed #dee2e6;
    margin: 40px 0;
}

.no-items-icon {
    margin-bottom: 25px;
    position: relative;
}

.no-items-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #cbd5e0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.edocman-no-items h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
}

.edocman-no-items p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Pagination */
.edocman-pagination {
    margin-top: 50px;
    text-align: center;
}

.edocman-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 4px;
    background: #fff;
    border: 2px solid #e9ecef;
    color: #6c757d;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.edocman-pagination .page-numbers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 10px;
}

.edocman-pagination .page-numbers span,
.edocman-pagination .page-numbers {
    position: relative;
    z-index: 1;
}

.edocman-pagination .page-numbers:hover,
.edocman-pagination .page-numbers.current {
    color: #fff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.edocman-pagination .page-numbers:hover::before,
.edocman-pagination .page-numbers.current::before {
    transform: scale(1);
}

/* List View Style */
.edocman-categories-list.list-view .edocman-categories-grid {
    display: block;
}

.edocman-categories-list.list-view .edocman-category-item {
    display: flex;
    margin-bottom: 30px;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
}

.edocman-categories-list.list-view .category-image,
.edocman-categories-list.list-view .category-no-image {
    width: 200px;
    height: 140px;
    flex-shrink: 0;
}

.edocman-categories-list.list-view .category-content {
    flex: 1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.edocman-categories-list.list-view .category-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.edocman-categories-list.list-view .category-description {
    -webkit-line-clamp: 2;
    margin-bottom: 20px;
}

.edocman-categories-list.list-view .category-meta {
    margin: 15px 0;
    padding: 12px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .edocman-categories-grid.columns-4,
    .edocman-categories-grid.columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .edocman-categories-list.list-view .category-image,
    .edocman-categories-list.list-view .category-no-image {
        width: 160px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .edocman-categories-list {
        padding: 15px;
    }
    
    .edocman-categories-grid {
        gap: 20px;
    }
    
    .edocman-categories-grid.columns-3,
    .edocman-categories-grid.columns-4,
    .edocman-categories-grid.columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-image,
    .category-no-image {
        height: 180px;
    }
    
    .category-content {
        padding: 20px;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    .edocman-categories-list.list-view .edocman-category-item {
        flex-direction: column;
    }
    
    .edocman-categories-list.list-view .category-image,
    .edocman-categories-list.list-view .category-no-image {
        width: 100%;
        height: 180px;
    }
    
    .edocman-no-items {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .edocman-categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-image,
    .category-no-image {
        height: 160px;
    }
    
    .category-content {
        padding: 15px;
    }
    
    .category-title {
        font-size: 16px;
    }
    
    .category-description {
        font-size: 14px;
    }
    
    .view-category-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .category-meta {
        gap: 10px;
    }
    
    .category-meta span {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .edocman-pagination .page-numbers {
        width: 36px;
        height: 36px;
        margin: 0 2px;
    }
}

/* Loading Animation */
.edocman-category-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.edocman-category-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.edocman-category-item:focus-within {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

.view-category-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .edocman-category-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .view-category-btn {
        display: none;
    }
    
    .edocman-pagination {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .edocman-categories-list {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .edocman-category-item {
        background: #2d2d2d;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .category-title {
        color: #ffffff;
    }
    
    .category-description {
        color: #b0b0b0;
    }
    
    .category-meta span {
        background: #3a3a3a;
        color: #d0d0d0;
    }
}


/* ===== EDOCMAN DOCUMENTS LISTING STYLES ===== */

/* Container */
.edocman-category-documents {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== CATEGORY HEADER ===== */
.category-header {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.category-breadcrumb {
    padding: 15px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.back-to-categories {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-to-categories:hover {
    color: #007cba;
    text-decoration: none;
}

.back-to-categories .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.category-info {
    display: flex;
    padding: 30px 25px;
    gap: 25px;
    align-items: flex-start;
}

.category-featured-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-details {
    flex: 1;
}

.category-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.category-description {
    margin-bottom: 20px;
    color: #6c757d;
    line-height: 1.6;
    font-size: 16px;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.document-count {
    display: inline-flex;
    align-items: center;
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.document-count .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ===== DOCUMENTS LIST ===== */
.documents-list {
    margin-bottom: 40px;
}

.documents-header {
    margin-bottom: 25px;
}

.documents-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 3px solid #007cba;
    display: inline-block;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.document-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.document-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Document Thumbnail */
.document-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.document-image {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.document-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.document-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-image:hover .image-overlay {
    opacity: 1;
}

.image-overlay .dashicons {
    color: white;
    font-size: 36px;
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Fallback Document Icon */
.document-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #666;
}

.document-icon i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #007cba;
}

.file-extension {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Document Content */
.document-content {
    padding: 20px;
}

.document-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.document-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.document-title a:hover {
    color: #007cba;
    text-decoration: none;
}

.document-short-description,
.document-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-short-description {
    -webkit-line-clamp: 2;
}

/* Document Meta */
.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.document-meta span {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #6c757d;
}

.document-meta .dashicons {
    margin-right: 4px;
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.document-version {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.file-size {
    background: #fff3e0;
    color: #f57c00;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.upload-date {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.download-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Document Actions */
.document-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004066 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: white;
    text-decoration: none;
}

.download-btn .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.view-details-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.view-details-btn:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.view-details-btn .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ===== NO DOCUMENTS STATE ===== */
.no-documents {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-documents-icon {
    margin-bottom: 20px;
}

.no-documents-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #cbd5e0;
}

.no-documents h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

.no-documents p {
    margin: 0 0 25px 0;
    color: #6c757d;
    font-size: 16px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #005a87;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
}

/* ===== MODAL STYLES ===== */
.edocman-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
    padding-right: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-image {
    margin-bottom: 20px;
}

.modal-image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-description {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
}

.modal-meta {
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: right;
    background: #f8f9fa;
}

.modal-download-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.modal-download-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.modal-download-btn .dashicons {
    margin-right: 8px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .edocman-category-documents {
        padding: 15px;
    }
    
    .category-info {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .category-featured-image {
        align-self: center;
        margin-bottom: 20px;
    }
    
    .category-title {
        font-size: 24px;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .document-thumbnail {
        height: 180px;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .download-btn,
    .view-details-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .document-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .category-breadcrumb,
    .category-info {
        padding: 15px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .documents-header h2 {
        font-size: 20px;
    }
    
    .document-thumbnail {
        height: 160px;
    }
    
    .document-content {
        padding: 15px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* ===== LOADING STATES ===== */
.document-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.document-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ACCESSIBILITY ===== */
.document-item:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.download-btn:focus,
.view-details-btn:focus,
.modal-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .document-actions,
    .modal-overlay,
    .modal-content {
        display: none !important;
    }
    
    .document-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.document-icon {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.document-icon:hover {
    transform: scale(1.05);
}

.icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.document-icon:hover .icon-overlay {
    opacity: 1;
}

.icon-overlay .dashicons {
    color: white;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.quick-preview-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.quick-preview-btn:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.quick-preview-btn .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.modal-details-btn {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.modal-details-btn:hover {
    background: #5a6268;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
}

.modal-details-btn .dashicons {
    margin-right: 8px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .document-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .download-btn,
    .view-details-btn,
    .quick-preview-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-details-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* ===== DOCUMENT DETAIL STYLES ===== */

.edocman-document-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Breadcrumb Navigation */
.document-breadcrumb {
    margin-bottom: 30px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5a67d8;
    text-decoration: none;
}

.breadcrumb-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.breadcrumb-separator {
    color: #6c757d;
    margin: 0 4px;
}

.breadcrumb-current {
    color: #495057;
    font-weight: 600;
}

/* Document Header */
.document-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.document-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50px, -50px);
}

.document-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.document-title-section {
    flex: 1;
    margin-right: 30px;
}

.document-details-title {
    margin: 0 0 15px 0;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: white;
}

.document-subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.5;
}

.document-actions-header {
    flex-shrink: 0;
}

.download-btn.primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-btn.primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.download-btn.primary .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Document Meta Bar */
.document-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.meta-label {
    font-weight: 600;
    opacity: 0.9;
}

.meta-value {
    font-weight: 700;
}

/* Content Wrapper */
.document-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.document-main-content {
    min-width: 0;
}

/* Document Preview Section */
.document-preview-section {
    margin-bottom: 40px;
}

.document-preview-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.document-preview-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-zoom-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.preview-zoom-btn:hover {
    background: white;
    transform: scale(1.05);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 3px solid #e9ecef;
}

.section-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #667eea;
}

/* Document Description */
.document-description-section {
    margin-bottom: 40px;
}

.document-description {
    font-size: 16px;
    line-height: 1.8;
    color: #495057;
}

.document-description p {
    margin-bottom: 20px;
}

.document-description h1,
.document-description h2,
.document-description h3,
.document-description h4,
.document-description h5,
.document-description h6 {
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
}

.document-description ul,
.document-description ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.document-description li {
    margin-bottom: 8px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.info-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e9ecef;
}

.info-header .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #667eea;
}

.info-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.info-content {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #6c757d;
}

.info-value {
    font-weight: 700;
    color: #2c3e50;
}

.info-value.highlight {
    color: #667eea;
    font-size: 18px;
}

/* Sidebar */
.document-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.card-content {
    padding: 25px;
}

/* Download Card */
.download-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.download-size,
.download-format {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #495057;
}

.download-size .dashicons,
.download-format .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #667eea;
}

.download-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.download-btn-large:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.download-btn-large .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.download-count {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* Category Card */
.category-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.category-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}


/* ===== SEARCH FUNCTIONALITY ===== */
.edocman-search-container {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.edocman-search-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.edocman-search-input-wrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.edocman-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.edocman-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edocman-search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
    pointer-events: none;
}

.edocman-search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.edocman-search-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.edocman-search-btn:active {
    transform: translateY(0);
}

.edocman-clear-search {
    padding: 15px 25px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edocman-clear-search:hover {
    background: #5a6268;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Search Results Info */
.edocman-search-results-info {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border-radius: 8px;
    border-left: 4px solid #1976d2;
    font-size: 14px;
    color: #1565c0;
}

.search-term {
    font-weight: 600;
    color: #0d47a1;
}

.search-count {
    font-weight: 600;
}

/* Highlight search terms in results */
.search-highlight {
    background: linear-gradient(120deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: #856404;
}

/* No search results */
.edocman-no-search-results {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
    margin: 30px 0;
}

.no-results-icon {
    margin-bottom: 20px;
}

.no-results-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #cbd5e0;
}

.edocman-no-search-results h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.edocman-no-search-results p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
}

.search-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.search-suggestions h4 {
    color: #495057;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    padding: 5px 0;
    color: #6c757d;
    font-size: 14px;
}

.search-suggestions li:before {
    content: "→";
    margin-right: 8px;
    color: #667eea;
    font-weight: bold;
}

/* Responsive Design for Search */
@media (max-width: 768px) {
    .edocman-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .edocman-search-input-wrapper {
        min-width: auto;
    }
    
    .edocman-search-btn,
    .edocman-clear-search {
        width: 100%;
        justify-content: center;
    }
    
    .edocman-search-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .edocman-search-input {
        padding: 12px 40px 12px 15px;
        font-size: 14px;
    }
    
    .edocman-search-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .edocman-clear-search {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .search-icon {
        right: 12px;
        font-size: 16px;
    }
}

/* Loading state for search */
.edocman-search-loading {
    opacity: 0.7;
    pointer-events: none;
}

.edocman-search-loading .edocman-search-btn {
    background: #6c757d;
    cursor: not-allowed;
}

.edocman-search-loading .edocman-search-btn:after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== EDOCMAN GLOBAL SEARCH PAGE STYLES ===== */

/* Search Page Container */
.edocman-search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Search Header */
.edocman-search-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.search-page-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.search-page-title .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #667eea;
}

.search-page-subtitle {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
    font-weight: 400;
}

/* Search Form Container */
.edocman-search-form-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin: 0 auto 50px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 900px;
}

.edocman-global-search-form .search-form-row {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Search Input Group */
.search-input-group,
.search-select-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.search-form-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.search-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.search-label .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #667eea;
}

.search-input-wrapper,
.search-select-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fafafa;
    color: #2c3e50;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-input-wrapper .input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    pointer-events: none;
}

.search-input-wrapper .input-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.search-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fafafa;
    color: #2c3e50;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.search-select:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-select-wrapper .select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    pointer-events: none;
}

.search-select-wrapper .select-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Search Actions */
.search-actions-group {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.search-submit-btn,
.search-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.search-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.search-submit-btn:active {
    transform: translateY(0);
}

.search-clear-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.search-clear-btn:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.search-submit-btn .dashicons,
.search-clear-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Search Results Section */
.edocman-search-results {
    margin-top: 40px;
}

.search-results-header {
    margin-bottom: 30px;
}

.results-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.results-title .results-count {
    color: #667eea;
}

.results-meta {
    font-size: 16px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-term-info,
.category-filter-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* No Results */
.no-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.no-results-title .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.no-results-message {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.6;
}

/* Search Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Search Result Item */
.search-result-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Result Thumbnail */
.result-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .result-thumbnail img {
    transform: scale(1.05);
}

.result-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-icon .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
}

.result-icon .file-ext {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Result Content */
.result-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.result-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #667eea;
}

/* Search Highlighting */
.search-highlight,
mark.search-highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Result Excerpt */
.result-excerpt {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0;
}

/* Result Meta */
.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #95a5a6;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.meta-category {
    color: #667eea;
    font-weight: 600;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.result-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-action-btn.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.result-action-btn.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.result-action-btn.preview-btn {
    background: #ffffff;
    color: #667eea;
    border-color: #667eea;
}

.result-action-btn.preview-btn:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-2px);
}

.result-action-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Pagination */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    background: #ffffff;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-2px);
}

.pagination-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
}

.pagination-dots {
    color: #95a5a6;
    font-weight: 700;
    padding: 0 8px;
}

/* Empty State */
.edocman-search-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 20px;
    margin-top: 40px;
}

.empty-state-icon {
    margin-bottom: 30px;
}

.empty-state-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #bdc3c7;
}

.edocman-search-empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.edocman-search-empty-state p {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .edocman-global-search-form .search-form-row {
        gap: 20px;
    }
    
    .search-form-inputs {
        grid-template-columns: 1fr;
    }
    
    .search-actions-group {
        flex-direction: row;
        justify-content: center;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .edocman-search-page {
        padding: 30px 15px;
    }
    
    .edocman-search-header {
        margin-bottom: 35px;
    }
    
    .search-page-title {
        font-size: 28px;
    }
    
    .search-page-subtitle {
        font-size: 14px;
    }
    
    .edocman-search-form-container {
        padding: 25px 20px;
    }
    
    .search-form-inputs {
        grid-template-columns: 1fr;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .results-title {
        font-size: 22px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .pagination-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .search-page-title {
        font-size: 24px;
        flex-direction: column;
        gap: 10px;
    }
    
    .search-submit-btn,
    .search-clear-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .search-actions-group {
        width: 100%;
        flex-direction: column;
    }
    
    .search-submit-btn,
    .search-clear-btn {
        width: 100%;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .pagination-numbers {
        flex-wrap: wrap;
    }
}


/* ===== EDOCMAN SEARCH - CENTERED FORM & VERTICAL CARDS ===== */

.edocman-search-page {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 20px 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Header - Centered */
.edocman-search-header {
    text-align: center;
    margin-bottom: 20px;
}

.search-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.search-page-title .dashicons {
    display: none;
}

.search-page-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Form Container - CENTERED WITH MAX WIDTH */
.edocman-search-form-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin: 0 auto 30px auto;
    border: 1px solid #e9ecef;
    max-width: 900px;
}

.edocman-global-search-form .search-form-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Input Grid - 2 Columns CENTERED */
.search-form-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.search-input-group,
.search-select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Labels */
.search-label {
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-label .dashicons {
    display: none;
}

/* Inputs */
.search-input-wrapper,
.search-select-wrapper {
    position: relative;
}

.search-input,
.search-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
    font-family: inherit;
    box-sizing: border-box;
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
    color: #95a5a6;
}

.search-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236c757d' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.search-input-wrapper .input-icon,
.search-select-wrapper .select-icon {
    display: none;
}

/* Buttons - Centered */
.search-actions-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.search-submit-btn,
.search-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    min-width: 130px;
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.4);
}

.search-clear-btn {
    background: #ffffff;
    color: #6c757d;
    border: 2px solid #e0e6ed;
    min-width: 110px;
}

.search-clear-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.search-submit-btn .dashicons,
.search-clear-btn .dashicons {
    display: none;
}

/* Results Header */
.search-results-header {
    margin-bottom: 25px;
    padding: 20px 25px;
    background: #ffffff;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.results-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px 0;
}

.results-title .results-count {
    color: #667eea;
}

.results-meta {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Results Grid - VERTICAL CARDS LIKE IMAGE */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Result Card - VERTICAL BOX LAYOUT */
.search-result-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

/* Thumbnail - TOP SECTION */
.result-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .result-thumbnail img {
    transform: scale(1.08);
}

.result-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
}

.result-icon i,
.result-icon .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
}

.result-icon .file-ext {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Content - BOTTOM SECTION */
.result-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.result-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.result-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #667eea;
}

/* Excerpt */
.result-excerpt {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Information */
.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    padding: 14px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.meta-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.meta-category {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.2);
}

.meta-size {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
    border: 1px solid rgba(245, 124, 0, 0.2);
}

.meta-date {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border: 1px solid rgba(123, 31, 162, 0.2);
}

.meta-downloads {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #388e3c;
    border: 1px solid rgba(56, 142, 60, 0.2);
}

/* Action Buttons */
.result-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.result-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.result-action-btn.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
}

.result-action-btn.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.result-action-btn.preview-btn {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
}

.result-action-btn.preview-btn:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-2px);
}

.result-action-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* No Results */
.no-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 0 15px 0;
    text-align: center;
}

.no-results-message {
    font-size: 16px;
    color: #6c757d;
    text-align: center;
    line-height: 1.6;
}

/* Empty State */
.edocman-search-empty-state {
    text-align: center;
    padding: 80px 30px;
    background: #ffffff;
    border-radius: 20px;
    margin-top: 40px;
    border: 2px dashed #e0e6ed;
}

.empty-state-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #cbd5e0;
}

.edocman-search-empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 20px 0 12px 0;
}

.edocman-search-empty-state p {
    font-size: 16px;
    color: #6c757d;
}

/* Pagination */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    background: #ffffff;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-2px);
}

.pagination-number {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    background: #ffffff;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .edocman-search-page {
        padding: 20px 15px;
    }
    
    .edocman-search-form-container {
        padding: 25px 20px;
    }
    
    .search-form-inputs {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .search-actions-group {
        flex-direction: row;
    }
    
    .search-submit-btn,
    .search-clear-btn {
        flex: 1;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .search-page-title {
        font-size: 24px;
    }
    
    .edocman-search-form-container {
        padding: 20px 16px;
    }
    
    .search-actions-group {
        flex-direction: column;
        width: 100%;
    }
    
    .search-submit-btn,
    .search-clear-btn {
        width: 100%;
    }
    
    .result-content {
        padding: 20px;
    }
}

/* Loading State */
.edocman-search-loading {
    opacity: 0.6;
    pointer-events: none;
}

.edocman-search-loading .search-submit-btn {
    background: #95a5a6;
}

/* Print */
@media print {
    .search-actions-group,
    .result-actions,
    .search-pagination {
        display: none !important;
    }
    
    .search-result-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
