/**
 * Top Hiring Companies widget — purple reference layout.
 */

.cjp-top-companies {
	--cjp-thc-primary: #6349c2;
	--cjp-thc-primary-light: #f3f0ff;
	--cjp-thc-title: #1e1b4b;
	--cjp-thc-muted: #64748b;
	--cjp-thc-card-bg: #ffffff;
	--cjp-thc-wrap-bg: #ffffff;
	--cjp-thc-radius: 16px;
	--cjp-thc-card-radius: 14px;
	--cjp-thc-tag-bg: #ecfdf5;
	--cjp-thc-tag-text: #047857;
}

.cjp-thc-wrap {
	border-radius: var(--cjp-thc-radius);
	padding: 28px 28px 32px;
	box-sizing: border-box;
}

.cjp-thc-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

.cjp-thc-header__main {
	flex: 1;
	min-width: 0;
}

.cjp-thc-header__title-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.cjp-thc-header__icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--cjp-thc-primary-light);
	color: var(--cjp-thc-primary);
	flex-shrink: 0;
	line-height: 0;
}

.cjp-thc-header__title {
	margin: 0;
	font-size: clamp(1.25rem, 2vw, 1.625rem);
	font-weight: 800;
	line-height: 1.25;
	color: var(--cjp-thc-title);
}

.cjp-thc-header__desc {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--cjp-thc-muted);
	max-width: 560px;
}

.cjp-thc-header__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 10px 22px;
	border: 1.5px solid var(--cjp-thc-primary);
	border-radius: 999px;
	background: transparent;
	color: var(--cjp-thc-primary) !important;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
	white-space: nowrap;
}

.cjp-thc-header__btn:hover {
	background: var(--cjp-thc-primary);
	border-color: var(--cjp-thc-primary);
	color: #fff !important;
	transform: translateY(-1px);
}

.cjp-thc-grid {
	display: grid;
	gap: 16px;
}

.cjp-thc-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	text-decoration: none;
	color: inherit;
	background: var(--cjp-thc-card-bg);
	border: 1px solid #f1f5f9;
	border-radius: var(--cjp-thc-card-radius);
	padding: 22px 14px 18px;
	min-height: 148px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.05);
	box-sizing: border-box;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cjp-thc-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(99, 73, 194, 0.1), 0 12px 28px rgba(15, 23, 42, 0.08);
	border-color: #e9e5ff;
	color: inherit;
}

.cjp-thc-card__logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	margin-bottom: 14px;
	overflow: hidden;
	flex-shrink: 0;
}

.cjp-thc-card__logo-wrap img {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.cjp-thc-card__logo-fallback {
	font-size: 0.75rem;
	font-weight: 800;
	color: var(--cjp-thc-primary);
	line-height: 1.1;
	text-transform: uppercase;
	padding: 4px;
}

.cjp-thc-card__name {
	display: block;
	font-size: 0.9375rem;
	font-weight: 800;
	line-height: 1.35;
	color: var(--cjp-thc-title);
	margin-bottom: 10px;
}

.cjp-thc-card__tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--cjp-thc-tag-bg);
	color: var(--cjp-thc-tag-text);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

.cjp-thc-empty {
	margin: 0;
	color: var(--cjp-thc-muted);
	font-size: 0.9375rem;
}

@media (max-width: 992px) {
	.cjp-thc-wrap {
		padding: 24px 20px 28px;
	}

	.cjp-thc-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.cjp-thc-header__btn {
		white-space: normal;
	}
}

@media (max-width: 640px) {
	.cjp-thc-card {
		min-height: 132px;
		padding: 18px 12px 16px;
	}

	.cjp-thc-card__logo-wrap {
		width: 56px;
		height: 56px;
		margin-bottom: 12px;
	}

	.cjp-thc-card__logo-wrap img {
		width: 38px;
		height: 38px;
	}
	
	.cjp-thc-header__btn {
	    width: 100%;
        max-width: 60%;
        margin-left: auto;
	}
}
