/**
 * Ajustes mobile globais (≤767px): rodapé, títulos Elementor grandes, redes da home.
 * Home hero: copy + CTAs na base do ecrã.
 */

body.home .elementor-element-fb1833b > .e-con-inner {
	align-items: flex-end;
}

body.home .elementor-element-03b714b.e-con,
body.home .elementor-element-03b714b > .e-con-inner {
	justify-content: flex-end;
}

body.home .elementor-element-40dfb12 {
	margin-top: 28px !important;
}

/* Nunca partir «Solicitar proposta» em sílabas. */
.ast-header-button-1 .ast-custom-button,
.ast-header-button-1 .ast-button {
	white-space: nowrap;
}

/*
 * Header hamburger até 1199px (o Astra só o ligava aos 921px).
 * Desktop ≥1200 continua com o menu inline.
 */
@media (max-width: 1199.98px) {
	#ast-desktop-header {
		display: none !important;
	}

	#ast-mobile-header {
		display: block !important;
	}

	#ast-mobile-header .ast-builder-grid-row {
		flex-wrap: nowrap;
		align-items: center;
	}

	#ast-mobile-header .site-logo-img img,
	#ast-mobile-header .custom-logo-link img,
	#ast-mobile-header .transparent-custom-logo img {
		width: auto !important;
		height: auto !important;
		max-height: 48px !important;
		max-width: min(220px, 42vw) !important;
		object-fit: contain !important;
		object-position: left center;
	}

	#ast-mobile-header .ast-header-button-1 .ast-custom-button,
	#ast-mobile-header .ast-header-button-1 .ast-button {
		padding: 6px 12px;
		font-size: 12px;
		line-height: 1.2;
		white-space: nowrap;
	}
}

/* iPad Air 11" e semelhantes em pé: +20% face ao hamburger landscape. */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
	#ast-mobile-header .site-logo-img img,
	#ast-mobile-header .custom-logo-link img,
	#ast-mobile-header .transparent-custom-logo img {
		max-height: 57.6px !important;
		max-width: min(264px, 50vw) !important;
	}
}

/* Telemóvel em pé: o CTA do header mobile não entra na barra (já era assim). */
@media (max-width: 767px) {
	#ast-mobile-header .ast-header-button-1 {
		display: none !important;
	}
}

/* Tablet e landscape largo (iPad deitado ~1180×820). Não mexe no retrato ≤767. */
@media (min-width: 768px) and (max-width: 1199.98px) {
	body.home .elementor-element-a9f4b8a .elementor-heading-title {
		font-size: clamp(2.4rem, 4.2vw, 3rem) !important;
		line-height: 1.12 !important;
	}

	body.home .elementor-element-97f9127 {
		padding-right: 0 !important;
		max-width: 42rem;
	}

	body.home .elementor-element-97f9127 p {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
		line-height: 1.45;
	}

	body.home .elementor-element-5f69f2f,
	body.home .elementor-element-192c9e4 {
		display: none !important;
	}
}

/* Landscape baixo (iPhone deitado ~844×390): título + lead + 2 botões. */
@media (max-width: 1199.98px) and (max-height: 499px) {
	body.home .elementor-element-fb1833b {
		--padding-top: 48px;
		--padding-bottom: 10px;
		--align-items: flex-end;
		padding-top: 44px !important;
		padding-bottom: 16px !important;
		align-items: flex-end;
		min-height: 100vh;
		min-height: 100svh;
	}

	body.home .elementor-element-fb1833b > .e-con-inner {
		flex-direction: column;
		justify-content: flex-end;
		align-items: flex-end;
	}

	body.home .elementor-element-03b714b,
	body.home .elementor-element-03b714b.e-con {
		width: 100% !important;
		max-width: 100%;
		flex: 0 0 auto;
		height: auto !important;
		min-height: 0 !important;
		align-self: flex-end;
	}

	body.home .elementor-element-03b714b > .e-con-inner {
		justify-content: flex-end;
		min-height: 0 !important;
		height: auto !important;
	}

	body.home .elementor-element-a9f4b8a .elementor-heading-title {
		font-size: clamp(1.35rem, 4.6vh, 1.85rem) !important;
		line-height: 1.1 !important;
		margin-bottom: 4px !important;
	}

	body.home .elementor-element-97f9127 {
		margin-bottom: 6px !important;
		padding-right: 0 !important;
		max-width: 42rem;
	}

	body.home .elementor-element-97f9127 p {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		font-size: 0.82rem;
		line-height: 1.3;
		margin: 0 !important;
	}

	body.home .elementor-element-40dfb12 {
		display: none !important;
	}

	body.home .elementor-element-5f69f2f,
	body.home .elementor-element-192c9e4 {
		display: none !important;
	}

	body.home .elementor-element-fb1833b .elementor-invisible,
	body.home .elementor-element-94aa7d7 {
		visibility: visible !important;
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
	}

	body.home .elementor-element-94aa7d7 {
		display: flex !important;
		margin-top: 6px !important;
	}

	body.home .elementor-element-94aa7d7 .elementor-button {
		padding: 8px 16px !important;
		font-size: 11px !important;
	}
}

@media (max-width: 767px) {
	/* Home hero: o bloco de texto e os botões assentam na base. */
	body.home .elementor-element-fb1833b {
		position: relative;
		padding-top: 96px !important;
		padding-bottom: 28px !important;
	}

	body.home .elementor-element-fb1833b > .e-con-inner {
		flex-direction: column;
		justify-content: flex-end;
		align-items: stretch;
	}

	body.home .elementor-element-03b714b {
		width: 100% !important;
		max-width: 100%;
		flex: 0 0 auto;
	}

	body.home .elementor-element-5f69f2f {
		position: absolute;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		width: auto !important;
		padding-right: 16px;
	}

	body.home .elementor-element-40dfb12 {
		margin-top: 20px !important;
	}

	/* Do Conceito à excelência: as 3 fotos preenchem a moldura. */
	body.home .elementor-2553 .elementor-element.elementor-element-bc5f822:not(.elementor-motion-effects-element-type-background),
	body.home .elementor-2553 .elementor-element.elementor-element-bc5f822 > .elementor-motion-effects-container > .elementor-motion-effects-layer,
	body.home .elementor-2553 .elementor-element.elementor-element-54178e3:not(.elementor-motion-effects-element-type-background),
	body.home .elementor-2553 .elementor-element.elementor-element-54178e3 > .elementor-motion-effects-container > .elementor-motion-effects-layer,
	body.home .elementor-2553 .elementor-element.elementor-element-88bd5db:not(.elementor-motion-effects-element-type-background),
	body.home .elementor-2553 .elementor-element.elementor-element-88bd5db > .elementor-motion-effects-container > .elementor-motion-effects-layer {
		background-size: cover !important;
		background-position: top center !important;
	}
	.site-footer .ast-builder-grid-row {
		display: flex !important;
		flex-direction: column;
		width: 100% !important;
		max-width: 100%;
	}

	.site-footer .site-footer-section,
	.site-footer .footer-widget-area {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.site-footer .wp-block-image,
	.site-footer .wp-block-image img {
		max-width: 220px !important;
		width: auto !important;
		height: auto !important;
	}

	.site-footer {
		color: #333333;
		overflow-x: clip;
	}

	/* A Urbiágua: H1 a 80px partia as palavras. */
	body.page-id-3058 h1.elementor-heading-title,
	body.ua-a-urbiagua h1.elementor-heading-title {
		font-size: clamp(2.1rem, 8.5vw, 2.75rem) !important;
		line-height: 1.12 !important;
	}

	/*
	 * A Urbiágua: o CTA tem de receber o tap.
	 * Header sticky e banner Complianz não interceptam (só ≤767px; desktop intacto).
	 */
	body.ua-a-urbiagua #masthead,
	body.ua-a-urbiagua #ast-desktop-header,
	body.ua-a-urbiagua #ast-mobile-header,
	body.ua-a-urbiagua .ast-mobile-header-wrap,
	body.ua-a-urbiagua .ast-stick-primary-header-wrapper,
	body.ua-a-urbiagua .ast-primary-header-bar,
	body.ua-a-urbiagua .main-header-bar {
		pointer-events: none;
	}

	body.ua-a-urbiagua #masthead a,
	body.ua-a-urbiagua #masthead button,
	body.ua-a-urbiagua #masthead input,
	body.ua-a-urbiagua #masthead .menu-toggle,
	body.ua-a-urbiagua #masthead .ast-button-wrap,
	body.ua-a-urbiagua #masthead .ast-header-button-1,
	body.ua-a-urbiagua #ast-mobile-header a,
	body.ua-a-urbiagua #ast-mobile-header button,
	body.ua-a-urbiagua #ast-mobile-header .menu-toggle,
	body.ua-a-urbiagua #ast-mobile-header .ast-button-wrap,
	body.ua-a-urbiagua .ast-mobile-header-wrap a,
	body.ua-a-urbiagua .ast-mobile-header-wrap button {
		pointer-events: auto;
	}

	body.ua-a-urbiagua .elementor-widget-button,
	body.ua-a-urbiagua .elementor-widget-button a.elementor-button,
	body.ua-a-urbiagua .elementor-widget-button a.elementor-button-link {
		position: relative;
		z-index: 4;
		pointer-events: auto;
	}

	body.ua-a-urbiagua .cmplz-soft-cookiewall,
	body.ua-a-urbiagua .cmplz-body-blocked {
		pointer-events: none;
	}

	body.ua-a-urbiagua #cmplz-cookiebanner-container,
	body.ua-a-urbiagua .cmplz-cookiebanner,
	body.ua-a-urbiagua .cmplz-manage-consent,
	body.ua-a-urbiagua #cmplz-manage-consent {
		pointer-events: auto;
	}

	/* Contacto: H1 a 80px partia as palavras. */
	body.page-id-312 h1.elementor-heading-title,
	body.page-id-312 h2.elementor-heading-title,
	body.ua-contacto h1.elementor-heading-title,
	body.ua-contacto h2.elementor-heading-title {
		font-size: clamp(2.1rem, 8vw, 2.7rem) !important;
		line-height: 1.15 !important;
	}

	body.home .elementor-element-192c9e4 {
		flex: 0 0 auto;
	}
}

/* Contacto: no telemóvel e no tablet o texto vem primeiro; o mapa a seguir. */
@media (max-width: 1024px) {
	body.page-id-312 .elementor-element-e1ca1fb,
	body.ua-contacto .elementor-element-e1ca1fb {
		--min-height: 0;
		min-height: 0 !important;
	}

	body.page-id-312 .elementor-element-e1ca1fb.e-con,
	body.page-id-312 .elementor-element-e1ca1fb > .e-con-inner,
	body.ua-contacto .elementor-element-e1ca1fb.e-con,
	body.ua-contacto .elementor-element-e1ca1fb > .e-con-inner {
		flex-direction: column-reverse !important;
	}

	/* Sem a min-height de 90vh do desktop, o mapa não deixa um bloco branco por baixo. */
	body.page-id-312 .elementor-element-162c4e4,
	body.ua-contacto .elementor-element-162c4e4 {
		--min-height: 0;
		min-height: 0 !important;
		height: auto !important;
	}
}

/* Árabe: formulário e WhatsApp — escrever em inglês ou francês. */
html[lang="ar"] .ua-ar-lang-note,
body.rtl .ua-ar-lang-note {
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 1px solid #236373;
	border-radius: 6px;
	background: #fff;
	font-family: Inter, sans-serif;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #003b4a;
}

html[lang="ar"] .ua-ar-lang-note p,
body.rtl .ua-ar-lang-note p {
	margin: 0 0 8px;
}

html[lang="ar"] .ua-ar-lang-note p:last-child,
body.rtl .ua-ar-lang-note p:last-child {
	margin: 0;
}

html[lang="ar"] .ua-ar-lang-note--wa,
body.rtl .ua-ar-lang-note--wa {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 0.88rem;
}

html[lang="ar"] .apoio-ar-note,
body.rtl .apoio-ar-note {
	display: none !important;
}
