/*
 * Inbound for WordPress
 * LearnDash Course Styles
 */

#course-content {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Allow the archive grid more room */
.archive #course-content {
	max-width: 1100px;
}

/* Archive header */
.courses-archive-header {
	margin-bottom: 40px;
}

.courses-archive-title {
	margin-bottom: 10px;
}

.courses-archive-description {
	font-size: 1.1em;
	color: #555;
}

/* Courses grid */
.courses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 32px;
	margin-bottom: 40px;
}

/* Course card */
.course-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.course-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.course-card__thumbnail {
	display: block;
	line-height: 0;
}

.course-card__thumbnail img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.course-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px;
}

.course-card__title {
	font-size: 1.2em;
	margin: 0 0 12px;
}

.course-card__title a {
	text-decoration: none;
}

.course-card__title a:hover {
	text-decoration: underline;
}

.course-card__excerpt {
	flex: 1;
	font-size: 0.95em;
	color: #555;
	margin-bottom: 14px;
}

.course-card__excerpt p:last-child {
	margin-bottom: 0;
}

.course-card__meta {
	font-size: 0.85em;
	color: #888;
	margin-bottom: 16px;
}

.course-card__cta {
	align-self: flex-start;
}

/* Success alert — secondary colour throughout */
.learndash-wrapper .ld-alert-success {
	border-color: var(--color-secondary) !important;
	background-color: rgba(106, 163, 160, 0.15) !important;
}

.learndash-wrapper .ld-alert-success .ld-alert-icon {
	background-color: var(--color-secondary) !important;
	color: #fff !important;
}

.learndash-wrapper .ld-alert-success .ld-button {
	background-color: var(--color-secondary) !important;
}

/* LearnDash nav/action buttons — square corners, white text and icons */
.learndash-wrapper .ld-button,
.learndash-wrapper .learndash_mark_complete_button {
	border-radius: 0 !important;
	color: #fff !important;
}

.learndash-wrapper:not(.ld-registration__outer-wrapper):not(.learndash-wrapper--modern) .learndash_mark_complete_button {
	background-color: var(--color-secondary) !important;
	border: 0 !important;
}

.learndash-wrapper .ld-button .ld-icon {
	color: #fff !important;
}

/* Course page H1 */
.single-sfwd-courses h1,
.single-sfwd-lessons h1,
.single-sfwd-topic h1,
.archive.post-type-archive-sfwd-courses h1 {
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
}

/* LearnDash expand button — use secondary colour */
.single-sfwd-courses .learndash-wrapper .ld-expand-button.ld-button-alternate:not([disabled]) .ld-icon,
.single-sfwd-courses .learndash-wrapper .ld-expand-button.ld-primary-background:not([disabled]),
.single-sfwd-lessons .learndash-wrapper .ld-expand-button.ld-button-alternate:not([disabled]) .ld-icon,
.single-sfwd-lessons .learndash-wrapper .ld-expand-button.ld-primary-background:not([disabled]),
.single-sfwd-topic .learndash-wrapper .ld-expand-button.ld-button-alternate:not([disabled]) .ld-icon,
.single-sfwd-topic .learndash-wrapper .ld-expand-button.ld-primary-background:not([disabled]) {
	background-color: var(--color-secondary) !important;
	color: #fff !important;
}

.single-sfwd-courses .learndash-wrapper .ld-expand-button.ld-button-alternate .ld-text,
.single-sfwd-lessons .learndash-wrapper .ld-expand-button.ld-button-alternate .ld-text,
.single-sfwd-topic .learndash-wrapper .ld-expand-button.ld-button-alternate .ld-text {
	color: var(--color-secondary) !important;
}

/* "Expand All" button — keep orange, square corners */
.single-sfwd-courses .learndash-wrapper .ld-item-list-actions .ld-expand-button.ld-primary-background,
.single-sfwd-lessons .learndash-wrapper .ld-item-list-actions .ld-expand-button.ld-primary-background,
.single-sfwd-topic .learndash-wrapper .ld-item-list-actions .ld-expand-button.ld-primary-background {
	background-color: var(--color-primary) !important;
	color: #fff !important;
	border-radius: 0 !important;
}

/* Spacing above breadcrumbs and below infobar */
.course-breadcrumb {
	padding-top: 24px;
}

[class*="learndash-shortcode-wrap-ld_infobar"] {
	margin-bottom: 40px;
}



.course-breadcrumb ul {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.course-breadcrumb ul li {
	display: inline;
	font-size: 12px;
	padding: 0 2px;
}

.course-breadcrumb ul li:after {
	content: "›";
	padding-left: 4px;
}

.course-breadcrumb ul li:last-child:after {
	content: "";
}
