/* ==============================
   Bloque: Banner Trabaja Con Nosotros
   Desktop-first
   ============================== */

.hbt-bloque {
	box-sizing: border-box;
	padding: 0 0 60px;
	width: 100%;
	margin-bottom: 0;
}

.hbt-shell {
	width: 100%;
}

.hbt-bloque *,
.hbt-bloque *::before,
.hbt-bloque *::after {
	box-sizing: border-box;
}

.hbt-inner {
	max-width: 1376px;
	min-height: 309px;
	margin: 0 auto;
	background-color: #111;
	border-radius: 2px;
	display: grid;
	grid-template-columns: minmax(0, 480px) minmax(0, 589px);
	gap: clamp(56px, 9.75vw, 134px);
	padding: clamp(48px, 5.1vw, 70px) clamp(48px, 6.62vw, 91px) clamp(52px, 5.67vw, 78px) clamp(48px, 5.96vw, 82px);
	align-items: center;
}

.hbt-col {
	min-width: 0;
}

/* ---- Columna texto ---- */
.hbt-col--texto {
	display: flex;
	flex-direction: column;
}

.hbt-titulo {
	font-family: var(--wp--preset--font-family--soho-gothic-pro);
	font-size: 40px;
	font-weight: 700;
	font-style: normal;
	line-height: 1.2;
	letter-spacing: -0.8px;
	margin: 0 0 11px;
	color: var(--wp--preset--color--custom-blanco);
}

.hbt-bajada {
	font-family: var(--wp--preset--font-family--inter-display);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	margin: 0;
	color: var(--wp--preset--color--custom-blanco);
	opacity: 0.7;
}

.hbt-bajada strong {
	font-weight: 700;
	color: inherit;
}

/* ---- Columna formulario ---- */
.hbt-col--form {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 589px;
	justify-self: end;
}

.hbt-file-label {
	display: inline-block;
	font-family: "Montserrat", var(--wp--preset--font-family--inter);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--wp--preset--color--custom-blanco);
	opacity: 0.8;
	margin-bottom: 9px;
}

/* La leyenda real de Gravity Forms se traduce desde scripts.js. */
.hbt-gf-wrap .gform_wrapper .gform_body .gform_fields .gfield::after {
	content: none !important;
	display: none !important;
}

.hbt-gf-fallback {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 14px;
	color: #777;
}

/* ---- Estilos Gravity Forms override (tema oscuro) ---- */
.hbt-gf-wrap .gform_wrapper {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.hbt-gf-wrap .gform_wrapper .gform_body .gform_fields .gfield {
	margin-bottom: 5px !important;
}

.hbt-gf-wrap .gform_wrapper .gfield_label {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Ocultar descripción de tipos de archivo de GF */
.hbt-gf-wrap .gform_wrapper .gfield_description {
	display: none !important;
}

.hbt-gf-wrap .gform_wrapper .gform_fileupload_rules {
	display: block !important;
	margin-top: 9px !important;
	font-family: "Montserrat", var(--wp--preset--font-family--inter) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1.8 !important;
	color: var(--wp--preset--color--custom-blanco) !important;
	opacity: 0.8;
}

/* Ocultar required asterisk */
.hbt-gf-wrap .gform_wrapper .gfield_required {
	display: none !important;
}

.hbt-gf-wrap .gform_wrapper input[type="text"],
.hbt-gf-wrap .gform_wrapper input[type="email"],
.hbt-gf-wrap .gform_wrapper input[type="tel"],
.hbt-gf-wrap .gform_wrapper textarea,
.hbt-gf-wrap .gform_wrapper select {
	width: 100% !important;
	height: 50px !important;
	padding: 10px 16px !important;
	border: 1px solid #444 !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: 16px !important;
	color: var(--wp--preset--color--custom-blanco) !important;
	background: #222 !important;
	transition: border-color 0.3s ease !important;
	box-sizing: border-box !important;
}

.hbt-gf-wrap .gform_wrapper input:focus,
.hbt-gf-wrap .gform_wrapper textarea:focus,
.hbt-gf-wrap .gform_wrapper select:focus {
	border-color: var(--wp--preset--color--custom-rojo-principal) !important;
	outline: none !important;
}

/* Estilo del campo de archivo */
.hbt-gf-wrap .gform_wrapper .gfield input[type="file"] {
	width: 100% !important;
	height: 44px !important;
	padding: 0 !important;
	border: 1.5px solid var(--wp--preset--color--custom-rojo-principal) !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--wp--preset--color--custom-blanco) !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: 16px !important;
	cursor: pointer !important;
}

/* Botón "Seleccionar archivo" */
.hbt-gf-wrap .gform_wrapper .gfield input[type="file"]::file-selector-button {
	padding: 10px 20px !important;
	height: 100% !important;
	background: transparent !important;
	color: var(--wp--preset--color--custom-rojo-principal) !important;
	border: none !important;
	border-right: 1.5px solid var(--wp--preset--color--custom-rojo-principal) !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	margin-right: 12px !important;
	transition: color 0.2s ease, border-right-color 0.2s ease !important;
}


/* Border-right blanco en hover del input padre */
.hbt-gf-wrap .gform_wrapper .gfield input[type="file"]:hover::file-selector-button {
	border-right-color: var(--wp--preset--color--custom-blanco) !important;
	color: var(--wp--preset--color--custom-blanco) !important;
}

.hbt-gf-wrap .gform_wrapper .gfield input[type="file"]:hover {
	border-color: var(--wp--preset--color--custom-blanco) !important;
}

.hbt-gf-wrap .gform_wrapper .hbt-file-upload-control {
	position: relative;
	display: block;
	width: 100%;
	height: 50px;
}

.hbt-gf-wrap .gform_wrapper .hbt-file-upload-control input[type="file"] {
	position: absolute !important;
	inset: 0 !important;
	z-index: 2;
	width: 100% !important;
	height: 100% !important;
	opacity: 0 !important;
	cursor: pointer !important;
}

.hbt-gf-wrap .gform_wrapper .hbt-file-upload-ui {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
	color: var(--wp--preset--color--custom-blanco);
	font-family: "Montserrat", var(--wp--preset--font-family--inter);
	font-size: 14px;
	box-sizing: border-box;
	pointer-events: none;
}

.hbt-gf-wrap .gform_wrapper .hbt-file-upload-ui__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(150px, 34.5%, 203px);
	min-width: 0;
	max-width: 100%;
	height: 100%;
	padding: 15px 30px;
	border: 1px solid var(--wp--preset--color--custom-rojo-principal);
	border-radius: 2px 0 0 2px;
	color: var(--wp--preset--color--custom-rojo-principal);
	font-weight: 700;
	line-height: 1.45;
	white-space: nowrap;
	overflow: hidden;
	box-sizing: border-box;
}

.hbt-gf-wrap .gform_wrapper .hbt-file-upload-ui__name {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.3);
	border-right: 1px solid rgba(255, 255, 255, 0.3);
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 0 2px 2px 0;
	font-weight: 500;
	line-height: 1.8;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Botón submit */
.hbt-gf-wrap .gform_wrapper .gform_footer,
.hbt-gf-wrap .gform_wrapper .gform_page_footer {
	display: flex !important;
	flex-wrap: wrap !important;
	justify-content: flex-end !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

.hbt-gf-wrap .gform_wrapper .gform_footer input[type="submit"],
.hbt-gf-wrap .gform_wrapper .gform_page_footer input[type="submit"],
.hbt-gf-wrap .gform_wrapper .gform_footer button[type="submit"],
.hbt-gf-wrap .gform_wrapper .gform_page_footer button[type="submit"] {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	min-height: 0 !important;
	padding: 18px 23px 16px !important;
	background-color: var(--wp--preset--color--custom-rojo-principal) !important;
	color: var(--wp--preset--color--custom-blanco) !important;
	border: none !important;
	border-radius: 2px !important;
	font-family: var(--wp--preset--font-family--jetbrains-mono) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: -0.12px !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	transition: background-color 0.3s ease !important;
	width: auto !important;
	justify-content: center !important;
}

.hbt-gf-wrap .gform_wrapper .gform_footer input[type="submit"]:hover,
.hbt-gf-wrap .gform_wrapper .gform_page_footer input[type="submit"]:hover,
.hbt-gf-wrap .gform_wrapper .gform_footer button[type="submit"]:hover,
.hbt-gf-wrap .gform_wrapper .gform_page_footer button[type="submit"]:hover {
	background-color: #fff !important;
	color: var(--wp--preset--color--custom-negro) !important;
}

/* ---- Mensajes de validación GF (blanco sobre fondo oscuro) ---- */
.hbt-gf-wrap .gform_wrapper .validation_error,
.hbt-gf-wrap .gform_wrapper .gform_validation_errors {
	color: var(--wp--preset--color--custom-blanco) !important;
	background: transparent !important;
	border-color: var(--wp--preset--color--custom-rojo-principal) !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: 14px !important;
	padding: 12px !important;
}

.hbt-gf-wrap .gform_wrapper .gform_validation_errors h2,
.hbt-gf-wrap .gform_wrapper .gform_validation_errors h3 {
	color: var(--wp--preset--color--custom-blanco) !important;
}

.hbt-gf-wrap .gform_wrapper .validation_message,
.hbt-gf-wrap .gform_wrapper .gfield_validation_message {
	color: var(--wp--preset--color--custom-blanco) !important;
	background: transparent !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: 14px !important;
	display: block !important;
}

/* Mensaje de éxito GF */
.hbt-gf-wrap .gform_wrapper .gform_confirmation_message {
	color: var(--wp--preset--color--custom-blanco) !important;
	background: transparent !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: 16px !important;
}

/* ---- Barra de progreso y spinner: rojo en vez de azul ---- */
.hbt-gf-wrap .gform_wrapper .gform_ajax_spinner,
.hbt-gf-wrap .gform_ajax_spinner {
	filter: hue-rotate(160deg) saturate(2) !important;
}

.hbt-gf-wrap .gform_wrapper .gf_progressbar .gf_progressbar_percentage {
	background-color: var(--wp--preset--color--custom-rojo-principal) !important;
}

/* Reemplazar todo azul por rojo */
.hbt-gf-wrap .gform_wrapper *:focus {
	box-shadow: none !important;
	outline-color: var(--wp--preset--color--custom-rojo-principal) !important;
}

.hbt-gf-wrap .gform_wrapper .gfield--type-fileupload .gform_drop_area {
	border-color: var(--wp--preset--color--custom-rojo-principal) !important;
	background: transparent !important;
	color: var(--wp--preset--color--custom-blanco) !important;
}

.hbt-gf-wrap .gform_wrapper .gfield--type-fileupload .gform_button_select_files {
	background-color: var(--wp--preset--color--custom-rojo-principal) !important;
	color: var(--wp--preset--color--custom-blanco) !important;
	border: none !important;
}

.hbt-gf-wrap .gform_wrapper .gfield--type-fileupload progress {
	appearance: none !important;
	-webkit-appearance: none !important;
	height: 6px !important;
	border: none !important;
	background: #333 !important;
	border-radius: 3px !important;
}

.hbt-gf-wrap .gform_wrapper .gfield--type-fileupload progress::-webkit-progress-bar {
	background: #333 !important;
	border-radius: 3px !important;
}

.hbt-gf-wrap .gform_wrapper .gfield--type-fileupload progress::-webkit-progress-value {
	background-color: var(--wp--preset--color--custom-rojo-principal) !important;
	border-radius: 3px !important;
}

.hbt-gf-wrap .gform_wrapper .gfield--type-fileupload progress::-moz-progress-bar {
	background-color: var(--wp--preset--color--custom-rojo-principal) !important;
	border-radius: 3px !important;
}

/* ---- Editor preview ---- */
.hbt-preview {
	max-width: var(--wp--style--global--wide-size);
	margin: 0 auto;
}

.hbt-preview__left {
	display: flex;
	flex-direction: column;
}

.hbt-preview__titulo {
	font-family: var(--wp--preset--font-family--soho-gothic-pro);
	font-size: 32px;
	font-weight: 700;
	font-style: normal;
	line-height: 1.1;
	margin: 0 0 12px;
	color: #fff;
}

.hbt-preview__bajada {
	font-family: var(--wp--preset--font-family--inter-display);
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
	color: #aaa;
}

.hbt-preview__right {
	display: flex;
	flex-direction: column;
}

.hbt-preview__file-label {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #fff;
	margin-bottom: 12px;
}

.hbt-preview__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	background-color: var(--wp--preset--color--custom-rojo-principal);
	color: #fff;
	font-family: var(--wp--preset--font-family--jetbrains-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-top: 12px;
}

/* =============================
   Tablet y pantallas intermedias ≤ 1338px
   ============================= */
@media (max-width: 1338px) {
	.hbt-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
		padding: 48px;
	}

	.hbt-col--form {
		max-width: none;
		justify-self: stretch;
	}

	.hbt-titulo {
		font-size: 34px;
	}

	.hbt-preview {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* =============================
   Mobile ≤ 767px
   ============================= */
@media (max-width: 767px) {
	.hbt-bloque {
		padding: 0 0 40px;
	}

	.hbt-inner {
		gap: 32px;
		padding: 32px 24px;
		min-height: 0;
	}

	.hbt-titulo {
		font-size: 28px;
	}

	.hbt-bajada {
		font-size: 16px;
	}

	/* Mobile: input archivo */
	.hbt-gf-wrap .gform_wrapper .gfield input[type="file"] {
		height: auto !important;
		min-height: 44px !important;
		padding: 0 0 10px !important;
	}

	.hbt-gf-wrap .gform_wrapper .gfield input[type="file"]::file-selector-button {
		width: 100% !important;
		margin-right: 0 !important;
		margin-bottom: 8px !important;
		padding: 12px 20px !important;
		border-right: none !important;
		border-bottom: 1.5px solid var(--wp--preset--color--custom-rojo-principal) !important;
	}

	.hbt-gf-wrap .gform_wrapper .hbt-file-upload-control input[type="file"] {
		height: 100% !important;
		min-height: 0 !important;
		padding: 0 !important;
	}

	.hbt-gf-wrap .gform_wrapper .hbt-file-upload-ui {
		flex-direction: column;
		align-items: stretch;
		height: 80px;
	}

	.hbt-gf-wrap .gform_wrapper .hbt-file-upload-control {
		height: 80px;
	}

	.hbt-gf-wrap .gform_wrapper .hbt-file-upload-ui__button {
		width: 100%;
		min-width: 0;
		height: 50px;
		border: 1px solid var(--wp--preset--color--custom-rojo-principal);
		border-radius: 2px 2px 0 0;
	}

	.hbt-gf-wrap .gform_wrapper .hbt-file-upload-ui__name {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 30px;
		min-height: 30px;
		padding: 4px 18px;
		border: 1px solid rgba(255, 255, 255, 0.3);
		border-top: 0;
		border-radius: 0 0 2px 2px;
		text-align: center;
	}

	/* Mobile: submit 100% ancho */
	.hbt-gf-wrap .gform_wrapper .gform_footer,
	.hbt-gf-wrap .gform_wrapper .gform_page_footer {
		justify-content: stretch !important;
	}

	.hbt-gf-wrap .gform_wrapper .gform_footer input[type="submit"],
	.hbt-gf-wrap .gform_wrapper .gform_page_footer input[type="submit"],
	.hbt-gf-wrap .gform_wrapper .gform_footer button[type="submit"],
	.hbt-gf-wrap .gform_wrapper .gform_page_footer button[type="submit"] {
		width: 100% !important;
	}
}
