.resources-wrapper { display: flex; flex-direction: column; gap: 32px; }
.resource-empty { color: #64748b; font-size: 14px; }

.rl-header { margin-bottom: 12px; }
.rl-title { font-size: 20px; font-weight: 800; color: #003349; margin: 0 0 4px; }
.rl-purpose { color: #64748b; font-size: 14px; margin: 0; }

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.resource-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.resource-card.has-resource { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.resource-card.has-resource:hover { box-shadow: 0 4px 14px rgba(0,51,73,0.12); transform: translateY(-2px); }

.resource-thumb { width: 100%; height: auto; object-fit: cover; }

.resource-info { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.resource-info h3 { margin: 0; font-size: 15px; font-weight: 700; color: #003349; }
.resource-info p { margin: 0; font-size: 13px; color: #64748b; flex: 1; }

.resource-btn {
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 14px;
    background: #003349;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.resource-btn:hover { background: #00527a; color: #fff; }

/* Resource preview modal */
.resource-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.resource-modal-content {
    position: relative;
    width: min(900px, 92vw);
    height: min(85vh, 900px);
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.resource-modal-close:hover { color: #003349; }

.resource-modal-title { margin: 0 32px 0 0; font-size: 18px; font-weight: 800; color: #003349; }

.resource-modal-frame {
    flex: 1;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.resource-modal-footer { display: flex; justify-content: center; }
.resource-modal-footer .resource-btn { align-self: center; padding: 8px 24px; }
