/* ==========================================================================
   Career Page — UB Heritage
   Scope: .ubh-career-page
   File: assets/css/career.css (standalone, enqueued conditionally
   in inc/enqueue.php — see the enqueue snippet provided alongside this file)
   ========================================================================== */

.ubh-career-page {
	--ubh-gold: #d2ab67;
	overflow-x: clip;
}

.ubh-career-container {
	max-width: 1820px;
	margin-inline: auto;
	padding-inline: 50px;
}

/* ---------------- Banner ---------------- */

.ubh-career-banner {
	position: relative;
	width: 100%;
	height: clamp(320px, 31.25vw, 600px);
	overflow: hidden;
}

.ubh-career-banner__media {
	position: relative;
	width: 100%;
	height: 100%;
}

.ubh-career-banner__media picture {
	display: block;
	width: 100%;
	height: 100%;
}

.ubh-career-banner__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ubh-career-banner__content {
	position: absolute;
	left: 50px;
	bottom: 50px;
	max-width: 640px;
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.ubh-career-banner__heading {
	font-family: 'IvyBodoni', serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(28px, 3vw, 48px);
	line-height: 1.15;
	margin: 0;
}

.ubh-career-banner__subheading {
	font-family: 'Avenir', sans-serif;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: clamp(13px, 1vw, 16px);
	margin: 0;
}

.ubh-career-banner__paragraph {
	font-family: 'Avenir', sans-serif;
	font-weight: 400;
	font-size: clamp(14px, 1.1vw, 17px);
	line-height: 1.6;
	margin: 0;
}

/* ---------------- Current Openings ---------------- */

.ubh-career-openings {
	padding: clamp(50px, 6vw, 100px) 0 clamp(30px, 4vw, 60px);
}

.ubh-career-openings__head {
	text-align: center;
	max-width: 620px;
	margin: 0 auto clamp(40px, 5vw, 70px);
}

.ubh-career-openings__heading {
	font-family: 'IvyBodoni', serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(30px, 3.2vw, 48px);
	margin: 0 0 16px;
	color: #000;
}

.ubh-career-openings__paragraph {
	font-family: 'Avenir', sans-serif;
	font-size: clamp(14px, 1vw, 16px);
	line-height: 1.7;
	color: #4a4a4a;
	margin: 0;
}

.ubh-career-joblist {
	border-top: 1px solid #dcdcdc;
}

.ubh-career-jobrow {
	border-bottom: 1px solid #dcdcdc;
}

.ubh-career-jobrow__trigger {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	width: 100%;
	display: grid;
	grid-template-columns: 60px 1fr 36px;
	align-items: center;
	gap: 24px;
	padding: 26px 12px 26px 0;
	transition: opacity 0.25s ease;
}

.ubh-career-jobrow__trigger:hover {
	opacity: 0.6;
}

.ubh-career-jobrow__sr,
.ubh-career-jobrow__title {
	font-family: 'IvyBodoni', serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(20px, 2.2vw, 40px);
	color: #000;
	line-height: 1.2;
}

.ubh-career-jobrow__icon {
	width: 36px;
	height: 36px;
	color: #000;
	justify-self: end;
	transition: transform 0.3s ease;
}

.ubh-career-jobrow__icon svg {
	width: 100%;
	height: 100%;
}

.ubh-career-jobrow__trigger[aria-expanded="true"] .ubh-career-jobrow__icon {
	transform: rotate(45deg);
}

/* ---------------- Job Detail Modal ---------------- */

.ubh-career-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 18, 16, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0s linear 0.4s;
	z-index: 900;
}

.ubh-career-overlay.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.ubh-career-drawer {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.97);
	width: min(1290px, 88vw);
	max-height: 85vh;
	background: #fff;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	/* visibility only flips to hidden AFTER the fade/scale finishes -
	   this is what removes the "jerk" on close */
	transition: opacity 0.4s ease,
		transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
		visibility 0s linear 0.4s;
	z-index: 901;
}

.ubh-career-drawer.is-active {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	visibility: visible;
	/* becomes visible immediately on open, no delay */
	transition: opacity 0.4s ease,
		transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
		visibility 0s linear 0s;
}

.ubh-career-drawer__scroll {
	height: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 70px clamp(30px, 6vw, 150px) 60px clamp(30px, 6vw, 150px);
}

.ubh-career-drawer__close {
	all: unset;
	cursor: pointer;
	position: absolute;
	top: 32px;
	right: 32px;
	width: 24px;
	height: 24px;
	color: #000;
	z-index: 2;
}

.ubh-career-drawer__close svg {
	width: 100%;
	height: 100%;
}

.ubh-career-drawer__title {
	font-family: 'IvyBodoni', serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(28px, 2.8vw, 44px);
	margin: 0 0 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #dcdcdc;
}

.ubh-career-drawer__block {
	margin-bottom: 26px;
	font-family: 'Avenir', sans-serif;
	font-size: 15px;
	line-height: 1.7;
	color: #262626;
}

.ubh-career-drawer__block h4 {
	font-family: 'Avenir', sans-serif;
	font-weight: 800;
	font-size: 15px;
	margin: 0 0 8px;
	color: #000;
}

.ubh-career-drawer__block p {
	margin: 0 0 6px;
}

.ubh-career-drawer__wysiwyg ul {
	margin: 0;
	padding-left: 20px;
}

.ubh-career-drawer__wysiwyg li {
	margin-bottom: 8px;
}

.ubh-career-drawer__profile-bullet {
	list-style: disc;
	padding-left: 20px;
	margin: 0 0 10px;
}

.ubh-career-drawer__apply {
	all: unset;
	cursor: pointer;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 20px;
	padding: 16px 44px;
	border: 1px solid #000;
	border-radius: 999px;
	font-family: 'Avenir', sans-serif;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #000;
	transition: background 0.25s ease, color 0.25s ease;
}

.ubh-career-drawer__apply:hover {
	background: #000;
	color: #fff;
}

html.ubh-no-scroll,
body.ubh-no-scroll {
	overflow: hidden;
}

/* ---------------- Submit Your Resume ---------------- */
/* Structure: section (.ubh-career-resume) > container (.ubh-career-container)
   > row (.ubh-career-resume__row, carries the CSS background-image)
   > inner (.ubh-career-resume__inner) > form (.ubh-career-resume__form)

   Desktop vs mobile background image: page-career.php sets two CSS custom
   properties inline on .ubh-career-resume__row —
     --ubh-resume-bg          (desktop image, always present if one is set)
     --ubh-resume-bg-mobile   (mobile image, falls back to the desktop one
                                in PHP if no mobile image was uploaded)
   so this file only has to pick which variable wins at which breakpoint. */

.ubh-career-resume {
	padding: clamp(40px, 5vw, 80px) 0 clamp(60px, 7vw, 120px);
}

.ubh-career-resume__heading {
	font-family: 'IvyBodoni', serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(28px, 2.8vw, 44px);
	margin: 0 0 24px;
	text-align: center;
}

.ubh-career-resume__rule {
	height: 1px;
	background: #dcdcdc;
	width: 100%;
	margin-bottom: clamp(30px, 4vw, 60px);
}

.ubh-career-resume__row {
	position: relative;
	width: 100%;
	min-height: 800px;
	background-color: #111;
	/* fallback while the image loads / if none is set */
	background-image: var(--ubh-resume-bg, none);
	background-size: cover;
	background-position: center left;
	background-repeat: no-repeat;
}

.ubh-career-resume__inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: inherit;
	flex-direction: row;
	flex-wrap: wrap;
	align-content: center;
}

.ubh-career-resume__form {
	position: relative;
	z-index: 1;
	width: 50%;
	/* comfortable breathing room so the row never has to squeeze content */
	margin-block: 60px;
	background: rgba(10, 10, 10, 0.92);
	padding: clamp(28px, 3vw, 60px);
}

/* Contact Form 7 styling inside the resume panel */
.ubh-career-resume__form .wpcf7-form {
	display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 100%;
    width: 100%;
}

.ubh-career-resume__form .wpcf7-form p {
	max-width: 100%;
    width: 100%;
	margin: 0 0 30px;
}
/* 
.ubh-career-resume__form .wpcf7-form p.ubh-full,
.ubh-career-resume__form .wpcf7-form p:has(textarea),
.ubh-career-resume__form .wpcf7-form .ubh-cf7-row-full {
	grid-column: 1 / -1;
} */

.ubh-career-resume__form label {
	display: block;
	font-family: 'Avenir', sans-serif;
	font-size: 15px;
	color: #cfcfcf;
	margin-bottom: 10px;
}

.ubh-career-resume__form input[type="text"],
.ubh-career-resume__form input[type="email"],
.ubh-career-resume__form input[type="tel"],
.ubh-career-resume__form select,
.ubh-career-resume__form textarea {
	all: unset;
	box-sizing: border-box;
	display: block;
	width: 100%;
	color: #fff;
	font-family: 'Avenir', sans-serif;
	font-size: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
	background: transparent;
}

.ubh-career-resume__form ::placeholder {
	color: rgba(255, 255, 255, 0.45);
	font-family: 'Avenir', sans-serif;
	font-size: 15px;
	opacity: 1;
}

.ubh-career-resume__form select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%23d2ab67' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right center;
}

.ubh-career-resume__form select:invalid {
	color: rgba(255, 255, 255, 0.45);
}

.ubh-career-resume__form select:valid {
	color: #fff;
}

.ubh-career-resume__form select option {
	color: #000;
	font-family: 'Avenir', sans-serif;
	font-size: 15px;
	background: #fff;
}

.ubh-career-resume__form textarea {
	min-height: 44px;
	max-height: 90px;
	resize: none;
}

.ubh-career-resume__form .ubh-cf7-file-row {
	display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    align-items: flex-start;
}

.ubh-career-resume__form input[type="file"] {
	display: none;
}

.ubh-career-resume__form .wpcf7-form-control-wrap {
	position: relative;
	display: block;
	width: 100%;
}

.ubh-career-resume__form .ubh-cf7-file-label {
	max-width: 100%;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 999px;
    background: var(--ubh-gold);
    color: #000;
    font-family: 'Avenir', sans-serif;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
}

.ubh-career-resume__form input[type="submit"] {
	all: unset;
	cursor: pointer;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	padding: 16px 55px;
	border: 1px solid var(--ubh-gold);
	border-radius: 999px;
	color: var(--ubh-gold);
	font-family: 'Avenir', sans-serif;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: background 0.25s ease, color 0.25s ease;
}

.ubh-career-resume__form input[type="submit"]:hover {
	background: var(--ubh-gold);
	color: #000;
}

.ubh-career-resume__form .wpcf7-not-valid-tip {
	color: #ff8a8a;
	font-size: 12px;
	margin-top: 6px;
}

.ubh-career-resume__form .wpcf7-response-output {
	grid-column: 1 / -1;
	color: #fff;
	font-family: 'Avenir', sans-serif;
	font-size: 13px;
	border-radius: 8px;
	margin-top: 10px;
}

/* ---------------- Mobile (<= 1200px) ---------------- */

@media (max-width: 1200px) {

	/* Portrait/mobile banner crop needs a taller box than the desktop
	   landscape one — placeholder ratio, verify against the Figma mobile
	   frame (node 190-4340) once the MCP rate limit resets. */
	.ubh-career-banner {
		height: clamp(420px, 140vw, 700px);
	}

	.ubh-career-container {
		padding-inline: 24px;
	}

	.ubh-career-banner__content {
		left: 24px;
		right: 24px;
		bottom: 24px;
		max-width: 100%;
	}

	.ubh-career-jobrow__trigger {
		grid-template-columns: 40px 1fr 28px;
		gap: 14px;
		padding: 18px 4px;
	}

	.ubh-career-jobrow__icon {
		width: 28px;
		height: 28px;
	}

	.ubh-career-drawer {
		width: 94vw;
		max-height: 90vh;
	}

	.ubh-career-drawer__scroll {
		max-height: 90vh;
		padding: 50px 24px 50px;
	}

	.ubh-career-drawer__close {
		top: 20px;
		right: 20px;
	}

	/* .ubh-career-resume__form .wpcf7-form {
		grid-template-columns: 1fr;
	} */
}

/* ---------------- Mobile (<= 1200px) ---------------- */

@media (max-width: 768px) {

	/* switch to the mobile background image if one was set (falls back
	   to the desktop var automatically via PHP when it wasn't), and
	   shrink the row to a short "peek" of the image */
	.ubh-career-resume__row {
		background-image: var(--ubh-resume-bg-mobile, var(--ubh-resume-bg, none));
		min-height: 700px;
		background-position: center bottom;
	}

	.ubh-career-container {
		padding-inline: 16px;
	}

	.ubh-career-resume__inner {
		display: flex;
		align-items: flex-start;
		justify-content: center;
		min-height: inherit;
		flex-direction: row;
		flex-wrap: wrap;
		align-content: flex-start;
	}

	.ubh-career-resume__form {
		width: 100%;
		margin-block: 16px 0;
		padding: 8px 12px;
	}

	.ubh-career-resume__form .wpcf7-form p {
		margin: 0 0 16px;
	}

	.ubh-career-resume__form label {
		font-size: 12px;
		margin-bottom: 0px;
	}

	.ubh-career-resume__form input[type="text"],
	.ubh-career-resume__form input[type="email"],
	.ubh-career-resume__form input[type="tel"],
	.ubh-career-resume__form select,
	.ubh-career-resume__form textarea {
		font-size: 12px;
		padding-bottom: 0px;
	}

	.ubh-career-resume__form .ubh-cf7-file-row {
		gap: 0;
	}

	.ubh-career-resume__form .ubh-cf7-file-label {
		padding: 8px 16px;
		font-size: 12px;
	}

	.ubh-career-resume__form input[type="submit"] {
		margin-top: 8px;
		padding: 10px 32px;
		font-size: 12px;
		letter-spacing: 0.5px;
	}
}

@media (max-width: 425px) {
	.ubh-career-resume__form .wpcf7-form p {
        margin: 0 0 2px;
    }
}