/* ==========================================
   Resources grid & cards
========================================== */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.res-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.res-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.res-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.res-type {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.type-pdf { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.type-doc { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.type-ppt { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.type-zip { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.type-default { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.res-category {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.res-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.res-title a {
    color: #f8fafc;
    text-decoration: none;
}

.res-title a:hover {
    color: #93c5fd;
}

.res-excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
    flex: 1;
}

.res-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #64748b;
}

.res-meta li::before {
    content: '•';
    margin-right: 6px;
    color: #475569;
}

.res-meta li:first-child::before {
    content: none;
    margin: 0;
}

.res-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.res-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    width: auto;
}

.res-btn-primary {
    background: var(--primary);
    color: #fff;
}

.res-btn-primary:hover {
    background: #1d4ed8;
}

.res-btn-outline {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.res-btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   Resources listing page
========================================== */

.resources-page {
    padding: 40px 0 60px;
}

.resources-hero {
    text-align: center;
    margin-bottom: 36px;
}

.resources-hero h1 {
    font-size: 40px;
    margin: 8px 0 12px;
    text-align: center;
}

.resources-hero-lead {
    color: #94a3b8;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

.resources-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.resources-search {
    flex: 1 1 260px;
}

.resources-search input {
    margin: 0;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.resources-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.resources-filters select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(2, 6, 23, 0.6);
    color: #f8fafc;
    font-size: 14px;
}

.resources-result-count {
    margin-bottom: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.resources-results.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.resources-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.resources-pagination .page-btn {
    border: none;
    cursor: pointer;
    font: inherit;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.page-btn:hover,
.page-btn.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.resources-empty {
    text-align: center;
    padding: 60px 20px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.resources-empty p {
    color: #94a3b8;
    margin-bottom: 18px;
}

@media (max-width: 600px) {
    .resources-hero h1 {
        font-size: 30px;
    }

    .res-actions {
        flex-direction: column;
    }

    .res-btn {
        width: 100%;
    }
}
