/**
 * TalentHub Homepage Styles
 * Styles for front-page.php and related template parts
 */

/* ===== Homepage Container ===== */
.homepage {
	display: flex;
	flex-direction: column;
}

/* ===== Hero Section ===== */
.hero-section {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	color: white;
	min-height: 400px;
	height: 50vh;
	max-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.hero-container {
	max-width: var(--container-width);
	width: 100%;
	margin: 0 auto;
	padding: 0 var(--spacing-md);
}

.hero-content {
	text-align: center;
	max-width: 800px;
	margin: 0 auto;
}

.hero-headline {
	font-size: 3rem;
	font-weight: 700;
	margin: 0 0 var(--spacing-md) 0;
	line-height: 1.2;
	font-family: var(--font-family-heading);
}

.hero-subheadline {
	font-size: 1.25rem;
	margin: 0 0 var(--spacing-2xl) 0;
	line-height: 1.5;
}

/* Hero fade-in animation - CSS only, no JS dependency */
@keyframes heroFadeUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes heroFadeUpSubtle {
	from {
		opacity: 0;
		transform: translateY(25px);
	}
	to {
		opacity: 0.95;
		transform: translateY(0);
	}
}

.hero-headline {
	animation: heroFadeUp 0.7s ease-out 0.1s both;
}

.hero-subheadline {
	animation: heroFadeUpSubtle 0.7s ease-out 0.25s both;
}

.hero-search-form,
.hero-actions {
	animation: heroFadeUp 0.7s ease-out 0.4s both;
}

/* Hero Search Form */
.hero-search-form {
	max-width: 700px;
	margin: 0 auto;
}

.search-fields {
	display: grid;
	gap: var(--spacing-sm);
	background: white;
	padding: var(--spacing-xs);
	border-radius: var(--border-radius-lg);
	box-shadow: var(--shadow-lg);
	align-items: stretch;
}
.search-fields-cols-1 { grid-template-columns: 1fr auto; }
.search-fields-cols-2 { grid-template-columns: 1fr 1fr auto; }
.search-fields-cols-3 { grid-template-columns: 1fr 1fr 1fr auto; }

.search-field {
	display: flex;
	min-width: 0;
}

/* Both the text input and the location select share these dimensions
   so the row aligns cleanly regardless of native form-element rendering.
   Inputs are visually invisible — the rounded white container provides
   the shape and they appear to merge into it. */
.search-input,
.search-select {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: none;
	border-radius: 0;
	font-size: 1rem;
	font-family: var(--font-family-base);
	color: var(--color-text);
	background: transparent;
	transition: background-color 0.15s ease;
	box-sizing: border-box;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

/* Subtle vertical divider between fields so the row doesn't feel cramped */
.search-fields > .search-field + .search-field .search-input,
.search-fields > .search-field + .search-field .search-select {
	border-left: 1px solid rgba(0, 0, 0, 0.08);
}

/* Custom chevron for the location select so it matches the input visually */
.search-select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

/* Soft focus — a quiet background tint instead of a hard bordered box.
   Override the global .search-input:focus rule from style.css that adds
   transform: scale(1.02) and a primary-coloured glow. */
.search-fields .search-input:focus,
.search-fields .search-select:focus {
	outline: none;
	border: none;
	background: rgba(99, 102, 241, 0.04);
	transform: none;
	box-shadow: none;
}

.search-input::placeholder {
	color: var(--color-text-muted);
}

.search-button {
	height: 52px;
	padding: 0 var(--spacing-xl);
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--border-radius-md);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
	white-space: nowrap;
	box-sizing: border-box;
}

.search-button:hover,
.search-button:focus {
	background: var(--color-primary-dark);
	transform: translateY(-2px);
	outline: 2px solid white;
	outline-offset: 2px;
}

.hero-actions {
	margin-top: var(--spacing-lg);
}

/* ===== Featured Jobs Section ===== */
.featured-jobs-section {
	padding: var(--spacing-3xl) 0;
	background: var(--color-background);
}

.featured-jobs-container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--spacing-md);
}

.section-header {
	text-align: center;
	margin-bottom: var(--spacing-2xl);
}

.section-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--color-primary);
	margin: 0 0 var(--spacing-sm) 0;
	font-family: var(--font-family-heading);
}

.section-description {
	font-size: 1.125rem;
	color: var(--color-text-muted);
	margin: 0;
}

/* Jobs Grid */
.jobs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--spacing-lg);
	margin-bottom: var(--spacing-2xl);
}

/* Card-internal visuals (.job-card, badges, meta, title, etc.) live in
   jobs.css — single source of truth for the Feature #34 design. The
   homepage only owns the section chrome + grid layout above. */

.section-footer {
	text-align: center;
	margin-top: var(--spacing-xl);
}

/* Modern "View All Jobs" CTA button — primary brand colour with arrow */
.view-all-jobs-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 32px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: 999px;
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.view-all-jobs-btn:hover {
	background: var(--color-primary-dark, var(--color-primary));
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
	color: white;
}
.view-all-jobs-btn .view-all-jobs-arrow {
	transition: transform 0.2s ease;
}
.view-all-jobs-btn:hover .view-all-jobs-arrow {
	transform: translateX(3px);
}

/* ===== How It Works Section ===== */
.how-it-works-section {
	padding: var(--spacing-3xl) 0;
	background: var(--color-surface);
}

.how-it-works-container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 3rem var(--spacing-md);
}

.steps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--spacing-xl);
	margin-top: var(--spacing-2xl);
}

.step-card {
	/* Feature #34 — 1px primary-coloured accent border so How It Works
	   boxes carry the same brand outline as job cards + filter sidebar
	   (Andrew's call 2026-05-13). */
	text-align: center;
	padding: var(--spacing-lg);
	background: var(--color-background);
	border-radius: var(--border-radius-lg);
	border: var(--border-width) solid var(--color-primary);
	transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.step-card:hover {
	border-color: var(--color-primary-dark, var(--color-primary));
	box-shadow: var(--shadow-md);
	transform: translateY(-4px);
}

.step-icon {
	color: var(--color-primary);
	margin-bottom: var(--spacing-md);
	display: flex;
	justify-content: center;
}

.step-number {
	display: inline-block;
	width: 40px;
	height: 40px;
	line-height: 40px;
	background: var(--color-primary);
	color: white;
	border-radius: 50%;
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: var(--spacing-md);
}

.step-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--color-text);
	margin: 0 0 var(--spacing-sm) 0;
}

.step-description {
	font-size: 1rem;
	color: var(--color-text-muted);
	margin: 0;
	line-height: 1.6;
}

/* ===== CTA Section ===== */
.cta-section {
	padding: var(--spacing-3xl) 0;
	background: var(--color-primary);
	color: white;
}

.cta-container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--spacing-md);
}

.cta-content {
	text-align: center;
	max-width: 700px;
	margin: 0 auto;
}

.cta-headline {
	font-size: 2.5rem;
	font-weight: 700;
	margin: 0 0 var(--spacing-xl) 0;
	line-height: 1.3;
	font-family: var(--font-family-heading);
}

.cta-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: white;
	color: var(--color-primary);
	font-size: 1.0625rem;
	font-weight: 600;
	padding: 14px 32px;
	border: none;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover,
.cta-button:focus {
	background: var(--color-background);
	color: var(--color-primary-dark, var(--color-primary));
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
	outline: none;
	text-decoration: none;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
	.hero-headline {
		font-size: 2rem;
	}

	.hero-subheadline {
		font-size: 1rem;
	}

	.hero-section {
		min-height: 300px;
		max-height: 500px;
	}

	.search-fields {
		grid-template-columns: 1fr;
	}

	.search-button {
		width: 100%;
	}

	.section-title {
		font-size: 2rem;
	}

	.jobs-grid {
		grid-template-columns: 1fr;
	}

	.steps-grid {
		grid-template-columns: 1fr;
	}

	.cta-headline {
		font-size: 1.75rem;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.jobs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ===== Dark Mode Support ===== */
[data-theme="dark"] .hero-section {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

[data-theme="dark"] .search-fields {
	background: var(--color-surface);
}

[data-theme="dark"] .search-input {
	background: var(--color-background);
	color: var(--color-text);
}

[data-theme="dark"] .job-card,
[data-theme="dark"] .step-card {
	background: var(--color-background);
	border-color: var(--color-border);
}

[data-theme="dark"] .job-type-badge {
	opacity: 0.9;
}

[data-theme="dark"] .cta-section {
	background: var(--color-primary);
}

[data-theme="dark"] .section-title {
	color: var(--color-text);
}

[data-theme="dark"] .stat-number {
	color: #64b5f6;
}

/* ─────────────────────────────────────────────────────────────────
 * Talent Community banner (Feature #32) — homepage slot between
 * the orange register CTA and the live-roles grid.
 *
 * Horizontal two-column banner (text left, pill CTA right) on a
 * solid teal-indigo ground. Visually distinct from the orange CTA
 * above so the two register-style callouts don't blur together.
 * Stacks on mobile.
 *
 * Banner copy (headline, lede, CTA label) is recruiter-editable via
 * Settings → Talent Community → "Homepage banner copy".
 * ───────────────────────────────────────────────────────────────── */
.talent-community-banner {
	padding: var(--spacing-3xl) 0;
	background: var(--color-talent-community, #1e40af);
	color: #ffffff;
}
.talent-community-banner__container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--spacing-md);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-xl);
}
.talent-community-banner__text {
	flex: 1 1 auto;
	min-width: 0;
}
.talent-community-banner__eyebrow {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	margin-bottom: var(--spacing-md);
}
.talent-community-banner__headline {
	margin: 0 0 var(--spacing-sm) 0;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.25;
	color: #ffffff;
	font-family: var(--font-family-heading);
}
.talent-community-banner__lede {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.92);
	max-width: 640px;
}
.talent-community-banner__cta-wrap {
	flex: 0 0 auto;
}
/* Banner-specific pill: inherits the global .btn-pill shape (forms.css),
 * but recolours for the dark ground (white pill, banner-coloured text). */
.talent-community-banner__cta {
	background: #ffffff;
	color: var(--color-talent-community, #1e40af);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.talent-community-banner__cta:hover,
.talent-community-banner__cta:focus {
	background: #f1f5f9;
	color: var(--color-talent-community, #1e40af);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

@media (max-width: 768px) {
	.talent-community-banner {
		padding: var(--spacing-2xl) 0;
	}
	.talent-community-banner__container {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
		gap: var(--spacing-lg);
	}
	.talent-community-banner__headline {
		font-size: 1.625rem;
	}
	.talent-community-banner__lede {
		font-size: 1rem;
	}
	.talent-community-banner__cta {
		width: 100%;
		justify-content: center;
	}
}
