/*
 * Helia Resources Grid
 * Values transcribed from the Figma file "Helia Care - Client Review (Final)".
 * Everything is scoped under .hr so it cannot leak into the theme.
 */

.hr {
	--hr-accent: #f99e22;
	--hr-ink: #2b313a;
	--hr-body: #616669;
	--hr-muted: #74747f;
	--hr-placeholder: #a8aeb6;
	--hr-border: #c4c8ce;
	--hr-surface: #ffffff;

	--hr-radius-card: 24px;
	--hr-radius-field: 8px;
	--hr-gap: 24px;
	--hr-columns: 3;

	--hr-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	width: 100%;
	font-family: var(--hr-font);
	color: var(--hr-body);
	box-sizing: border-box;
}

.hr *,
.hr *::before,
.hr *::after {
	box-sizing: inherit;
}

.hr .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------------------------------------------------------------- Layout */

.hr__layout {
	display: grid;
	grid-template-columns: 258px minmax(0, 1fr);
	gap: 60px;
	align-items: start;
}

.hr__main {
	display: flex;
	flex-direction: column;
	gap: 60px;
	min-width: 0;
}

.hr__results {
	display: flex;
	flex-direction: column;
	gap: 60px;
	transition: opacity 0.18s ease;
}

.hr__results[aria-busy="true"] {
	opacity: 0.45;
	pointer-events: none;
}

/* --------------------------------------------------------------- Sidebar */

.hr__sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: sticky;
	top: 24px;
}

.hr__rule {
	width: 100%;
	height: 0;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--hr-border);
}

.hr__links {
	display: flex;
	flex-direction: column;
}

.hr-link {
	display: flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--hr-ink);
	text-decoration: none;
	transition: color 0.15s ease;
}

.hr-link:hover,
.hr-link:focus-visible {
	color: var(--hr-accent);
	text-decoration: none !important;
}

.hr-link.is-active {
	color: var(--hr-accent);
	text-decoration: none !important;
}

/* ---------------------------------------------------------------- Fields */

.hr-field {
	display: flex;
	align-items: center;
	gap: 24px;
}

.hr-input {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 16px;
	min-height: 43px;
	padding: 8px;
	border: 1px solid var(--hr-border);
	border-radius: var(--hr-radius-field);
	background: var(--hr-surface);
}

.hr-input:focus-within {
	border-color: var(--hr-accent);
}

.hr-input .hr-icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: var(--hr-placeholder);
}

.hr-input__control {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 18px;
	line-height: 1.5;
	color: var(--hr-ink);
	appearance: none;
	outline: none;
	height: auto !important;
}

.hr-input__control::placeholder {
	color: var(--hr-placeholder);
}

.hr-input--select {
	gap: 8px;
}

.hr-input--select .hr-input__control {
	cursor: pointer;
	color: var(--hr-ink);
}

/* ------------------------------------------------------------------ Grid */

.hr__grid {
	display: grid;
	grid-template-columns: repeat(var(--hr-columns), minmax(0, 1fr));
	gap: var(--hr-gap);
}

.hr__empty {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
	color: var(--hr-muted);
}

/* ------------------------------------------------------------------ Card */

.hr-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hr-border);
	border-radius: var(--hr-radius-card);
	background: var(--hr-surface);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.hr-card:hover {
	border-color: var(--hr-accent);
}

.hr-card__media {
	display: block;
	height: 164px;
	overflow: hidden;
	background: var(--hr-border);
	flex: 0 0 auto;
}

.hr-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hr-card__media img.is-placeholder {
	object-fit: cover;
}

.hr-card__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1 1 auto;
	padding: 24px;
}

.hr-card__eyebrow {
	margin: 0 !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--hr-accent);
}

.hr-card__title {
	margin: 0 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	color: var(--hr-ink) !important;
	text-wrap: pretty;
}

.hr-card__title a {
	color: inherit;
	text-decoration: none;
}

.hr-card__title a:hover {
	color: var(--hr-accent);
	text-decoration: none !important;
}

.hr-card__excerpt {
	margin: 0 !important;
	font-size: 18px;
	line-height: 1.6;
	color: var(--hr-body);
	text-wrap: pretty;

	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.hr-card__more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding: 8px 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--hr-ink);
	text-decoration: none;
}

.hr-card__more .hr-icon--arrow {
	transition: transform 0.15s ease;
}

.hr-card__more:hover {
	color: var(--hr-accent);
	text-decoration: none !important;
}

.hr-card__more:hover .hr-icon--arrow {
	transform: translateX(3px);
}

/* ------------------------------------------------------------ Pagination */

.hr__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 36px;
}

.hr__pages {
	display: flex;
	align-items: center;
	gap: 36px;
}

.hr-page {
	min-width: 20px;
	font-size: 18px;
	line-height: 1.7;
	text-align: center;
	color: var(--hr-body);
	text-decoration: none;
}

.hr-page.is-active {
	color: var(--hr-ink);
	font-weight: 700;
}

.hr-page:hover {
	color: var(--hr-accent);
}

.hr-page--gap {
	color: var(--hr-placeholder);
}

.hr-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 31.535px;
	height: 31.535px;
	color: var(--hr-accent);
	text-decoration: none;
}

/* The source glyph points down; the design rotates it per direction. */
.hr-arrow .hr-chevrons {
	width: 31.535px;
	height: 31.535px;
}

.hr-arrow--next .hr-chevrons {
	transform: rotate(-90deg);
}

.hr-arrow--prev .hr-chevrons {
	transform: rotate(90deg);
}

.hr-arrow.is-disabled {
	opacity: 0.5;
	cursor: default;
}

/* -------------------------------------------------------- Featured post */
/* Medium Card Row — 1200×308, row gap 24, media 588 wide, radius 24. */

.hr-featured {
	display: flex;
	flex-direction: row;
	gap: 24px;
	align-items: center;
	min-height: 308px;
}

.hr-featured__media {
	flex: 0 0 588px;
	width: 588px;
	align-self: stretch;
	overflow: hidden;
	border-radius: 24px;
	background: var(--hr-border);
	display: block;
}

.hr-featured__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hr-featured__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1 1 auto;
	min-width: 0;
	padding: 24px;
}

.hr-featured__eyebrow {
	margin: 0 !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--hr-accent);
}

.hr-featured__title {
	margin: 0 !important;
	font-size: 36px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	color: var(--hr-surface) !important;
	text-wrap: pretty;
	/* Two lines max, then ellipsis. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.hr-featured__title a {
	color: inherit;
	text-decoration: none;
}

.hr-featured__title a:hover {
	color: var(--hr-accent);
	text-decoration: none !important;
}

.hr-featured__excerpt {
	margin: 0 !important;
	font-size: 18px;
	line-height: 1.6;
	color: var(--hr-surface);
	text-wrap: pretty;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.hr-featured__more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 36px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--hr-surface);
	text-decoration: none;
}

.hr-featured__more .hr-icon--arrow {
	transition: transform 0.15s ease;
}

.hr-featured__more:hover {
	color: var(--hr-accent);
	text-decoration: none !important;
}

.hr-featured__more:hover .hr-icon--arrow {
	transform: translateX(3px);
}

/* ------------------------------------------------------------ Author line */
/* Figma frame "Author" — 57px round headshot, gap 24, name 18px/1.7. */

.hr-author {
	display: flex;
	flex-direction: row;
	gap: 24px;
	align-items: center;
	min-height: 57px;
}

.hr-author__headshot {
	flex-shrink: 0;
	width: 57px;
	height: 57px;
	border-radius: 50%;
	object-fit: cover;
	background-color: #d9d9d9;
	display: block;
}

.hr-author__name {
	flex-grow: 1;
	min-width: 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.7;
	color: #2b313a;
}

.hr-author__name a {
	color: inherit;
	text-decoration: none;
}

.hr-author__name a:hover {
	color: var(--hr-accent);
	text-decoration: none !important;
}

/* --------------------------------------------------------------- Post meta */
/* Figma frame "Meta Data" — eyebrows at gap 16, split by 5px dots. */

.hr-meta {
	margin: 0 !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--hr-accent);
}

.hr-meta__item {
	color: inherit;
	white-space: nowrap;
}

.hr-meta__item a {
	color: inherit;
	text-decoration: none;
}

.hr-meta__item a:hover {
	color: var(--hr-ink);
	text-decoration: none !important;
}

.hr-meta__dot {
	flex-shrink: 0;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: var(--hr-accent);
}

/* ---------------------------------------------------------- Mobile / RWD */

.hr__mobile-filters {
	display: none;
	flex-direction: column;
	gap: 24px;
}

@media (max-width: 1180px) {
	.hr-featured__media {
		flex: 0 0 45%;
		width: 45%;
	}
	.hr-featured__title {
		font-size: 32px;
	}
	.hr__grid {
		grid-template-columns: 1fr 1fr;
	}
	.hr {
		--hr-columns: 2;
	}
	.hr__layout {
		gap: 40px;
		grid-template-columns: 220px minmax(0, 1fr);
	}
}

@media (max-width: 860px) {
	.hr-featured {
		flex-direction: column;
		align-items: stretch;
		min-height: 0;
	}
	.hr-featured__media {
		flex: 0 0 auto;
		width: 100%;
		height: 240px;
	}
	.hr-featured__body {
		padding: 24px 0 0;
	}
	.hr-featured__title {
		font-size: 28px;
	}
	.hr__grid {
		grid-template-columns: 1fr 1fr;
	}
	.hr__layout {
		display: block;
	}
	.hr__sidebar {
		display: none;
	}
	.hr__mobile-filters {
		display: flex;
	}
	.hr__main,
	.hr__results {
		gap: 60px;
	}
}

@media (max-width: 640px) {
	.hr__grid {
		grid-template-columns: 1fr;
	}
	.hr {
		--hr-columns: 1;
	}
	.hr__pagination,
	.hr__pages {
		gap: 28px;
	}
}
