/* ==========================================================================
   Linkin Solution University — Resources
   Colour tokens pulled from the live EduBlink theme so this section
   feels native, not bolted on.
   ========================================================================== */

.ls-res-wrap {
	--ls-navy: #0D3B66;
	--ls-navy-dark: #082846;
	--ls-navy-alt: #144272;
	--ls-gold: #9F7944;
	--ls-teal: #1AB69D;
	--ls-teal-soft: rgba(26, 182, 157, 0.12);
	--ls-bg: #EEF2F5;
	--ls-text: #1E1E1E;
	--ls-text-muted: #6B7280;
	--ls-border: #E4E9EE;
	--ls-radius: 14px;
	--ls-font-heading: 'League Spartan', 'Spartan', 'Poppins', sans-serif;
	--ls-font-body: 'Poppins', sans-serif;

	font-family: var(--ls-font-body);
	color: var(--ls-text);
	max-width: 1240px;
	margin: 0 auto;
	padding: 8px 20px 60px;
}

.ls-res-wrap *, .ls-res-wrap *::before, .ls-res-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Login notice ---------- */
.ls-res-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #FFF7EC;
	border: 1px solid #F2D9AE;
	color: var(--ls-navy);
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 24px;
	font-size: 14.5px;
	font-weight: 500;
}
.ls-res-notice-icon { font-size: 16px; }

/* ---------- Toolbar ---------- */
.ls-res-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 30px;
}

.ls-res-search {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	max-width: 320px;
	color: var(--ls-text-muted);
}
.ls-res-search svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}
.ls-res-search input {
	width: 100%;
	font-family: var(--ls-font-body);
	font-size: 14.5px;
	padding: 11px 14px 11px 40px;
	border: 1px solid var(--ls-border);
	border-radius: 999px;
	background: #fff;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.ls-res-search input:focus {
	border-color: var(--ls-teal);
	box-shadow: 0 0 0 3px var(--ls-teal-soft);
}

.ls-res-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ls-res-filter-btn {
	font-family: var(--ls-font-body);
	font-size: 13.5px;
	font-weight: 500;
	padding: 9px 18px;
	border-radius: 999px;
	border: 1px solid var(--ls-border);
	background: #fff;
	color: var(--ls-text-muted);
	cursor: pointer;
	transition: all .2s ease;
	white-space: nowrap;
}
.ls-res-filter-btn:hover {
	border-color: var(--ls-navy);
	color: var(--ls-navy);
}
.ls-res-filter-btn.is-active {
	background: var(--ls-navy);
	border-color: var(--ls-navy);
	color: #fff;
}

/* ---------- Grid ---------- */
.ls-res-grid {
	--ls-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--ls-cols), 1fr);
	gap: 26px;
}
@media (max-width: 992px) {
	.ls-res-grid { --ls-cols: 2 !important; }
}
@media (max-width: 640px) {
	.ls-res-grid { --ls-cols: 1 !important; }
}

/* ---------- Card ---------- */
.ls-res-card {
	background: #fff;
	border: 1px solid var(--ls-border);
	border-radius: var(--ls-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease;
}
.ls-res-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(13, 59, 102, 0.12);
}

.ls-res-card-cover {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--ls-bg);
	overflow: hidden;
}
.ls-res-card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ls-res-cover-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ls-font-heading);
	font-weight: 800;
	font-size: 22px;
	letter-spacing: 1px;
}

.ls-res-filetag {
	position: absolute;
	top: 12px;
	left: 12px;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 4px 10px;
	border-radius: 999px;
	text-transform: uppercase;
}

.ls-res-lock-overlay {
	position: absolute;
	inset: 0;
	background: rgba(13, 59, 102, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(1px);
}

.ls-res-card.is-locked .ls-res-card-cover img,
.ls-res-card.is-locked .ls-res-cover-fallback {
	filter: blur(3px) grayscale(15%);
}

/* ---------- Card body ---------- */
.ls-res-card-body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ls-res-badge {
	align-self: flex-start;
	background: var(--ls-teal-soft);
	color: var(--ls-navy);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 4px;
	margin-bottom: 10px;
}

.ls-res-title {
	font-family: var(--ls-font-heading);
	font-weight: 700;
	font-size: 17.5px;
	line-height: 1.35;
	margin: 0 0 8px;
	color: var(--ls-text);
}

.ls-res-desc {
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--ls-text-muted);
	margin: 0 0 14px;
}

.ls-res-meta {
	display: flex;
	gap: 14px;
	font-size: 12.5px;
	color: var(--ls-text-muted);
	margin-bottom: 16px;
	padding-top: 12px;
	border-top: 1px dashed var(--ls-border);
	margin-top: auto;
}

/* ---------- Buttons ---------- */
.ls-res-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	font-family: var(--ls-font-body);
	font-weight: 600;
	font-size: 14.5px;
	padding: 11px 18px;
	border-radius: 8px;
	background: var(--ls-navy);
	color: #fff !important;
	border: none;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .2s ease, transform .15s ease;
}
.ls-res-btn:hover {
	background: var(--ls-navy-alt);
	color: #fff;
}
.ls-res-btn:active { transform: scale(.98); }

.ls-res-btn-locked {
	background: var(--ls-gold);
}
.ls-res-btn-locked:hover {
	background: #8a6838;
}

.ls-res-btn-disabled {
	background: #C9CFD6;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---------- Empty state ---------- */
.ls-res-empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--ls-text-muted);
	background: var(--ls-bg);
	border-radius: var(--ls-radius);
}

/* ---------- Search/filter hidden state (JS toggles) ---------- */
.ls-res-card.ls-res-hide {
	display: none !important;
}
