/*
 * Resources page – page-specific styles only.
 * Shared pieces come from css/index.css (tokens, header, .btn, bootstrap cards),
 * css/lang-switcher.css and css/page.css (hero + header state).
 */

/* ----------------------------------------------------------- filter + count */
.rs-tools {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 5% 0.5rem;
    text-align: center;
}

.rs-tools__label {
    margin: 0 0 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rs-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* outline button like the secondary buttons on index.html; accent when selected */
.rs-chip {
    padding: 0.5rem 1rem;
    border: 1px solid #000;
    border-radius: 5px;
    background: #fff;
    color: #000;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.rs-chip:hover {
    transform: scaleX(1.03);
}

.rs-chip[aria-pressed="true"] {
    background: var(--accent-color, #8897d8);
}

.rs-chip:focus-visible,
.rs-link:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

.rs-count {
    margin: 0.9rem 0 0;
    color: #4b4b4b;
    font-size: 0.9rem;
}

/* -------------------------------------------------------------------- cards */
.rs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 5% 2rem;
}

/* the cards themselves are the same bootstrap "card shadow-sm" used on index.html */
.rs-card {
    height: 100%;
}

.rs-card[hidden] {
    display: none;
}

.rs-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rs-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.rs-card__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.rs-card__cat {
    margin: 0;
    color: #4b4b4b;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rs-card__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
}

.rs-card .card-text {
    margin: 0;
    color: #374151;
}

.rs-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
}

.rs-link {
    padding: 0.4rem 0.9rem;
    border: 1px solid #000;
    border-radius: 5px;
    color: #000;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.rs-link:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}

/* status badge: always has a text label, colour is only a hint */
.rs-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border: 1px solid #000;
    border-radius: 999px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.rs-badge--available {
    background: var(--accent-color, #8897d8);
}

.rs-badge--tba {
    background: #fff7d6;
}

/* ------------------------------------------------- toolkit "to be announced" */
.rs-tba {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
    width: 90%;
    max-width: 1100px;
    margin: 1rem auto 4rem;
    padding: 2rem 1.5rem;
    border: 2px dashed #000;
    border-radius: 0.5rem;
    background: #fff;
    text-align: center;
}

.rs-tba__icon {
    font-size: 2rem;
    line-height: 1;
}

.rs-tba h2 {
    margin: 0;
    font-size: 1.75rem;
}

.rs-tba p {
    max-width: 560px;
    margin: 0 0 0.5rem;
    color: #374151;
}

@media (prefers-reduced-motion: reduce) {
    .rs-chip,
    .rs-link {
        transition: none;
    }
}
