/* ==========================================================================
   Online course catalog + detail — tablet and mobile.
   ========================================================================== */

@media only screen and (max-width: 1024.98px) {
	.lms-catalog__form {
		margin-top: 16px;
	}

	.lms-catalog__layout {
		grid-template-columns: 1fr;
	}

	.lms-page-header:not(.lms-page-header--detail) {
		padding: 16px 0 18px;
	}

	.lms-filters {
		position: static;
		padding: 14px;
	}

	.lms-filters__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		min-height: 42px;
		border: 1px solid var(--lms-line, #e2e8f0);
		background: #fff;
		border-radius: 8px;
		font-size: 14px;
		font-weight: 600;
		font-family: inherit;
		color: var(--lms-navy, #2D368F);
		cursor: pointer;
	}

	.lms-filters__toggle:hover {
		background: #eef0fb;
	}

	.lms-filters__toggle:focus-visible {
		outline: 2px solid var(--lms-navy, #2D368F);
		outline-offset: 2px;
	}

	.lms-filters__panel {
		display: none;
		margin-top: 12px;
	}

	.lms-filters__panel.is-open {
		display: block;
	}

	.lms-filters__title {
		display: none;
	}

	.lms-catalog .lms-toolbar {
		grid-template-columns: 1fr;
	}

	.lms-catalog .course-result-count {
		grid-column: auto;
		padding: 0;
	}

	.lms-course-detail__layout {
		grid-template-columns: 1fr;
	}

	.lms-course-sidebar {
		position: static;
	}

	.lms-course-hero,
	.lms-course-hero__image {
		min-height: 0;
		height: 340px;
	}

	.lms-course-intro__title {
		max-width: none;
		font-size: 28px;
	}
}

@media only screen and (max-width: 767.98px) {
	.lms-page-header:not(.lms-page-header--detail) .lms-page-header__title,
	.lms-page-header__title {
		font-size: clamp(24px, 6.5vw, 30px);
	}

	.lms-page-header__lede {
		font-size: 14px;
	}

	.hero-stats {
		gap: 16px;
		margin-top: 16px;
	}

	.lms-page-header__row {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.lms-toolbar,
	.lms-catalog .lms-toolbar {
		grid-template-columns: 1fr;
		padding: 10px;
	}

	.lms-catalog .lms-toolbar__meta {
		flex-wrap: wrap;
	}

	.lms-catalog .course-sort-select {
		width: 100%;
		max-width: none;
		min-width: 0;
		margin-left: 0;
	}

	.lms-catalog .course-result-count {
		padding: 0;
	}

	.lms-course-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.lms-course-card__actions .lms-btn {
		flex: 1 1 100%;
	}

	.lms-catalog .lms-course-card__actions .lms-btn {
		flex: 1 1 100%;
	}

	.lms-catalog .lms-course-card__details {
		margin-left: 0;
		width: 100%;
		text-align: center;
		padding: 6px 0 2px;
	}

	.lms-course-card__actions .course-enrollment-closed-badge {
		flex: 1 1 auto;
		justify-content: flex-start;
	}

	.lms-course-hero {
		min-height: 340px;
		border-radius: 18px;
	}

	.lms-course-hero__image {
		height: 340px;
		border-radius: 18px;
	}

	.lms-course-hero__overlay {
		padding: 18px 18px 16px;
	}

	.lms-course-intro__title {
		font-size: clamp(22px, 6.4vw, 28px);
	}

	/* The page is used mostly on mobile -- clamp the Overview description
	   instead of forcing a long scroll past a wall of text before
	   reaching the Curriculum, which is what most visitors came to see. */
	.lms-panel__body--clamp {
		max-height: 140px;
		overflow: hidden;
		position: relative;
	}

	.lms-panel__body--clamp::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 36px;
		background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	}

	.lms-panel__body--clamp.is-expanded {
		max-height: none;
	}

	.lms-panel__body--clamp.is-expanded::after {
		display: none;
	}

	.lms-curriculum__lessons {
		padding-left: 8px;
	}

	.lms-course-detail {
		padding-bottom: 96px;
	}

	.lms-sticky-cta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		background: #121739;
		color: #fff;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	}

	.lms-sticky-cta__price {
		font-size: 16px;
		font-weight: 800;
		color: #fff;
	}

	.lms-sticky-cta .lms-btn {
		min-width: 140px;
		background: #fff;
		color: #2D368F;
	}
}

@media only screen and (min-width: 768px) and (max-width: 1024.98px) {
	.lms-course-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media only screen and (min-width: 1280px) {
	.lms-course-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
