/* Resource lists */
.resources-page {
    min-height: 70vh;
    padding: 2.5rem 0 4rem;
}

.resource-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--card-bg, #fff);
    border: 1px solid rgba(125, 1, 159, .12);
    border-radius: 16px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .08));
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.resource-card::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    content: '';
    background: linear-gradient(90deg, var(--primary, #7d019f), var(--accent, #fed403));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.resource-card:hover {
    border-color: rgba(125, 1, 159, .28);
    box-shadow: var(--shadow, 0 4px 16px rgba(0, 0, 0, .08));
    transform: translateY(-4px);
}

.resource-card:hover::after {
    transform: scaleX(1);
}

.resource-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.resource-title {
    margin-bottom: .75rem;
    color: var(--dark, #0f172a);
    font-weight: 700;
    line-height: 1.55;
}

.resource-description {
    line-height: 1.8;
}

.resource-description > :last-child {
    margin-bottom: 0;
}

.resource-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.resource-icon {
    max-width: 100%;
    height: 110px;
    object-fit: contain;
}

/* Resource details */
.resource-detail,
.paper-detail,
.news-detail {
    max-width: 960px;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    margin: 0 auto;
    background: var(--card-bg, #fff);
    border: 1px solid rgba(125, 1, 159, .1);
    border-radius: 20px;
    box-shadow: var(--shadow, 0 4px 16px rgba(0, 0, 0, .08));
}

.resource-icon-large {
    max-width: min(100%, 320px);
    max-height: 240px;
    object-fit: contain;
}

.resource-description-full,
.abstract-content,
.news-summary,
.news-content {
    color: var(--text, #1e293b);
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.resource-description-full img,
.news-summary img,
.news-content img {
    max-width: 100%;
    height: auto;
}

.paper-authors,
.news-meta {
    color: var(--text-muted, #64748b);
}

.paper-keywords .badge {
    padding: .5em .75em;
    font-weight: 500;
}

@media (max-width: 576px) {
    .resources-page {
        padding: 1.5rem 0 3rem;
    }

    .resource-detail,
    .paper-detail,
    .news-detail {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .resource-card {
        border-radius: 14px;
    }
}
