/*
Theme Name: ALM
Theme URI: https://example.org/
Description: Tema do site da ALM — Autonomia, Liberdade e Movimento · Associação para a Lesão Medular. Tema de blocos: todos os conteúdos são editáveis no editor do WordPress.
Author: Zematek
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: alm
*/

/* ==========================================================================
   0. Fichas de desenho (tokens)
   ========================================================================== */
:root {
	--alm-raio-s: 12px;
	--alm-raio-m: 20px;
	--alm-raio-l: 28px;
	--alm-raio-xl: 40px;
	--alm-sombra-suave: 0 1px 2px rgba(3, 43, 87, 0.06), 0 12px 32px -16px rgba(3, 43, 87, 0.28);
	--alm-sombra-elevada: 0 2px 4px rgba(3, 43, 87, 0.06), 0 24px 48px -20px rgba(3, 43, 87, 0.38);
	--alm-linha: rgba(6, 67, 131, 0.12);
	--alm-foco: 0 0 0 3px #fff, 0 0 0 6px var(--wp--preset--color--azul-escuro);
	--alm-transicao: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

html { scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }
::selection { background: var(--wp--preset--color--pessego); color: var(--wp--preset--color--azul-escuro); }

/* Foco visível e consistente em todos os elementos interativos */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--azul-escuro);
	outline-offset: 3px;
	border-radius: 4px;
}
.has-azul-background-color :where(a, button):focus-visible,
.has-azul-escuro-background-color :where(a, button):focus-visible { outline-color: var(--wp--preset--color--laranja-luz); }

/* Ligação para saltar para o conteúdo (acessibilidade) */
.alm-saltar {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--azul-escuro);
	color: #fff;
	font-weight: 700;
	border-radius: 999px;
}
.alm-saltar:focus { left: 1rem; top: 1rem; color: #fff; }

/* ==========================================================================
   1. Cabeçalho fixo, translúcido
   ========================================================================== */
.alm-cabecalho {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid transparent;
	transition: box-shadow var(--alm-transicao), border-color var(--alm-transicao);
}
.alm-cabecalho.has-background {
	background-color: rgba(255, 255, 255, 0.86) !important;
	-webkit-backdrop-filter: saturate(1.6) blur(14px);
	backdrop-filter: saturate(1.6) blur(14px);
	box-shadow: 0 1px 0 var(--alm-linha);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.alm-cabecalho.has-background { background-color: #fff !important; }
}
/* Sombra que aparece só depois de começar a descer a página */
@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.alm-cabecalho {
			animation: alm-cabecalho-sombra linear both;
			animation-timeline: scroll(root);
			animation-range: 0 120px;
		}
	}
}
@keyframes alm-cabecalho-sombra {
	to { box-shadow: 0 1px 0 var(--alm-linha), 0 12px 28px -18px rgba(3, 43, 87, 0.45); }
}
.admin-bar .alm-cabecalho { top: var(--wp-admin--admin-bar--height, 0); }
/* O cabeçalho vive dentro do invólucro da parte de modelo: é esse que fica fixo. */
.wp-site-blocks > .wp-block-template-part:has(> .alm-cabecalho) {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .alm-cabecalho) { top: var(--wp-admin--admin-bar--height, 0); }
.wp-site-blocks > .wp-block-template-part > .alm-cabecalho { position: relative; top: 0; }
@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .alm-cabecalho) { top: 0; }
}
.alm-cabecalho .wp-block-site-logo img { width: 52px; height: auto; transition: transform var(--alm-transicao); }
.alm-cabecalho .wp-block-site-logo a:hover img { transform: rotate(-6deg) scale(1.04); }
.alm-cabecalho .wp-block-site-tagline { margin-top: 0.15rem; }
.alm-cabecalho .wp-block-button__link { white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 601px) {
	.alm-cabecalho .wp-block-site-tagline { display: none; }
}
@media (max-width: 600px) {
	.alm-cabecalho .wp-block-site-tagline { display: none; }
	.alm-cabecalho .alm-botao-doar { display: none; }
}

/* Navegação: itens em "pílula", alvo de toque ≥ 44px */
.alm-cabecalho .wp-block-navigation .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.15rem;
	border-radius: 999px;
	transition: color var(--alm-transicao);
	position: relative;
}
@media (min-width: 600px) {
	.alm-cabecalho .wp-block-navigation__container { gap: 0.1rem !important; }
	.alm-cabecalho .wp-block-navigation .wp-block-navigation-item__content { padding: 0 0.6rem; white-space: nowrap; }
	.alm-cabecalho .wp-block-navigation .wp-block-navigation-item__content:hover {
		background: var(--wp--preset--color--nevoa);
		color: var(--wp--preset--color--azul);
	}
}
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--laranja-texto); }
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--azul);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--laranja);
	text-decoration-thickness: 3px;
	text-underline-offset: 8px;
}
/* Menu móvel em ecrã inteiro */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--papel) !important;
	padding: 1.5rem clamp(1rem, 5vw, 2rem) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.35rem;
	font-weight: 600;
	min-height: 48px;
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	display: inline-grid;
	place-items: center;
	border-radius: 999px;
}
.wp-block-navigation__responsive-container-open { background: var(--wp--preset--color--nevoa); color: var(--wp--preset--color--azul); }

/* ==========================================================================
   2. Botões (pílula, micro-interações)
   ========================================================================== */
.wp-element-button,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	transition: transform var(--alm-transicao), box-shadow var(--alm-transicao), background-color var(--alm-transicao), color var(--alm-transicao), border-color var(--alm-transicao);
}
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(3, 43, 87, 0.55); }
.wp-block-button__link:active { transform: translateY(0); }
.wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--azul-escuro); outline-offset: 3px; }
.has-azul-background-color .wp-block-button__link:focus-visible,
.has-azul-escuro-background-color .wp-block-button__link:focus-visible { outline-color: var(--wp--preset--color--laranja-luz); }

/* Botões contorno */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--azul);
	box-shadow: none;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--azul-escuro);
	border-color: var(--wp--preset--color--azul-escuro);
	color: #fff;
	box-shadow: 0 14px 28px -14px rgba(3, 43, 87, 0.55);
}
.has-azul-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.has-azul-escuro-background-color .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
.has-azul-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-azul-escuro-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: #fff;
	border-color: #fff;
	color: var(--wp--preset--color--azul-escuro);
}

/* Ligação com seta ("Conheça…", "Ler mais") */
.alm-ligacao-seta a,
.alm-cartao--ligacao p:last-child a,
.wp-block-post-excerpt__more-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	min-height: 44px;
	font-family: var(--wp--preset--font-family--titulos);
	font-weight: 600;
	text-decoration: none;
}
.alm-ligacao-seta a::after,
.alm-cartao--ligacao p:last-child a::before,
.wp-block-post-excerpt__more-link::after {
	content: "→";
	display: inline-block;
	transition: transform var(--alm-transicao);
}
.alm-ligacao-seta a:hover::after,
.wp-block-post-excerpt__more-link:hover::after { transform: translateX(4px); }
.alm-ligacao-seta a:hover,
.wp-block-post-excerpt__more-link:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ==========================================================================
   3. Cores sobre fundos azuis
   ========================================================================== */
.has-azul-background-color, .has-azul-escuro-background-color { color: #fff; }
.has-azul-background-color :where(h1, h2, h3, h4, a:not(.wp-block-button__link)),
.has-azul-escuro-background-color :where(h1, h2, h3, h4, a:not(.wp-block-button__link)) { color: #fff; }

/* Sobretítulo (pequena etiqueta por cima dos títulos) */
.alm-sobretitulo {
	font-family: var(--wp--preset--font-family--titulos);
	font-size: 0.85rem !important;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--laranja-texto);
	margin-bottom: 0.5rem !important;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.alm-sobretitulo::before {
	content: "";
	width: 1.75rem;
	height: 3px;
	border-radius: 3px;
	background: var(--wp--preset--color--laranja);
	flex: none;
}
.alm-sobretitulo.has-text-align-center { justify-content: center; }
.alm-sobretitulo.has-text-align-center::after {
	content: "";
	width: 1.75rem;
	height: 3px;
	border-radius: 3px;
	background: var(--wp--preset--color--laranja);
	flex: none;
}
/* Laranja claro: contraste 5,4:1 sobre o azul (o laranja da marca fica em 3,8:1) */
.has-azul-background-color .alm-sobretitulo,
.has-azul-escuro-background-color .alm-sobretitulo { color: var(--wp--preset--color--laranja-luz); }

/* ==========================================================================
   4. Cartões (cantos generosos, camadas, hover)
   ========================================================================== */
.alm-cartao {
	border-radius: var(--alm-raio-l);
	height: 100%;
	position: relative;
	box-sizing: border-box;
	transition: transform var(--alm-transicao), box-shadow var(--alm-transicao);
}
.alm-cartao.has-nevoa-background-color { box-shadow: inset 0 0 0 1px rgba(6, 67, 131, 0.07); }
.alm-cartao.has-areia-background-color { box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.1); }
.alm-cartao.has-branco-background-color { box-shadow: var(--alm-sombra-suave), inset 0 0 0 1px var(--alm-linha); }
.alm-cartao.has-azul-background-color {
	background-image: radial-gradient(120% 90% at 100% 0%, rgba(244, 130, 30, 0.28), transparent 55%);
	box-shadow: var(--alm-sombra-suave);
}
.alm-cartao > :first-child { margin-top: 0; }

/* Cartão totalmente clicável (a ligação "estica" sobre o cartão) */
.alm-cartao--ligacao p:last-child a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 1;
}
.alm-cartao--ligacao p:last-child a:focus-visible { outline: none; }
.alm-cartao--ligacao:has(a:focus-visible) { outline: 3px solid var(--wp--preset--color--azul-escuro); outline-offset: 4px; }
.alm-cartao--ligacao.has-azul-background-color:has(a:focus-visible) { outline-color: var(--wp--preset--color--laranja-texto); }
.alm-cartao--ligacao:hover { transform: translateY(-4px); box-shadow: var(--alm-sombra-elevada), inset 0 0 0 1px var(--alm-linha); }
.alm-cartao--ligacao p:last-child { margin-top: auto; padding-top: 0.5rem; }
.alm-cartao--ligacao p:last-child a { color: var(--wp--preset--color--azul); }
.alm-cartao--ligacao.has-azul-background-color p:last-child a { color: #fff; }
.alm-cartao--ligacao p:last-child a::before { order: 2; }
.alm-cartao--ligacao:hover p:last-child a::before { transform: translateX(4px); }

/* Ícones (SVG em linha via CSS, sem HTML extra nos blocos) */
.alm-icone::before {
	content: "";
	display: block;
	width: 3.25rem;
	height: 3.25rem;
	margin-bottom: 1.1rem;
	border-radius: 16px;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.6rem;
	box-shadow: 0 6px 16px -10px rgba(3, 43, 87, 0.45);
	transition: transform var(--alm-transicao);
}
.alm-cartao:hover.alm-icone::before { transform: rotate(-6deg) scale(1.05); }
.alm-icone.has-branco-background-color::before { background-color: var(--wp--preset--color--pessego); box-shadow: none; }
.alm-icone.has-azul-background-color::before { background-color: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
/* ICONES:INICIO */
.alm-icone--autonomia::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m16.24 7.76-2.12 6.36-6.36 2.12 2.12-6.36z'/></svg>"); }
.alm-icone--liberdade::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12.67 19a2 2 0 0 0 1.42-.59l6.15-6.17a6 6 0 0 0-8.49-8.49L5.59 9.91A2 2 0 0 0 5 11.33V18a1 1 0 0 0 1 1z'/><path d='M16 8 2 22'/><path d='M17.5 15H9'/></svg>"); }
.alm-icone--movimento::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='16' cy='4' r='1'/><path d='m18 19 1-7-6 1'/><path d='m5 8 3-3 5.5 3-2.36 3.5'/><path d='M4.24 14.5a5 5 0 0 0 6.88 6'/><path d='M13.76 17.5a5 5 0 0 0-6.88-6'/></svg>"); }
.alm-icone--socio::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>"); }
.alm-icone--donativo::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/></svg>"); }
.alm-icone--empresas::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/><path d='M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2'/><path d='M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2'/><path d='M10 6h4M10 10h4M10 14h4M10 18h4'/></svg>"); }
.alm-icone--ajuda::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23064383' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/><path d='M8 12h.01M12 12h.01M16 12h.01'/></svg>"); }
.alm-icone.has-azul-background-color.alm-icone--ajuda::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/><path d='M8 12h.01M12 12h.01M16 12h.01'/></svg>"); }
.alm-contacto--telefone::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A84C08' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/></svg>"); }
.alm-contacto--email::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A84C08' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='20' height='16' x='2' y='4' rx='2'/><path d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/></svg>"); }
.alm-contacto--sede::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A84C08' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/><circle cx='12' cy='10' r='3'/></svg>"); }
.alm-contacto--redes::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A84C08' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='18' cy='5' r='3'/><circle cx='6' cy='12' r='3'/><circle cx='18' cy='19' r='3'/><path d='m8.59 13.51 6.83 3.98M15.41 6.51l-6.82 3.98'/></svg>"); }
/* ICONES:FIM */

.alm-numero {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 16px;
	background: var(--wp--preset--color--laranja);
	color: var(--wp--preset--color--azul-escuro);
	font-family: var(--wp--preset--font-family--titulos);
	font-weight: 700;
	font-size: 1.25rem !important;
	margin: 0 !important;
	box-shadow: 0 10px 20px -12px rgba(168, 76, 8, 0.8);
	position: relative;
	z-index: 1;
}

/* ==========================================================================
   5. Página inicial
   ========================================================================== */

/* Herói: gradiente suave, forma orgânica, imagem em destaque */
.alm-hero {
	position: relative;
	overflow: clip;
	isolation: isolate;
	background-image:
		radial-gradient(60% 80% at 95% 10%, rgba(244, 130, 30, 0.22), transparent 60%),
		radial-gradient(70% 90% at 0% 100%, rgba(3, 43, 87, 0.75), transparent 70%);
	border-radius: 0 0 var(--alm-raio-xl) var(--alm-raio-xl);
}
.alm-hero::before {
	/* Anel decorativo, discreto */
	content: "";
	position: absolute;
	z-index: -1;
	width: min(70vw, 760px);
	aspect-ratio: 1;
	right: -18%;
	top: -30%;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.07);
	box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.02);
	pointer-events: none;
}
.alm-hero h1 {
	font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.6rem) !important;
	margin-top: 0.25rem;
}
.alm-hero .has-laranja-color { margin-top: 0.75rem; }
.alm-hero .has-medio-font-size { color: rgba(255, 255, 255, 0.92); max-width: 36rem; }
.alm-hero__media { position: relative; }
.alm-hero__media::before {
	/* Forma orgânica laranja por trás da fotografia */
	content: "";
	position: absolute;
	inset: 8% -6% -7% 10%;
	border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
	background: linear-gradient(140deg, var(--wp--preset--color--laranja), #f9a64f);
	opacity: 0.95;
	z-index: 0;
}
.alm-hero__media .wp-block-image { position: relative; z-index: 1; margin: 0; }
.alm-hero__media .wp-block-image img {
	border-radius: var(--alm-raio-xl) var(--alm-raio-xl) var(--alm-raio-xl) 120px;
	aspect-ratio: 4 / 3.4;
	object-fit: cover;
	width: 100%;
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
@media (max-width: 781px) {
	.alm-hero__media { margin-top: var(--wp--preset--spacing--40); padding-right: 6%; }
	.alm-hero__media::before { inset: 10% 0 -6% 14%; }
}

/* Secções com cantos curvos: transição suave entre cores */
.alm-seccao-curva {
	border-radius: var(--alm-raio-xl);
	margin-left: clamp(0.5rem, 2vw, 1.5rem) !important;
	margin-right: clamp(0.5rem, 2vw, 1.5rem) !important;
	width: auto !important;
}
.alm-seccao-curva.alignfull { max-width: none; }

/* Grelhas "bento" */
.wp-block-columns.alm-bento {
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
	grid-template-columns: 1fr;
}
.wp-block-columns.alm-bento > .wp-block-column { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.wp-block-columns.alm-bento > .wp-block-column > .alm-cartao { flex: 1; display: flex; flex-direction: column; }
@media (min-width: 640px) {
	.wp-block-columns.alm-bento--ajudar { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 782px) {
	.wp-block-columns.alm-bento--pilares { grid-template-columns: repeat(3, 1fr); align-items: start; }
	.wp-block-columns.alm-bento--pilares > .wp-block-column:nth-child(2) { margin-top: 2.5rem; }
	.wp-block-columns.alm-bento--pilares > .wp-block-column:nth-child(3) { margin-top: 1.25rem; }
	.wp-block-columns.alm-bento--ajudar {
		grid-template-columns: 1.15fr 1fr 1fr;
		grid-template-areas: "a b d" "a c d";
	}
	.alm-bento--ajudar > .wp-block-column:nth-child(1) { grid-area: a; }
	.alm-bento--ajudar > .wp-block-column:nth-child(2) { grid-area: b; }
	.alm-bento--ajudar > .wp-block-column:nth-child(3) { grid-area: c; }
	.alm-bento--ajudar > .wp-block-column:nth-child(4) { grid-area: d; }
	.alm-bento--ajudar > .wp-block-column:nth-child(1) .alm-cartao {
		background-color: var(--wp--preset--color--pessego) !important;
		box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.12);
		background-image: radial-gradient(90% 70% at 100% 0%, rgba(244, 130, 30, 0.22), transparent 60%);
	}
	.alm-bento--ajudar > .wp-block-column:nth-child(1) .alm-cartao::before { background-color: #fff; }
	.alm-bento--ajudar > .wp-block-column:nth-child(1) h3 { font-size: var(--wp--preset--font-size--grande) !important; }
	/* Cartões altos: ícone em cima, texto em baixo */
	.alm-bento--ajudar > .wp-block-column:is(:nth-child(1), :nth-child(4)) .alm-cartao > h3 { margin-top: auto; padding-top: 2rem; }
	.alm-bento--ajudar > .wp-block-column:is(:nth-child(1), :nth-child(4)) .alm-cartao > p:last-child { margin-top: 0.5rem; }
	.alm-bento--ajudar > .wp-block-column:nth-child(4) h3 { font-size: var(--wp--preset--font-size--grande) !important; }
}
.alm-bento--pilares .alm-cartao h3 { margin-top: 0; }

/* "Porque existimos": título fixo + lista em cartões */
@media (min-width: 782px) {
	.alm-fixo { position: sticky; top: 7rem; align-self: flex-start; }
}
ul.alm-lista-cartoes { list-style: none; padding: 0; display: grid; gap: 0.75rem; counter-reset: alm-lista; }
ul.alm-lista-cartoes > li {
	position: relative;
	margin: 0;
	padding: 1.1rem 1.25rem 1.1rem 3.6rem;
	background: rgba(255, 255, 255, 0.75);
	border-radius: var(--alm-raio-m);
	box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.1);
	counter-increment: alm-lista;
}
ul.alm-lista-cartoes > li::before {
	content: counter(alm-lista, decimal-leading-zero);
	position: absolute;
	left: 1.1rem;
	top: 1.1rem;
	font-family: var(--wp--preset--font-family--titulos);
	font-weight: 700;
	color: var(--wp--preset--color--laranja-texto);
}

/* Passos 1-2-3 ligados por uma linha */
.wp-block-columns.alm-passos { position: relative; }
.wp-block-columns.alm-passos > .wp-block-column {
	background: var(--wp--preset--color--papel);
	border-radius: var(--alm-raio-l);
	padding: var(--wp--preset--spacing--40);
	box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.08);
	position: relative;
}
@media (min-width: 782px) {
	.wp-block-columns.alm-passos::before {
		content: "";
		position: absolute;
		left: 8%;
		right: 8%;
		top: calc(var(--wp--preset--spacing--40) + 1.5rem);
		border-top: 2px dashed rgba(244, 130, 30, 0.55);
		z-index: 0;
	}
}

/* Secção da citação */
.alm-seccao-citacao .wp-block-quote { position: relative; padding-top: 2.75rem; }
.alm-seccao-citacao .wp-block-quote::before {
	content: "“";
	position: absolute;
	left: 1.1rem;
	top: -1.25rem;
	font-family: var(--wp--preset--font-family--titulos);
	font-size: 6rem;
	line-height: 1;
	color: var(--wp--preset--color--laranja);
	opacity: 0.55;
}
.alm-imagem-organica img {
	border-radius: 46% 54% 42% 58% / 52% 44% 56% 48% !important;
	aspect-ratio: 1;
	object-fit: cover;
	box-shadow: 0 0 0 10px #fff, var(--alm-sombra-elevada);
}

/* ==========================================================================
   6. Páginas interiores
   ========================================================================== */
.alm-cabecalho-pagina {
	position: relative;
	overflow: clip;
	isolation: isolate;
	border-radius: 0 0 var(--alm-raio-xl) var(--alm-raio-xl);
	background-image: radial-gradient(50% 120% at 100% 0%, rgba(244, 130, 30, 0.16), transparent 60%);
}
.alm-cabecalho-pagina::before,
.alm-cabecalho-pagina::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
	pointer-events: none;
}
.alm-cabecalho-pagina::before {
	width: clamp(140px, 22vw, 300px);
	aspect-ratio: 1;
	right: clamp(-60px, -2vw, 0px);
	bottom: -35%;
	background: linear-gradient(140deg, var(--wp--preset--color--laranja), #f9a64f);
	opacity: 0.85;
}
.alm-cabecalho-pagina::after {
	width: clamp(90px, 12vw, 160px);
	aspect-ratio: 1;
	right: clamp(90px, 18vw, 300px);
	top: -30%;
	background: rgba(6, 67, 131, 0.08);
}
.alm-cabecalho-pagina h1 { max-width: min(100%, 16ch + 30vw); }
.alm-cabecalho-pagina h1::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 5px;
	border-radius: 5px;
	margin-top: 1rem;
	background: var(--wp--preset--color--laranja);
}
@media (max-width: 600px) {
	.alm-cabecalho-pagina::before { opacity: 0.35; }
	.alm-cabecalho-pagina::after { display: none; }
}

/* Primeiro parágrafo destacado (lead) */
.alm-conteudo > p.has-medio-font-size:first-child {
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem) !important;
	line-height: 1.55;
	color: var(--wp--preset--color--azul-escuro);
}
.alm-conteudo > h2 { margin-top: var(--wp--preset--spacing--60); }
.alm-conteudo :where(h2) { font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem) !important; }
.alm-conteudo .alignwide { max-width: min(100%, 1000px) !important; }
.alm-conteudo > h2 + * { margin-top: var(--wp--preset--spacing--30); }

/* Listas com marcadores da marca */
.alm-conteudo ul.wp-block-list:not(.alm-lista-simples):not(.alm-lista-cartoes),
.alm-seccao-curva ul.wp-block-list:not(.alm-lista-simples):not(.alm-lista-cartoes) { list-style: none; padding-left: 0; }
.alm-conteudo ul.wp-block-list:not(.alm-lista-simples):not(.alm-lista-cartoes) > li {
	position: relative;
	padding-left: 1.75rem;
}
.alm-conteudo ul.wp-block-list:not(.alm-lista-simples):not(.alm-lista-cartoes) > li + li { margin-top: 0.6rem; }
.alm-conteudo ul.wp-block-list:not(.alm-lista-simples):not(.alm-lista-cartoes) > li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.62em;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--laranja);
	box-shadow: 0 0 0 4px rgba(244, 130, 30, 0.18);
}
.has-azul-background-color ul.wp-block-list > li::before { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15); }

/* Listas numeradas = passos */
.alm-conteudo ol.wp-block-list {
	list-style: none;
	padding-left: 0;
	counter-reset: alm-passo;
	display: grid;
	gap: 0.75rem;
}
.alm-conteudo ol.wp-block-list > li {
	counter-increment: alm-passo;
	position: relative;
	padding: 1rem 1.25rem 1rem 4.25rem;
	min-height: 3rem;
	background: var(--wp--preset--color--papel);
	border-radius: var(--alm-raio-m);
	box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.1);
}
.alm-conteudo ol.wp-block-list > li::before {
	content: counter(alm-passo);
	position: absolute;
	left: 1rem;
	top: 0.9rem;
	width: 2.25rem;
	height: 2.25rem;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: var(--wp--preset--color--laranja);
	color: var(--wp--preset--color--azul-escuro);
	font-family: var(--wp--preset--font-family--titulos);
	font-weight: 700;
}

/* Colunas de texto simples dentro das páginas → mini-cartões */
.alm-conteudo > .wp-block-columns:not(:has(.wp-block-image, .alm-cartao, .wpcf7, .alm-contacto)) > .wp-block-column {
	background: var(--wp--preset--color--papel);
	border-radius: var(--alm-raio-l);
	padding: var(--wp--preset--spacing--40);
	box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.08);
}
.alm-conteudo > .wp-block-columns:not(:has(.wp-block-image, .alm-cartao, .wpcf7, .alm-contacto)) > .wp-block-column > :first-child { margin-top: 0; }
.alm-conteudo .alm-cartao { height: auto; }
.alm-conteudo > .alm-cartao + .alm-cartao { margin-top: 1rem; }

/* Contactos com ícones */
.alm-contacto {
	position: relative;
	padding: 0.9rem 1rem 0.9rem 4.1rem;
	min-height: 3.25rem;
	background: var(--wp--preset--color--papel);
	border-radius: var(--alm-raio-m);
	box-shadow: inset 0 0 0 1px rgba(168, 76, 8, 0.08);
}
.alm-contacto::before {
	content: "";
	position: absolute;
	left: 0.9rem;
	top: 0.9rem;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 12px;
	background-color: var(--wp--preset--color--pessego);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.25rem;
}
.alm-contacto a { font-family: var(--wp--preset--font-family--titulos); font-weight: 600; }
.alm-painel-formulario {
	background: var(--wp--preset--color--nevoa);
	border-radius: var(--alm-raio-l);
	padding: var(--wp--preset--spacing--40) !important;
}
.alm-painel-formulario > h2:first-child { margin-top: 0; }

/* Imagens */
.alm-imagem-arredondada img { border-radius: var(--alm-raio-l); }
.wp-block-image.alm-imagem-arredondada img { box-shadow: var(--alm-sombra-suave); }
/* Galerias: fotos verticais não devem ficar compridas demais */
.wp-block-gallery.alm-imagem-arredondada.is-cropped .wp-block-image img { aspect-ratio: 4 / 5; height: auto; }
.wp-block-gallery.alm-imagem-arredondada.is-cropped .wp-block-image { flex-grow: 0; }

/* Citação */
.wp-block-quote {
	border-radius: 0 var(--alm-raio-m) var(--alm-raio-m) 0;
}
.wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: var(--wp--preset--font-family--texto);
	font-size: 1rem;
	font-style: normal;
	font-weight: 700;
	color: var(--wp--preset--color--laranja-texto);
}
.wp-block-quote cite::before { content: "— "; }

/* Separador */
.wp-block-separator:not(.has-background) { border-top-width: 3px; border-radius: 3px; }

/* ==========================================================================
   7. Barra de progresso dos equipamentos ([alm_progresso])
   ========================================================================== */
.alm-progresso { margin: 1rem 0 0; }
.alm-progresso__barra {
	height: 14px;
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(6, 67, 131, 0.18), inset 0 2px 4px rgba(3, 43, 87, 0.08);
}
.alm-progresso__preenchido {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--wp--preset--color--laranja), #f9a64f);
	min-width: 14px;
	box-shadow: 0 0 0 1px rgba(168, 76, 8, 0.25);
}
@media (prefers-reduced-motion: no-preference) {
	.alm-progresso__preenchido { animation: alm-encher 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; transform-origin: left; }
}
@keyframes alm-encher { from { transform: scaleX(0); } }
.alm-progresso__legenda {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	font-size: 0.95rem;
	margin-top: 0.5rem;
	color: var(--wp--preset--color--cinza);
}
.alm-progresso__legenda strong { color: var(--wp--preset--color--texto); }

/* Marcadores de dados em falta — devem desaparecer antes de publicar */
mark.alm-falta {
	background: #fff3a6;
	color: #5a3b00;
	border: 1px dashed #b88a00;
	border-radius: 6px;
	padding: 0.05em 0.35em;
	font-size: 0.92em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
footer mark.alm-falta { white-space: nowrap; }

/* ==========================================================================
   8. Notícias
   ========================================================================== */
.alm-titulo-listagem::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 5px;
	border-radius: 5px;
	margin-top: 1rem;
	background: var(--wp--preset--color--laranja);
}
.alm-cartao--noticia { overflow: hidden; display: flex; flex-direction: column; }
.alm-cartao--noticia:hover { transform: translateY(-4px); box-shadow: var(--alm-sombra-elevada), inset 0 0 0 1px var(--alm-linha); }
.alm-cartao--noticia .wp-block-post-featured-image { overflow: hidden; border-radius: 14px; }
.alm-cartao--noticia .wp-block-post-featured-image img { transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.alm-cartao--noticia:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.alm-cartao--noticia .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--azul); }
.alm-cartao--noticia .wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	border-radius: 999px;
}
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--azul); color: #fff; }
.wp-block-post-navigation-link a { display: inline-flex; min-height: 44px; align-items: center; }

/* ==========================================================================
   9. Rodapé
   ========================================================================== */
.alm-rodape {
	position: relative;
	overflow: clip;
	isolation: isolate;
	border-radius: var(--alm-raio-xl) var(--alm-raio-xl) 0 0;
	background-image: radial-gradient(50% 70% at 100% 0%, rgba(244, 130, 30, 0.16), transparent 60%);
	margin-top: var(--wp--preset--spacing--60) !important;
}
.alm-rodape a { color: #fff; text-underline-offset: 3px; }
.alm-rodape a:hover { color: var(--wp--preset--color--laranja-luz); }
.alm-rodape .wp-block-image img { max-width: 170px; }
.alm-rodape h2 { letter-spacing: 0; }
.alm-rodape .alm-lista-simples a { display: inline-flex; align-items: center; min-height: 32px; }
.alm-rodape .wp-block-separator { width: 100%; max-width: none; opacity: 1; background-color: rgba(255, 255, 255, 0.14) !important; color: rgba(255, 255, 255, 0.14) !important; border: 0; height: 1px; }

/* Crédito no rodapé: "Made with ♥ ☕ ✦, by Zematek" com ícones. */
.alm-credito {
	font-size: 0.85rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em;
	margin: 0.25rem 0 0;
	color: rgba(255, 255, 255, 0.88);
}
.alm-credito__item { display: inline-flex; align-items: center; }
.alm-credito__icone { display: block; transition: transform var(--alm-transicao); }
.alm-credito:hover .alm-credito__icone--love { transform: scale(1.2); }
.alm-credito__icone--love { color: #F4821E; }
.alm-credito__icone--coffee { color: #E8C9A0; }
.alm-credito__icone--belief { color: #FFD166; }
.alm-credito a { color: inherit; font-weight: 700; }
.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Listas sem marcadores (rodapé, listas de ligações) */
ul.alm-lista-simples { list-style: none; padding-left: 0; }
ul.alm-lista-simples li + li { margin-top: 0.35rem; }

/* ==========================================================================
   10. Formulários (Contact Form 7)
   ========================================================================== */
.wpcf7 {
	background: var(--wp--preset--color--nevoa);
	border-radius: var(--alm-raio-l);
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: inset 0 0 0 1px rgba(6, 67, 131, 0.07);
}
.alm-painel-formulario .wpcf7 { background: transparent; padding: 0; box-shadow: none; }
.wpcf7 form { display: grid; gap: 1.1rem; }
.wpcf7 label { display: block; font-weight: 700; color: var(--wp--preset--color--azul-escuro); }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.8rem 1rem;
	min-height: 48px;
	border: 2px solid #b9c8da;
	border-radius: 14px;
	font: inherit;
	color: var(--wp--preset--color--texto);
	background: #fff;
	transition: border-color var(--alm-transicao), box-shadow var(--alm-transicao);
}
.wpcf7 input:hover, .wpcf7 select:hover, .wpcf7 textarea:hover { border-color: #8aa3c0; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus {
	outline: 3px solid var(--wp--preset--color--laranja);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--azul);
}
.wpcf7 .wpcf7-acceptance label, .wpcf7 .wpcf7-list-item label { font-weight: 400; color: var(--wp--preset--color--texto); }
.wpcf7 input[type="checkbox"], .wpcf7 input[type="radio"] { width: 1.25rem; height: 1.25rem; accent-color: var(--wp--preset--color--azul); vertical-align: -0.2em; margin-right: 0.4rem; }
.wpcf7 .wpcf7-submit {
	justify-self: start;
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1.9rem;
	min-height: 48px;
	background: var(--wp--preset--color--laranja);
	color: var(--wp--preset--color--azul-escuro);
	font-family: var(--wp--preset--font-family--titulos);
	font-weight: 600;
	font-size: 1.05rem;
	cursor: pointer;
	box-shadow: 0 8px 20px -10px rgba(168, 76, 8, 0.55);
	transition: transform var(--alm-transicao), background-color var(--alm-transicao), color var(--alm-transicao), box-shadow var(--alm-transicao);
}
.wpcf7 .wpcf7-submit:hover { background: var(--wp--preset--color--azul-escuro); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(3, 43, 87, 0.55); }
.wpcf7 .wpcf7-submit:focus-visible { outline: 3px solid var(--wp--preset--color--azul-escuro); outline-offset: 3px; }
.wpcf7 .wpcf7-not-valid-tip { color: #b3261e; font-weight: 700; font-size: 0.95rem; margin-top: 0.35rem; }
.wpcf7 form .wpcf7-response-output { border-radius: 14px; margin: 0; padding: 0.75rem 1rem; }
/* Campos dos formulários não ultrapassam a largura do contentor. */
.wpcf7 input, .wpcf7 select, .wpcf7 textarea { box-sizing: border-box; max-width: 100%; }
.wpcf7 form > p { margin: 0; }
.alm-nota { font-size: 0.95rem; color: var(--wp--preset--color--cinza); }

/* IBAN fácil de copiar */
.alm-iban {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem) !important;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--azul-escuro);
	background: #fff;
	border: 2px dashed var(--wp--preset--color--laranja);
	border-radius: 16px;
	padding: 0.9rem 1.1rem;
	user-select: all;
	word-break: break-word;
	box-shadow: 0 6px 16px -12px rgba(168, 76, 8, 0.6);
}

/* ==========================================================================
   11. Animações de entrada (scroll-driven), só no site e só se o
       utilizador não pediu para reduzir o movimento.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.wp-site-blocks main :is(.alm-cartao, .alm-passos > .wp-block-column, .alm-lista-cartoes > li, .wp-block-image, .alm-contacto, .wpcf7, .alm-conteudo ol.wp-block-list > li) {
			animation: alm-entrar linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 55%;
		}
		.wp-site-blocks .alm-hero__media .wp-block-image,
		.wp-site-blocks .alm-hero__media { animation: none; }
	}
	/* Herói: entrada suave no carregamento (funciona em todos os browsers) */
	.wp-site-blocks .alm-hero__texto > * { animation: alm-subir 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.wp-site-blocks .alm-hero__texto > :nth-child(2) { animation-delay: 60ms; }
	.wp-site-blocks .alm-hero__texto > :nth-child(3) { animation-delay: 120ms; }
	.wp-site-blocks .alm-hero__texto > :nth-child(4) { animation-delay: 180ms; }
	.wp-site-blocks .alm-hero__texto > :nth-child(5) { animation-delay: 240ms; }
	.wp-site-blocks .alm-hero__media { animation: alm-surgir 900ms 150ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes alm-entrar {
	from { opacity: 0; transform: translateY(28px) scale(0.985); }
	to { opacity: 1; transform: none; }
}
@keyframes alm-subir {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}
@keyframes alm-surgir {
	from { opacity: 0; transform: translateY(24px) scale(0.97); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}

/* Logótipos dos parceiros: mesma altura, sem esticar */
.wp-block-image.alm-logo-parceiro { margin-bottom: var(--wp--preset--spacing--30); }
.wp-block-image.alm-logo-parceiro img { height: 96px; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--alm-raio-s, 8px); }
