/* Enhanced Resource Library - Main Styles */

/* CSS Variables for Theme Integration */
:root {
    --erl-primary-color: #0073aa;
    --erl-secondary-color: #005177;
    --erl-accent-color: #ff6600;
    --erl-text-color: #333333;
    --erl-background-color: #ffffff;
    --erl-border-color: #e2e2e2;
    --erl-border-radius: 6px;
    --erl-box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    --erl-transition: all 0.3s ease;
    --erl-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --erl-font-size: 16px;
    --erl-line-height: 1.6;
    --erl-spacing: 1rem;
    --erl-grid-gap: 20px;
    --erl-card-padding: 16px;
}

/* Base Styles */
.erl-resource-library {
    font-family: var(--erl-font-family);
    font-size: var(--erl-font-size);
    line-height: var(--erl-line-height);
    color: var(--erl-text-color);
    background-color: var(--erl-background-color);
}

/* Search Form */
.erl-search-form {
    margin-bottom: var(--erl-spacing);
    padding: var(--erl-spacing);
    background: var(--erl-background-color);
    border: 1px solid var(--erl-border-color);
    border-radius: var(--erl-border-radius);
    box-shadow: var(--erl-box-shadow);
}

.erl-search-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.erl-search-field,
.erl-category-filter,
.erl-tag-filter,
.erl-price-filter {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid var(--erl-border-color);
    border-radius: var(--erl-border-radius);
    font-size: 14px;
    transition: var(--erl-transition);
}

.erl-search-field:focus,
.erl-category-filter:focus,
.erl-tag-filter:focus,
.erl-price-filter:focus {
    outline: none;
    border-color: var(--erl-primary-color);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.erl-search-submit {
    background-color: var(--erl-primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--erl-border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--erl-transition);
}

.erl-search-submit:hover {
    background-color: var(--erl-secondary-color);
    transform: translateY(-1px);
}

.erl-favorites-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.erl-favorites-filter input[type="checkbox"] {
    margin: 0;
}

/* Resource Grid */
.erl-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--erl-grid-gap);
    margin-bottom: var(--erl-spacing);
}

/* Resource Card */
.erl-resource-card {
    position: relative;
    background: var(--erl-background-color);
    border: 1px solid var(--erl-border-color);
    border-radius: var(--erl-border-radius);
    overflow: hidden;
    box-shadow: var(--erl-box-shadow);
    transition: var(--erl-transition);
    display: flex;
    flex-direction: column;
}

.erl-resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.erl-resource-card.erl-favorite {
    border-color: var(--erl-accent-color);
}

/* Resource Thumbnail */
.erl-resource-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 16/9; /* Standard aspect ratio for thumbnails */
    min-height: 150px;
    max-height: 250px;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .erl-resource-thumbnail {
        height: 200px; /* Fallback height */
    }
}

.erl-resource-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--erl-transition);
}

.erl-resource-card:hover .erl-resource-thumbnail img {
    transform: scale(1.05);
}

/* No Thumbnail State */
.erl-no-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #666;
}

.erl-default-thumbnail {
    font-size: 48px;
    opacity: 0.5;
}

/* Resource Content */
.erl-resource-content {
    padding: var(--erl-card-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.erl-resource-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.erl-resource-title a {
    color: var(--erl-text-color);
    text-decoration: none;
    transition: var(--erl-transition);
}

.erl-resource-title a:hover {
    color: var(--erl-primary-color);
}

.erl-resource-excerpt {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Resource Categories and Tags */
.erl-resource-categories,
.erl-resource-tags {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.erl-category,
.erl-tag {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--erl-transition);
}

.erl-category {
    background-color: rgba(0, 115, 170, 0.1);
    color: var(--erl-primary-color);
}

.erl-category:hover {
    background-color: var(--erl-primary-color);
    color: white;
}

.erl-tag {
    background-color: rgba(255, 102, 0, 0.1);
    color: var(--erl-accent-color);
}

.erl-tag:hover {
    background-color: var(--erl-accent-color);
    color: white;
}

/* Resource Meta */
.erl-resource-meta {
    margin-bottom: 15px;
}

.erl-resource-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.erl-resource-type {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.erl-type-video {
    color: #e74c3c;
}

.erl-type-audio {
    color: #9b59b6;
}

.erl-type-download {
    color: #3498db;
}

.erl-type-external {
    color: #f39c12;
}

.erl-resource-price {
    font-weight: 600;
    color: var(--erl-accent-color);
}

.erl-file-size {
    color: #666;
}

/* Resource Actions */
.erl-resource-actions {
    margin-top: auto;
}

.erl-btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: var(--erl-border-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--erl-transition);
    min-width: 100px;
}

.erl-btn-primary {
    background-color: var(--erl-primary-color);
    color: white;
}

.erl-btn-primary:hover {
    background-color: var(--erl-secondary-color);
    transform: translateY(-1px);
}

.erl-btn-secondary {
    background-color: var(--erl-accent-color);
    color: white;
}

.erl-btn-secondary:hover {
    background-color: #cc5200;
    transform: translateY(-1px);
}

.erl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Favorite Button */
.erl-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--erl-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.erl-favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.erl-favorite-btn.erl-favorited {
    background: var(--erl-accent-color);
    color: white;
}

.erl-favorite-icon {
    font-size: 18px;
    transition: var(--erl-transition);
}

.erl-favorite-btn.erl-favorited .erl-favorite-icon {
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Load More Button */
.erl-load-more-wrapper {
    text-align: center;
    margin: var(--erl-spacing) 0;
}

.erl-load-more-btn {
    background-color: var(--erl-primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--erl-border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--erl-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.erl-load-more-btn:hover {
    background-color: var(--erl-secondary-color);
    transform: translateY(-1px);
}

.erl-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.erl-loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.erl-pagination {
    margin-top: var(--erl-spacing);
    text-align: center;
}

.erl-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid var(--erl-border-color);
    border-radius: var(--erl-border-radius);
    text-decoration: none;
    color: var(--erl-text-color);
    transition: var(--erl-transition);
}

.erl-pagination .page-numbers:hover,
.erl-pagination .page-numbers.current {
    background-color: var(--erl-primary-color);
    color: white;
    border-color: var(--erl-primary-color);
}

/* Loading States */
.erl-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid #e7e7e7;
}

.erl-loading i {
    display: block;
    margin-bottom: 1rem;
}

.erl-loading p {
    margin: 0;
    font-size: 1rem;
    color: #999;
}

.erl-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--erl-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.erl-no-resources {
    text-align: center;
    padding: var(--erl-spacing);
    color: #666;
    font-style: italic;
}

/* Error States */
.erl-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: var(--erl-spacing);
    border-radius: var(--erl-border-radius);
    margin-bottom: var(--erl-spacing);
}

/* Success Messages */
.erl-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #363;
    padding: var(--erl-spacing);
    border-radius: var(--erl-border-radius);
    margin-bottom: var(--erl-spacing);
}

/* Accessibility */
.erl-resource-card:focus-within {
    outline: 2px solid var(--erl-primary-color);
    outline-offset: 2px;
}

.erl-btn:focus {
    outline: 2px solid var(--erl-primary-color);
    outline-offset: 2px;
}

/* Screen Reader Only */
.erl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .erl-search-form,
    .erl-favorite-btn,
    .erl-pagination {
        display: none;
    }
    
    .erl-resource-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ========================================
   ARCHIVE PAGE STYLES - BuddyBoss Style
   ======================================== */

.erl-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Archive Header */
.erl-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.erl-archive-title-section {
    flex: 1;
}

.erl-archive-title {
    font-size: 28px;
    margin: 0;
}

.erl-archive-count {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.erl-archive-search {
    flex: 0 0 300px;
}

.erl-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
}

.erl-search-input:focus {
    outline: none;
    border-color: var(--erl-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.erl-search-input::placeholder {
    color: #999;
}

/* Archive Navigation */
.erl-archive-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e7e7e7;
}

.erl-archive-tabs {
    display: flex;
    gap: 0;
}

.erl-tab {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.erl-tab:hover {
    color: var(--erl-primary-color);
    text-decoration: none;
}

.erl-tab.active {
    color: var(--erl-primary-color) !important;
    border-bottom-color: var(--erl-primary-color) !important;
    background-color: rgba(0, 115, 170, 0.15) !important;
    font-weight: 700 !important;
    border-radius: 6px 6px 0 0 !important;
}

.erl-archive-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile responsive controls */
@media (max-width: 768px) {
    .erl-archive-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .erl-filter-dropdown select {
        width: 100%;
    }
    
    .erl-view-toggle {
        align-self: center;
    }
}

.erl-filter-dropdown select {
    height: 36px;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    min-width: 140px;
}

.erl-filter-dropdown select:focus {
    outline: none;
    border-color: var(--erl-primary-color);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.erl-view-toggle {
    display: flex;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    overflow: hidden;
}

.erl-view-btn {
    padding: 0.5rem;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erl-view-btn:first-child {
    border-right: 1px solid #e7e7e7;
}

.erl-view-btn:hover {
    background: #f8f9fa;
    color: var(--erl-primary-color);
}

.erl-view-btn.active {
    background: var(--erl-primary-color);
    color: #fff;
}

/* Resource Grid */
.erl-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Resource List */
.erl-resource-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.erl-resource-list .erl-resource-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem;
    height: auto;
    min-height: 120px;
}

.erl-resource-list .erl-resource-card-header {
    flex: 0 0 120px;
    height: 120px;
    margin-right: 1.5rem;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/9; /* Maintain aspect ratio in list view */
}

/* Ensure no-thumbnail areas in list view match the header height */
.erl-resource-list .erl-no-thumbnail {
    height: 120px !important;
    border-radius: 8px;
    aspect-ratio: 16/9; /* Maintain aspect ratio in list view */
}

/* Ensure actual thumbnails in list view are properly sized */
.erl-resource-list .erl-resource-thumbnail img {
    height: 120px !important;
    object-fit: cover;
}

.erl-resource-list .erl-resource-card-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.erl-resource-list .erl-resource-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.erl-resource-list .erl-resource-excerpt {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.erl-resource-list .erl-resource-taxonomies {
    margin-top: 0.5rem;
}

.erl-resource-list .erl-favorite-btn {
    position: static;
    margin-left: auto;
    align-self: center;
}

/* List view specific enhancements */
.erl-resource-list .erl-resource-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.erl-resource-list .erl-resource-type-icon-overlay,
.erl-resource-list .erl-locked-icon-overlay {
    bottom: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
}

.erl-resource-list .erl-resource-type-icon-overlay i,
.erl-resource-list .erl-locked-icon-overlay i {
    font-size: 14px;
}

/* View Toggle Styles */
.erl-view-toggle {
    display: flex;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    overflow: hidden;
}

.erl-view-btn {
    padding: 0.5rem;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erl-view-btn:first-child {
    border-right: 1px solid #e7e7e7;
}

.erl-view-btn:hover {
    background: #f8f9fa;
    color: var(--erl-primary-color);
}

.erl-view-btn.active {
    background: var(--erl-primary-color);
    color: #fff;
}

.erl-view-btn i {
    font-size: 16px;
}

/* Responsive Grid Adjustments */
@media (min-width: 1200px) {
    .erl-resource-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .erl-resource-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .erl-resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 599px) {
    .erl-resource-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Mobile list view adjustments */
    .erl-resource-list .erl-resource-card {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }
    
    .erl-resource-list .erl-resource-card-header {
        flex: none;
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .erl-resource-list .erl-favorite-btn {
        margin: 1rem auto 0;
        align-self: center;
    }
}

/* Resource Cards - BuddyBoss Style */
.erl-resource-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.erl-resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.erl-resource-card-header {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9; /* Match 300x169 aspect ratio */
    min-height: 150px;
    max-height: 250px;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .erl-resource-card-header {
        height: 200px; /* Fallback height */
    }
}

.erl-resource-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
}

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

.erl-resource-card:hover .erl-resource-thumbnail img {
    transform: scale(1.05);
}

.erl-no-thumbnail {
    background: linear-gradient(135deg, var(--erl-primary-color) 0%, var(--erl-secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9; /* Match 300x169 aspect ratio */
    min-height: 150px;
    max-height: 250px;
}

.erl-default-thumbnail {
    color: rgba(255, 255, 255, 0.8);
}

.erl-default-thumbnail i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
}



.erl-resource-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Resource Type Icon Overlay */
.erl-resource-type-icon-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 115, 170, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.erl-resource-type-icon-overlay:hover {
    background: rgba(0, 115, 170, 1);
    transform: scale(1.1);
}

.erl-resource-type-icon-overlay i {
    color: #fff;
    font-size: 16px;
}

/* Locked Icon Overlay */
.erl-locked-icon-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(220, 53, 69, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.erl-locked-icon-overlay:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.erl-locked-icon-overlay i {
    color: #fff;
    font-size: 16px;
}



.erl-resource-card-actions {
    position: absolute;
}

.erl-resource-card-actions.erl-bottom-right {
    right: 1rem;
    bottom: 1rem;
}

.erl-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}



.erl-learn-more-btn {
    background: var(--erl-primary-color);
    color: #fff;
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    line-height: 1;
    border-radius: 999px;
}
.erl-card-cta-row {
    margin-top: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

.erl-card-cta-row .erl-action-btn {
    width: auto;
}

.erl-learn-more-btn:hover {
    background: var(--erl-secondary-color);
	color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}



.erl-resource-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.erl-resource-header {
    margin-bottom: 1rem;
}

.erl-resource-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.erl-resource-title a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.erl-resource-title a:hover {
    color: var(--erl-primary-color);
}

.erl-resource-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Resource Type Display */
.erl-resource-type-display {
    margin-bottom: 0.75rem;
}

.erl-resource-type-label {
    display: inline-block;
    background: rgba(0, 115, 170, 0.1);
    color: var(--erl-primary-color, #0073aa);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Resource Meta Layout */
.erl-resource-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.erl-resource-taxonomies {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.erl-resource-taxonomies-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}



.erl-category-tag {
    background: rgba(0, 115, 170, 0.1);
    color: var(--erl-primary-color);
    padding: 0.1rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.erl-category-more {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    padding: 0.1rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.erl-tag-tag {
    background: rgba(255, 102, 0, 0.1);
    color: var(--erl-accent-color);
    padding: 0.1rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.erl-tag-more {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    padding: 0.1rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.erl-resource-actions-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.erl-resource-date {
    color: #999;
    font-size: 0.8rem;
    font-weight: 500;
}

.erl-resource-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.erl-favorite-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #999;
}

.erl-favorite-btn i {
    font-size: 18px;
    color: #999;
}

.erl-favorite-btn:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

/* Archive card favorite button hover: only heart fills, no background change */
.erl-resource-card .erl-favorite-btn:hover {
    background: transparent;
}

.erl-resource-card .erl-favorite-btn:hover i {
    color: #fff;
}

.erl-favorite-btn.erl-favorited {
    background: none;
    color: #ff6b6b;
}

.erl-favorite-btn.erl-favorited i {
    color: #ff6b6b;
}

.erl-favorite-btn.erl-favorited:hover {
    color: #ff5252;
}

/* Pagination */
.erl-pagination {
    text-align: center;
    margin-top: 3rem;
}

.erl-pagination .page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    transition: all 0.2s ease;
    background: #fff;
}

.erl-pagination .page-numbers:hover,
.erl-pagination .page-numbers.current {
    background: var(--erl-primary-color);
    color: #fff;
    border-color: var(--erl-primary-color);
}

/* No Resources State */
.erl-no-resources {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid #e7e7e7;
}

.erl-no-resources-icon {
    margin-bottom: 1.5rem;
    opacity: 0.6;
    color: #999;
}

.erl-no-resources-icon i {
    font-size: 64px;
    color: #999;
}

.erl-no-resources h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.erl-no-resources p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.erl-no-resources-actions {
    margin-top: 2rem;
}

.erl-clear-filters-btn {
    background: var(--erl-accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.erl-clear-filters-btn:hover {
    background: var(--erl-accent-color);
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .erl-archive-wrapper {
        padding: 1rem;
    }
    
    .erl-archive-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .erl-archive-search {
        flex: none;
        width: 100%;
    }
    
    .erl-archive-navigation {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .erl-archive-controls {
        justify-content: center;
    }
    
    .erl-resource-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .erl-archive-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .erl-archive-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .erl-filter-dropdown select {
        width: 100%;
    }
    
    .erl-resource-card-content {
        padding: 1rem;
    }
    
    .erl-resource-meta {
        flex-direction: column;
        align-items: flex-start;
    }
} 



/* ========================================
   SINGLE RESOURCE PAGE STYLES
   ======================================== */

/* BuddyBoss theme-compatible styles */
.erl-single-resource-wrapper {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Two-column layout */
.erl-single-resource {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main content area */
.erl-main-content {
    min-width: 0; /* Prevents grid overflow */
}

.erl-resource-header {
    margin-bottom: 2rem;
}

.erl-resource-title.bb-title {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.erl-resource-meta {
    margin-bottom: 1.5em;
    opacity: 0.8;
}

.erl-resource-meta > * {
    display: inline-block;
    margin-right: 1em;
}

.erl-resource-type {
    background: rgba(0,0,0,0.08);
    padding: 0.25em 0.5em;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Featured image */
.erl-featured-image {
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.erl-resource-thumbnail {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.erl-resource-display-area {
    margin-bottom: 2em;
}

.erl-resource-display {
    margin: 1.5em 0;
}

.erl-resource-body {
    margin-top: 1.5em;
    line-height: 1.6;
}

/* Sidebar */
.erl-resource-sidebar {
    min-width: 0; /* Prevents grid overflow */
}

.erl-sidebar-section {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.erl-sidebar-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

/* Favorites button */
.erl-sidebar-favorite-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--erl-accent-color, #ff6600);
    border-radius: 6px;
    background: var(--erl-accent-color, #ff6600);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.erl-sidebar-favorite-btn:hover {
    border-color: var(--erl-accent-color, #ff6600);
    background: #fff;
    color: #666;
}

.erl-sidebar-favorite-btn.erl-sidebar-favorited {
    background: #fff;
    border-color: var(--erl-accent-color, #ff6600);
    color: var(--erl-accent-color, #ff6600);
}

.erl-sidebar-favorite-btn.erl-sidebar-favorited:hover {
    background: var(--erl-accent-color, #ff6600);
    color: #fff;
}

.erl-sidebar-favorite-btn i {
    font-size: 1.2rem;
}

/* Action buttons */
.erl-action-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.erl-action-btn:last-child {
    margin-bottom: 0;
}

.erl-download-btn {
    background: var(--erl-accent-color, #ff6600);
    color: #fff;
}

.erl-download-btn:hover {
    background: transparent;
    color: var(--erl-accent-color, #ff6600);
    border: 2px solid var(--erl-accent-color, #ff6600);
    text-decoration: none;
}

/* Archive card download button styling - matches learn-more button */
.erl-card-cta-row .erl-download-btn {
    padding: 0.35rem 0.6rem;
    background: var(--erl-primary-color,#0073aa);
    font-size: 0.72rem;
    line-height: 1;
    border-radius: 10px;
}

.erl-card-cta-row .erl-download-btn:hover {
    background: transparent;
    color: var(--erl-primary-color,#0073aa);
    border: 2px solid var(--erl-primary-color,#0073aa);
    text-decoration: none;
}

.erl-external-btn {
    background: var(--erl-accent-color, #ff6600);
    color: #fff;
}

.erl-external-btn:hover {
    background: transparent;
    color: var(--erl-accent-color, #ff6600);
    border: 2px solid var(--erl-accent-color, #ff6600);
    text-decoration: none;
}

.erl-purchase-btn {
    background: var(--erl-primary-color, #0073aa);
    color: #fff;
}

.erl-purchase-btn:hover {
    background: var(--erl-secondary-color, #005177);
    transform: translateY(-1px);
}

.erl-locked-btn {
    background: #6c757d;
    color: #fff;
    cursor: default;
}

/* Categories & Tags */
.erl-categories-list,
.erl-tags-list {
    margin-bottom: 1rem;
}

.erl-categories-list:last-child,
.erl-tags-list:last-child {
    margin-bottom: 0;
}

.erl-category-link,
.erl-tag-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    background: rgba(0,0,0,0.05);
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.erl-category-link:hover,
.erl-tag-link:hover {
    background: var(--erl-primary-color, #0073aa);
    color: #fff;
}

/* Similar resources */
.erl-similar-resources {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.erl-similar-resource {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--erl-primary-color, #0073aa);
}

.erl-similar-resource h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.erl-similar-resource h4 a {
    color: #333;
    text-decoration: none;
}

.erl-similar-resource h4 a:hover {
    color: var(--erl-primary-color, #0073aa);
}

.erl-similar-resource-type {
    font-size: 0.75rem;
    color: #666;
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Responsive media containers */
.erl-presto-container,
.erl-youtube-container,
.erl-media-container {
    margin: 1.5em 0;
    position: relative;
}

.erl-presto-container iframe,
.erl-youtube-container iframe,
.erl-media-container video,
.erl-media-container audio {
    max-width: 100%;
    height: auto;
    display: block;
}

/* YouTube responsive embed */
.erl-youtube-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.erl-youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Access denied message */
.erl-access-denied {
    background: rgba(255,0,0,0.1);
    border: 1px solid rgba(255,0,0,0.2);
    padding: 1em;
    border-radius: 4px;
    margin: 1em 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .erl-single-resource {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .erl-resource-meta > * {
        display: block;
        margin-right: 0;
        margin-bottom: 0.5em;
    }
    
    .erl-resource-title.bb-title {
        font-size: 1.5rem;
    }
    
    .erl-sidebar-section {
        padding: 1rem;
    }
}

/* Sales Content Styling */
.erl-sales-content {
    background: #f8f9fa;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
}

.erl-sales-main-content {
    line-height: 1.6;
}

.erl-sales-main-content h1,
.erl-sales-main-content h2,
.erl-sales-main-content h3,
.erl-sales-main-content h4 {
    color: var(--erl-primary-color, #007cba);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.erl-sales-main-content h1:first-child,
.erl-sales-main-content h2:first-child,
.erl-sales-main-content h3:first-child,
.erl-sales-main-content h4:first-child {
    margin-top: 0;
}

.erl-sales-main-content ul,
.erl-sales-main-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.erl-sales-main-content li {
    margin-bottom: 0.5rem;
}

.erl-sales-main-content p {
    margin-bottom: 1rem;
}

.erl-sales-main-content a {
    color: var(--erl-primary-color, #007cba);
    text-decoration: none;
}

.erl-sales-main-content a:hover {
    text-decoration: underline;
}

.erl-access-denied-message {
    text-align: center;
    padding: 2rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    margin: 1rem 0;
}

.erl-access-denied-message h3 {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.erl-access-denied-message p {
    color: #856404;
    margin: 0;
}
