/* ═══════════════════════════════════════════════
   S360 RESOURCE LIBRARY
   ═══════════════════════════════════════════════ */
.s360-rl { padding: 80px 24px; background: var(--color-bg, #FAFAFA); }
.s360-rl__inner { max-width: 1200px; margin: 0 auto; }
.s360-rl__header { text-align: center; margin-bottom: 40px; }

/* Toolbar */
.s360-rl__toolbar {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
    margin-bottom: 32px;
}
.s360-rl__search {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; border-radius: 12px; flex: 1; min-width: 220px;
    border: 1px solid var(--color-border, #E5E5E5); background: var(--color-bg-elevated, #fff);
    transition: border-color 0.2s;
}
.s360-rl__search:focus-within { border-color: #FEC10D; }
.s360-rl__search svg { color: var(--color-text-muted, #6B6B6B); flex-shrink: 0; }
.s360-rl__search-input {
    border: none; background: none; outline: none; width: 100%;
    font-size: 0.9rem; font-family: inherit; color: var(--color-text, #0A0A0A);
}
.s360-rl__search-input::placeholder { color: var(--color-text-muted, #6B6B6B); }

/* Filter pills */
.s360-rl__filter-group, .s360-rl__type-group {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.s360-rl__filter-btn, .s360-rl__type-btn {
    padding: 8px 16px; border-radius: 10px; white-space: nowrap;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    background: transparent; border: 1px solid transparent;
    color: var(--color-text-muted, #6B6B6B); transition: all 0.2s;
    font-family: inherit;
}
.s360-rl__filter-btn:hover, .s360-rl__type-btn:hover {
    color: var(--color-text, #0A0A0A); background: var(--color-bg-elevated, #fff);
}
.s360-rl__filter-btn--active, .s360-rl__type-btn--active {
    background: #FEC10D !important; color: #0A0A0A !important;
    border-color: #FEC10D !important;
}

/* Grid */
.s360-rl__grid {
    display: grid;
    grid-template-columns: repeat(var(--s360-rl-cols, 3), 1fr);
    gap: 24px;
}

/* Card */
.s360-rl__card {
    display: flex; flex-direction: column;
    background: var(--color-bg-elevated, #fff);
    border: 1px solid var(--color-border, #E5E5E5);
    border-radius: 20px; overflow: hidden;
    transition: all 0.3s;
}
.s360-rl__card:hover {
    border-color: #FEC10D; transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.s360-rl__card[hidden] { display: none; }

/* Thumbnail */
.s360-rl__thumb {
    position: relative; width: 100%;
    overflow: hidden; background: var(--color-bg, #FAFAFA);
}
/* Orientation variants */
.s360-rl__thumb--landscape { aspect-ratio: 16 / 9; }
.s360-rl__thumb--portrait  { aspect-ratio: 8.5 / 11; }
.s360-rl__thumb--slide     { aspect-ratio: 4 / 3; }
.s360-rl__thumb--square    { aspect-ratio: 1 / 1; }
.s360-rl__thumb--wide      { aspect-ratio: 21 / 9; }
/* Portrait/square images: contain instead of cover so they don't crop */
.s360-rl__thumb--portrait .s360-rl__img,
.s360-rl__thumb--square .s360-rl__img {
    object-fit: contain; padding: 12px; background: var(--color-bg, #FAFAFA);
}
.s360-rl__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.3s;
}
.s360-rl__card:hover .s360-rl__img { transform: scale(1.04); }

/* Type badge on image */
.s360-rl__badge {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 12px; border-radius: 100px;
    background: #FEC10D; color: #0A0A0A;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Gated lock icon */
.s360-rl__gated {
    position: absolute; top: 12px; right: 12px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff;
    display: flex; align-items: center; justify-content: center;
}

/* Body */
.s360-rl__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.s360-rl__cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.s360-rl__cat {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: #FEC10D;
}
.s360-rl__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem; font-weight: 700; margin: 0 0 8px;
    color: var(--color-text, #0A0A0A);
}
.s360-rl__excerpt {
    font-size: 0.88rem; color: var(--color-text-secondary, #404040);
    line-height: 1.5; margin: 0 0 16px; flex: 1;
}
.s360-rl__btn {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 10px 20px; border-radius: 12px;
    background: var(--color-accent, #0A0A0A); color: var(--color-bg, #FAFAFA);
    font-size: 0.85rem; font-weight: 600; text-decoration: none;
    transition: all 0.2s; margin-top: auto;
}
.s360-rl__btn:hover {
    background: #FEC10D; color: #0A0A0A;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(254,193,13,0.3);
}

/* Empty state */
.s360-rl__empty {
    text-align: center; padding: 60px 24px;
    color: var(--color-text-muted, #6B6B6B);
}
.s360-rl__empty[hidden] { display: none; }
.s360-rl__empty h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem; font-weight: 700; margin-bottom: 8px;
    color: var(--color-text, #0A0A0A);
}

/* Responsive */
@media (max-width: 1024px) {
    .s360-rl__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .s360-rl { padding: 60px 20px; }
    .s360-rl__grid { grid-template-columns: 1fr; }
    .s360-rl__toolbar { flex-direction: column; }
    .s360-rl__search { min-width: 100%; }
}
