/**
 * Projetos, contacto, rodapé e ritmo tipográfico global
 */

/* —— Ritmo global (menos texto “embolado”) —— */
.mf-wrap :where(p, li) {
	line-height: 1.7;
}

.mf-wrap p + p {
	margin-top: 0.85em;
}

.mf-wrap :where(h1, h2, h3, h4) {
	line-height: 1.25;
	margin-bottom: 0.65em;
}

.mf-wrap :where(h1, h2, h3, h4) + p,
.mf-wrap :where(h1, h2, h3, h4) + ul {
	margin-top: 0.5em;
}

.mf-wrap ul.wp-block-list {
	display: flex;
	flex-direction: column;
	gap: 0.45em;
}

/* Stats do CV — alinhamento interno */
.mf-cv-stat p {
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
}

/* Cards de plugins — espaço entre badge e título */
.mf-plugin-card h4 {
	margin-top: 0.15rem;
}

.mf-plugin-card__badge + h4 {
	margin-top: 0.35rem;
}

.mf-plugin-card .wp-block-group {
	height: 100%;
}

/* —— Hero de páginas internas —— */
.mf-page-hero {
	background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
	color: #f8fafc;
	padding: clamp(2.5rem, 6vw, 4rem) 0;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.mf-page-hero--compact {
	padding: clamp(2rem, 4vw, 3rem) 0;
}

.mf-page-hero .ft1-eyebrow {
	color: #94a3b8;
}

.mf-page-hero h1 {
	color: #fff;
	font-size: clamp(1.85rem, 4vw, 2.5rem);
	margin: 0.35rem 0 0.75rem;
	max-width: 20ch;
}

.mf-page-hero__lead {
	font-size: clamp(1rem, 2vw, 1.125rem);
	line-height: 1.75 !important;
	color: #cbd5e1;
	max-width: 42rem;
	margin: 0;
}

.mf-projects-main,
.mf-contact-main {
	max-width: none;
}

.mf-contact-main .wp-block-post-content,
.mf-projects-main .wp-block-post-content {
	padding-left: 0;
	padding-right: 0;
}

/* —— Grelha de projetos —— */
.mf-projects-grid,
.mf-projects-archive .mf-projects-grid,
.mf-projects-grid .wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: clamp(1.25rem, 3vw, 2rem);
	align-items: stretch;
}

.mf-project-card {
	background: #fff;
	border: 1px solid #e8ecf1;
	border-radius: 12px;
	padding: 0 0 1.15rem;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mf-project-card:hover {
	border-color: #c4b5fd;
	box-shadow: 0 12px 32px rgba(80, 58, 168, 0.1);
}

.mf-project-card .wp-block-post-featured-image {
	margin: 0;
}

.mf-project-card .wp-block-post-featured-image img {
	width: 100%;
	display: block;
	border-radius: 0 !important;
}

.mf-project-card .wp-block-post-title {
	margin: 1rem 1.1rem 0.35rem;
	font-size: 1rem !important;
	line-height: 1.4 !important;
}

.mf-project-card .wp-block-post-title a {
	text-decoration: none;
	color: #0f172a;
}

.mf-project-card__terms,
.mf-project-card .wp-block-post-terms {
	margin: 0 1.1rem 0;
	font-size: 0.75rem;
}

.mf-project-card .wp-block-post-excerpt {
	margin: 0.5rem 1.1rem 0;
	font-size: 0.88rem;
	line-height: 1.6;
	color: #64748b;
}

.mf-projects-heading {
	padding-top: 0.5rem;
	padding-bottom: 1.5rem;
}

/* Single projeto */
.mf-project-single .wp-block-post-content {
	max-width: 52rem;
}

.mf-project-single .wp-block-post-content p {
	line-height: 1.75;
}

/* —— Contacto —— */
.mf-contact-hero {
	background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
	color: #f8fafc;
}

.mf-contact-hero h1 {
	color: #fff;
}

.mf-contact-body {
	padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.mf-contact-grid {
	gap: clamp(1.5rem, 3vw, 2.5rem) !important;
	align-items: stretch !important;
}

.mf-contact-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.5rem 1.6rem;
	height: 100%;
	box-sizing: border-box;
}

.mf-contact-card h3 {
	margin-top: 0;
	font-size: 1.1rem;
}

.mf-contact-card p:last-child {
	margin-bottom: 0;
}

.mf-contact-note {
	background: var(--wp--preset--color--accent-5, #fbfaf3);
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid #503aa8;
	max-width: 52rem;
}

.mf-contact-note p {
	margin: 0;
	line-height: 1.7;
}

.mf-contact-cta {
	text-align: center;
	padding-bottom: 1rem;
}

.mf-contact-cta .wp-block-buttons {
	justify-content: center;
	gap: 0.75rem;
}

/* —— Rodapé simplificado —— */
.mf-footer {
	background: #0f172a;
	color: #94a3b8;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	margin-top: 0;
}

.mf-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: space-between;
	align-items: center;
}

.mf-footer .wp-block-site-title a {
	color: #f8fafc;
	text-decoration: none;
	font-weight: 600;
}

.mf-footer__copy {
	margin: 0.35rem 0 0 !important;
	color: #64748b !important;
	line-height: 1.5 !important;
}

.mf-footer .wp-block-navigation a {
	color: #cbd5e1;
	text-decoration: none;
	font-size: 0.9rem;
}

.mf-footer .wp-block-navigation a:hover {
	color: #fff;
}

@media (max-width: 600px) {
	.mf-footer__inner > .wp-block-group {
		width: 100%;
	}

	.mf-footer .wp-block-navigation {
		width: 100%;
	}
}
