/**
 * Estilos do widget Posts para Elementor.
 * As cores de fundo, título e destaque são sobrescritas pelos controles do Elementor.
 */

.pe-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	width: 100%;
}

.pe-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease;
}

.pe-shadow-yes .pe-card {
	box-shadow: 0 6px 20px rgba(15, 23, 42, .08);
}

.pe-shadow-yes .pe-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.pe-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	line-height: 0;
}

.pe-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.pe-card:hover .pe-card-thumb img {
	transform: scale(1.05);
}

.pe-card-cat {
	position: absolute;
	top: 12px;
	left: 12px;
	background-color: #2563eb;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.pe-card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 20px 22px;
	flex: 1;
}

.pe-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13px;
	color: #64748b;
}

.pe-card-views::before {
	content: "\1F441";
	margin-right: 4px;
}

.pe-card-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.3;
}

.pe-card-title a {
	color: inherit;
	text-decoration: none;
}

.pe-card-title a:hover {
	text-decoration: underline;
}

.pe-card-excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: #475569;
}

.pe-card-button {
	align-self: flex-start;
	margin-top: auto;
	background-color: #2563eb;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	padding: 10px 18px;
	border-radius: 8px;
	transition: opacity .2s ease;
}

.pe-card-button:hover {
	opacity: .88;
	color: #ffffff;
}

/* ---------------------------------------------------------------
 * Layout horizontal: imagem à esquerda, texto à direita.
 * A classe pe-layout-horizontal é aplicada no wrapper do widget.
 * ------------------------------------------------------------- */
.pe-layout-horizontal .pe-card {
	flex-direction: row;
	align-items: stretch;
}

.pe-layout-horizontal .pe-card-thumb {
	flex: 0 0 40%;
	aspect-ratio: auto;
	min-height: 100%;
}

.pe-layout-horizontal .pe-card-thumb img {
	height: 100%;
}

.pe-layout-horizontal .pe-card-body {
	flex: 1;
	justify-content: flex-start;
}

/* No mobile, volta a empilhar para não espremer o texto. */
@media (max-width: 767px) {
	.pe-layout-horizontal .pe-card {
		flex-direction: column;
	}

	.pe-layout-horizontal .pe-card-thumb {
		flex-basis: auto;
		aspect-ratio: 16 / 10;
	}
}

.pe-empty {
	padding: 24px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	color: #64748b;
	text-align: center;
	font-size: 14px;
}

/* Segurança para telas pequenas quando o tema não define os breakpoints do Elementor. */
@media (max-width: 767px) {
	.pe-grid {
		grid-template-columns: 1fr;
	}
}
