/*
 * RRPS Accreditations — [rrps_accreditations].
 *
 * Centred tab bar (tabs.css) over a grid of white logo cards: logo area,
 * hairline rule, name. Columns fill the row (two cards share it, five sit
 * side by side on desktop), wrapping to three on tablet and two on phones.
 */

.rrps-accr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 48px;
	width: 100%;
}

.rrps-accr .rrps-tabs__bar {
	align-self: center;
}

.rrps-accr__panel {
	width: 100%;
}

.rrps-accr__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rrps-accr__card {
	display: flex;
	flex-direction: column;
	margin: 0;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.rrps-accr__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 102px;
	padding: 8px 16px;
	border-bottom: 1px solid var(--rrps-gray-100);
}

/* Two classes so the size limits beat Elementor's `.elementor img` reset. */
.rrps-accr .rrps-accr__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 80px;
	object-fit: contain;
}

.rrps-accr .rrps-accr__name {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	color: var(--rrps-blue);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-align: center;
}

/* No logo supplied: the name fills the card. */
.rrps-accr .rrps-accr__card--text .rrps-accr__name {
	min-height: 166px;
	box-sizing: border-box;
	font-weight: 600;
}

@media (max-width: 1024px) {
	.rrps-accr {
		gap: 32px;
	}
}

@media (max-width: 767px) {
	.rrps-accr__grid {
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
		gap: 12px;
	}

	.rrps-accr__logo {
		height: 88px;
		padding: 8px 12px;
	}

	.rrps-accr .rrps-accr__img {
		max-height: 64px;
	}

	.rrps-accr .rrps-accr__name {
		padding: 14px 12px;
		font-size: 14px;
	}

	.rrps-accr .rrps-accr__card--text .rrps-accr__name {
		min-height: 136px;
	}
}
