/**
 * Art Portfolio Manager — public grid.
 *
 * Exhibition cards follow the existing Divi expositions page:
 * three columns, a 5.5% gutter, and the full poster (no crop).
 * Artist cards keep a square portrait.
 */

.apm-grid {
	display: grid;
	width: 100%;
	gap: 3rem 1.75rem;
	margin: 0;
	padding: 0;
	align-items: start;
}

.apm-grid--expo {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 5.5%;
	row-gap: 79px;
}

.apm-grid--artiste {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 5.5%;
	row-gap: 4vw;
}

.apm-card {
	margin: 0;
	min-width: 0;
}

.apm-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.apm-card__link:focus-visible {
	outline: 1px solid #111;
	outline-offset: 6px;
}

.apm-card__media {
	position: relative;
	display: block;
	margin: 0 0 0.95rem;
	overflow: hidden;
	background: #efefef;
}

.apm-grid--artiste .apm-card__media {
	aspect-ratio: 1 / 1;
	margin-bottom: calc(13.174% - 11px);
}

.apm-grid--artiste h3.apm-card__title {
	margin: 0;
	padding: 0 0 10px;
}

.apm-grid img.apm-card__image,
.apm-card__placeholder {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transform: scale(1);
	transition: transform 0.5s ease;
}

.apm-card__placeholder {
	background: linear-gradient(180deg, #f6f6f6 0%, #e4e4e4 100%);
}

.apm-card__link:hover .apm-card__image,
.apm-card__link:focus-visible .apm-card__image {
	transform: scale(1.03);
}

.apm-card__title {
	margin: 0;
	color: #161616;
	font-family: inherit;
	font-size: 1.02rem;
	font-weight: 500;
	letter-spacing: 0.015em;
	line-height: 1.35;
}

.apm-card__subtitle,
.apm-card__dates,
.apm-single__subtitle,
.apm-single__dates {
	margin: 0.35rem 0 0;
	color: #5c5c5c;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.45;
}

.apm-card__dates,
.apm-single__dates {
	color: #6f6f6f;
}

.apm-single {
	margin: 0 0 1.25rem;
}

.apm-empty {
	margin: 0;
	color: #6f6f6f;
}

/* Artist and exhibition singles follow the old full-width article pages. */
.single-artiste #sidebar,
.single-expo #sidebar,
.single-artiste .post-meta,
.single-expo .post-meta {
	display: none;
}

.single-artiste #left-area,
.single-expo #left-area {
	float: none;
	width: 100%;
	padding-right: 0;
}

.single-artiste h1.entry-title,
.single-expo h1.entry-title {
	margin: 0 0 48px;
	padding: 0;
	color: #333;
	font-family: Roboto, Helvetica, Arial, sans-serif;
	font-size: 32px;
	font-weight: 500;
	line-height: 32px;
	text-align: left;
}

.single-artiste .entry-content,
.single-expo .entry-content,
.single-artiste .entry-content p,
.single-expo .entry-content p {
	color: #000;
	font-size: 17px;
	font-weight: 300;
	line-height: 28px;
}

.single-artiste .entry-content p,
.single-expo .entry-content p {
	margin: 0 0 1em;
	text-align: justify;
}

/* The theme page title, styled like the centered Divi heading on the old pages. */
article:has(.apm-grid) > h1.entry-title.main_title {
	margin-top: 37px;
	margin-bottom: 4vw;
	padding-bottom: 10px;
	color: #333;
	font-family: Roboto, Helvetica, Arial, sans-serif;
	font-size: 27px;
	font-weight: 300;
	line-height: 27px;
	text-align: center;
}

/* Match the Divi exhibition modules: Roboto, full poster, tight text stack. */
.apm-grid--expo .apm-card__link,
.apm-grid--expo .apm-card__link:hover,
.apm-grid--expo .apm-card__link:focus {
	color: #000;
	text-decoration: none;
}

.apm-grid--expo .apm-card__media {
	aspect-ratio: auto;
	margin: 0 0 calc(9.27% - 11px);
	overflow: visible;
	background: transparent;
}

.apm-grid--expo img.apm-card__image {
	position: static;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: fill;
	transform: none;
}

.apm-grid--expo .apm-card__placeholder {
	position: static;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	background: #efefef;
}

.apm-grid--expo .apm-card__link:hover .apm-card__image,
.apm-grid--expo .apm-card__link:focus-visible .apm-card__image {
	transform: none;
}

.apm-grid--expo h3.apm-card__title {
	margin: 0;
	padding: 0 0 10px;
	color: #000;
	font-family: Roboto, Helvetica, Arial, sans-serif;
	font-size: 1.2rem;
	font-weight: 900;
	letter-spacing: normal;
	line-height: 1.2rem;
	text-align: left;
}

.apm-grid--expo p.apm-card__subtitle {
	margin: 0;
	color: #666;
	font-family: Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 28px;
	text-align: left;
}

.apm-grid--expo p.apm-card__dates {
	margin: 0;
	color: #000;
	font-family: Roboto, Helvetica, Arial, sans-serif;
	font-size: 0.8rem;
	font-weight: 300;
	line-height: 28px;
	text-align: left;
}

@media (max-width: 980px) {
	.apm-grid--artiste {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.apm-grid--expo {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 0;
		row-gap: 30px;
	}
}

@media (max-width: 600px) {
	.apm-grid--artiste {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.apm-grid img.apm-card__image {
		transition: none;
	}

	.apm-card__link:hover .apm-card__image,
	.apm-card__link:focus-visible .apm-card__image {
		transform: none;
	}
}
