/* RP training archive (m-courses). Tile look mirrors the former Kadence query card. */

.rp-archive__title {
	margin: 0 0 1rem;
	text-align: center;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--global-palette1, #002f6c);
}

.rp-archive__breadcrumbs {
	margin-bottom: 1.5rem;
}

.rp-archive {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 1025px) {
	.rp-archive--with-panel {
		grid-template-columns: 1.5fr 5.6fr;
		align-items: start;
	}
}

/* The online panel sits in the WooCommerce filters overlay, which drops the content link underline. */
.rp-archive__panel .sp-dynamic-category-list li {
	line-height: 1.8;
}

.rp-archive__panel .sp-dynamic-category-list a {
	text-decoration: none;
}

.rp-search {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 1.25rem;
}

.rp-search__input {
	flex: 1 1 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #d9e0ea;
	border-radius: 10px;
}

.rp-search__submit {
	flex: 1 1 100%;
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
}

.rp-archive__clear {
	display: inline-block;
	margin-top: 0.75rem;
}

/* Grid */
.rp-courses__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	row-gap: 26px;
	column-gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

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

@media (max-width: 767px) {
	.rp-courses__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Tile */
.rp-courses__item {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 8px;
	overflow: hidden;
	border: 1px solid #d9e0ea;
	border-radius: 10px;
	transition: all 0.4s ease;
}

.rp-courses__item:hover {
	box-shadow: 0 36px 36px 0 rgba(94, 94, 94, 0.1);
}

.rp-course-card__image {
	display: block;
}

.rp-course-card__image img {
	display: block;
	width: 100%;
	height: auto;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
}

.rp-course-card__body {
	transition: all 0.3s cubic-bezier(0.17, 0.67, 0.35, 0.95);
}

.rp-course-card__title-link {
	text-decoration: none;
}

.rp-course-card__title {
	margin: 0;
	padding-top: 12px;
	font-size: 16px;
	font-weight: 400;
	text-align: left !important;
	color: var(--global-palette4, #23354c);
}

.rp-course-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	box-sizing: border-box;
	width: 100%;
	padding: 10px 16px;
	border: 1px solid var(--global-palette1, #002f6c);
	border-radius: 3px;
	background: var(--global-palette9, #fff);
	color: var(--global-palette1, #002f6c);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
}

.rp-course-card__btn:hover,
.rp-course-card__btn:focus {
	background: var(--global-palette1, #002f6c);
	color: var(--global-palette9, #fff);
}

.rp-course-card__action {
	margin-top: 12px;
}

/* Devices with hover: the button fades in at the bottom of the tile. Its slot (46px
   button + 11px offset + 8px gap) is reserved as padding, so it never covers the title. */
@media (hover: hover) {
	.rp-courses__item {
		padding-bottom: 65px;
	}

	.rp-course-card__action {
		position: absolute;
		bottom: 11px;
		left: 50%;
		width: calc(100% - 16px);
		margin-top: 0;
		opacity: 0;
		transform: translate(-50%);
		z-index: 1;
		transition: opacity 0.3s cubic-bezier(0.17, 0.67, 0.35, 0.95);
	}

	.rp-course-card__btn {
		white-space: nowrap;
	}

	.rp-courses__item:hover .rp-course-card__action,
	.rp-courses__item:focus-within .rp-course-card__action {
		opacity: 1;
	}
}

/* Footer of the list */
.rp-courses__empty {
	margin: 0 0 0.75rem;
}

.rp-courses__more {
	display: block;
	width: min(320px, 100%);
	margin: 2rem auto 0;
	padding: 12px 16px;
	border: 1px solid var(--global-palette1, #002f6c);
	border-radius: 3px;
	text-align: center;
	text-decoration: none;
	color: var(--global-palette1, #002f6c);
	font-weight: 500;
}

.rp-courses__more:hover,
.rp-courses__more:focus {
	background: var(--global-palette1, #002f6c);
	color: var(--global-palette9, #fff);
}

.rp-courses__status {
	min-height: 1.5em;
	margin-top: 0.75rem;
	text-align: center;
}
