/* =========================================================================
 * Careers — "Find your match" cards
 * Scoped to .careers-cards. No hover effects at this stage (per spec).
 * Responsive: 3 columns (desktop) → 2 (tablet) → 1 (mobile).
 * ========================================================================= */

.careers-cards {
	/* Design tokens (kept local to the component) */
	--cc-gap: 24px;
	--cc-radius: 20px;
	--cc-card-bg: rgba(255, 255, 255, 0.04);
	--cc-card-border: rgba(255, 255, 255, 0.08);
	--cc-text: #ffffff;
	--cc-muted: #98b1bc;

	/* Tags use the brand purple tint shown in the Figma */
	--cc-tag-text: #b5a8ec;
	--cc-tag-bg: rgba(147, 102, 255, 0.06);
	--cc-tag-border: rgba(147, 102, 255, 0.24);

	/* "View role" button: light fill + dark navy text (matches site pills) */
	--cc-btn-bg: #d8e1e7;
	--cc-btn-text: #1b1c3f;

	/* Green "New" badge */
	--cc-green: #57e389;
	--cc-green-bg: rgba(87, 227, 137, 0.12);
	--cc-green-border: rgba(87, 227, 137, 0.30);

	font-family: "Work Sans", sans-serif;
	width: 100%;
}

/* --- Grid ---------------------------------------------------------------- */
.careers-cards__grid {
	display: grid;
	/* minmax(0, 1fr) lets columns shrink below their content's intrinsic
	   width, preventing horizontal overflow / cut-off cards. */
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--cc-gap);
}

/* --- Card ---------------------------------------------------------------- */
.careers-card {
	display: flex;
	flex-direction: column;
	gap: 24px;

	/* Positioning context for the absolutely-placed "New" badge. */
	position: relative;

	padding: 24px;
	border-radius: 20px;
	border: 1px solid #1E2173;
	background: #191A41;
}

/* --- Head: thumbnail + headings (title/meta/tags) + badge ---------------- */
.careers-card__head {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

/* Large square image, as in the Figma */
.careers-card__thumb {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	border-radius: 14px;
	overflow: hidden;
}

.careers-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Title + meta + tags. min-width:0 lets long titles wrap instead of overflow. */
.careers-card__headings {
	flex: 1 1 auto;
	min-width: 0;
}

.careers-card__title {
	margin: 0;
	padding-right: 70px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: #D8E1E7;
	font-family: "Unbounded", Sans-serif;
}

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

.careers-card__meta {
	margin: 6px 0 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--cc-muted);
}

/* Green "New" badge — absolutely pinned to the top-right of the card so it
   no longer consumes flow width (lets the tags row run full width / inline). */
.careers-card__badge {
	position: absolute;
	top: 24px;
	right: 24px;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--cc-green);
	background: var(--cc-green-bg);
	border: 1px solid var(--cc-green-border);
	white-space: nowrap;
}

/* --- Tech stack chips (inside the headings column) ----------------------- */
.careers-card__tags {
	display: flex;
	/* Inline on one row when the card is wide enough; wraps to additional
	   rows on narrow cards instead of forcing the column to overflow. */
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.careers-card__tag {
	flex: 0 0 auto;       /* chips keep their natural width, no shrinking */
	white-space: nowrap;  /* never break a chip label across lines */
	padding: 6px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--cc-tag-text);
	background: var(--cc-tag-bg);
	border: 1px solid var(--cc-tag-border);
}

/* --- Foot: view role + location ------------------------------------------ */
.careers-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto; /* pin the footer to the bottom for equal-height cards */
}

.careers-card__btn {
	display: inline-flex;
	align-items: center;
	padding: 13px 26px;
	border-radius: 55px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--cc-btn-text);
	background: var(--cc-btn-bg);
	border: 2px solid var(--cc-btn-bg);
}

.careers-card__location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: #8776D5;
	white-space: nowrap;
}

/* Location icon — works for both an <img> (icon_picker media) and a
   dashicons <span>. Sized to sit inline with the location text. */
.careers-card__location-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	font-size: 16px;        /* sizes the dashicons glyph variant */
	line-height: 1;
	object-fit: contain;    /* applies to the <img> variant */
	display: block;
}

/* --- Empty state --------------------------------------------------------- */
.careers-cards__empty {
	margin: 0;
	color: var(--cc-muted);
	font-size: 15px;
}

/* --- Hover animation (scoped to .careers-card only) ----------------------
 * Transitions live on the base elements so both hover-in and hover-out
 * animate. A prefers-reduced-motion fallback disables the movement. */
.careers-card,
.careers-card__img,
.careers-card__title,
.careers-card__btn,
.careers-card__tag,
.careers-card__location {
	transition: transform 0.25s ease, color 0.25s ease,
		background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}



/* Card: lift + purple border glow + slightly lighter surface */
.careers-card:hover {
	transform: translateY(-4px);
	background-color: rgba(255, 255, 255, 0.06);
	border: 1px solid #93F;
	background: #222360;
	box-shadow: 0 14px 34px rgba(147, 51, 255, 0.18);
}

.careers-card .careers-card__tag:hover {
	border: 1px solid #93F;
	background: #191A41;
}

/* Featured image zooms within its rounded frame (thumb has overflow:hidden) */
 
.careers-card .careers-card__btn:hover {
	border-color: #fff;
	background-color: #191A41;
	color: #93F;
}

@media (prefers-reduced-motion: reduce) {
	.careers-card,
	.careers-card__img,
	.careers-card__title,
	.careers-card__btn,
	.careers-card__tag,
	.careers-card__location {
		transition: none;
	}
	.careers-card:hover,
	.careers-card:hover .careers-card__img {
		transform: none;
	}
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
	.careers-cards__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.careers-cards__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 500px) {
	.careers-card__tag {
		font-size: 12px;
	}
	.careers-card__title
	{
		font-size: 13px;
	}
	.careers-card__tags {
		gap: 4px;
	}
	.careers-card {
		padding: 20px;
	}
}

/* =========================================================================
 * Mobile slider variant — [careers_cards slider="true"]
 * Only active when the JS (careers-cards-slider.js) initialises Slick on
 * mobile (<= 767px). All rules are scoped to .careers-cards--slider AND the
 * .slick-* classes Slick injects, so they are completely inert on the
 * careers archive (which never carries the --slider modifier) and on
 * desktop/tablet (where Slick is destroyed / never initialised).
 * ========================================================================= */

/* Each card sits in a .careers-cards__slide wrapper (slider mode only) so the
   card itself never receives Slick's gutter padding. The wrapper is a
   transparent flex cell that lets the card fill the full height — keeping the
   equal-height look in both the desktop grid and the mobile slider. */
.careers-cards--slider .careers-cards__slide {
	display: flex;
}

.careers-cards--slider .careers-cards__slide > .careers-card {
	width: 100%;
}

/* Once Slick takes over, drop the CSS grid so the track lays out the slides.
   Higher specificity than .careers-cards__grid so it reliably wins. */
.careers-cards--slider .careers-cards__grid.slick-initialized {
	display: block;
}

/* Equal-height slides across the track (incl. the peeking card). */
.careers-cards--slider .slick-track {
	display: flex;
}

.careers-cards--slider .slick-slide {
	height: auto;          /* stretch to the track's tallest slide */
	box-sizing: border-box;
	padding: 0 8px;        /* gutter — lands on the wrapper, not the card */
}

/* Pull the list edges back so the first/last cards sit flush with the row. */
.careers-cards--slider .slick-list {
	margin: 0 -8px;
}

/* --- Pagination dots (pill container, per the Figma) --------------------- */
.careers-cards--slider .slick-dots {
	position: static;       /* flow below the slider instead of overlapping */
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: -moz-fit-content;
	width: fit-content;
	margin: 22px auto 0;
	padding: 8px 14px;
	list-style: none;
	background: #191A41;
	border: 1px solid #1E2173;
	border-radius: 999px;
}

.careers-cards--slider .slick-dots li {
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	line-height: 0;
}

.careers-cards--slider .slick-dots li button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(216, 225, 231, 0.30);
	transition: width 0.25s ease, background-color 0.25s ease;
}

/* Remove Slick's default "•" glyph so only our pill shows. */
.careers-cards--slider .slick-dots li button:before {
	display: none;
	content: "";
}

/* Active page = wider, lighter pill. */
.careers-cards--slider .slick-dots li.slick-active button {
	width: 22px;
	background: #D8E1E7;
}