/* Footer (fragmento: template-footer.html) Ã¢â‚¬â€Ã¢â‚¬â€ */
.cdp-footer {
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

.cdp-footer__main {
	background: #232629;
	color: #f5f5f5;
}

.cdp-footer__mainInner {
	max-width: var(--cdp-site-max);
	margin: 0 auto;
	padding: clamp(2.25rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem);
	display: grid;
	/* Logo só com a largura necessária; menu e contactos partilham o resto de forma equilibrada */
	grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
	column-gap: clamp(1.25rem, 3.5vw, 2.25rem);
	row-gap: clamp(1rem, 2.5vw, 1.5rem);
	align-items: start;
}

@media (max-width: 960px) {
	.cdp-footer__mainInner {
		grid-template-columns: 1fr 1fr;
	}
	.cdp-footer__social {
		grid-column: 1 / -1;
		justify-self: start;
	}
}

@media (max-width: 767px) {
	/* Coluna Ãºnica Ã  esquerda: logo â†’ redes â†’ contactos â†’ menu (ul.menu) em linha */
	.cdp-footer__mainInner {
		grid-template-columns: 1fr;
		text-align: left;
		padding-top: clamp(1.85rem, 5vw, 2.65rem);
		padding-bottom: clamp(1.85rem, 5vw, 2.65rem);
		column-gap: 0;
		row-gap: clamp(1.25rem, 3.5vw, 1.85rem);
	}

	.cdp-footer__brand {
		order: 1;
		justify-self: start;
	}

	.cdp-footer__social {
		order: 2;
		justify-self: start;
		align-self: start;
		justify-content: flex-start;
		width: auto;
		margin-top: 0.15rem;
		margin-bottom: 0.35rem;
	}

	.cdp-footer__contact {
		order: 3;
		justify-self: start;
		font-size: 0.8rem;
		line-height: 1.65;
		max-width: none;
		margin-inline: 0;
		text-align: left;
	}

	.cdp-footer__nav {
		order: 4;
		justify-self: stretch;
		align-items: flex-start;
		width: 100%;
	}

	.cdp-footer__brandImg {
		height: clamp(38px, 9vw, 50px);
	}

	/* Menu WordPress (ex.: ul#menu-menu-footer.menu) â€” sempre horizontal no mobile */
	.cdp-footer__nav ul.menu {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		column-gap: clamp(0.65rem, 2.5vw, 1.1rem);
		row-gap: 0.4rem;
		max-width: none;
		margin-inline: 0;
		width: 100%;
	}

	.cdp-footer__nav ul.menu > li {
		flex: 0 0 auto;
	}

	.cdp-footer__nav ul.menu > li > a {
		display: inline-block;
		padding: 0.4rem 0;
		white-space: nowrap;
	}

	.cdp-footer__subInner {
		padding-top: clamp(1rem, 3vw, 1.2rem);
		padding-bottom: clamp(1rem, 3vw, 1.2rem);
		gap: 1.15rem;
	}

	.cdp-footer__credit {
		font-size: 0.7rem;
		line-height: 1.5;
		max-width: 36ch;
	}

	.cdp-footer__finLogo {
		width: min(100%, 280px);
	}

	.cdp-bottom-bar {
		padding-top: 1rem;
		padding-bottom: 1rem;
	}

	.cdp-bottom-bar__finLogo {
		width: min(100%, 300px);
	}
}

.cdp-footer__brand {
	display: inline-block;
	text-decoration: none;
	line-height: 0;
}

.cdp-footer__brandImg {
	display: block;
	height: clamp(40px, 5vw, 52px);
	width: auto;
	filter: brightness(0) invert(1);
}

.cdp-footer__nav {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	font-family: var(--cdp-font-small);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.cdp-footer__nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.65rem;
	width: 100%;
}

.cdp-footer__nav .menu > li {
	margin: 0;
	padding: 0;
}

.cdp-footer__nav a {
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	transition: color 0.2s ease;
}

.cdp-footer__nav a:hover {
	color: var(--cdp-accent);
}

.cdp-footer__contact {
	margin: 0;
	font-family: var(--cdp-font-small);
	font-size: 0.82rem;
	font-weight: 400;
	font-style: normal;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.88);
}

.cdp-footer__contact a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.cdp-footer__contact a:hover {
	color: var(--cdp-accent);
}

.cdp-footer__social {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

/* SÃ³ na grelha de 4 colunas o bloco social fica Ã  direita; em â‰¤960px o prÃ³prio @media trata com justify-self: start */
@media (min-width: 961px) {
	.cdp-footer__social {
		justify-self: end;
	}
}

.cdp-footer__socialBtn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	color: #232629;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease;
}

.cdp-footer__socialBtn svg {
	width: 20px;
	height: 20px;
	display: block;
	flex-shrink: 0;
}

.cdp-footer__socialBtn:hover {
	transform: scale(1.06);
	background: #eaeaea;
}

.cdp-footer__sub {
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cdp-footer__subInner {
	max-width: var(--cdp-site-max);
	margin: 0 auto;
	padding: clamp(0.85rem, 2vw, 1.15rem) clamp(1rem, 4vw, 2.5rem);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.cdp-footer .cdp-footer__subInner {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: clamp(1rem, 3vw, 2rem);
		width: 100%;
		max-width: var(--cdp-site-max);
	}

	.cdp-footer .cdp-footer__subInner > .cdp-footer__credit {
		flex: 0 0 auto;
		margin: 0;
		max-width: none;
		text-align: left;
		white-space: nowrap;
	}

	.cdp-footer .cdp-footer__subInner > .cdp-footer__finLink {
		margin-left: auto;
		display: flex;
		justify-content: flex-end;
	}
}

@media (max-width: 767px) {
	.cdp-footer__subInner {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.cdp-footer .cdp-footer__subInner > .cdp-footer__credit {
		white-space: normal;
	}
}

.cdp-footer__finLink {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	color: inherit;
}

.cdp-footer__finLogo {
	display: block;
	width: min(100%, 450px);
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.cdp-footer__credit {
	margin: 0;
	font-family: var(--cdp-font-small);
	font-size: 0.72rem;
	color: #666;
	letter-spacing: 0.02em;
}

.cdp-footer__credit a {
	color: #444;
	text-decoration: none;
}

.cdp-footer__credit a:hover {
	color: var(--cdp-accent);
	text-decoration: underline;
}

.cdp-bottom-bar {
	min-height: 100px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
}

.cdp-bottom-bar__inner {
	width: 100%;
	max-width: var(--cdp-site-max);
	margin: 0 auto;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.cdp-bottom-bar__credit {
	margin: 0;
	font-family: var(--cdp-font-small);
	font-size: 0.72rem;
	color: #666;
	letter-spacing: 0.02em;
	text-align: left;
}

.cdp-bottom-bar__finLink {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	color: inherit;
}

.cdp-bottom-bar__finLogo {
	display: block;
	height: auto;
	width: min(100%, 500px);
	max-width: 100%;
	object-fit: contain;
	flex-shrink: 1;
}

@media (max-width: 560px) {
	.cdp-bottom-bar__inner {
		flex-direction: column;
		text-align: center;
	}

	.cdp-bottom-bar__credit {
		text-align: center;
	}
}

.cdp-bottom-bar__credit a {
	color: #444;
	text-decoration: none;
}

.cdp-bottom-bar__credit a:hover {
	color: var(--cdp-accent);
	text-decoration: underline;
}

/* Ãcones redes no rodapÃ©: sem cÃ­rculo branco em mobile (deve vir depois dos estilos base) */
@media (max-width: 767px) {
	.cdp-footer__socialBtn {
	    display: inline-flex;
	    justify-content: flex-start;
	}
	.cdp-footer__social {
		justify-self: start;
		width: 100%;
	}

	.cdp-footer__socialBtn {
		width: 48px;
		height: 30px;
		border-radius: 0;
		background: transparent;
		color: #fff;
		border: none;
		transition: color 0.2s ease, transform 0.2s ease;
	}

	.cdp-footer__socialBtn:hover {
		transform: none;
		background: transparent;
		color: var(--cdp-accent);
	}
}
