/*
 * Magazinul Nației — pages.css: info / content pages (Despre noi, Contact, Starea
 * Nației, Termeni + the four policy pages). Enqueued from functions.php on those page
 * IDs only, after base.css. Tokens from theme.json; no !important.
 *
 * Layout model: running text lives in a constrained .mn-prose group (the prose measure,
 * set per block in the content source). Wider elements (banner image, image grids) are
 * SIBLINGS of that group so they break out to the container width on their own.
 */

/* ---- Prose rhythm ---- */
.mn-prose {
	margin-inline: auto;
}
.mn-prose > * + * {
	margin-top: 1.1em;
}
.mn-prose h2 {
	margin-top: 1.9em;
	margin-bottom: 0.5em;
}
.mn-prose h3 {
	margin-top: 1.4em;
	margin-bottom: 0.35em;
}
.mn-prose ul,
.mn-prose ol {
	padding-left: 1.3em;
}
.mn-prose li + li {
	margin-top: 0.3em;
}

/* ---- Breakout / closing figures ---- */
.mn-prose__figure {
	margin-block: 2.2em;
}
.wp-block-image.mn-prose__figure img {
	border-radius: var(--wp--custom--radius--base);
}

/* ---- Starea Nației — production + project image grids ---- */
.mn-prodgrid,
.mn-projects {
	display: grid;
	gap: clamp(14px, 2.2vw, 26px);
	margin-block: clamp(24px, 3vw, 40px);
}
.mn-prodgrid {
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
	.mn-prodgrid {
		grid-template-columns: repeat(3, 1fr);
	}
}
.mn-projects {
	grid-template-columns: 1fr;
	max-width: var(--wp--custom--measure--prose);
	margin-inline: auto;
}
@media (min-width: 600px) {
	.mn-projects {
		grid-template-columns: repeat(3, 1fr);
	}
}
.mn-prodgrid .wp-block-image,
.mn-projects .wp-block-image {
	margin: 0;
}
.mn-prodgrid img,
.mn-projects img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--custom--radius--base);
}
/* Linked covers: contain the zoom-on-hover inside the frame. */
.mn-prodgrid .wp-block-image a,
.mn-projects .wp-block-image a {
	display: block;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--base);
}

/* ---- Contact — details block + location cards ---- */
.mn-contact p {
	margin: 0.35em 0;
	font-size: var(--wp--preset--font-size--large);
}
.mn-locations {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(18px, 2.5vw, 26px);
	margin-block: clamp(20px, 3vw, 36px);
}
@media (min-width: 768px) {
	.mn-locations {
		grid-template-columns: repeat(3, 1fr);
	}
}
.mn-location {
	padding: clamp(16px, 2vw, 24px);
	border: 1px solid var(--wp--custom--hairline--light);
	border-radius: var(--wp--custom--radius--base);
}
.mn-location > :first-child {
	margin-top: 0;
}
.mn-location > :last-child {
	margin-bottom: 0;
}
.mn-location__addr {
	color: var(--wp--preset--color--mn-muted);
}
.mn-location__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: 0.7em;
	font-weight: 600;
}

/* ---- Policy pages (Confidențialitate 5894, Cookie-uri 5892, Retur 5932,
 *      GDPR 5962). Already core-block content in the DB, no .mn-prose wrapper —
 *      give them the same readable measure by constraining entry-content. ---- */
.page-id-5894 .entry-content,
.page-id-5892 .entry-content,
.page-id-5932 .entry-content,
.page-id-5962 .entry-content {
	max-width: var(--wp--custom--measure--prose);
	margin-inline: auto;
}

/* ---- Motion (only for people who haven't asked for less) ---- */
@media (prefers-reduced-motion: no-preference) {
	.mn-prodgrid .wp-block-image a img {
		transition: scale 0.45s var(--wp--custom--ease);
	}
	.mn-prodgrid .wp-block-image a:hover img,
	.mn-prodgrid .wp-block-image a:focus img {
		scale: 1.03;
	}
}
