/* Escola Privada Palmo e Meio
   Cores do logótipo; decoração tirada do mundo da escola:
   caderno pautado, polaroides com fita-cola, letra à mão, quadro de giz,
   ramos como os do louro do emblema e ondas entre secções. */
.pm-site {
	--pm-verde: #077B07;
	--pm-folha: #2CAF07;
	--pm-claro: #39B54A;
	--pm-mata: #1B5B06;
	--pm-ouro: #F0C506;
	--pm-ouro-escuro: #C9A000;
	--pm-papel: #F4F7F1;
	--pm-areia: #FBF4DF;
	--pm-tinta: #1D2A1C;
	--pm-suave: #4A5A48;
	--pm-linha: #DCE6DA;
	--pm-onda-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V20C120 2 240 2 360 20S600 38 720 20 960 2 1080 20 1320 38 1440 20V40Z'/%3E%3C/svg%3E");
	--pm-ramo-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cpath d='M4 56C40 42 78 26 116 6' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='28' cy='38' rx='12' ry='5' transform='rotate(-55 28 38)'/%3E%3Cellipse cx='36' cy='54' rx='12' ry='5' transform='rotate(12 36 54)'/%3E%3Cellipse cx='60' cy='24' rx='12' ry='5' transform='rotate(-55 60 24)'/%3E%3Cellipse cx='70' cy='40' rx='12' ry='5' transform='rotate(12 70 40)'/%3E%3Cellipse cx='92' cy='10' rx='11' ry='4.5' transform='rotate(-55 92 10)'/%3E%3Cellipse cx='102' cy='25' rx='11' ry='4.5' transform='rotate(12 102 25)'/%3E%3C/svg%3E");
	margin: 0;
	color: var(--pm-tinta);
	font-family: "Nunito", system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.65;
}
body.pm-site { background: #fff; }
.pm-site *, .pm-site *::before, .pm-site *::after { box-sizing: border-box; }
.pm-site h1, .pm-site h2, .pm-site h3 {
	font-family: "Baloo 2", "Nunito", sans-serif;
	color: var(--pm-mata);
	line-height: 1.15;
	margin: 0 0 .5em;
	letter-spacing: 0;
	text-transform: none;
}
.pm-site h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; }
.pm-site h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; }
.pm-site h3 { font-size: 1.3rem; font-weight: 700; }
.pm-site p { margin: 0 0 1em; color: inherit; }
.pm-site a { color: var(--pm-verde); }
.pm-site img { max-width: 100%; display: block; }
.pm-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; position: relative; }

.pm-saltar { position: absolute; left: -9999px; }
.pm-saltar:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; }

/* Letra à mão */
.pm-mao, .pm-sobre-titulo {
	font-family: "Caveat", "Comic Sans MS", cursive;
	font-weight: 700;
	font-size: 1.65rem;
	line-height: 1.1;
	color: var(--pm-verde);
	margin: 0 0 .25em !important;
	letter-spacing: 0;
	text-transform: none;
	display: inline-block;
	transform: rotate(-2deg);
}
.pm-mao--ouro { color: var(--pm-ouro); }

/* Risco de marcador por baixo de uma palavra */
.pm-risco { position: relative; white-space: nowrap; }
.pm-risco::after {
	content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .32em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8C30 3 60 11 92 6S152 2 197 7' fill='none' stroke='%23F0C506' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Ramo de folhas (como o louro do emblema) */
.pm-ramo {
	position: absolute; width: 150px; height: 75px; pointer-events: none;
	background: currentColor;
	-webkit-mask: var(--pm-ramo-svg) center / contain no-repeat;
	mask: var(--pm-ramo-svg) center / contain no-repeat;
}

/* Ondas entre secções */
.pm-onda { position: relative; }
.pm-onda::before {
	content: ""; position: absolute; left: 0; right: 0; top: -39px; height: 40px; z-index: 1;
	background: var(--onda, #fff);
	-webkit-mask: var(--pm-onda-svg) center / 100% 100% no-repeat;
	mask: var(--pm-onda-svg) center / 100% 100% no-repeat;
	pointer-events: none;
}

/* Botões com "degrau", como peças de brincar */
.pm-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 24px; border-radius: 14px;
	font-weight: 800; text-decoration: none !important; line-height: 1.2;
	border: 2px solid transparent; transition: transform .12s ease, box-shadow .12s ease;
}
.pm-btn--ouro { background: var(--pm-ouro); color: var(--pm-mata) !important; box-shadow: 0 4px 0 var(--pm-ouro-escuro); }
.pm-btn--ouro:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--pm-ouro-escuro); }
.pm-btn--linha { border-color: rgba(255,255,255,.85); color: #fff !important; }
.pm-btn--linha:hover { background: rgba(255,255,255,.12); }
.pm-acoes { display: flex; flex-wrap: wrap; gap: 14px; }

/* Topo e cabeçalho com recorte ondulado */
.pm-topo { background: var(--pm-mata); color: #E6F0E4; font-size: .88rem; }
.pm-topo__in { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.pm-topo a { color: #fff; text-decoration: none; margin-left: 18px; }
.pm-cab { background: #fff; position: sticky; top: 0; z-index: 50; }
.pm-cab::after {
	content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px;
	background: radial-gradient(circle at 10px 0, #fff 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
	filter: drop-shadow(0 2px 1px rgba(27,91,6,.12));
	pointer-events: none;
}
.admin-bar .pm-cab { top: 32px; }
.pm-cab__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; }
.pm-marca { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.pm-marca img { width: 62px; height: 62px; object-fit: contain; }
.pm-marca__nome { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.45rem; line-height: 1; color: var(--pm-verde); }
.pm-marca__nome small { display: block; font-size: .8rem; font-weight: 700; color: var(--pm-suave); margin-bottom: 3px; }
.pm-nav { display: flex; align-items: center; gap: 24px; }
.pm-nav a:not(.pm-btn) { color: var(--pm-tinta); text-decoration: none; font-weight: 700; padding: 6px 0; background: linear-gradient(var(--pm-ouro), var(--pm-ouro)) left bottom / 0 3px no-repeat; transition: background-size .2s; }
.pm-nav a:not(.pm-btn):hover { background-size: 100% 3px; }
.pm-nav__cta { min-height: 44px; padding: 10px 18px; }
.pm-cab__abrir { display: none; }

/* Hero */
.pm-hero { background: var(--pm-verde); color: #fff; padding: 78px 0 96px; position: relative; overflow: hidden; }
.pm-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; background: #fff;
	-webkit-mask: var(--pm-onda-svg) center / 100% 100% no-repeat; mask: var(--pm-onda-svg) center / 100% 100% no-repeat;
}
.pm-hero .pm-ramo { color: rgba(255,255,255,.12); }
.pm-ramo--a { width: 260px; height: 130px; left: -40px; bottom: 40px; transform: rotate(-12deg); }
.pm-ramo--b { width: 220px; height: 110px; right: -30px; top: 30px; transform: scaleX(-1) rotate(-20deg); }
.pm-hero__grelha { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.pm-hero h1 { color: #fff; }
.pm-hero__lead { font-size: 1.15rem; color: #EAF5E8; max-width: 34em; margin-bottom: 28px !important; }
.pm-estrelas { margin: 48px 0 0 !important; color: #EAF5E8; font-weight: 700; font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.pm-estrelas b { color: #fff; }
.pm-estrelas span { color: var(--pm-ouro); }

/* Polaroide com fita-cola */
.pm-polaroide {
	background: #fff; padding: 12px 12px 14px; margin: 0;
	box-shadow: 0 10px 24px rgba(15,40,10,.18), 0 1px 2px rgba(15,40,10,.2);
	position: relative; transform: rotate(-1.5deg);
}
.pm-polaroide::before {
	content: ""; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px; margin-left: -48px;
	background: rgba(240,197,6,.6); transform: rotate(-3deg);
	box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
.pm-polaroide .pm-img { border-radius: 0; aspect-ratio: 4 / 3; }
.pm-polaroide figcaption, .pm-polaroide h3 {
	font-family: "Caveat", cursive; font-weight: 700; font-size: 1.6rem; color: var(--pm-tinta);
	text-align: center; margin: 10px 0 0; line-height: 1.1; transform: none;
}
.pm-hero .pm-polaroide { transform: rotate(2.5deg); }

/* Secções */
.pm-sec { padding: 92px 0; }
.pm-sec--papel { background: var(--pm-papel); --onda: var(--pm-papel); }
.pm-sec--areia { background: var(--pm-areia); --onda: var(--pm-areia); }
.pm-cabsec { max-width: 720px; margin-bottom: 44px; }
.pm-cabsec > p:last-child { color: var(--pm-suave); font-size: 1.08rem; }

/* Imagens e espaços reservados */
.pm-img { width: 100%; object-fit: cover; border-radius: 14px; }
.pm-img--vazia {
	display: flex; align-items: center; justify-content: center;
	min-height: 200px; aspect-ratio: 4 / 3; background: var(--pm-claro);
	color: #fff; font-weight: 700; font-size: .95rem; text-align: center; padding: 16px;
}

/* Níveis de ensino */
.pm-niveis { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.pm-nivel__img { aspect-ratio: 16 / 10; margin-bottom: 22px; border-radius: 22px 22px 22px 4px; }
.pm-nivel:nth-child(2) .pm-nivel__img { border-radius: 22px 22px 4px 22px; }
.pm-nivel h3 { color: var(--pm-verde); }

/* Caderno pautado */
.pm-caderno {
	position: relative; padding: 30px 40px 0 96px;
	background:
		linear-gradient(90deg, transparent 70px, #E9A4A4 70px, #E9A4A4 72px, transparent 72px),
		repeating-linear-gradient(#FFFEF8 0 33px, #CFE0EE 33px 34px);
	box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 30px rgba(15,40,10,.1);
	border-radius: 4px;
	transform: rotate(-.6deg);
}
.pm-caderno::before {
	/* furos da argola */
	content: ""; position: absolute; left: 24px; top: 30px; bottom: 30px; width: 18px;
	background: radial-gradient(circle, var(--pm-papel) 6px, rgba(0,0,0,.12) 7px, transparent 8px) 0 0 / 18px 68px repeat-y;
}
.pm-sec--areia .pm-caderno::before { background-image: radial-gradient(circle, var(--pm-areia) 6px, rgba(0,0,0,.12) 7px, transparent 8px); }
.pm-razoes { list-style: none; margin: 0; padding: 0; counter-reset: razao; display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.pm-razoes li { counter-increment: razao; position: relative; padding-left: 64px; min-height: 68px; margin-bottom: 34px; }
.pm-razoes li::before {
	content: counter(razao); position: absolute; left: 0; top: -2px; width: 50px; height: 50px;
	display: flex; align-items: center; justify-content: center;
	font-family: "Caveat", cursive; font-weight: 700; font-size: 2rem; color: var(--pm-verde);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M31 6C15 5 5 17 6 31s12 24 26 23 23-12 22-26S43 5 25 9' fill='none' stroke='%23F0C506' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pm-razoes h3 { margin: 0; line-height: 34px; font-size: 1.25rem; }
.pm-razoes p { margin: 0; line-height: 34px; color: var(--pm-suave); }

/* Vida escolar: polaroides espalhadas */
.pm-cartoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 28px; padding-top: 14px; }
.pm-cartoes > *, .pm-razoes > *, .pm-niveis > * { min-width: 0; }
.pm-cartao .pm-polaroide { margin-bottom: 22px; }
.pm-cartao:nth-child(2) .pm-polaroide { transform: rotate(1.8deg); }
.pm-cartao:nth-child(3) .pm-polaroide { transform: rotate(-.8deg); }
.pm-cartao:nth-child(4) .pm-polaroide { transform: rotate(2.2deg); }
.pm-cartao:nth-child(2) .pm-polaroide::before { background: rgba(57,181,74,.45); transform: rotate(4deg); }
.pm-cartao:nth-child(4) .pm-polaroide::before { background: rgba(57,181,74,.45); }
.pm-cartao p { color: var(--pm-suave); font-size: .98rem; }

/* Escola e família: balões de conversa */
.pm-familia, .pm-dois { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.pm-familia .pm-ramo { color: rgba(44,175,7,.18); right: -20px; top: -60px; width: 200px; height: 100px; }
.pm-baloes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pm-baloes li {
	position: relative; max-width: 86%; padding: 14px 20px;
	background: #fff; border-radius: 20px 20px 20px 6px;
	font-weight: 700; color: var(--pm-mata);
	box-shadow: 0 2px 0 rgba(27,91,6,.08);
}
.pm-baloes li::after {
	content: ""; position: absolute; left: 14px; bottom: -9px;
	border: 10px solid transparent; border-top-color: #fff; border-left-width: 0;
}
.pm-baloes li:nth-child(even) {
	align-self: flex-end; background: #DFF2D8; border-radius: 20px 20px 6px 20px;
}
.pm-baloes li:nth-child(even)::after { left: auto; right: 14px; border-top-color: #DFF2D8; border-left-width: 10px; border-right-width: 0; }

/* Quadro de giz */
.pm-quadro {
	position: relative; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
	padding: 48px 52px;
	background:
		radial-gradient(ellipse at 18% 30%, rgba(255,255,255,.07), transparent 45%),
		radial-gradient(ellipse at 80% 75%, rgba(255,255,255,.05), transparent 40%),
		#1E4A19;
	border: 14px solid #9A6B3F;
	border-radius: 8px;
	box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), 0 14px 30px rgba(15,40,10,.2);
	color: #fff;
}
.pm-quadro::after {
	/* pedaço de giz no rebordo */
	content: ""; position: absolute; right: 60px; bottom: -14px; width: 46px; height: 9px;
	background: #F6F2E6; border-radius: 3px; transform: translateY(-2px) rotate(-2deg);
}
.pm-quadro h2 { color: #fff; font-family: "Caveat", cursive; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; margin-bottom: .2em; }
.pm-quadro p { color: #DCE8D8; max-width: 38em; margin: 0; }
.pm-quadro .pm-mao { color: var(--pm-ouro); }

/* Contactos */
.pm-contactos { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.pm-dados { margin: 0; display: grid; gap: 4px; }
.pm-dados dt { font-weight: 800; color: var(--pm-verde); margin-top: 14px; }
.pm-dados dd { margin: 0; font-size: 1.05rem; }
.pm-dados small { color: var(--pm-suave); }
.pm-mapa { position: relative; background: #fff; padding: 10px; box-shadow: 0 10px 24px rgba(15,40,10,.15); transform: rotate(.8deg); }
.pm-mapa::before, .pm-mapa::after {
	content: ""; position: absolute; width: 80px; height: 24px; background: rgba(240,197,6,.6); z-index: 2;
}
.pm-mapa::before { top: -10px; left: -18px; transform: rotate(-35deg); }
.pm-mapa::after { bottom: -10px; right: -18px; transform: rotate(-35deg); }
.pm-mapa iframe { display: block; width: 100%; height: 380px; border: 0; }

/* Faixa de título das outras páginas */
.pm-pagtopo { background: var(--pm-verde); color: #fff; padding: 72px 0 92px; position: relative; overflow: hidden; }
.pm-pagtopo::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; background: #fff;
	-webkit-mask: var(--pm-onda-svg) center / 100% 100% no-repeat; mask: var(--pm-onda-svg) center / 100% 100% no-repeat;
}
.pm-pagtopo::before {
	content: ""; position: absolute; right: 6%; top: 24px; width: 230px; height: 115px;
	background: rgba(255,255,255,.12); transform: scaleX(-1) rotate(-15deg);
	-webkit-mask: var(--pm-ramo-svg) center / contain no-repeat; mask: var(--pm-ramo-svg) center / contain no-repeat;
}
.pm-pagtopo h1 { color: #fff; }
.pm-pagtopo p { color: #EAF5E8; font-size: 1.15rem; margin: 0; }
.pm-pagtopo .pm-mao, .pm-pagtopo .pm-sobre-titulo { color: var(--pm-ouro); font-size: 1.65rem; }
.pm-pagtopo .pm-sobre-titulo a { color: var(--pm-ouro); text-decoration: none; }
.pm-pagtopo--curto { padding: 52px 0 84px; }
.pm-pagtopo--curto h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); }

/* Lista com vistos à mão */
.pm-vistos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pm-vistos li { position: relative; padding-left: 40px; font-weight: 700; color: var(--pm-mata); }
.pm-vistos li::before {
	content: "✓"; position: absolute; left: 4px; top: -8px;
	font-family: "Caveat", cursive; font-size: 2rem; font-weight: 700; color: var(--pm-folha); transform: rotate(-8deg);
}
.pm-dois .pm-polaroide { max-width: 520px; justify-self: center; }

/* Rodapé com onda */
.pm-rod { background: var(--pm-mata); color: #D7E6D4; padding: 72px 0 0; font-size: .96rem; position: relative; margin-top: 40px; }
.pm-rod::before {
	content: ""; position: absolute; left: 0; right: 0; top: -39px; height: 40px; background: var(--pm-mata);
	-webkit-mask: var(--pm-onda-svg) center / 100% 100% no-repeat; mask: var(--pm-onda-svg) center / 100% 100% no-repeat;
}
.pm-rod__grelha { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr .9fr; gap: 36px; }
.pm-rod h2 { color: #fff; font-size: 1.15rem; margin-bottom: 12px; }
.pm-rod ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pm-rod a { color: #fff; text-decoration: none; }
.pm-rod a:hover { color: var(--pm-ouro); }
.pm-rod .pm-marca img { background: #fff; border-radius: 50%; padding: 2px; }
.pm-rod .pm-marca__nome { color: #fff; }
.pm-rod .pm-marca__nome small { color: #B9D3B4; }
.pm-rod__lema { margin-top: 16px !important; font-family: "Caveat", cursive; font-size: 1.5rem; line-height: 1.2; color: var(--pm-ouro); }
.pm-rod__nota { color: #B9D3B4; font-size: .9rem; }
.pm-rod__base { border-top: 1px dashed rgba(255,255,255,.2); margin-top: 48px; padding: 18px 0 22px; color: #B9D3B4; font-size: .88rem; }

/* Ecrãs médios e pequenos */
@media (max-width: 1080px) {
	.pm-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pm-rod__grelha { grid-template-columns: 1fr 1fr; }
	.pm-nav { gap: 16px; }
}
@media (max-width: 920px) {
	.pm-cab__abrir {
		display: inline-flex; min-height: 44px; padding: 8px 16px; border-radius: 12px;
		border: 2px solid var(--pm-verde); background: #fff; color: var(--pm-verde); font-weight: 800; cursor: pointer;
	}
	.pm-cab__in { flex-wrap: wrap; }
	.pm-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
	.pm-nav.aberto { display: flex; }
	.pm-nav a:not(.pm-btn) { padding: 12px 0; border-bottom: 1px dashed var(--pm-linha); background: none; }
	.pm-nav__cta { margin-top: 12px; }
	.pm-hero__grelha, .pm-niveis, .pm-familia, .pm-dois, .pm-contactos { grid-template-columns: 1fr; gap: 44px; }
	.pm-razoes { grid-template-columns: 1fr; }
	.pm-caderno { padding: 30px 22px 10px 74px; transform: none; }
	.pm-caderno { background:
		linear-gradient(90deg, transparent 54px, #E9A4A4 54px, #E9A4A4 56px, transparent 56px),
		repeating-linear-gradient(#FFFEF8 0 33px, #CFE0EE 33px 34px); }
	.pm-caderno::before { left: 16px; }
	.pm-quadro { padding: 34px 26px; border-width: 10px; }
}
@media (max-width: 600px) {
	.pm-site { font-size: 16px; }
	.pm-sec { padding: 68px 0; }
	.pm-hero { padding-top: 52px; }
	.pm-cartoes, .pm-rod__grelha { grid-template-columns: 1fr; }
	.pm-topo__in > span:first-child { display: none; }
	.pm-topo a { margin: 0 14px 0 0; }
	.admin-bar .pm-cab { top: 0; }
	.pm-baloes li { max-width: 100%; }
	.pm-mapa iframe { height: 300px; }
}
