
/* Individual Resource Card - FIXED HEIGHT */
.resources.resource-grid > .resource {
    display: flex !important;
    flex-direction: column !important;
    background: #2c3136 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
    transition: box-shadow 0.3s ease !important;
    /* FIXED HEIGHT - Larger image, smaller text */
    height: 333px !important;
}

/* Thumbnail Section - TALLER for better visual balance */
/* Thumbnail - FULL HEIGHT with overlay */
.resources.resource-grid .resource__thumbnail {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #2c3136 !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.resources.resource-grid .resource__thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s ease !important;
}

/* Gradient Overlay - Starts at bottom THIRD */
.resources.resource-grid .resource__thumbnail::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 55% !important;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 20%,
        rgba(0, 0, 0, 0.75) 50%,
        rgba(0, 0, 0, 0.92) 100%
    ) !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* Placeholder for missing thumbnails */
.resources.resource-grid .resource__thumbnail:empty::before,
.resources.resource-grid .resource__thumbnail:not(:has(img))::before {
    content: '' !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background: #e9ecef url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23adb5bd"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>') center/60px no-repeat !important;
}

/* Subtle zoom on hover */
.resources.resource-grid > .resource:hover .resource__thumbnail img {
    transform: scale(1.05) !important;
}

.resources.resource-grid > .resource:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15) !important;
    border-color: #adb5bd !important;
}

/*---------------------//////////////////////////////////////////////////////////-----------------------*/
/* ============================================
   Content
   ============================================ */
/*---------------------//////////////////////////////////////////////////////////-----------------------*/
/* Content - OVERLAY on bottom with FIXED MIN HEIGHT */
.resources.resource-grid .resource__content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0.875rem 1rem .5rem !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    min-height: 145px !important;
    justify-content: flex-end !important;
}
/* Title - EXACT TRUNCATION with ellipsis */
.resources.resource-grid .resource__content > a:first-of-type,
.resources.resource-grid .resource__content h3,
.resources.resource-grid .resource__content h4,
.resources.resource-grid .resource__meta > a:first-of-type {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    height: 2.6em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    position: relative !important;
    margin: 0 0 0.375rem 0 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    max-width: 100% !important;
}
.resources.resource-grid .resource__content > a:hover,
.resources.resource-grid .resource__meta > a:hover {
    color: #6fc3ff !important;
}

/* Author - ALWAYS show label, truncate long values */
.resources.resource-grid .resource__content .author,
.resources.resource-grid .resource__content div.author {
    font-size: 0.7rem !important;
    color: #e9ecef !important;
    line-height: 1.3 !important;
    display: block !important;
    margin-bottom: -0.15rem !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-style: italic;
}
/* Date - ALWAYS show label, truncate long values */
.resources.resource-grid .resource__content .date,
.resources.resource-grid .resource__content div.date {
    font-size: 0.7rem !important;
    color: #e9ecef !important;
    line-height: 1.3 !important;
    display: block !important;
    margin-bottom: -0.75rem !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-style: italic;
}
/* Description - FADE effect, not ellipsis */
.resources.resource-grid .resource__content .description {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    color: #d1d5db !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
    max-height: 2.6rem !important;
    min-height: 2.6rem !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 !important;
}
/* Gradient FADE on description */
.resources.resource-grid .resource__content .description::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1.3rem !important;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(28, 30, 33, 0.95) 100%
    ) !important;
    pointer-events: none !important;
}
/*---------------------//////////////////////////////////////////////////////////-----------------------*/
/* ============================================
   LIST VIEW (Alternative)
   ============================================ */
/*---------------------//////////////////////////////////////////////////////////-----------------------*/

.resources.resource-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
    list-style: none !important;
}

.resources.resource-list > .resource {
    display: flex !important;
    flex-direction: row !important;
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    min-height: 180px !important;
    height: 200px
}

.resources.resource-list > .resource:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15) !important;
}

.resources.resource-list .resource__thumbnail {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    width: 140px !important;
    height: auto !important;
    /*min-height: 180px !important;*/
    flex-shrink: 0 !important;
    /*background: #e9ecef !important;*/
    z-index: 1 !important;
}

.resources.resource-list .resource__thumbnail::after {
    display: none !important;
}

.resources.resource-list .resource__thumbnail img {
    width: 100% !important;
    height: 100% !important;
   /* object-fit: cover !important;*/
    object-fit: contain !important;
}

.resources.resource-list .resource__thumbnail:empty::before,
.resources.resource-list .resource__thumbnail:not(:has(img))::before {
    content: '' !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background: #e9ecef url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23adb5bd"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>') center/60px no-repeat !important;
}

.resources.resource-list .resource__content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    padding: 1.25rem !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    background: #fff !important;
    z-index: 1 !important;
}

.resources.resource-list .resource__content > a:first-of-type,
.resources.resource-list .resource__content h3,
.resources.resource-list .resource__content h4 {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #212529 !important;
    text-shadow: none !important;
    margin: 0 0 0.5rem 0 !important;
    text-decoration: none !important;
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}

.resources.resource-list .resource__content > a:hover {
    color: #0d6efd !important;
}

.resources.resource-list .resource__content .author,
.resources.resource-list .resource__content div.author {
    font-size: 0.875rem !important;
    color: #495057 !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
    margin-bottom: 0.25rem !important;
    white-space: normal !important;
    overflow: visible !important;
}

.resources.resource-list .resource__content .author strong,
.resources.resource-list .resource__content div.author strong {
    font-weight: 600 !important;
    color: #212529 !important;
}

.resources.resource-list .resource__content .date,
.resources.resource-list .resource__content div.date {
    font-size: 0.875rem !important;
    color: #495057 !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
    margin-bottom: 0.5rem !important;
    white-space: normal !important;
    overflow: visible !important;
}

.resources.resource-list .resource__content .date strong,
.resources.resource-list .resource__content div.date strong {
    font-weight: 600 !important;
    color: #212529 !important;
}

.resources.resource-list .resource__content .description {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    color: #495057 !important;
    text-shadow: none !important;
    max-height: 4.8em !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    position: relative !important;
}

.resources.resource-list .resource__content .description::after {
    display: none !important;
}

/* Resource Tags */
.resource-tag,
.resource-label {
    display: inline-block !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: #fff !important;
    background-color: #6c757d !important;
    border-radius: 0.25rem !important;
    margin-right: 0.25rem !important;
    margin-bottom: 0.5rem !important;
}

/*---------------------//////////////////////////////////////////////////////////-----------------------*/
/* ============================================
    BROWSE CONTROLS - IMPROVED STYLING
   ============================================ */
/*---------------------//////////////////////////////////////////////////////////-----------------------*/

/* Layout Toggle Buttons - Better Styling */
.layout-toggle {
    display: flex !important;
    gap: 0 !important;
    flex-shrink: 0 !important;
    border: 1px solid #dee2e6 !important;
    /* border-radius: 0.375rem !important; */
    border-radius: 25px !important; 
    overflow: hidden !important;
    background: #fff !important;
}

.layout-toggle button {
    padding: 0.625rem 0.875rem !important;
    background: #fff !important;
    border: none !important;
    border-right: 1px solid #dee2e6 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6c757d !important;
    font-size: 1.125rem !important;
    border-radius: 25px;
}

.layout-toggle button:last-child {
    border-right: none !important;
}

.layout-toggle button:hover:not([disabled]) {
    background: #f8f9fa !important;
    color: #212529 !important;
}

.layout-toggle button[disabled] {
    background: #ce0000 !important;
    color: #fff !important;
    cursor: default !important;
}
/*---------------------//////////////////////////////////////////////////////////-----------------------*/
select {
    /*padding: 0.625rem 2.5rem 0.625rem 0.875rem !important;*/
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    /* border-radius: 0.375rem !important; */
    border-radius: 65px !important; 
    font-size: 0.9375rem !important;
    color: #495057 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    appearance: none !important;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23495057"><path d="M8 11L3 6h10l-5 5z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
    min-width: 180px !important;
}

select:hover {
    border-color: #adb5bd !important;
    background-color: #f8f9fa !important;
}

select:focus {
    outline: none !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15) !important;
}
button, .button {
        border-radius: 65px !important;
}
input {
        border-radius: 65px !important;
}
