/*
 * E-Law Resources list (views/resource.php, views/partials/article_card.php).
 * Mobile first, Bootstrap breakpoints (576/768/992/1200).
 */
.resources {
	background: var(--color-cream);
	color: var(--color-text);
}

/* ---------- Hero with search ---------- */
.resources-hero {
	color: var(--color-text-on-dark);
}
/* Larger brand shapes on the right, only on wide screens */
.resources-hero .brand-panel__blob,
.resources-hero .brand-panel__dot,
.resources-hero .brand-panel__lines {
	display: none;
}
.resources-hero .brand-panel__blob {
	top: -120px;
	right: -60px;
	width: 520px;
	height: 520px;
	opacity: .5;
}
.resources-hero .brand-panel__dot {
	top: auto;
	bottom: 56px;
	right: 400px;
	width: 96px;
	height: 96px;
}
.resources-hero .brand-panel__lines {
	top: 64px;
	right: 64px;
	width: 160px;
	height: 120px;
	background: repeating-linear-gradient(0deg, var(--color-border-on-dark) 0 8px, transparent 8px 20px);
}
.resources-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	padding-top: 56px;
	padding-bottom: 56px;
}
.resources-hero__title {
	margin: 0;
	font-size: 44px;
	line-height: 1.05;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--color-white);
}
.resources-hero__subtitle {
	margin: -4px 0 0;
	max-width: 640px;
	font-family: var(--font-display);
	font-size: 22px;
	line-height: 1.3;
	font-weight: 500;
	color: var(--color-teal-glow);
}
.resources-hero__byline {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 15px;
	color: var(--color-text-on-dark-muted);
}
.resources-hero__byline img {
	width: 44px;
	height: 44px;
	border: 2px solid var(--color-peach);
	border-radius: 50%;
	object-fit: cover;
}
.resources-search {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 560px;
	margin-top: 8px;
	padding: 6px 6px 6px 22px;
	border: 1.5px solid var(--color-border-on-dark);
	border-radius: var(--radius-pill);
	background: var(--color-surface-on-dark);
}
.resources-search:focus-within {
	border-color: var(--color-teal-light);
}
.resources-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--color-white);
	font-family: inherit;
	font-size: 16px;
	outline: none;
}
.resources-search input::placeholder {
	color: var(--color-text-on-dark-subtle);
}
.resources-search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--color-orange);
	color: var(--color-navy);
}
.resources-search button:hover {
	background: var(--color-orange-light);
}

/* ---------- Article cards ---------- */
.resources-list {
	padding-top: 48px;
	padding-bottom: 24px;
}
.resources-list__title {
	margin: 0 0 24px;
	font-size: 30px;
	font-weight: 600;
}
.articles {
	display: grid;
	gap: 20px;
}
.articles__empty {
	margin: 0;
	padding: 32px;
	border-radius: var(--radius-md);
	background: var(--color-white);
	color: var(--color-text-muted);
	text-align: center;
}
.article-card {
	min-width: 0;
}
.article-card .article-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: 22px;
	background: var(--color-white);
	color: var(--color-text);
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}
.article-card .article-link:hover,
.article-card .article-link:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lift);
}

/* Generated header (a .brand-panel): the title over the brand shapes */
.article-card__visual {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 8px;
	min-height: 200px;
	padding: 22px 24px;
}
.article-card__note {
	align-self: flex-start;
	margin-bottom: auto;
	font-size: 20px;
	color: var(--color-orange-glow);
	transform: rotate(-3deg);
}
.article-card__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--color-white);
	text-wrap: balance;
}
.article-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 14px;
	padding: 20px 24px 22px;
}
.article-card__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--color-text-muted);
}
.article-card__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 16px;
	margin: auto 0 0;
	font-size: 13px;
	color: var(--color-text-subtle);
}
.article-card__more {
	font-weight: 600;
	color: var(--color-teal);
}

/* ---------- Pagination (CodeIgniter's Bootstrap markup) ---------- */
.pagination-links .pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 40px 0 0;
}
.pagination-links .page-link {
	min-width: 44px;
	padding: 10px 14px;
	border: 1px solid var(--color-border) !important;
	border-radius: var(--radius-pill) !important;
	background: var(--color-white);
	color: var(--color-navy) !important;
	font-weight: 600;
	text-align: center;
}
.pagination-links .page-item.active .page-link {
	border-color: var(--color-navy) !important;
	background: var(--color-navy) !important;
	color: var(--color-white) !important;
}

.resources-cta {
	padding-top: 32px;
	padding-bottom: 72px;
}
.resources-cta .workspace-cta {
	margin: 0;
}

/* ---------- Larger screens ---------- */
@media (min-width: 768px) {
	.resources-hero__title {
		font-size: 60px;
	}
	.resources-hero__subtitle {
		font-size: 26px;
	}
	.resources-hero__inner {
		padding-top: 80px;
		padding-bottom: 72px;
	}
	.resources-list {
		padding-top: 64px;
	}
	.articles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
	/* The newest article on the first page */
	.articles--featured .article-card:first-child {
		grid-column: 1 / -1;
	}
	.articles--featured .article-card:first-child .article-card__visual {
		min-height: 260px;
		padding: 32px 36px;
	}
	.articles--featured .article-card:first-child .article-card__title {
		font-size: 32px;
	}
}
@media (min-width: 992px) {
	/* Full width here: text on the left, the button on the right */
	.resources-cta .workspace-cta {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 48px 56px;
	}
	.resources-cta .workspace-cta .workspace-cta__action {
		align-items: center;
		margin-right: 40px;
	}
	.resources-hero .brand-panel__blob,
	.resources-hero .brand-panel__dot,
	.resources-hero .brand-panel__lines {
		display: block;
	}
	.articles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	/* Featured card: header and text side by side */
	.articles--featured .article-card:first-child .article-link {
		display: grid;
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	}
	.articles--featured .article-card:first-child .article-card__visual {
		min-height: 300px;
	}
	.articles--featured .article-card:first-child .article-card__body {
		justify-content: center;
		padding: 32px 36px;
	}
	.articles--featured .article-card:first-child .article-card__text {
		-webkit-line-clamp: 6;
		line-clamp: 6;
		font-size: 17px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.article-card .article-link {
		transition: none;
	}
}
