/*!
 * footer.css — Custom site footer (themes/els-roures/footer.php)
 *
 * Implementa el disseny del handoff de Claude Design ('web-elsroures-com'
 * 2026-05-14), Footer.html. Sistema:
 *  - Paleta càlida (fons cremós #F4F0E8, tinta marró fosc #2A2520)
 *  - Verd corporatiu #5BA740 com a acent (filet superior, botó newsletter,
 *    hover dels enllaços, focus ring)
 *  - Tipografies Lora (serif, només per al wordmark) + Inter (sans, tot
 *    el cos). Carregades per functions.php.
 *  - 4 tiers separats per hairlines (no per fons de color)
 *
 * Ajustos respecte al handoff original (per indicació de l'usuari):
 *  - Els 5 sellos són <img> sense caixa blanca al voltant
 *  - Els 3 logos LEADER sí mantenen caixa blanca (separa l'institucional)
 *  - Les llistes d'enllaços no porten guió "—" davant de cada item
 *  - El filet superior del footer és verd corporatiu (no gris)
 *  - Els logos de "Marca família" no porten cor decoratiu; s'usa el logo real
 */

:root {
	--er-footer-bg:        #F4F0E8;
	--er-footer-bg-soft:   #ECE6DA;
	--er-footer-ink:       #2A2520;
	--er-footer-ink-soft:  #5C5249;
	--er-footer-ink-mute:  #8A8278;
	--er-footer-line:      #E2DBCB;
	--er-footer-green:     #5BA740;
	--er-footer-green-ink: #4D8C36;
	--er-footer-gutter:    24px;
	--er-footer-gutter-lg: 48px;
}

/* ──────────────────────────────────────────
   ROOT — base
   ────────────────────────────────────────── */
.er-site-footer {
	background: var(--er-footer-bg);
	color: var(--er-footer-ink-soft);
	font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	line-height: 1.6;
	/* Filet superior verd corporatiu: signatura de marca minimalista */
	border-top: 2px solid var(--er-footer-green);
}

.er-site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 64px var(--er-footer-gutter) 24px;
}

.er-site-footer *,
.er-site-footer *::before,
.er-site-footer *::after {
	box-sizing: border-box;
}

/* Accessibilitat: text només per a screen readers */
.er-site-footer .er-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ──────────────────────────────────────────
   TIER 1 — Informació útil (4 columnes desktop)
   ────────────────────────────────────────── */
.er-footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
}

.er-footer-col__title {
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--er-footer-ink-mute);
	margin: 0 0 20px 0;
}

/* — Contacte (col 1) — */
.er-footer__brand {
	font-family: 'Lora', 'Cormorant Garamond', Georgia, serif;
	font-weight: 500;
	font-size: 22px;
	line-height: 1.2;
	color: var(--er-footer-ink);
	margin: 0 0 20px 0;
}

.er-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.er-contact-list a {
	color: var(--er-footer-ink-soft);
	text-decoration: none;
	transition: color 0.2s ease;
}

.er-contact-list a:hover,
.er-contact-list a:focus-visible {
	color: var(--er-footer-green-ink);
}

.er-contact-list address {
	font-style: normal;
	color: var(--er-footer-ink-soft);
}

/* — Xarxes socials (Facebook · Instagram · YouTube) — */
.er-contact-social {
	margin-top: 4px;
}
.er-social {
	display: flex;
	align-items: center;
	gap: 18px;
}
.er-social__link {
	display: inline-flex;
	color: var(--er-footer-ink-soft);
	transition: color 0.2s ease, transform 0.2s ease;
}
.er-social__link:hover,
.er-social__link:focus-visible {
	color: var(--er-footer-green-ink);
	transform: translateY(-1px);
}
.er-social__link svg {
	width: 22px;
	height: 22px;
	display: block;
}

/* — Llistes d'enllaços (cols 2 i 3) — Sense guió davant —
   (Ajust per indicació de l'usuari: el separador és l'espai vertical) */
.er-link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.er-link-list a {
	color: var(--er-footer-ink-soft);
	text-decoration: none;
	transition: color 0.2s ease;
}

.er-link-list a:hover,
.er-link-list a:focus-visible {
	color: var(--er-footer-green-ink);
}

/* — Newsletter (col 4) — */
.er-newsletter__intro {
	font-family: 'Lora', 'Cormorant Garamond', Georgia, serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.35;
	color: var(--er-footer-ink);
	margin: 0 0 16px 0;
	max-width: 28ch;
}

.er-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.er-newsletter-form__field {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1px solid var(--er-footer-line);
	border-radius: 2px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.er-newsletter-form__field:focus-within {
	border-color: var(--er-footer-green);
	box-shadow: 0 0 0 3px rgba(91, 167, 64, 0.15);
}

.er-newsletter-form input[type="email"] {
	flex: 1;
	border: 0;
	outline: 0;
	padding: 12px 14px;
	font: inherit;
	font-size: 14px;
	color: var(--er-footer-ink);
	background: transparent;
	min-width: 0; /* evita overflow en columnes estretes */
}

.er-newsletter-form input[type="email"]::placeholder {
	color: var(--er-footer-ink-mute);
}

.er-newsletter-form button {
	border: 0;
	background: var(--er-footer-green);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0 18px;
	cursor: pointer;
	transition: background 0.2s ease;
	white-space: nowrap;
}

.er-newsletter-form button:hover,
.er-newsletter-form button:focus-visible {
	background: var(--er-footer-green-ink);
}

.er-newsletter-form__legal {
	font-size: 12px;
	color: var(--er-footer-ink-mute);
	line-height: 1.5;
	margin: 4px 0 0;
}

.er-newsletter-form__legal a {
	color: var(--er-footer-ink-soft);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

/* ──────────────────────────────────────────
   Separador hairline — només funcional
   ────────────────────────────────────────── */
.er-footer-rule {
	border: 0;
	height: 1px;
	background: var(--er-footer-line);
	margin: 56px 0;
}

/* ──────────────────────────────────────────
   TIER 2 — Sellos i certificacions
   5 <img> en filera, alçada uniforme, sense caixa
   ────────────────────────────────────────── */
.er-seals {
	text-align: center;
}

.er-seals__title {
	margin-bottom: 24px;
}

.er-seals__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 32px;
}

.er-seal {
	flex: 0 0 auto;
}

.er-seal img {
	display: block;
	height: 60px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	/* Suau: una mica desaturat per cohesionar paletes diferents dels logos */
	transition: opacity 0.2s ease;
}

.er-seal img:hover {
	opacity: 0.8;
}

/* ──────────────────────────────────────────
   TIER 3 — Bloc institucional LEADER
   3 logos en caixes blanques (separen l'unitat institucional)
   ────────────────────────────────────────── */
.er-leader {
	background: var(--er-footer-bg-soft);
	border-radius: 4px;
	padding: 32px var(--er-footer-gutter);
}

.er-leader__title {
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--er-footer-ink-mute);
	margin: 0 0 16px 0;
}

.er-leader__body {
	font-size: 13px;
	line-height: 1.7;
	color: var(--er-footer-ink-soft);
	margin: 0 0 28px 0;
	max-width: 70ch;
}

.er-leader__body strong {
	color: var(--er-footer-ink);
	font-weight: 500;
}

.er-leader__logos {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	align-items: center;
}

.er-leader-logo {
	background: #fff;
	border: 1px solid var(--er-footer-line);
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	min-height: 96px;
}

.er-leader-logo img {
	display: block;
	max-height: 64px;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* ──────────────────────────────────────────
   TIER 4 — Strip legal
   ────────────────────────────────────────── */
.er-legal-strip {
	border-top: 1px solid var(--er-footer-line);
	margin-top: 48px;
	padding: 24px 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
	font-size: 12px;
	color: var(--er-footer-ink-mute);
}

.er-legal-strip nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	align-items: center;
}

.er-legal-strip a {
	color: var(--er-footer-ink-mute);
	text-decoration: none;
	transition: color 0.2s ease;
}

.er-legal-strip a:hover,
.er-legal-strip a:focus-visible {
	color: var(--er-footer-green-ink);
}

/* ──────────────────────────────────────────
   RESPONSIVE — desktop
   ────────────────────────────────────────── */
@media (min-width: 720px) {
	.er-footer-grid {
		grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
		gap: 56px;
	}

	.er-leader__logos {
		grid-template-columns: 1fr 1.2fr 1.4fr;
		gap: 24px;
	}

	.er-leader-logo {
		min-height: 112px;
	}

	.er-leader-logo img {
		max-height: 80px;
	}

	.er-legal-strip {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

@media (min-width: 1024px) {
	.er-site-footer__inner {
		padding: 88px var(--er-footer-gutter-lg) 32px;
	}

	.er-footer-rule {
		margin: 72px 0;
	}

	.er-seals__list {
		gap: 48px;
	}

	.er-seal img {
		height: 64px;
	}
}
