/* ==========================================================================
   Material escolar — níveis de ensino e página inicial (inc/material-escolar.php)
   Arquivo separado do style.css: carrega sem bloquear e não invalida o CSS crítico.
   ========================================================================== */

/* --- Bloco do nível de ensino ------------------------------------------ */
.pc-mat {
	position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(24px, 3.4vw, 48px);
	margin-top: clamp(28px, 3vw, 40px); padding: clamp(26px, 3.2vw, 40px) clamp(22px, 3.2vw, 40px) clamp(26px, 3.2vw, 40px) clamp(40px, 4.6vw, 64px);
	border: 1px solid #EDE4CF; border-radius: var(--pc-radius-lg); scroll-margin-top: 110px;
	/* Folha pautada: linhas finas e a margem do caderno. */
	background:
		linear-gradient(90deg, transparent calc(clamp(22px, 2.6vw, 34px) - 1px), rgba(255, 106, 0, .38) calc(clamp(22px, 2.6vw, 34px) - 1px), rgba(255, 106, 0, .38) clamp(22px, 2.6vw, 34px), transparent clamp(22px, 2.6vw, 34px)),
		repeating-linear-gradient(180deg, transparent 0 31px, rgba(23, 112, 46, .07) 31px 32px),
		var(--pc-cream);
}
.pc-mat__intro { min-width: 0; }
.pc-mat__intro .pc-kicker { margin-bottom: 12px; }
.pc-mat__title { font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.06; letter-spacing: -.025em; color: var(--pc-green-900); }
.pc-mat__level { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--pc-green-700); }
.pc-mat__stamp {
	display: inline-block; margin-top: 12px; font-family: var(--pc-script); font-size: 24px; font-weight: 600; line-height: 1; color: var(--pc-green-900);
	transform: rotate(-3deg); transform-origin: left center;
}
.pc-mat__stamp::after { content: ""; display: block; width: 78%; height: 3px; margin: 4px 0 0 8%; border-radius: 3px; background: var(--pc-yellow); transform: rotate(-1.5deg); }
.pc-mat__text { margin-top: 16px; max-width: 420px; font-size: 14.5px; line-height: 1.6; color: var(--pc-text); }

.pc-mat-dates { list-style: none; margin-top: 20px; display: grid; gap: 0; max-width: 440px; }
.pc-mat-dates li { position: relative; display: grid; gap: 1px; padding: 9px 0 9px 22px; border-top: 1px dashed #D9D0B9; }
.pc-mat-dates li:last-child { border-bottom: 1px dashed #D9D0B9; }
.pc-mat-dates li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--pc-orange); background: var(--pc-cream); }
.pc-mat-dates__when { font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: var(--pc-green-900); font-variant-numeric: tabular-nums; }
.pc-mat-dates__what { font-size: 13.5px; line-height: 1.4; color: var(--pc-muted); }

.pc-mat__list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pc-mat-files { list-style: none; display: grid; gap: 10px; }
.pc-mat-file__link {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px 14px 14px;
	border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: var(--pc-white);
	transition: border-color .2s, box-shadow .25s var(--pc-ease), transform .25s var(--pc-ease);
}
.pc-mat-file__link:hover { border-color: #C9D9BE; box-shadow: var(--pc-shadow); transform: translateX(3px); }
.pc-mat-file__ext {
	position: relative; display: grid; place-items: end center; width: 44px; height: 54px; padding-bottom: 9px;
	border-radius: 5px; background: var(--pc-green-900); color: var(--pc-yellow);
	font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1;
	clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
}
.pc-mat-file__ext::before { content: ""; position: absolute; top: 0; right: 0; width: 13px; height: 13px; background: var(--pc-green-400); border-bottom-left-radius: 3px; }
.pc-mat-file--livros .pc-mat-file__ext { background: var(--pc-green-700); }
.pc-mat-file--fardamento .pc-mat-file__ext, .pc-mat-file--comunicado .pc-mat-file__ext { background: #3A4A3F; }
.pc-mat-file__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pc-mat-file__title { font-size: 15.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; color: var(--pc-green-900); }
.pc-mat-file__meta { font-size: 12.5px; font-weight: 600; color: var(--pc-muted); }
.pc-mat-file__desc { font-size: 13px; line-height: 1.45; color: var(--pc-text); }
.pc-mat-file__new {
	display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--pc-pill); background: var(--pc-yellow);
	font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; color: var(--pc-green-900);
}
.pc-mat-file__go {
	display: grid; place-items: center; width: 42px; height: 42px; border: 1.5px solid var(--pc-green-900); border-radius: 50%; color: var(--pc-green-900);
	transition: background .2s, border-color .2s, color .2s;
}
.pc-mat-file__go .pc-ico { width: 18px; height: 18px; stroke-width: 2.2; }
.pc-mat-file__link:hover .pc-mat-file__go { background: var(--pc-orange); border-color: var(--pc-orange); color: var(--pc-white); }

.pc-mat__soon { padding: 26px 24px; border: 1.5px dashed #CFC5AC; border-radius: var(--pc-radius); background: rgba(255, 255, 255, .7); }
.pc-mat__soon-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 50%; background: var(--pc-mint); color: var(--pc-green-700); }
.pc-mat__soon-icon .pc-ico { width: 24px; height: 24px; }
.pc-mat__soon-title { font-size: 17px; font-weight: 800; color: var(--pc-green-900); }
.pc-mat__soon-text { margin-top: 4px; font-size: 14px; color: var(--pc-muted); }

.pc-mat__ask { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 13.5px; font-weight: 700; color: var(--pc-green-700); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.pc-mat__ask .pc-ico { width: 18px; height: 18px; }
.pc-mat__ask:hover { color: var(--pc-green-900); }

/* --- Página inicial ----------------------------------------------------- */
.pc-mat-home { position: relative; overflow: hidden; background: var(--pc-cream); scroll-margin-top: 90px; }
.pc-mat-home::before {
	content: ""; position: absolute; inset: 0 auto 0 0; width: min(46%, 560px); pointer-events: none;
	background: repeating-linear-gradient(180deg, transparent 0 35px, rgba(23, 112, 46, .06) 35px 36px);
	-webkit-mask-image: linear-gradient(90deg, #000 40%, transparent); mask-image: linear-gradient(90deg, #000 40%, transparent);
}
.pc-mat-home__grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.pc-mat-home__text .pc-title { max-width: 480px; }
.pc-mat-home__lead { margin: 18px 0 0; max-width: 460px; font-size: 15.5px; line-height: 1.65; color: var(--pc-text); }
.pc-mat-dates--home { margin-top: 24px; }
.pc-mat-home__text .pc-actions { margin-top: 26px; }

.pc-mat-home__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pc-mat-home__photo { overflow: hidden; border-radius: var(--pc-radius-lg); background: var(--pc-mint); box-shadow: var(--pc-shadow); }
.pc-mat-home__photo img { width: 100%; aspect-ratio: 16 / 7.5; object-fit: cover; }

.pc-mat-levels { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pc-mat-level {
	display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px 14px 14px;
	border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: var(--pc-white);
	transition: border-color .2s, box-shadow .25s var(--pc-ease), transform .25s var(--pc-ease);
}
.pc-mat-level:hover { border-color: #C9D9BE; box-shadow: var(--pc-shadow-hover); transform: translateY(-2px); }
.pc-mat-level__img { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--pc-white), 0 0 0 4px var(--pc-mint-line); }
.pc-mat-level__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pc-mat-level__name { font-size: 15.5px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: var(--pc-green-900); }
.pc-mat-level__meta { font-size: 13px; font-weight: 600; color: var(--pc-green-700); }
.pc-mat-level.is-soon .pc-mat-level__meta { color: var(--pc-muted); font-weight: 500; font-style: italic; }
.pc-mat-level.is-soon .pc-mat-level__img { filter: grayscale(.7); opacity: .8; }
.pc-mat-level__go { flex: none; color: var(--pc-green-900); transition: transform .25s var(--pc-ease), color .2s; }
.pc-mat-level__go .pc-ico { width: 18px; height: 18px; stroke-width: 2.2; }
.pc-mat-level:hover .pc-mat-level__go { transform: translateX(3px); color: var(--pc-orange); }

.pc-mat-home__note { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--pc-muted); }
.pc-mat-home__note .pc-ico { width: 18px; height: 18px; margin-top: 1px; color: var(--pc-green-700); }

/* --- Responsivo --------------------------------------------------------- */
@media (max-width: 1023px) {
	.pc-mat, .pc-mat-home__grid { grid-template-columns: 1fr; }
	.pc-mat-home::before { width: 100%; }
}
@media (max-width: 600px) {
	.pc-mat { padding: 24px 18px 22px 34px; }
	.pc-mat-file__link { gap: 12px; padding: 12px; }
	.pc-mat-file__ext { width: 38px; height: 48px; font-size: 10px; }
	.pc-mat-file__go { width: 36px; height: 36px; }
	.pc-mat-levels { grid-template-columns: 1fr; }
}
@media print {
	.pc-mat { background: none; border-color: #ccc; }
}
