/* ========================================
   E-LEARNING / RESOURCE HUB
   Fintechs client view styles
   ======================================== */

/* ── 1. SEARCH BAR ── */
.el-search-bar {
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.el-search-bar .input-group-text {
    background: #fff;
    border-right: none;
    color: #6b7280;
}

.el-search-bar .form-control {
    border-left: none;
    border-right: none;
}

.el-search-bar .form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.el-search-bar .btn-outline-secondary {
    border-left: none;
    color: #9ca3af;
}

/* ── 2. CATEGORY FILTER PILLS ── */
.el-category-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 0.9375rem;
    padding: 4px 0;
}

.el-category-link {
    background: none;
    border: none;
    padding: 0.2rem 0;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.el-category-link:hover {
    color: #0891b2;
}

.el-category-link.active {
    color: #0891b2;
    font-weight: 700;
}

.el-category-sep {
    color: #e5e7eb;
    margin: 0 0.5rem;
    user-select: none;
}

/* ── 3. RESOURCE CARDS ── */
.el-resource-card {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.25s, transform 0.25s;
    cursor: pointer;
    border: 1px solid #f3f4f6;
}

.el-resource-card:hover,
.el-resource-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.el-resource-card .el-resource-title {
    font-size: 0.975rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

.el-resource-card .el-resource-desc {
    font-size: 0.83rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.el-resource-card .el-resource-meta {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ── 4. FILE TYPE ICONS ── */
.el-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.el-file-icon.file-pdf {
    background: #fee2e2;
    color: #dc2626;
}

.el-file-icon.file-doc {
    background: #dbeafe;
    color: #2563eb;
}

.el-file-icon.file-xls {
    background: #d1fae5;
    color: #059669;
}

.el-file-icon.file-generic {
    background: #e0f2fe;
    color: #0891b2;
}

/* Large variant (used in detail hero) */
.el-file-icon.large {
    width: 72px;
    height: 72px;
    font-size: 2.2rem;
    border-radius: 16px;
    margin: 0 auto;
}

/* ── 5. PAGINATION ── */
.el-pagination {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px 0;
}

.el-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.el-page-btn:hover:not(.disabled):not(.active) {
    border-color: #0891b2;
    color: #0891b2;
}

.el-page-btn.active {
    background: #0891b2;
    color: #fff;
    border-color: #0891b2;
}

.el-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── 6. BACK BUTTON ── */
.el-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-bottom: 4px;
}

.el-back-btn:hover {
    background: #e5e7eb;
    transform: translateX(-2px);
}

/* ── 7. RESOURCE DETAIL HERO ── */
.el-detail-hero {
    text-align: center;
    padding: 28px 16px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.el-detail-hero h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin: 12px 0 6px;
}

.el-detail-hero .el-detail-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* ── 8. PREVIEW SECTION ── */
.el-preview-section {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.el-preview-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 14px;
}

.el-preview-frame {
    width: 100%;
    height: 480px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.el-preview-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.el-preview-image {
    text-align: center;
}

.el-preview-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.el-preview-placeholder {
    text-align: center;
    padding: 48px 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.el-preview-placeholder p {
    margin: 8px 0 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ── 9. ACTIONS (download button row) ── */
.el-detail-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.el-detail-actions .btn {
    min-width: 140px;
}

/* ── 10. RESPONSIVE ── */
@media (min-width: 768px) {
    .el-search-bar {
        max-width: 50%;
    }

    #resourcesList {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .el-resource-card {
        margin-bottom: 0;
    }

    #resourceDetailView {
        max-width: 860px;
        margin: 0 auto;
    }

    .el-preview-frame {
        height: 620px;
    }
}

@media (min-width: 1024px) {
    #resourcesList {
        gap: 1.5rem;
    }
}
