.ncra-resources-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Filters Container - holds both tag filter and sort dropdown side by side */
.ncra-resources-filters-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ncra-resources-tag-filter-wrapper {
    min-width: 200px;
}

.ncra-resources-sort-control {
    min-width: 200px;
}

/* Unified styling for both dropdowns */
.ncra-resources-filter-select2 {
    min-height: 38px;
}

/* Select2 customization for both dropdowns */
.ncra-resources-filters-container .select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ncra-resources-filters-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    color: #555;
}

.ncra-resources-filters-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 8px;
}

.ncra-resources-filters-container .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
}

.ncra-resources-viewing-info {
    font-size: 0.9em;
    color: #555;
    margin-right: auto; /* Pushes filters container to the right */
}

/* Remove old sort control styles - now handled by unified filter styles */

.ncra-resources-grid-wrapper .ncra-loading-resources,
.ncra-resources-grid-wrapper .ncra-no-resources-found {
    grid-column: 1 / -1; /* Span all columns in the grid */
    padding: 20px;
    text-align: center;
    color: #777;
}

/* Styles for the sort dropdown are usually handled by Divi/theme, 
   but if you need to style a custom one it would go here. 
   The select element for sorting is in the module options, not rendered directly in the header by default. */

.ncra-resources-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 20px;
}

.ncra-resource-item {
    border: 1px solid #eee;
    padding: 0; /* Remove padding from container since link will have padding */
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.ncra-resource-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ncra-resource-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px; /* Move padding to the link */
    text-decoration: none;
    color: inherit;
}

.ncra-resource-link:hover {
    text-decoration: none;
    color: inherit;
}

.ncra-resource-item .et_pb_image_container {
    margin-bottom: 10px;
}

.ncra-resource-item .et_pb_image_container img {
    max-width: 100%;
    height: auto;
}

.ncra-resource-item h3 {
    margin-top: 0;
    font-size: 1.2em; /* Adjust as needed */
    margin-bottom: 10px;
}

.ncra-resource-item .ncra-resource-excerpt {
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.2em; /* Fallback: 2 lines * 1.6 line-height */
    word-wrap: break-word;
}

.ncra-resource-meta {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between avatar and text info */
    margin-top: auto; /* Pushes meta to the bottom if item is flex container */
    padding-top: 10px;
    border-top: 1px solid #f5f5f5; /* Optional separator */
}

.ncra-resource-author-avatar img.ncra-author-avatar {
    border-radius: 50%; /* Circular avatar */
    width: 40px; /* Match avatar size in PHP */
    height: 40px; /* Match avatar size in PHP */
}

.ncra-resource-author-info {
    display: flex;
    flex-direction: column;
    font-size: 0.85em;
    color: #666;
}

.ncra-resource-author-name {
    font-weight: bold;
}

.ncra-resource-date {
    font-size: 0.9em;
    color: #777;
}

/* Responsive Adjustments */
@media (max-width: 980px) { /* Tablet */
    .ncra-resources-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) { /* Mobile */
    .ncra-resources-grid-wrapper {
        grid-template-columns: 1fr;
    }
    .ncra-resources-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .ncra-resources-viewing-info {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Filters container responsive styles */
    .ncra-resources-filters-container {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .ncra-resources-tag-filter-wrapper,
    .ncra-resources-sort-control {
        width: 100%;
        min-width: auto;
    }
    
    .ncra-resources-tag-filter-item {
        width: 100%;
    }
} 