/* AM Projects Templates
 * Change the accent in Appearance > Customize > Additional CSS:
 * :root { --amp-accent: #0550A0; }
 */
:root {
	--amp-accent: #0550A0;
	--amp-ink: #222222;
	--amp-text: #6b6b6b;
	--amp-muted: #ececec;
	--amp-heading-font: "Poppins", sans-serif;
	--amp-tab: 56px;      /* width of the vertical blue tab */
	--amp-overlap: 72px;  /* how far the white panel rises over the image */
}

/* ---------- Grid ---------- */
.amp-grid {
	display: grid;
	grid-template-columns: repeat(var(--amp-cols, 3), minmax(0, 1fr));
	gap: 72px 40px;
}
@media (max-width: 1024px) {
	.amp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.amp-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* ---------- Card ---------- */
.amp-card {
	position: relative;
	display: flex;
	flex-direction: column;
}

/* Vertical blue tab, the same device as the location label on project pages */
.amp-card-tab {
	position: absolute;
	top: 32px;
	left: 0;
	z-index: 3;
	width: var(--amp-tab);
	padding: 22px 0;
	background: var(--amp-accent);
	color: #fff;
	font-family: var(--amp-heading-font);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1;
	white-space: nowrap;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.amp-card-media {
	position: relative;
	display: block;
	overflow: hidden;
	margin-left: calc(var(--amp-tab) / 2);
	background: var(--amp-muted);
}
.amp-card--category .amp-card-media { aspect-ratio: 4 / 5; }
.amp-card--project  .amp-card-media { aspect-ratio: 4 / 3; }

.amp-card-media img,
.amp-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.amp-card:hover .amp-card-media img { transform: scale(1.05); }

/* White panel overlapping the image, echoing the project page content box */
.amp-card-body {
	position: relative;
	z-index: 2;
	margin: calc(var(--amp-overlap) * -1) 32px 0 calc(var(--amp-tab) / 2 + 32px);
	padding: 30px 30px 26px;
	background: #fff;
	flex: 1;
}

.amp-card-title {
	margin: 0 0 12px;
	font-family: var(--amp-heading-font);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}
.amp-card-title a {
	color: var(--amp-ink);
	text-decoration: none;
}
.amp-card-title a:hover { color: var(--amp-accent); }

.amp-card-desc {
	color: var(--amp-text);
	font-size: 15px;
	line-height: 1.7;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.amp-card-desc p { margin: 0; }

.amp-card-link {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-top: 20px;
	color: var(--amp-ink);
	font-family: var(--amp-heading-font);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.amp-card-line {
	display: inline-block;
	width: 32px;
	height: 2px;
	background: var(--amp-accent);
	transition: width 0.35s ease;
}
.amp-card-link:hover .amp-card-line,
.amp-card-link:focus-visible .amp-card-line { width: 56px; }

.amp-card a:focus-visible {
	outline: 2px solid var(--amp-accent);
	outline-offset: 3px;
}

.amp-card-placeholder {
	background:
		linear-gradient(135deg, transparent 49.5%, rgba(0, 0, 0, 0.06) 50%, transparent 50.5%),
		var(--amp-muted);
}

/* ---------- Archive page ---------- */
.amp-archive { padding: 100px 0 120px; }
.amp-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.amp-archive-intro {
	max-width: 720px;
	margin: 0 auto 56px;
	text-align: center;
}
.amp-archive-desc {
	color: var(--amp-text);
	font-size: 17px;
	line-height: 1.8;
}
.amp-archive-desc p:last-child { margin-bottom: 0; }

.amp-filter { margin: 0 0 64px; }
.amp-filter ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 36px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.amp-filter a {
	position: relative;
	display: inline-block;
	padding: 6px 0;
	color: var(--amp-text);
	font-family: var(--amp-heading-font);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}
.amp-filter a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--amp-accent);
	transition: width 0.3s ease;
}
.amp-filter a:hover,
.amp-filter a.is-current { color: var(--amp-ink); }
.amp-filter a:hover::after,
.amp-filter a.is-current::after { width: 100%; }

/* Pagination */
.amp-pagination { margin-top: 80px; }
.amp-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.amp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	padding: 0 14px;
	border: 1px solid #e3e3e3;
	color: var(--amp-ink);
	font-family: var(--amp-heading-font);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.amp-pagination .page-numbers:hover,
.amp-pagination .page-numbers.current {
	background: var(--amp-accent);
	border-color: var(--amp-accent);
	color: #fff;
}

.amp-empty {
	text-align: center;
	color: var(--amp-text);
	padding: 40px 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	:root { --amp-tab: 46px; --amp-overlap: 48px; }
	.amp-card-body {
		margin-right: 16px;
		margin-left: calc(var(--amp-tab) / 2 + 16px);
		padding: 24px 22px 22px;
	}
	.amp-card-title { font-size: 21px; }
	.amp-archive { padding: 64px 0 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.amp-card-media img,
	.amp-card-line,
	.amp-filter a::after { transition: none; }
	.amp-card:hover .amp-card-media img { transform: none; }
}
