/* Site-wide UI tweaks (header / home / contact) — Neoquim catalog companion */

/* Sector titles in the strip open the full sector catalogue */
.nq-menu.menu-categorias .category-menu__category {
	position: relative;
}

.nq-menu.menu-categorias .category-menu__category .elementor-widget-heading {
	position: relative;
	z-index: 2;
}

/* Keep only the chevron clickable so the sector title link works */
.nq-menu.menu-categorias .category-menu__category .elementor-widget-n-menu.elementor-absolute {
	z-index: 3;
	width: 36px !important;
	max-width: 36px !important;
	left: auto !important;
	right: 0 !important;
}

.nq-menu.menu-categorias .category-menu__category .elementor-heading-title a,
.nq-menu.menu-categorias .category-menu__category a.elementor-heading-title {
	color: inherit !important;
	text-decoration: none !important;
	cursor: pointer;
}

.nq-menu.menu-categorias .category-menu__category .elementor-heading-title a:hover,
.nq-menu.menu-categorias .category-menu__category a.elementor-heading-title:hover {
	color: #e3062c !important;
}

.nq-menu .e-n-menu-title a.e-n-menu-title-text,
.nq-menu .e-n-menu-title .e-n-menu-title-text a {
	color: inherit !important;
	text-decoration: none !important;
}

/* First mega-menu entry: all products in the sector */
.nq-menu.menu-categorias .elementor-nav-menu--dropdown .menu-item:first-child > .elementor-item {
	font-weight: 700 !important;
	color: #e3062c !important;
	border-left-color: #e3062c !important;
}

/* Sector strip under header circles: center labels + chevron */
.nq-menu.menu-categorias .e-n-menu-title {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	padding-inline: 28px 32px;
}

.nq-menu.menu-categorias .e-n-menu-title-container {
	justify-content: center !important;
	align-items: center !important;
	text-align: center !important;
	width: 100%;
}

.nq-menu.menu-categorias .e-n-menu-title-text {
	flex: 1 1 auto;
	text-align: center !important;
}

.nq-menu.menu-categorias .e-n-menu-dropdown-icon {
	position: absolute !important;
	top: 50% !important;
	right: 10px !important;
	bottom: auto !important;
	left: auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 12px !important;
	height: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	transform: translateY(-50%) !important;
}

/* Sector mega-menu dropdowns (desktop / default) */
.nq-menu.menu-categorias .e-n-menu-content {
	z-index: 40;
	margin-top: 6px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

@media (min-width: 1025px) {
	.nq-menu.menu-categorias .e-n-menu-content {
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
	}
}

.nq-menu.menu-categorias .e-n-menu-content .e-con-inner {
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: visible;
	gap: 0 !important;
}

.nq-menu.menu-categorias .e-n-menu-content .elementor-widget,
.nq-menu.menu-categorias .e-n-menu-content .elementor-widget-nav-menu,
.nq-menu.menu-categorias .e-n-menu-content .elementor-widget-container {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.nq-menu.menu-categorias .elementor-nav-menu--dropdown {
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 6px 0 !important;
	background: #ffffff !important;
	border: 1px solid #dfe2e1 !important;
	border-top: 2px solid #e3062c !important;
	border-radius: 6px !important;
	box-shadow: 0 14px 36px rgb(23 26 31 / 12%) !important;
	overflow: hidden;
}

.nq-menu.menu-categorias .elementor-nav-menu--dropdown .elementor-item {
	display: block !important;
	padding: 11px 18px !important;
	color: #171a1f !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	border: 0 !important;
	border-left: 3px solid transparent !important;
	background: transparent !important;
	transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
	/* Never orphan a single letter on the next line */
	overflow-wrap: normal !important;
	word-break: normal !important;
	word-wrap: normal !important;
	hyphens: none !important;
	white-space: normal !important;
}

.nq-menu.menu-categorias .elementor-nav-menu--dropdown .elementor-item:hover,
.nq-menu.menu-categorias .elementor-nav-menu--dropdown .elementor-item:focus,
.nq-menu.menu-categorias .elementor-nav-menu--dropdown .elementor-item:focus-visible,
.nq-menu.menu-categorias .elementor-nav-menu--dropdown .elementor-item.highlighted,
.nq-menu.menu-categorias .elementor-nav-menu--dropdown .elementor-item.elementor-item-active {
	color: #e3062c !important;
	background: #f8f4f3 !important;
	border-left-color: #e3062c !important;
	outline: none !important;
	box-shadow: none !important;
}

.nq-menu.menu-categorias .elementor-nav-menu--dropdown .menu-item + .menu-item {
	border-top: 1px solid #f0f2f1;
}

.nq-menu.menu-categorias .elementor-nav-menu--dropdown .menu-item + .menu-item .elementor-item {
	border-top: 0 !important;
}

/*
 * Mobile/tablet: sector gamas open as a right-side drawer (85vw) with backdrop + X.
 */
.nq-sector-drawer-backdrop {
	display: none;
}

.nq-sector-drawer-bar {
	display: none;
}

@media (max-width: 1024px) {
	.nq-menu.menu-categorias {
		overflow: visible !important;
	}

	.nq-menu.menu-categorias .category-menu__category,
	.nq-menu.menu-categorias .e-con,
	.nq-menu.menu-categorias .elementor-widget-n-menu,
	.nq-menu.menu-categorias .e-n-menu-none,
	.nq-menu.menu-categorias .e-n-menu,
	.nq-menu.menu-categorias .e-n-menu-wrapper,
	.nq-menu.menu-categorias .e-n-menu-heading,
	.nq-menu.menu-categorias .e-n-menu-item {
		overflow: visible !important;
	}

	.nq-menu.menu-categorias .e-n-menu-title {
		position: relative !important;
		padding-inline: 10px 28px !important;
	}

	.nq-menu.menu-categorias .e-n-menu-title-text {
		overflow-wrap: normal !important;
		word-break: normal !important;
		hyphens: none !important;
		font-size: 12px !important;
		line-height: 1.25 !important;
	}

	body.nq-sector-drawer-open {
		overflow: hidden;
	}

	.nq-sector-drawer-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 10040;
		background: rgb(23 26 31 / 48%);
		-webkit-backdrop-filter: blur(1px);
		backdrop-filter: blur(1px);
	}

	.nq-sector-drawer-backdrop[hidden] {
		display: none !important;
	}

	/* Beat hello-elementor-child .menu-categorias .e-n-menu-content { min-width:100% } */
	.nq-menu.menu-categorias .e-n-menu-content.e-active,
	.menu-categorias .e-n-menu-content.e-active {
		position: fixed !important;
		/* Anchor only to the right so width:85vw is respected */
		inset: 0 0 0 auto !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: auto !important;
		width: 85vw !important;
		max-width: 85vw !important;
		min-width: 0 !important;
		height: 100% !important;
		max-height: 100dvh !important;
		margin: 0 !important;
		padding: 0 !important;
		z-index: 10050 !important;
		background: #ffffff !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: -16px 0 40px rgb(23 26 31 / 22%) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		transform: none !important;
		inset-inline-start: auto !important;
		inset-inline-end: 0 !important;
	}

	.menu-categorias .e-n-menu-content.e-active > .e-con {
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		left: auto !important;
		right: auto !important;
	}

	.nq-menu.menu-categorias .e-n-menu-content.e-active .e-con-inner,
	.nq-menu.menu-categorias .e-n-menu-content.e-active .e-con,
	.nq-menu.menu-categorias .e-n-menu-content.e-active .elementor-widget,
	.nq-menu.menu-categorias .e-n-menu-content.e-active .elementor-widget-container,
	.nq-menu.menu-categorias .e-n-menu-content.e-active .elementor-nav-menu--dropdown {
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
		margin: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		border-left: 0 !important;
		border-right: 0 !important;
	}

	.nq-menu.menu-categorias .e-n-menu-content.e-active .elementor-nav-menu--dropdown {
		border: 0 !important;
		border-top: 0 !important;
		padding: 4px 0 24px !important;
		background: #ffffff !important;
	}

	/* Elementor leaves .e-n-menu-content as display:flex when closed on mobile */
	.nq-menu.menu-categorias .e-n-menu-content:not(.e-active) {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	/* Only while the drawer is open — otherwise the bar leaks into the sector grid */
	.nq-menu.menu-categorias .e-n-menu-content:not(.e-active) .nq-sector-drawer-bar {
		display: none !important;
	}

	.nq-menu.menu-categorias .e-n-menu-content.e-active .nq-sector-drawer-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		position: sticky;
		top: 0;
		z-index: 2;
		padding: 14px 14px 12px 18px;
		background: #ffffff;
		border-bottom: 1px solid #e6e9e8;
	}

	.nq-sector-drawer-title {
		margin: 0;
		flex: 1 1 auto;
		color: #171a1f;
		font-size: 15px;
		font-weight: 700;
		line-height: 1.3;
		text-align: left;
		text-decoration: none;
	}

	a.nq-sector-drawer-title:hover,
	a.nq-sector-drawer-title:focus-visible {
		color: #e3062c;
		outline: none;
	}

	/* Title text / image are the principal sector link; chevron opens drawer */
	.nq-menu.menu-categorias .e-n-menu-title-text,
	.nq-menu.menu-categorias .e-n-menu-title-container,
	.nq-menu.menu-categorias .elementor-widget-image {
		cursor: pointer;
	}

	.nq-sector-drawer-close {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 4px;
		background: #f2f3f2;
		color: #171a1f;
		font-size: 30px;
		line-height: 1;
		cursor: pointer;
	}

	.nq-sector-drawer-close:hover,
	.nq-sector-drawer-close:focus-visible {
		background: #e7e9e8;
		outline: none;
	}

	.nq-menu.menu-categorias .e-n-menu-content.e-active .elementor-nav-menu--dropdown .elementor-item,
	.elementor-location-header .nq-menu.menu-categorias .e-n-menu-content.e-active .elementor-nav-menu .elementor-item {
		text-align: left !important;
		justify-content: flex-start !important;
		padding: 14px 18px !important;
		font-size: 15px !important;
		line-height: 1.4 !important;
		overflow-wrap: normal !important;
		word-break: normal !important;
		hyphens: none !important;
	}
}

/* Header mega-menu dropdowns: center link labels */
.elementor-location-header .e-n-menu-content .elementor-nav-menu,
.elementor-location-header .e-n-menu-content .elementor-nav-menu--main {
	text-align: center !important;
}

.elementor-location-header .e-n-menu-content .elementor-nav-menu .menu-item,
.elementor-location-header .e-n-menu-content .elementor-nav-menu .elementor-item {
	text-align: center !important;
	justify-content: center !important;
}

.elementor-location-header .e-n-menu-content .elementor-nav-menu__align-end .elementor-nav-menu .elementor-item,
.elementor-location-header .e-n-menu-content .elementor-nav-menu__align-start .elementor-nav-menu .elementor-item {
	text-align: center !important;
	justify-content: center !important;
}

.elementor-location-header .e-n-menu-content .elementor-widget-nav-menu {
	--align-self: center !important;
	width: 100% !important;
}

/* Header: WhatsApp + hamburger side by side (all breakpoints; layout enforced on mobile) */
.elementor-element-f2a4717 {
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 12px !important;
	flex-wrap: nowrap !important;
}

.elementor-element-f2a4717 > .elementor-element {
	align-self: center !important;
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.elementor-element-f2a4717 .elementor-element-7796c80,
.elementor-element-f2a4717 .elementor-element-7796c80 .elementor-icon-wrapper {
	text-align: center !important;
}

.elementor-element-f2a4717 .elementor-element-fb7d653 {
	--n-menu-heading-justify-content: flex-end !important;
	--n-menu-title-justify-content-mobile: flex-end !important;
	order: 1;
}

.elementor-element-f2a4717 .elementor-element-7796c80 {
	order: 2;
	flex-shrink: 0;
}

.elementor-element-f2a4717 .e-n-menu-toggle,
.elementor-element-f2a4717 .e-n-menu-toggle-button,
.elementor-element-f2a4717 .e-n-menu-heading {
	justify-content: flex-end !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

@media (max-width: 1024px) {
	/* Mobile/tablet: keep WhatsApp and hamburger on one horizontal row */
	.elementor-element-f2a4717 {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-end !important;
		gap: 10px !important;
		width: auto !important;
		max-width: 100% !important;
	}

	.elementor-element-f2a4717 > .elementor-element {
		width: auto !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		flex: 0 0 auto !important;
	}

	.elementor-element-f2a4717 .elementor-element-fb7d653 {
		--n-menu-heading-justify-content: flex-end !important;
		--n-menu-title-justify-content-mobile: flex-end !important;
		--align-self: center !important;
		width: auto !important;
		min-width: 0 !important;
	}

	.elementor-element-f2a4717 .elementor-element-fb7d653 .e-n-menu,
	.elementor-element-f2a4717 .elementor-element-fb7d653 .e-n-menu-heading,
	.elementor-element-f2a4717 .elementor-element-fb7d653 .e-n-menu-toggle {
		width: auto !important;
		max-width: none !important;
	}

	.elementor-element-f2a4717 .elementor-element-7796c80 {
		--align-self: center !important;
		width: auto !important;
	}

	.elementor-element-f2a4717 .e-n-menu-toggle,
	.elementor-element-f2a4717 .e-n-menu-toggle-button,
	.elementor-element-f2a4717 .e-n-menu-heading {
		display: inline-flex !important;
		justify-content: center !important;
		align-items: center !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: auto !important;
	}
}
.elementor-4142 .elementor-element-581b88d {
	background-color: #92928e !important;
	background-repeat: no-repeat !important;
	background-position: right center !important;
	background-size: auto 80% !important;
}

.elementor-4142 .elementor-element-581b88d::before,
.elementor-4142 .elementor-element-581b88d > .elementor-motion-effects-container > .elementor-motion-effects-layer::before {
	/* Keep Elementor overlay off so the photo stays visible */
	opacity: 0 !important;
}

@media (max-width: 767px) {
	/* Mobile: no bg photo behind text — show it below the buttons */
	.elementor-4142 .elementor-element-581b88d {
		background-image: none !important;
		flex-direction: column !important;
		min-height: 0 !important;
		--min-height: auto !important;
		justify-content: flex-start !important;
		padding-top: 28px !important;
		padding-bottom: 8px !important;
	}

	.elementor-4142 .elementor-element-f90bb46 {
		margin-top: 8px !important;
	}

	.elementor-4142 .elementor-element-581b88d::after {
		content: "";
		display: block;
		order: 20;
		width: 100%;
		aspect-ratio: 16 / 9;
		max-height: 46vh;
		margin-top: 20px;
		background-image: url("https://esquineo.web46.com.es/wp-content/uploads/2026/09/foto-scaled.webp");
		background-repeat: no-repeat;
		background-position: center bottom;
		background-size: contain;
		flex-shrink: 0;
		pointer-events: none;
	}
}

/* Home "Soluciones para cada industria" */
.nq-sector-card {
	border: 1px solid #cfd4d2 !important;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.nq-sector-card:hover,
.nq-sector-card:focus-within {
	border-color: #e3062c !important;
	box-shadow: 0 8px 22px rgb(23 26 31 / 8%);
}

.elementor-element-eaf9a07 {
	gap: 0 !important;
}

@media (max-width: 767px) {
	.elementor-4142 .elementor-element-eaf9a07 {
		--e-con-grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		--justify-items: stretch !important;
		justify-items: stretch !important;
		--align-items: stretch !important;
		align-items: stretch !important;
		gap: 10px !important;
		--gap: 10px !important;
		--row-gap: 10px !important;
		--column-gap: 10px !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 16px 0 !important;
		padding-left: 16px !important;
		padding-right: 16px !important;
		box-sizing: border-box !important;
	}

	.elementor-4142 .elementor-element-eaf9a07 > .e-con-inner {
		display: contents;
	}

	.elementor-4142 .elementor-element-eaf9a07 .nq-sector-card {
		width: 100% !important;
		max-width: 100% !important;
		min-height: 0 !important;
		padding: 18px 12px !important;
		box-sizing: border-box !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 10px !important;
	}

	.elementor-4142 .elementor-element-eaf9a07 .nq-sector-card .elementor-heading-title {
		font-size: 13px !important;
		line-height: 1.25 !important;
		text-align: center !important;
	}

	.elementor-4142 .elementor-element-eaf9a07 .nq-sector-card .elementor-icon {
		font-size: 22px !important;
	}

	.elementor-4142 .elementor-element-eaf9a07 .nq-sector-card .elementor-icon svg {
		width: 22px !important;
		height: 22px !important;
	}
}

/* Contact form: tighten vertical rhythm to match right column */
.page-id-5229 .wpcf7,
.page-id-5229 .wpcf7-form,
.elementor-element-71d853d9 .wpcf7-form {
	margin: 0;
}

.page-id-5229 .wpcf7 p,
.elementor-element-71d853d9 .wpcf7 p {
	margin: 0 0 10px;
}

.page-id-5229 .wpcf7 label,
.elementor-element-71d853d9 .wpcf7 label {
	margin-bottom: 4px;
	line-height: 1.25;
}

.page-id-5229 .wpcf7 input[type="text"],
.page-id-5229 .wpcf7 input[type="email"],
.page-id-5229 .wpcf7 input[type="tel"],
.page-id-5229 .wpcf7 select,
.page-id-5229 .wpcf7 textarea,
.elementor-element-71d853d9 .wpcf7 input[type="text"],
.elementor-element-71d853d9 .wpcf7 input[type="email"],
.elementor-element-71d853d9 .wpcf7 input[type="tel"],
.elementor-element-71d853d9 .wpcf7 select,
.elementor-element-71d853d9 .wpcf7 textarea {
	margin-top: 2px;
	padding-top: 6px;
	padding-bottom: 6px;
	line-height: 1.3;
}

.page-id-5229 .wpcf7-form > div,
.elementor-element-71d853d9 .wpcf7-form > div {
	margin-bottom: 14px !important;
}


/* CF7 privacy acceptance */
.wpcf7 .neo-acceptance,
.wpcf7 .wpcf7-acceptance,
.wpcf7 .neo-consent-required {
	margin: 12px 0 18px;
	font-size: 13.5px;
	line-height: 1.45;
	color: #3d444c;
}

.wpcf7 .neo-acceptance .wpcf7-list-item,
.wpcf7 .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

.wpcf7 .neo-acceptance a,
.wpcf7 .wpcf7-acceptance a,
.wpcf7 .neo-consent-text a {
	color: #e3062c;
	text-decoration: underline;
}

.wpcf7 .neo-acceptance .req,
.wpcf7 .neo-consent-text .req {
	color: #e3062c;
	margin-left: 2px;
}

.elementor-field-type-acceptance,
.elementor-field-type-acceptance .elementor-field-option {
	font-size: 13.5px;
	line-height: 1.45;
	color: #3d444c;
}

.elementor-field-type-acceptance a {
	color: #e3062c;
	text-decoration: underline;
}

/* Search results: type badge + products-first layout */
.search .page-content article.post,
.search-results .page-content article.post {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	grid-template-rows: auto auto auto;
	gap: 8px 24px;
	align-items: start;
	padding: 22px 0;
	border-bottom: 1px solid #dfe2e1;
}

.search .page-content article.post .nq-search-badge,
.search-results .page-content article.post .nq-search-badge {
	grid-column: 2;
	grid-row: 1;
	display: inline-flex;
	align-items: center;
	width: fit-content;
	margin: 0;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.search .page-content article.post .nq-search-badge--product,
.search-results .page-content article.post .nq-search-badge--product {
	background: #e8f3ee;
	color: #1f6b4a;
}

.search .page-content article.post .nq-search-badge--article,
.search-results .page-content article.post .nq-search-badge--article {
	background: #eef1f5;
	color: #3d4a5c;
}

.search .page-content article.post .nq-search-badge--other,
.search-results .page-content article.post .nq-search-badge--other {
	background: #f4f4f4;
	color: #555;
}

.search .page-content article.post .entry-title,
.search-results .page-content article.post .entry-title {
	grid-column: 2;
	grid-row: 2;
	margin: 0;
	font-size: 20px;
	line-height: 1.25;
}

.search .page-content article.post > a:has(img),
.search-results .page-content article.post > a:has(img) {
	grid-column: 1;
	grid-row: 1 / span 3;
	display: grid;
	place-items: center;
	width: 160px;
	height: 160px;
	background: #f4f6f5;
	border: 1px solid #dfe2e1;
	border-radius: 6px;
	overflow: hidden;
}

.search .page-content article.post img,
.search-results .page-content article.post img {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: calc(100% - 20px) !important;
	max-height: calc(100% - 20px) !important;
	object-fit: contain !important;
	object-position: center center !important;
	margin: 0 !important;
}

.search .page-content article.post .entry-title + a + p,
.search .page-content article.post > p:not(.nq-search-badge),
.search-results .page-content article.post > p:not(.nq-search-badge) {
	grid-column: 2;
	grid-row: 3;
	margin: 0;
	color: #626870;
	font-size: 14.5px;
	line-height: 1.5;
}

@media (max-width: 767px) {
	.search .page-content article.post,
	.search-results .page-content article.post {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 18px 0;
	}

	.search .page-content article.post .nq-search-badge,
	.search-results .page-content article.post .nq-search-badge {
		order: 1;
		margin: 0;
	}

	.search .page-content article.post .entry-title,
	.search-results .page-content article.post .entry-title {
		order: 2;
		margin: 0;
		font-size: 18px;
		line-height: 1.3;
	}

	.search .page-content article.post > a:has(img),
	.search-results .page-content article.post > a:has(img) {
		order: 3;
		width: 100%;
		max-width: 100%;
		height: auto;
		aspect-ratio: 16 / 10;
		min-height: 160px;
	}

	.search .page-content article.post img,
	.search-results .page-content article.post img {
		max-width: calc(100% - 24px) !important;
		max-height: calc(100% - 24px) !important;
	}

	.search .page-content article.post .entry-title + a + p,
	.search .page-content article.post > p:not(.nq-search-badge),
	.search-results .page-content article.post > p:not(.nq-search-badge) {
		order: 4;
		margin: 0;
		font-size: 14px;
		line-height: 1.5;
	}
}

/* Thank-you pages (CF7 redirect target) */
.nq-thank-you {
	max-width: 40rem;
	margin: 4rem auto 5rem;
	padding: 0 1.25rem;
	text-align: center;
}

.nq-thank-you__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #c45c26;
}

.nq-thank-you__title {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 3vw, 2.35rem);
	line-height: 1.2;
	color: #1a1a1a;
}

.nq-thank-you__text {
	margin: 0 0 1.75rem;
	font-size: 1.05rem;
	line-height: 1.6;
	color: #444;
}

.nq-thank-you__button {
	display: inline-block;
	padding: 0.85rem 1.5rem;
	background: #c45c26;
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600;
	border-radius: 2px;
}

.nq-thank-you__button:hover {
	background: #a84c1f;
}

/* 404 */
.nq-404 {
	max-width: 40rem;
	margin: 4.5rem auto 6rem;
	padding: 0 1.25rem;
	text-align: center;
}

.nq-404__code {
	margin: 0;
	font-size: clamp(5.5rem, 18vw, 8.5rem);
	font-weight: 700;
	line-height: 0.85;
	letter-spacing: -0.05em;
	color: transparent;
	-webkit-text-stroke: 2px #e3062c;
}

.nq-404__title {
	margin: 1.25rem 0 0.75rem;
	font-size: clamp(1.6rem, 3vw, 2.15rem);
	line-height: 1.2;
	color: #171a1f;
}

.nq-404__text {
	margin: 0 auto 1.75rem;
	max-width: 32rem;
	font-size: 1.05rem;
	line-height: 1.6;
	color: #444;
}

.nq-404__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.nq-404__button {
	display: inline-block;
	padding: 0.85rem 1.35rem;
	background: #e3062c;
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600;
	border: 1px solid #e3062c;
	border-radius: 2px;
}

.nq-404__button:hover {
	background: #c10524;
	border-color: #c10524;
}

.nq-404__button--ghost {
	background: #fff;
	color: #171a1f !important;
	border-color: #171a1f;
}

.nq-404__button--ghost:hover {
	background: #171a1f;
	color: #fff !important;
}

.nq-404__search {
	display: flex;
	max-width: 28rem;
	margin: 1.75rem auto 0;
	border: 1px solid #d8d8d8;
	background: #fff;
}

.nq-404__search input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	padding: 0.85rem 1rem;
	font: inherit;
	background: transparent;
}

.nq-404__search input:focus {
	outline: 2px solid #e3062c;
	outline-offset: -2px;
}

.nq-404__search button {
	flex: 0 0 auto;
	border: 0;
	background: #171a1f;
	color: #fff;
	padding: 0 1.1rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.nq-404__search button:hover {
	background: #000;
}

@media (max-width: 600px) {
	.nq-404 {
		margin-top: 3rem;
	}

	.nq-404__actions,
	.nq-404__search {
		flex-direction: column;
	}

	.nq-404__button {
		width: 100%;
	}
}
