/* ── Ressources page ───────────────────────────────────────────── */
@import "base.css";
@import "colors.css";

main {
    padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 6vw, 5rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #faf7f5;
    min-height: 100vh;
}

.title {
    font-family: 'Great Vibes', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--murrey);
    text-align: center;
    margin-bottom: 0.5rem;
}

#resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: #fff;
    border: 1px solid rgba(155,89,141,0.12);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.11);
}

/* Coloured left border per type */
.resource-type-video { border-left: 4px solid #e03c3c; }
.resource-type-file  { border-left: 4px solid var(--murrey); }
.resource-type-link  { border-left: 4px solid #46972b; }

.resource-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.resource-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.55;
}

.resource-header h2 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: #2a1520;
    line-height: 1.35;
}

.resource-description {
    color: #5a5a6a;
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.55;
}

/* Embedded YouTube iframe */
.resource-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.resource-video iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    color: #fff;
    background-color: var(--murrey);
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(155,89,141,0.2);
}
.resource-link:hover {
    background-color: #7a3f6e;
    box-shadow: 0 4px 12px rgba(155,89,141,0.35);
}

.resource-type-video .resource-link { background-color: #e03c3c; box-shadow: 0 2px 6px rgba(224,60,60,0.2); }
.resource-type-video .resource-link:hover { background-color: #b02020; }

.resource-type-file .resource-link { background-color: #46972b; box-shadow: 0 2px 6px rgba(70,151,43,0.2); }
.resource-type-file .resource-link:hover { background-color: #286318; }

.no-resources {
    text-align: center;
    color: #aaa;
    font-size: 1.05rem;
    margin-top: 3rem;
    font-style: italic;
}

@media screen and (max-width: 480px) {
    #resources-list {
        grid-template-columns: 1fr;
    }
}
