/**
 * Versão 1 — Editorial / Premium (inspirada em referência externa, adaptada)
 * Tom pedra quente, título enorme a duas cores/duas linhas, foto a sangrar
 * na base do hero, secções em linha mista (não cartões empilhados iguais).
 * Nada copiado da referência: só a lógica de proporção e ritmo.
 */
body.wl-variant-v1 {
	--wp--preset--color--base: #F1EDE6;
	--wp--preset--color--surface: #FFFFFF;
	--wp--preset--color--ink: #1B1A17;
	--wp--preset--color--muted: #6E675C;
	--wp--preset--color--line: #E2DCCE;
	--wp--preset--color--primary: #12303A;
	--wp--preset--color--primary-dark: #0B2028;
	--wp--preset--color--accent: #D6402A;
	--wp--preset--color--accent-dark: #B3311D;
	--wp--preset--color--signal: #D6402A;
	--wp--preset--color--signal-dark: #B3311D;
	--wp--preset--color--on-primary: #F4F1EA;
	--wp--custom--radius--sm: 3px;
	--wp--custom--radius--md: 6px;
	--wp--custom--radius--lg: 10px;
	--wp--custom--shadow--card: none;
	--wp--custom--shadow--lift: none;
	background: var(--wp--preset--color--base);
}

body.wl-variant-v1 :where(h1,h2,h3,h4) {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	letter-spacing: -0.02em;
}
body.wl-variant-v1 h1 { font-size: clamp(3rem, 6.2vw, 5.25rem); line-height: 0.98; }
body.wl-variant-v1 h1 em { color: var(--wp--preset--color--accent); font-style: normal; }
body.wl-variant-v1 h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
body.wl-variant-v1 .wl-eyebrow {
	font-family: var(--wp--preset--font-family--text);
	font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
	color: var(--wp--preset--color--ink) !important;
	display: inline-flex; align-items: center; gap: 0.6em;
}
body.wl-variant-v1 .wl-eyebrow::before {
	content: ""; width: 0.6em; height: 0.6em; border-radius: 2px;
	background: var(--wp--preset--color--accent); transform: rotate(45deg);
	display: inline-block;
}

/* Botão chunky, sem arredondar muito, com "aceno" gráfico discreto */
body.wl-variant-v1 .wl-btn { border-radius: var(--wp--custom--radius--sm); font-weight: 700; padding: 1em 1.6em; }
body.wl-variant-v1 .wp-block-button__link { border-radius: var(--wp--custom--radius--sm); font-weight: 700; }

/* Secções em linha mista: slots com só a borda de cima, não caixa fechada */
body.wl-variant-v1 .is-style-card,
body.wl-variant-v1 .wl-card > a {
	border: 0;
	border-top: 3px solid var(--wp--preset--color--ink);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
body.wl-variant-v1 .wl-card > a:hover { border-top-color: var(--wp--preset--color--accent); }
body.wl-variant-v1 .wl-card__title { font-family: var(--wp--preset--font-family--display); font-size: 1.3rem; }

/* Sidebar — secundária de forma inequívoca: sem caixa fechada, tipografia
 * mais pequena, só uma régua fina a separar dos widgets. É a mesma lógica
 * em toda a V1: nunca compete visualmente com o corpo principal. */
body.wl-variant-v1 .wl-landing__aside .is-style-card {
	background: transparent !important; border: 0;
	border-top: 3px solid var(--wp--preset--color--ink);
	border-radius: 0; padding: 1.5rem 0 !important; box-shadow: none;
}
body.wl-variant-v1 .wl-landing__aside,
body.wl-variant-v1 .wl-local-context { font-size: 0.9rem; }
body.wl-variant-v1 .wl-local-context__body h3,
body.wl-variant-v1 .wl-local-context__body h4,
body.wl-variant-v1 .wl-weather__title {
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
	border-top-color: var(--wp--preset--color--line);
}
/* O widget do tempo por defeito vem com caixa fechada (borda+fundo); na V1
 * despe-se dessa caixa para não destoar dos outros widgets "sem caixa" da
 * sidebar — o separador entre widgets já vem do .wl-sidebar-widget. */
body.wl-variant-v1 .wl-weather {
	border: 0; border-radius: 0; padding: 0; background: transparent;
}
body.wl-variant-v1 .wl-weather__now { margin-top: .5rem; }
body.wl-variant-v1 .wl-weather__temp { font-family: var(--wp--preset--font-family--display); }
body.wl-variant-v1 .wl-sidebar-widget + .wl-sidebar-widget { border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--30); }

/* FAQ — títulos no estilo display, régua fina a separar, sem sombra. */
body.wl-variant-v1 .wl-faq .wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1.4rem 0;
}
body.wl-variant-v1 .wl-faq .wp-block-details summary {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.15rem; font-weight: 700;
}

/* Passos numerados: número grande a condizer com a escala tipográfica da V1 */
body.wl-variant-v1 .wl-steps li::before {
	background: var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--sm);
	font-family: var(--wp--preset--font-family--display);
}

/* Rodapé: título "Whatleaks" do rodapé acompanha a escala display da V1 */
body.wl-variant-v1 .wl-site-footer h2,
body.wl-variant-v1 .wl-site-footer h3 { font-family: var(--wp--preset--font-family--display); }

body.wl-variant-v1 .wl-main section,
body.wl-variant-v1 .wl-landing section { padding-top: 5.5rem; padding-bottom: 5.5rem; }

/* Hero V1: bloco de texto amplo em cima, foto a sangrar a toda a largura na
 * base do hero — diferente do hero cheio de A e do assimétrico de B/C. */
.wl-hero-v1 { background: var(--wp--preset--color--base); }
.wl-hero-v1__text { padding: 4.5rem 0 3rem; }
/* Nas páginas de concelho, a navegação já fixa a abertura da página. A
   redução no bloco interno aproxima as migalhas cerca de 20% no total. */
.single-wl_localidade .wl-hero-v1__text { padding-top: 2.5rem; }
.wl-hero-v1__photo { position: relative; }
.wl-hero-v1__photo .wp-block-post-featured-image { margin: 0; }
.wl-hero-v1__photo .wp-block-post-featured-image img {
	width: 100%; aspect-ratio: 24 / 9; height: auto;
	min-height: 300px; max-height: 520px;
	object-fit: cover; object-position: var(--wl-focal, 50% 45%); display: block;
}

/* Secção "Falar com um técnico" / "Pedir orçamento": a coluna de texto à
 * esquerda ficava com pouca massa visual ao lado do cartão do formulário.
 * Uma foto no final da coluna aproxima as duas alturas sem forçar layout
 * artificial — reutiliza a imagem de destaque do próprio conteúdo (nunca
 * uma imagem nova), por isso funciona em qualquer localidade/página. */
.wl-cta-v1__photo { margin-top: 1.75rem; }
.wl-cta-v1__photo .wp-block-post-featured-image { margin: 0; }
.wl-cta-v1__photo .wp-block-post-featured-image img {
	width: 100%; aspect-ratio: 16 / 9; height: auto; max-height: 19rem;
	object-fit: cover; object-position: var(--wl-focal, 50% 45%); display: block;
	border-radius: var(--wp--custom--radius--md, 6px);
}

/* Tablet e mobile: menos respiro vertical, hero mais compacto */
@media (max-width: 1024px) {
	body.wl-variant-v1 .wl-main section,
	body.wl-variant-v1 .wl-landing section { padding-top: 4rem; padding-bottom: 4rem; }
	.wl-hero-v1__text { padding: 3rem 0 2.5rem; }
}
@media (max-width: 600px) {
	.wl-hero-v1__text { padding: 2rem 0 2rem; }
	.wl-hero-v1__photo .wp-block-post-featured-image img { aspect-ratio: 3 / 2; min-height: 220px; }
	.wl-cta-v1__photo .wp-block-post-featured-image img { aspect-ratio: 3 / 2; min-height: 180px; }
	body.wl-variant-v1 h1 { font-size: clamp(2.1rem, 9vw, 2.75rem); }
}

/* =====================================================================
 * ARQUÉTIPOS EDITORIAIS DAS PÁGINAS LOCAIS
 * Mesma linguagem visual V1 (cor, tipografia, ritmo); o que muda é a
 * silhueta da página — composição do hero, lado da barra lateral e
 * posição dos blocos secundários. Ver templates/single-wl_localidade-arq-*.
 * ===================================================================== */

/* --- Hero dividido (arquétipos B e E) --- */
.wl-hero-split { background: var(--wp--preset--color--base); }
.wl-hero-split__photo .wp-block-post-featured-image { margin: 0; }
.wl-hero-split__photo .wp-block-post-featured-image img {
	width: 100%; aspect-ratio: 5 / 4; height: auto; max-height: 26rem;
	object-fit: cover; object-position: var(--wl-focal, 50% 45%); display: block;
	border-radius: var(--wp--custom--radius--md, 6px);
}
body.wl-variant-v1 .wl-hero-split h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }

/* --- Arquétipo C: foto primeiro, barra lateral à esquerda --- */
.wl-hero-c__photo .wp-block-post-featured-image { margin: 0; }
.wl-hero-c__photo .wp-block-post-featured-image img {
	width: 100%; aspect-ratio: 24 / 9; height: auto;
	min-height: 280px; max-height: 460px;
	object-fit: cover; object-position: var(--wl-focal, 50% 45%); display: block;
}
.wl-hero-c__text { background: var(--wp--preset--color--base); }
body.wl-variant-v1 .wl-hero-c__text h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
body.wl-arq-c .wl-proof-band h3 { color: inherit; }
body.wl-arq-c .wl-proof-band .wp-block-column + .wp-block-column {
	border-left: 1px solid rgba(255, 255, 255, .18);
	padding-left: var(--wp--preset--spacing--50);
}

/* --- Arquétipo D: hero escuro e compacto + faixa de foto estreita --- */
body.wl-arq-d .wl-hero-d h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
body.wl-arq-d .wl-hero-d .wl-breadcrumbs,
body.wl-arq-d .wl-hero-d .wl-breadcrumbs a { color: rgba(255, 255, 255, .72); }
body.wl-arq-d .wl-hero-d__cta { display: flex; justify-content: flex-end; }
body.wl-arq-d .wl-hero-d__cta .wl-btn { font-size: 1.05rem; padding: 1.1em 1.8em; }
.wl-strip-photo .wp-block-post-featured-image { margin: 0; }
.wl-strip-photo .wp-block-post-featured-image img {
	width: 100%; aspect-ratio: 7 / 2; height: auto;
	min-height: 200px; max-height: 330px;
	object-fit: cover; object-position: var(--wl-focal, 50% 40%); display: block;
}

/* --- Arquétipo E: corpo a largura inteira + faixa de widgets no fim --- */
body.wl-arq-e .wl-arq-e__body > .entry-content > p,
body.wl-arq-e .wl-arq-e__body > .entry-content > ul,
body.wl-arq-e .wl-arq-e__body > .entry-content > ol { max-width: 70ch; }
body.wl-arq-e .wl-widget-band .wl-sidebar-widget { font-size: 0.9rem; }
body.wl-arq-e .wl-widget-band .wl-sidebar-widget + .wl-sidebar-widget { border-top: 0; padding-top: 0; }
body.wl-arq-e .wl-widget-band .is-style-card {
	border-top: 3px solid var(--wp--preset--color--ink);
	padding-top: 1.25rem !important;
}

/* --- Correções responsivas dos arquétipos --- */
@media (max-width: 781px) {
	/* Arquétipo C: em mobile o conteúdo principal tem de vir antes da
	   barra lateral, apesar de no HTML a lateral aparecer primeiro. */
	body.wl-arq-c .wl-landing__main { order: 1; }
	body.wl-arq-c .wl-landing__aside { order: 2; }

	.wl-hero-split__photo .wp-block-post-featured-image img { aspect-ratio: 3 / 2; min-height: 190px; }
	body.wl-arq-d .wl-hero-d__cta { justify-content: flex-start; }
	.wl-strip-photo .wp-block-post-featured-image img { aspect-ratio: 2 / 1; min-height: 160px; }
	body.wl-arq-c .wl-proof-band .wp-block-column + .wp-block-column {
		border-left: 0; padding-left: 0;
		border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 1.25rem;
	}
}
