/* AdvicePapa Post Grid
   Brand colors match the AdvicePapa homepage.
*/

:root {
	--apg-orange: #D94F2B;
	--apg-orange-dark: #B83D20;
	--apg-ink: #18212B;
	--apg-body: #4B5563;
	--apg-border: #E8E2DE;
	--apg-soft: #FFF9F5;
	--apg-card: #FFFFFF;
}

.apg-wrap,
.apg-wrap * {
	box-sizing: border-box;
}

.apg-wrap {
	width: 100%;
}

.apg-grid {
	display: grid;
	gap: 24px;
	margin: 0;
	padding: 0;
}

.apg-columns-1 { grid-template-columns: 1fr; }
.apg-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apg-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apg-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.apg-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--apg-card);
	border: 1px solid var(--apg-border);
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(24, 33, 43, 0.02);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.apg-card:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 14px 36px rgba(24, 33, 43, 0.10);
}

.apg-image {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: #F6F1ED;
	text-decoration: none !important;
}

.apg-ratio-16-9 { aspect-ratio: 16 / 9; }
.apg-ratio-4-3  { aspect-ratio: 4 / 3; }
.apg-ratio-1-1  { aspect-ratio: 1 / 1; }

.apg-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1);
	transition: transform .35s ease;
}

.apg-card:hover .apg-image img {
	transform: scale(1.025);
}

.apg-placeholder {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	color: var(--apg-orange);
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -.05em;
	background:
		radial-gradient(circle at 20% 20%, rgba(217,79,43,.16), transparent 35%),
		linear-gradient(145deg, #fffaf7, #f1ebe7);
}

.apg-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px;
}

.apg-kicker {
	margin: 0 0 9px;
	color: var(--apg-orange);
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .12em;
	line-height: 1.2;
	text-transform: uppercase;
}

.apg-title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Avenir Next", "Manrope", "Segoe UI", system-ui, sans-serif;
	font-size: 1.22rem !important;
	font-weight: 750 !important;
	line-height: 1.32 !important;
	letter-spacing: -.025em;
}

.apg-title a,
.apg-title a:visited {
	color: var(--apg-ink) !important;
	text-decoration: none !important;
}

.apg-title a:hover,
.apg-title a:focus {
	color: var(--apg-orange) !important;
	text-decoration: none !important;
}

.apg-date {
	margin-top: 9px;
	color: #7C858F;
	font-size: .82rem;
}

.apg-excerpt {
	margin-top: 12px;
	color: var(--apg-body);
	font-size: .95rem;
	line-height: 1.65;
}

.apg-read-more,
.apg-read-more:visited {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: fit-content;
	margin-top: auto;
	padding-top: 18px;
	color: var(--apg-orange) !important;
	font-size: .9rem;
	font-weight: 800;
	text-decoration: none !important;
}

.apg-read-more span {
	transition: transform .2s ease;
}

.apg-read-more:hover,
.apg-read-more:focus {
	color: var(--apg-orange-dark) !important;
	text-decoration: none !important;
}

.apg-read-more:hover span,
.apg-read-more:focus span {
	transform: translateX(3px);
}

.apg-pagination {
	margin-top: 38px;
}

.apg-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.apg-pagination li {
	margin: 0 !important;
	padding: 0 !important;
}

.apg-pagination a,
.apg-pagination span {
	display: grid;
	min-width: 42px;
	height: 42px;
	padding: 0 13px;
	place-items: center;
	border: 1px solid var(--apg-border);
	border-radius: 10px;
	background: #fff;
	color: var(--apg-ink) !important;
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none !important;
}

.apg-pagination a:hover,
.apg-pagination a:focus,
.apg-pagination .current {
	border-color: var(--apg-orange);
	background: var(--apg-orange);
	color: #fff !important;
	text-decoration: none !important;
}

.apg-empty {
	padding: 24px;
	border: 1px solid var(--apg-border);
	border-radius: 14px;
	background: var(--apg-soft);
	color: var(--apg-body);
}

@media (max-width: 1050px) {
	.apg-columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.apg-columns-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.apg-columns-2,
	.apg-columns-3,
	.apg-columns-4 {
		grid-template-columns: 1fr;
	}

	.apg-grid {
		gap: 18px;
	}

	.apg-content {
		padding: 19px;
	}

	.apg-title {
		font-size: 1.15rem !important;
	}
}
