/*
 * SkillELECTRIC resource cards (eplatforms, 15 Sep 2026).
 * The document and image cards on Resources (rows with el_class "resource_panel_in") were floated
 * boxes, so cards of different caption lengths snagged and left gaps at tablet widths. They are now
 * an equal-height grid: cards stay in order, photos share one square shape, and the grey caption
 * boxes fill to a common bottom. 3 columns on desktop, 2 on tablets and large phones, 1 on small phones.
 */

.resource_panel_in .categoryitems {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 40px 30px;
	margin: 0 0 40px;
}

/* The theme's clearfix pseudo-elements and stray paragraphs would become grid cells. */
.resource_panel_in .categoryitems::before,
.resource_panel_in .categoryitems::after,
.resource_panel_in .categoryitems > br,
.resource_panel_in .categoryitems > p:empty {
	display: none;
}

.resource_panel_in .categoryitems > .competitors_mg,
.resource_panel_in .categoryitems > .competitors_mg2 {
	display: flex;
	flex-direction: column;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

.resource_panel_in .categoryitems > div > p {
	margin: 0;
}

.resource_panel_in .categoryitems > div > a,
.resource_panel_in .categoryitems > div > p > a {
	display: block;
}

.resource_panel_in .categoryitems img {
	display: block;
	float: none !important;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Caption boxes fill the rest of each card so their bottoms line up across the row. */
.resource_panel_in .categoryitems .pdf_mg_filename,
.resource_panel_in .categoryitems .competitors_mg_heading {
	display: block !important;
	flex: 1 1 auto;
	width: 100%;
	height: auto !important;
	min-height: 80px;
	margin: 0 !important;
	padding-bottom: 18px;
}

.resource_panel_in .categoryitems .pdf_mg_filename .resources_mg_text012 {
	height: auto !important;
}

@media (max-width: 1024px) {
	.resource_panel_in .categoryitems {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 479px) {
	.resource_panel_in .categoryitems {
		grid-template-columns: minmax(0, 1fr);
	}
}
