/* ==========================================================================
   Páginas legais (Política de Privacidade e Termos e Condições) — v2
   ========================================================================== */

/* Logótipo (o link aqui é "index.html", não "#hero") */
[data-header] .fb-logo-link img {
	width: 140px;
	height: auto;
}

.fb-footer-logo {
	width: 140px;
	height: auto;
}

/* ---------- Topo ---------- */
.fb-legal-hero {
	position: relative;
	overflow: hidden;
	padding: 4.5rem 0 3.5rem;
	background: #eef7e8;
	border-bottom: 1px solid #d7ebc9;
}

.dark .fb-legal-hero {
	background: #0b1511;
	border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Grelha fina e brilho (mesmo estilo da secção de Impacto) */
.fb-legal-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(63, 122, 30, 0.08) 1px, transparent 1px),
		linear-gradient(90deg, rgba(63, 122, 30, 0.08) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(ellipse at 80% 40%, #000 0%, transparent 70%);
	mask-image: radial-gradient(ellipse at 80% 40%, #000 0%, transparent 70%);
	pointer-events: none;
}

.dark .fb-legal-hero::before {
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.fb-legal-hero::after {
	content: "";
	position: absolute;
	right: -8%;
	top: -40%;
	width: 50%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(135, 230, 75, 0.22) 0%, rgba(135, 230, 75, 0) 65%);
	pointer-events: none;
}

.fb-legal-hero .container {
	position: relative;
	z-index: 1;
}

.fb-legal__back {
	display: inline-block;
	margin-bottom: 1.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #3f7a1e;
}

.dark .fb-legal__back {
	color: #87e64b;
}

.fb-legal__back:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.fb-legal__badge {
	display: table;
	margin-bottom: 1rem;
	padding: 0.3rem 0.8rem;
	border-radius: 999px !important;
	background: rgba(63, 122, 30, 0.12);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #3f7a1e;
}

.dark .fb-legal__badge {
	background: rgba(135, 230, 75, 0.12);
	color: #87e64b;
}

.fb-legal__title {
	margin: 0;
	font-size: clamp(2.1rem, 4.5vw, 3.4rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: #111827;
}

.dark .fb-legal__title {
	color: #ffffff;
}

.fb-legal__lead {
	max-width: 44rem;
	margin: 1.25rem 0 0;
	font-size: 1.1rem;
	line-height: 1.7;
	color: #4b5563;
}

.dark .fb-legal__lead {
	color: #9ca3af;
}

.fb-legal__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.75rem;
	font-size: 0.85rem;
	color: #6b7280;
}

.fb-legal__meta strong {
	font-weight: 600;
	color: #111827;
}

.dark .fb-legal__meta strong {
	color: #e5e7eb;
}

.fb-legal__dot {
	width: 4px;
	height: 4px;
	margin: 0 0.35rem;
	border-radius: 50% !important;
	background: #87e64b;
}

/* ---------- Corpo ---------- */
.fb-legal-page {
	padding: 4rem 0 6rem;
}

.dark .fb-legal-page {
	background: #0a120f;
}

.fb-legal__layout {
	display: grid;
	gap: 2.5rem;
}

@media (min-width: 1024px) {
	.fb-legal__layout {
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 4.5rem;
		align-items: start;
	}
}

/* Índice "Nesta página" */
.fb-legal__toc details {
	padding: 1.25rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
}

.dark .fb-legal__toc details {
	border-color: rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
}

@media (min-width: 1024px) {
	.fb-legal__toc {
		position: sticky;
		top: 7rem;
	}
}

.fb-legal__toc summary {
	cursor: pointer;
	list-style: none;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #111827;
}

.fb-legal__toc summary::-webkit-details-marker {
	display: none;
}

.dark .fb-legal__toc summary {
	color: #ffffff;
}

.fb-legal__toc ol {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.fb-legal__toc a {
	display: flex;
	gap: 0.65rem;
	padding: 0.45rem 0.6rem;
	border-radius: 6px;
	font-size: 0.875rem;
	line-height: 1.35;
	color: #4b5563;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.dark .fb-legal__toc a {
	color: #9ca3af;
}

.fb-legal__toc a span {
	flex: none;
	font-size: 0.75rem;
	font-weight: 700;
	color: #9ca3af;
	font-variant-numeric: tabular-nums;
}

.fb-legal__toc a:hover,
.fb-legal__toc a.is-active {
	background: rgba(135, 230, 75, 0.12);
	color: #111827;
}

.dark .fb-legal__toc a:hover,
.dark .fb-legal__toc a.is-active {
	color: #ffffff;
}

.fb-legal__toc a.is-active span {
	color: #3f7a1e;
}

.dark .fb-legal__toc a.is-active span {
	color: #87e64b;
}

/* Secções numeradas */
.fb-legal__section {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	gap: 1.25rem;
	padding: 2rem 0;
	border-top: 1px solid #eef0ec;
	scroll-margin-top: 6.5rem;
}

.fb-legal__section:first-child {
	padding-top: 0;
	border-top: 0;
}

.dark .fb-legal__section {
	border-top-color: rgba(255, 255, 255, 0.07);
}

.fb-legal__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 8px;
	background: rgba(135, 230, 75, 0.15);
	font-size: 0.85rem;
	font-weight: 800;
	color: #3f7a1e;
}

.dark .fb-legal__num {
	color: #87e64b;
}

.fb-legal__body h2 {
	margin: 0.35rem 0 0.9rem;
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.3;
	color: #111827;
}

.dark .fb-legal__body h2 {
	color: #ffffff;
}

.fb-legal__body p {
	margin: 0 0 1rem;
	font-size: 1rem;
	line-height: 1.8;
	color: #374151;
}

.dark .fb-legal__body p {
	color: #d1d5db;
}

.fb-legal__body ul {
	display: grid;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.fb-legal__body li {
	position: relative;
	padding-left: 1.5rem;
	line-height: 1.6;
	color: #374151;
}

.dark .fb-legal__body li {
	color: #d1d5db;
}

.fb-legal__body li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.6em;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 2px;
	background: #87e64b;
}

.fb-legal__body a {
	color: #3f7a1e;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dark .fb-legal__body a {
	color: #87e64b;
}

/* Cartão com os dados da empresa */
.fb-legal__card {
	margin: 0.25rem 0 0;
	padding: 0.5rem 1.25rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
}

.dark .fb-legal__card {
	border-color: rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
}

.fb-legal__card>div {
	display: grid;
	grid-template-columns: 10rem minmax(0, 1fr);
	gap: 1rem;
	padding: 0.75rem 0;
	border-top: 1px solid #eef0ec;
	font-size: 0.925rem;
}

.fb-legal__card>div:first-child {
	border-top: 0;
}

.dark .fb-legal__card>div {
	border-top-color: rgba(255, 255, 255, 0.07);
}

.fb-legal__card dt {
	color: #6b7280;
}

.fb-legal__card dd {
	margin: 0;
	font-weight: 600;
	color: #111827;
}

.dark .fb-legal__card dd {
	color: #ffffff;
}

/* Caixa "Tem dúvidas?" */
.fb-legal__help {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-top: 2.5rem;
	padding: 1.75rem 2rem;
	border: 1px solid #87e64b;
	border-radius: 8px;
	background: linear-gradient(135deg, rgba(135, 230, 75, 0.12), rgba(135, 230, 75, 0.02));
}

.fb-legal__help>div {
	flex: 1 1 22rem;
}

.fb-legal__help-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	color: #111827;
}

.dark .fb-legal__help-title {
	color: #ffffff;
}

.fb-legal__help-text {
	margin: 0.35rem 0 0;
	font-size: 0.925rem;
	color: #4b5563;
}

.dark .fb-legal__help-text {
	color: #9ca3af;
}

.fb-legal__help-btn {
	flex: none;
	padding: 0.8rem 1.5rem;
	border-radius: 8px !important;
	background: #87e64b;
	font-size: 0.9rem;
	font-weight: 700;
	color: #000 !important;
	transition: background-color 0.2s ease;
}

.fb-legal__help-btn:hover {
	background: #7dd642;
}

/* Link para a outra página legal */
.fb-legal__other {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1rem;
	padding: 1.1rem 1.5rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.dark .fb-legal__other {
	border-color: rgba(255, 255, 255, 0.08);
}

.fb-legal__other:hover {
	border-color: #87e64b;
	transform: translateY(-2px);
}

.fb-legal__other span {
	font-size: 0.85rem;
	color: #6b7280;
}

.fb-legal__other strong {
	font-weight: 700;
	color: #111827;
}

.dark .fb-legal__other strong {
	color: #ffffff;
}

/* ---------- Telemóvel ---------- */
@media (max-width: 1023px) {
	.fb-legal__toc details:not([open]) ol {
		display: none;
	}

	.fb-legal__toc summary::after {
		content: "+";
		float: right;
		font-size: 1rem;
		line-height: 1;
		color: #87e64b;
	}

	.fb-legal__toc details[open] summary::after {
		content: "–";
	}
}

@media (max-width: 767px) {
	[data-header] .fb-logo-link img {
		width: 108px;
	}

	.fb-legal-hero {
		padding: 2.5rem 0 2.25rem;
	}

	.fb-legal__back {
		margin-bottom: 1.25rem;
	}

	.fb-legal__title {
		font-size: 1.9rem;
	}

	.fb-legal__lead {
		font-size: 0.98rem;
	}

	.fb-legal-page {
		padding: 2.25rem 0 4rem;
	}

	.fb-legal__section {
		grid-template-columns: 1fr;
		gap: 0.75rem;
		padding: 1.5rem 0;
	}

	.fb-legal__num {
		width: 2.1rem;
		height: 2.1rem;
		font-size: 0.78rem;
	}

	.fb-legal__body h2 {
		margin-top: 0;
		font-size: 1.15rem;
	}

	.fb-legal__body p {
		font-size: 0.95rem;
	}

	.fb-legal__card {
		padding: 0.25rem 1rem;
	}

	.fb-legal__card>div {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}

	.fb-legal__help {
		padding: 1.4rem 1.25rem;
	}

	.fb-legal__help-btn {
		width: 100%;
		text-align: center;
	}
}