/**
 * Projects participations – layout based on the original Wix presentation.
 */

.am-grants {
	font-size: 17px;
}

.am-grant {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	padding: 26px 0 34px;
	margin: 0;
	background: transparent;
}

.am-grant.has-logo {
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.am-grant__logo {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: 105px;
	min-height: 90px;
}

.am-grant__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 90px;
	max-height: 72px;
	object-fit: contain;
}

.am-grant__content {
	min-width: 0;
}

.am-grant__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 28px;
	margin-bottom: 14px;
}

.am-grant__acronym {
	color: #1F2A44;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
}

.am-grant__role {
	display: block;
	flex: 0 0 auto;
	color: #7D2935;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	text-align: right;
}

.am-grant__title {
	display: block;
	margin-bottom: 10px;
	color: #1F2A44;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

/* Tytuł w roli akronimu – projekt bez skrótu otwiera kartę tytułem. */
.am-grant__title--lead {
	min-width: 0;
	margin-bottom: 0;
	overflow-wrap: anywhere;
}

.am-grant__desc {
	margin-bottom: 20px;
	color: #4d4d4d;
	font-size: 17px;
	line-height: 1.65;
}

.am-grant__meta {
	margin: 0;
	color: #999;
	font-size: 16px;
	line-height: 1.45;
}

.am-grant__meta-row {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 18px;
}

.am-grant__meta dt {
	color: #7D2935;
	font-weight: 400;
}

.am-grant__meta dd {
	margin: 0;
	color: #999;
}

.am-grants-empty {
	color: #777;
	font-style: italic;
}

/* Kompaktowa, natywna lista rozwijana używana na długiej stronie About. */
.am-grant--collapsible,
.am-grant--collapsible.has-logo {
	display: block;
	padding: 0;
	margin: 0 0 14px;
	background: #fff;
	border: 1px solid rgba(31, 42, 68, 0.12);
	border-left: 4px solid #7D2935;
	border-radius: 3px;
}

.am-grant--collapsible:last-child {
	margin-bottom: 0;
}

.am-grant__summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	gap: 18px;
	align-items: center;
	min-height: 72px;
	padding: 18px 18px 18px 22px;
	cursor: pointer;
	list-style: none;
}

.am-grant--collapsible.has-logo .am-grant__summary {
	grid-template-columns: 105px minmax(0, 1fr) 44px;
}

.am-grant__summary::-webkit-details-marker {
	display: none;
}

.am-grant__summary:focus-visible {
	outline: 2px solid #7D2935;
	outline-offset: 3px;
}

.am-grant__summary-content {
	display: block;
	min-width: 0;
}

.am-grant--collapsible .am-grant__header {
	margin-bottom: 8px;
}

.am-grant--collapsible .am-grant__title {
	margin-bottom: 0;
	overflow-wrap: anywhere;
}

.am-grant--collapsible:not([open]) .am-grant__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.am-grant__toggle {
	position: relative;
	display: block;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(31, 42, 68, 0.28);
	border-radius: 50%;
}

.am-grant__toggle::before,
.am-grant__toggle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	background: #1F2A44;
	transform: translate(-50%, -50%);
	transition: transform 0.18s ease;
}

.am-grant__toggle::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.am-grant--collapsible[open] .am-grant__toggle::after {
	transform: translate(-50%, -50%) rotate(0deg);
}

.am-grant--collapsible[open] .am-grant__summary {
	border-bottom: 1px solid rgba(31, 42, 68, 0.12);
}

.am-grant__details {
	padding: 18px 22px 22px;
}

.am-grant__details .am-grant__desc:last-child {
	margin-bottom: 0;
}

@media ( max-width: 600px ) {
	.am-grant {
		padding: 22px 0 28px;
	}

	.am-grant.has-logo {
		grid-template-columns: 68px minmax(0, 1fr);
		gap: 14px;
	}

	.am-grant__logo {
		width: 62px;
		min-height: 56px;
	}

	.am-grant__logo img {
		max-width: 62px;
		max-height: 56px;
	}

	.am-grant__header {
		display: block;
		margin-bottom: 10px;
	}

	.am-grant__acronym {
		font-size: 22px;
	}

	.am-grant__role {
		max-width: 100%;
		margin-top: 4px;
		font-size: 15px;
		text-align: left;
		overflow-wrap: anywhere;
	}

	.am-grant__title {
		font-size: 17px;
	}

	.am-grant__desc {
		margin-bottom: 16px;
		font-size: 16px;
		line-height: 1.5;
	}

	.am-grant__meta {
		font-size: 14px;
	}

	.am-grant__meta-row {
		grid-template-columns: 105px minmax(0, 1fr);
		gap: 8px;
	}

	.am-grant--collapsible,
	.am-grant--collapsible.has-logo {
		padding: 0;
	}

	.am-grant__summary {
		grid-template-columns: minmax(0, 1fr) 36px;
		gap: 10px;
		min-height: 64px;
		padding: 14px;
	}

	.am-grant--collapsible.has-logo .am-grant__summary {
		grid-template-columns: 62px minmax(0, 1fr) 36px;
	}

	.am-grant--collapsible .am-grant__logo {
		width: 62px;
		min-height: 56px;
	}

	.am-grant--collapsible .am-grant__header {
		margin-bottom: 6px;
	}

	.am-grant__toggle {
		width: 34px;
		height: 34px;
	}

	.am-grant__details {
		padding: 16px 14px 18px;
	}
}
