/**
 * QM Integral Solutions — sistema visual global.
 * Los componentes existentes conservan prioridad mediante sus selectores específicos.
 */
:root {
	--qm-font-primary: "Montserrat", "Avenir Next", Avenir, "Segoe UI", sans-serif;
	--qm-font-display: clamp(2.625rem, 4.25vw, 4rem);
	--qm-font-heading: clamp(2rem, 3vw, 2.875rem);
	--qm-font-subheading: clamp(1.3125rem, 1.75vw, 1.6875rem);
	--qm-font-lead: clamp(1.125rem, 1.55vw, 1.375rem);
	--qm-font-body: clamp(1rem, 1.2vw, 1.125rem);
	--qm-font-small: .875rem;
	--qm-line-display: 1.12;
	--qm-line-heading: 1.15;
	--qm-line-subheading: 1.3;
	--qm-line-body: 1.65;
	--qm-tracking-display: -.035em;
	--qm-tracking-heading: -.025em;
	--qm-color-ink: #303b3e;
	--qm-color-blue: #286488;
	--qm-color-muted: #70878c;
	--qm-color-gold: #e0b640;
	--qm-color-green: #08ae51;
	--qm-color-white: #fff;
	--qm-button-background: var(--qm-color-gold);
	--qm-button-foreground: var(--qm-color-white);
	--qm-button-radius: 999px;
	--qm-button-padding-block: .8125rem;
	--qm-button-padding-inline: 1.875rem;
	--qm-button-min-inline-size: 14.375rem;
	--qm-button-min-block-size: 2.75rem;
}

body {
	font-family: var(--qm-font-primary);
}

/* El toggle de navegación es un control, no un CTA del kit de Elementor. */
[class*="elementor-kit-"] button.qm-menu-toggle {
	min-inline-size: 0;
	min-block-size: 0;
	padding: 9px 5px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	box-shadow: none;
	filter: none;
	transform: none;
}

[class*="elementor-kit-"] button.qm-menu-toggle:hover,
[class*="elementor-kit-"] button.qm-menu-toggle:focus,
[class*="elementor-kit-"] button.qm-menu-toggle:focus-visible,
[class*="elementor-kit-"] button.qm-menu-toggle:active {
	background: transparent;
	filter: none;
	transform: none;
}

/* Estado abierto: X más contenida y separada del panel desplegable. */
[class*="elementor-kit-"] button.qm-menu-toggle[aria-expanded="true"] span {
	inline-size: 38px;
	block-size: 4px;
	justify-self: end;
}

[class*="elementor-kit-"] button.qm-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(12px) rotate(45deg);
}

[class*="elementor-kit-"] button.qm-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-12px) rotate(-45deg);
}

[class*="elementor-kit-"] .qm-nav {
	top: 105px;
}

/* Los bullets del slider son indicadores, no botones CTA de Elementor. */
[class*="elementor-kit-"] .qm-hero__dots {
	gap: 4px;
}

[class*="elementor-kit-"] .qm-hero__dots button {
	flex: 0 0 16px;
	inline-size: 16px;
	block-size: 16px;
	min-inline-size: 0;
	min-block-size: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .45);
	box-shadow: none;
	filter: none;
	transform: none;
}

[class*="elementor-kit-"] .qm-hero__dots button.is-active {
	background: #fff;
	filter: none;
	transform: none;
}

/* Las flechas del slider son controles de navegación, no CTA. */
[class*="elementor-kit-"] button.qm-slider__arrow {
	inline-size: 48px;
	block-size: 64px;
	min-inline-size: 0;
	min-block-size: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(10, 20, 23, .28);
	color: #fff;
	font-size: 50px;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
	filter: none;
	transform: translateY(-50%);
	backdrop-filter: blur(4px);
}

[class*="elementor-kit-"] button.qm-slider__arrow:hover,
[class*="elementor-kit-"] button.qm-slider__arrow:focus-visible {
	background: rgba(10, 20, 23, .65);
	filter: none;
	transform: translateY(-50%);
}

/* El cierre del popup es un control circular, no un CTA. */
[class*="elementor-kit-"] button.qm-popup__close {
	inline-size: 44px;
	block-size: 44px;
	min-inline-size: 0;
	min-block-size: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(10, 20, 23, .55);
	color: #fff;
	font-size: 26px;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
	filter: none;
	transform: none;
}

[class*="elementor-kit-"] button.qm-popup__close:hover,
[class*="elementor-kit-"] button.qm-popup__close:focus-visible {
	background: rgba(10, 20, 23, .82);
	filter: none;
	transform: none;
}

@media (max-width: 600px) {
	[class*="elementor-kit-"] button.qm-popup__close {
		inline-size: 40px;
		block-size: 40px;
		font-size: 24px;
	}
}

/* Valores predeterminados para contenido editorial y widgets nuevos. */
:where(.entry-content, .elementor) :where(h1, h2, h3, h4, p, li) {
	font-family: var(--qm-font-primary);
}

:where(.entry-content, .elementor) :where(h1) {
	color: var(--qm-color-ink);
	font-size: var(--qm-font-display);
	font-weight: 700;
	line-height: var(--qm-line-display);
	letter-spacing: var(--qm-tracking-display);
	text-wrap: balance;
}

:where(.entry-content, .elementor) :where(h2) {
	color: var(--qm-color-ink);
	font-size: var(--qm-font-heading);
	font-weight: 700;
	line-height: var(--qm-line-heading);
	letter-spacing: var(--qm-tracking-heading);
	text-wrap: balance;
}

:where(.entry-content, .elementor) :where(h3) {
	color: var(--qm-color-muted);
	font-size: var(--qm-font-subheading);
	font-weight: 500;
	line-height: var(--qm-line-subheading);
}

:where(.entry-content, .elementor) :where(h4) {
	color: var(--qm-color-ink);
	font-size: var(--qm-font-lead);
	font-weight: 600;
	line-height: var(--qm-line-subheading);
}

:where(.entry-content, .elementor) :where(p, li) {
	font-size: var(--qm-font-body);
	line-height: var(--qm-line-body);
}

.qm-display { font: 700 var(--qm-font-display) / var(--qm-line-display) var(--qm-font-primary); letter-spacing: var(--qm-tracking-display); }
.qm-heading { font: 700 var(--qm-font-heading) / var(--qm-line-heading) var(--qm-font-primary); letter-spacing: var(--qm-tracking-heading); }
.qm-subheading { font: 500 var(--qm-font-subheading) / var(--qm-line-subheading) var(--qm-font-primary); }
.qm-lead { font: 400 var(--qm-font-lead) / 1.55 var(--qm-font-primary); }
.qm-body { font: 400 var(--qm-font-body) / var(--qm-line-body) var(--qm-font-primary); }
.qm-small { font: 400 var(--qm-font-small) / 1.4 var(--qm-font-primary); }

/* Un único botón primario para tema, Elementor clásico, Atomic y formularios. */
.qm-button,
.elementor .elementor-button,
.elementor .e-button-base:not(.qm-menu-toggle),
.elementor .e-form-submit-button-base {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: var(--qm-button-min-inline-size);
	min-block-size: var(--qm-button-min-block-size);
	padding: var(--qm-button-padding-block) var(--qm-button-padding-inline);
	border: 0;
	border-radius: var(--qm-button-radius);
	background: var(--qm-button-background);
	color: var(--qm-button-foreground);
	font-family: var(--qm-font-primary);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s ease, filter .2s ease, opacity .2s ease;
}

.qm-button:hover:not([aria-disabled="true"]),
.elementor .elementor-button:hover:not([aria-disabled="true"]),
.elementor .e-button-base:not(.qm-menu-toggle):hover:not(:disabled),
.elementor .e-form-submit-button-base:hover:not(:disabled) {
	filter: brightness(1.05);
	transform: translateY(-2px);
}

.qm-button:focus-visible,
.elementor .elementor-button:focus-visible,
.elementor .e-button-base:not(.qm-menu-toggle):focus-visible,
.elementor .e-form-submit-button-base:focus-visible {
	outline: 3px solid var(--qm-color-blue);
	outline-offset: 3px;
}

.qm-button:active,
.elementor .elementor-button:active,
.elementor .e-button-base:not(.qm-menu-toggle):active,
.elementor .e-form-submit-button-base:active {
	transform: translateY(0);
}

:where(.qm-button[aria-disabled="true"], .elementor-button[aria-disabled="true"], .e-button-base:not(.qm-menu-toggle):disabled, .e-form-submit-button-base:disabled) {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

.qm-button--green { --qm-button-background: var(--qm-color-green); }
.qm-button--outline {
	--qm-button-background: transparent;
	--qm-button-foreground: var(--qm-color-blue);
	box-shadow: inset 0 0 0 2px currentColor;
}

@media (max-width: 600px) {
	.elementor .elementor-widget-button .elementor-button,
	.elementor .e-button-base:not(.qm-menu-toggle),
	.elementor .e-form-submit-button-base {
		width: 100%;
		min-inline-size: 0;
	}
}

@media (min-width: 1025px) {
	.home .qm-hero h1,
	.home .qm-hero__title {
		font-size: 56px;
	}
}

@media (min-width: 901px) {
	body.blog .qm-blog-hero {
		min-height: clamp(270px, 22.5vw, 360px);
		padding-top: clamp(113px, 11.25vw, 150px);
		padding-bottom: clamp(23px, 3vw, 41px);
	}

	body.blog .qm-blog-hero__title {
		font-size: 56px;
	}
}

.qm-blog-archive .qm-posts-list .qm-post img {
	width: 100%;
	height: auto;
	max-height: none;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.qm-blog-archive .qm-posts-list .qm-post__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	color: var(--qm-color-muted);
	font-family: var(--qm-font-primary);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}

.qm-single-article .qm-article__header {
	margin-bottom: clamp(24px, 3vw, 38px);
}

.qm-single-article .qm-blog-archive__listing {
	padding-top: clamp(40px, 4.5vw, 65px);
}

body.blog:not(.search):not(.single-post) .qm-blog-archive__listing {
	padding-top: clamp(40px, 4.5vw, 65px);
}

.qm-single-article .qm-article__header h1 {
	margin: 8px 0 0;
	color: var(--qm-color-ink);
	font-family: var(--qm-font-primary);
	font-size: clamp(32px, 3vw, 46px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.025em;
}

.qm-single-article .qm-article__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	margin: 0 0 clamp(28px, 3.5vw, 46px);
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
}

.qm-single-article .qm-article__meta {
	margin: 0 0 clamp(20px, 2.5vw, 32px);
}

.qm-single-article .entry-content {
	color: #222;
	font-size: clamp(16px, 1.2vw, 18px);
	line-height: 1.7;
}

.qm-single-article .entry-content > :first-child {
	margin-top: 0;
}

.qm-single-article .entry-content img {
	max-width: 100%;
	height: auto;
}

@media (max-width: 600px) {
	.qm-single-article .qm-blog-archive__listing {
		padding-top: 35px;
	}

	body.blog:not(.search):not(.single-post) .qm-blog-archive__listing {
		padding-top: 35px;
	}
}

/* Composición del hero exclusiva para tablets, incluida iPad Pro en vertical. */
@media (min-width: 601px) and (max-width: 1024px) {
	.home .qm-hero {
		height: 100vh;
		height: 100svh;
		min-height: 0;
		max-height: none;
	}

	.home .qm-slide {
		align-items: center;
		padding-top: clamp(150px, 14svh, 190px);
		padding-bottom: clamp(76px, 8svh, 110px);
	}

	.home .qm-hero__content {
		width: min(calc(100% - 96px), 860px);
		max-width: 860px;
		padding-top: 5svh;
	}

	.home .qm-hero h1,
	.home .qm-hero__title {
		font-size: clamp(46px, 5.8vw, 60px);
		line-height: 1.08;
	}

	.home .qm-hero p:not(.qm-hero__title) {
		max-width: 680px;
		font-size: clamp(19px, 2.2vw, 24px);
	}
}

/* Los textos de los popups replican la tipografía de las tarjetas de servicio. */
.home .qm-popup .qm-popup__col h3 {
	margin: 0 0 clamp(12px, 1.2vw, 17px);
	color: var(--qm-color-muted);
	font-family: var(--qm-font-primary);
	font-size: clamp(19px, 1.55vw, 23px);
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
}

.home .qm-popup .qm-popup__col p {
	margin: 0;
	color: #111;
	font-family: var(--qm-font-primary);
	font-size: clamp(15px, 1.15vw, 17px);
	font-weight: 400;
	line-height: 1.42;
	text-align: left;
}

.home .qm-popup .qm-popup__foot {
	margin-top: clamp(20px, 2.5vw, 36px);
}

/* Un único desplazamiento para imagen, contenido y pie del modal. */
.home .qm-popup .qm-popup__dialog {
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
}

.home .qm-popup .qm-popup__content {
	flex: 0 0 auto;
	overflow: visible;
}

@media (min-width: 601px) {
	.home .qm-popup .qm-popup__title {
		font-size: 36px;
	}

	.home .qm-popup .qm-popup__hero {
		min-height: clamp(210px, 29.4vh, 308px);
	}

	.home .qm-popup .qm-popup__content {
		padding-block: clamp(24px, 3vw, 44px);
	}
}

/* Escala tipográfica de la home en mobile: jerarquía equivalente a desktop. */
@media (max-width: 600px) {
	.home .qm-hero {
		height: 100vh;
		height: 100svh;
		min-height: 0;
		max-height: none;
	}

	.admin-bar.home .qm-hero {
		height: calc(100svh - var(--wp-admin--admin-bar--height, 46px));
	}

	[class*="elementor-kit-"] .qm-nav {
		inset: 0;
		z-index: 21;
		display: grid;
		place-items: center;
		width: 100vw;
		height: 100vh;
		height: 100svh;
		padding: clamp(80px, 18vh, 140px) 28px;
		border-radius: 0;
		background: rgba(15, 21, 22, .88);
		text-align: center;
		backdrop-filter: blur(10px);
	}

	.qm-header__inner > a {
		position: relative;
		z-index: 22;
	}

	.home .qm-hero h1,
	.home .qm-hero__title {
		font-size: clamp(34px, 9.5vw, 40px);
		line-height: 1.08;
	}

	.home .qm-hero p:not(.qm-hero__title) {
		font-size: clamp(18px, 5vw, 20px);
		line-height: 1.4;
	}

	.home .qm-title,
	.home .qm-purpose__lead h2,
	.home .qm-services__heading,
	.home .qm-team-title {
		font-size: clamp(28px, 7.5vw, 32px);
		line-height: 1.15;
	}

	.home .qm-eyebrow {
		font-size: clamp(18px, 5vw, 20px);
		line-height: 1.35;
	}

	.home .qm-member h3,
	.home .qm-value h3,
	.home .qm-service h3 {
		font-size: clamp(20px, 5.5vw, 22px);
		line-height: 1.3;
	}

	.home .qm-intro__copy p,
	.home .qm-about__copy,
	.home .qm-member > div > p,
	.home .qm-value p,
	.home .qm-service p {
		font-size: 16px;
		line-height: 1.6;
	}

	.home .qm-purpose__lead p {
		font-size: 18px;
		line-height: 1.5;
	}

	.home .qm-quote {
		font-size: clamp(21px, 5.8vw, 23px);
		line-height: 1.4;
	}

	.home .qm-member__contact a,
	.home .qm-post__date {
		font-size: 14px;
		line-height: 1.4;
	}

	.home .qm-button {
		font-size: 16px;
		line-height: 1.2;
	}

	.qm-blog-archive .qm-blog-layout {
		box-sizing: border-box;
		width: 100%;
		max-width: var(--qm-width);
		margin-inline: auto;
		padding-inline: 18px;
	}

	.qm-blog-archive .qm-blog-main,
	.qm-blog-archive .qm-blog-sidebar,
	.qm-blog-archive .qm-posts-list,
	.qm-blog-archive .qm-post {
		min-width: 0;
		max-width: 100%;
	}

	.qm-blog-archive img {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qm-button,
	.elementor .elementor-button,
	.elementor .e-button-base:not(.qm-menu-toggle),
	.elementor .e-form-submit-button-base {
		transition: none;
	}
}

