/* IFG Resource Library Styles */
.ifg-resource-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: end;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.ifg-filter-group {
    flex: 1;
    min-width: 200px;
}

.ifg-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.ifg-filter-group select,
.ifg-filter-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ifg-filter-group select:focus,
.ifg-filter-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.ifg-filter-actions {
    display: flex;
    align-items: end;
}

.ifg-clear-filters {
    padding: 12px 24px;
    background: #718096;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ifg-clear-filters:hover {
    background: #4a5568;
    transform: translateY(-1px);
}

/* Resources Grid */
.ifg-resources-grid {
    position: relative;
}

.ifg-resources-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    transition: opacity 0.3s ease;
}

.ifg-resources-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ifg-loading-spinner {
    padding: 20px 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #4299e1;
}

/* Resource Card */
.ifg-resource-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.ifg-resource-item.hidden {
    display: none;
}

.ifg-resource-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ifg-resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.ifg-resource-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.ifg-type-whitepaper { background: #4299e1; color: white; }
.ifg-type-video { background: #48bb78; color: white; }
.ifg-type-webinar { background: #ed8936; color: white; }
.ifg-type-case-study { background: #9f7aea; color: white; }
.ifg-type-guide { background: #f56565; color: white; }
.ifg-type-article { background: #718096; color: white; }

.ifg-resource-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.ifg-resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ifg-resource-card:hover .ifg-resource-image img {
    transform: scale(1.05);
}

.ifg-resource-placeholder {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ifg-placeholder-icon {
    font-size: 48px;
    opacity: 0.7;
}

.ifg-resource-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ifg-resource-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.ifg-resource-excerpt {
    color: #718096;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.ifg-resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 12px;
    color: #a0aec0;
}

.ifg-resource-categories {
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
}

.ifg-resource-link {
    display: inline-flex;
    align-items: center;
    color: #4299e1;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.ifg-resource-link:hover {
    color: #3182ce;
}

.ifg-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.ifg-no-results p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ifg-resources-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .ifg-resource-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .ifg-filter-group {
        min-width: 100%;
    }
    
    .ifg-resources-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ifg-resource-content {
        padding: 20px;
    }
}

/* Animation for filter changes */
.ifg-resources-container.updating {
    opacity: 0.6;
    pointer-events: none;
}

/* Filter count badge */
.ifg-filter-count {
    display: inline-block;
    background: #4299e1;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 600;
}