/* Document Grid Styles */

/* Count */
.document-count {
    margin-bottom: 28px;
}

.count-text {
    line-height: 120% !important;
}

/* Grid */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 72px 100px;
    justify-content: space-between;
    transition: all 0.3s ease;
}

/* Document Card */
.document-card {
    gap: 20px;
    width: 300px;
    max-width: 300px;
    background: transparent !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
}

.document-card-link {
    text-decoration: none;
    color: inherit;
}

.document-image {
    min-width: 100px;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--global-palette2);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.document-content {
    display: flex;
    flex-direction: column;
}

.document-excerpt {
    font-weight: 400 !important;
    color: var(--global-palette4);
    letter-spacing: 0.1px !important;
}

/* Load More Button */
.document-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
}

.document-load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 40px;
    min-width: 251px;
    background: transparent !important;
    color: var(--global-palette1);
    border: 2px solid var(--global-palette1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.document-load-more-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: transparent !important;
    color: var(--global-palette1);
}

.document-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.load-more-spinner {
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--global-palette1);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-documents {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* ==================== Responsive Design ==================== */

/* Large screens - 3 columns */
@media (min-width: 1200px) {
    .document-grid {
        grid-template-columns: repeat(3, 300px);
    }
}

/* Medium-large - 3 columns */
@media (min-width: 900px) and (max-width: 1199px) {
    .document-grid {
        grid-template-columns: repeat(2, 300px);
    }
}

/* Medium - 2 columns */
@media (min-width: 600px) and (max-width: 899px) {
    .document-grid {
        grid-template-columns: repeat(2, 300px);
    }
}

/* Mobile - single column */
@media (max-width: 599px) {
    .document-grid {
        grid-template-columns: 1fr;
        gap: 48px 0;
        padding: 0 16px;
    }
    
    .document-card {
        width: 100%;
        max-width: none;
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    .document-load-more-btn {
        width: 100%;
        max-width: 300px;
    }
}