/* =========================================================
   PMN - Campanhas
   Prefeitura Municipal de Mundo Novo - MS
   ========================================================= */

.pmn-campanhas {
	--pmn-azul: #2e3092;
	--pmn-azul-escuro: #262a7e;
	box-sizing: border-box;
	width: 100%;
	padding: clamp(18px, 3vw, 40px) 0;
}

.pmn-campanhas *,
.pmn-campanhas *::before,
.pmn-campanhas *::after {
	box-sizing: border-box;
}

.pmn-campanhas__interno {
	width: min(100% - 32px, 1200px);
	margin: 0 auto;
}

/* Cabeçalho da seção: título + "Ver Mais" */
.pmn-campanhas__topo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: clamp(14px, 1.8vw, 26px);
}

.pmn-campanhas__titulo {
	margin: 0;
	padding: 0;
	color: var(--pmn-azul);
	font-size: clamp(22px, 2.4vw, 34px);
	font-style: italic;
	font-weight: 800;
	line-height: 1.1;
}

.pmn-campanhas__vermais {
	flex: 0 0 auto;
	display: inline-block;
	padding: 10px 22px;
	background: var(--pmn-azul);
	border-radius: 10px;
	color: #fff;
	font-size: clamp(13px, 1.1vw, 16px);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s ease, transform .2s ease;
}

.pmn-campanhas__vermais:hover,
.pmn-campanhas__vermais:focus {
	background: var(--pmn-azul-escuro);
	color: #fff;
	transform: translateY(-1px);
}

/* Grade das imagens */
.pmn-campanhas__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(14px, 1.8vw, 26px);
	align-items: start;
}

.pmn-campanhas__item {
	display: block;
	margin: 0;
	aspect-ratio: 4 / 5; /* mesma escala (retrato) dos banners do layout aprovado */
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
	line-height: 0;
	background: #eef0f5;
}

.pmn-campanhas__item--link {
	cursor: pointer;
	transition: transform .25s ease, box-shadow .25s ease;
	text-decoration: none;
}

.pmn-campanhas__item--link:hover,
.pmn-campanhas__item--link:focus {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .20);
}

.pmn-campanhas__item--link:focus-visible {
	outline: 3px solid var(--pmn-azul);
	outline-offset: 3px;
}

.pmn-campanhas__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border: 0;
	border-radius: 0;
}

/* Responsivo */
@media (max-width: 860px) {
	.pmn-campanhas__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	/* Se houver 3 imagens, a 3ª ocupa a linha inteira na visão de 2 colunas. */
	.pmn-campanhas__grid--3 .pmn-campanhas__item:nth-child(3) {
		grid-column: 1 / -1;
		max-width: 60%;
		margin: 0 auto;
	}
}

@media (max-width: 560px) {
	.pmn-campanhas__grid {
		grid-template-columns: 1fr;
	}
	.pmn-campanhas__grid--3 .pmn-campanhas__item:nth-child(3) {
		grid-column: auto;
		max-width: none;
		margin: 0;
	}
	.pmn-campanhas__topo {
		flex-wrap: wrap;
	}
}
