/**
 * Demo-pack builder sections: class schedule, property cards, course cards.
 *
 * @package Nexus
 */

.nexus-class-schedule-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.nexus-class-schedule {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	table-layout: auto;
}

.nexus-class-schedule th,
.nexus-class-schedule td {
	padding: 0.65rem 0.85rem;
	text-align: left;
	border-bottom: 1px solid var(--nexus-border-light, #e2e8f0);
	vertical-align: top;
	overflow-wrap: anywhere;
	word-break: normal;
}

.nexus-class-schedule thead th {
	font-weight: 600;
	background: var(--nexus-surface-alt, #f8fafc);
	white-space: nowrap;
}

@media (max-width: 700px) {
	.nexus-class-schedule,
	.nexus-class-schedule thead,
	.nexus-class-schedule tbody,
	.nexus-class-schedule th,
	.nexus-class-schedule td,
	.nexus-class-schedule tr {
		display: block;
		width: 100%;
	}

	.nexus-class-schedule thead {
		display: none;
	}

	.nexus-class-schedule tr {
		margin: 0 0 0.85rem;
		padding: 0.85rem 1rem;
		border: 1px solid var(--nexus-border-light, #e2e8f0);
		border-radius: 10px;
		background: var(--nexus-surface, #fff);
		box-sizing: border-box;
	}

	.nexus-class-schedule td {
		display: grid;
		grid-template-columns: 6.5rem minmax(0, 1fr);
		gap: 0.5rem 0.75rem;
		align-items: start;
		padding: 0.35rem 0;
		border-bottom: 0;
		white-space: normal;
	}

	.nexus-class-schedule td::before {
		content: attr(data-label);
		font-size: 0.75rem;
		font-weight: 650;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		color: var(--nexus-body-text-muted, #64748b);
		line-height: 1.35;
	}

	.nexus-class-schedule td:last-child {
		padding-bottom: 0;
	}
}

/* Builder mobile preview (media queries do not fire). */
body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule,
body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule thead,
body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule tbody,
body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule th,
body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule td,
body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule tr {
	display: block;
	width: 100%;
}

body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule thead {
	display: none;
}

body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule tr {
	margin: 0 0 0.85rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--nexus-border-light, #e2e8f0);
	border-radius: 10px;
	background: var(--nexus-surface, #fff);
	box-sizing: border-box;
}

body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule td {
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	gap: 0.5rem 0.75rem;
	align-items: start;
	padding: 0.35rem 0;
	border-bottom: 0;
	white-space: normal;
}

body.nexus-builder-active.nexus-preview-mobile .nexus-class-schedule td::before {
	content: attr(data-label);
	font-size: 0.75rem;
	font-weight: 650;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--nexus-body-text-muted, #64748b);
}

.nexus-property-cards-grid,
.nexus-course-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.25rem;
	align-items: stretch;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

.nexus-property-card,
.nexus-course-card {
	border: 1px solid var(--nexus-border-light, #e2e8f0);
	border-radius: 10px;
	overflow: hidden;
	background: var(--nexus-surface, #fff);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
}

.nexus-property-card__media {
	background: var(--nexus-surface-alt, #f1f5f9);
	aspect-ratio: 16 / 10;
	overflow: hidden;
	flex-shrink: 0;
}

.nexus-property-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nexus-property-card__body,
.nexus-course-card {
	padding: 1rem 1.15rem 1.2rem;
}

.nexus-property-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 0.35rem;
	min-height: 0;
}

.nexus-property-card__body > p {
	margin: 0;
}

.nexus-property-card__body .nexus-btn,
.nexus-course-card .nexus-btn {
	margin-top: auto;
	align-self: flex-start;
}

.nexus-property-card__price {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--nexus-primary, #0f766e);
}

.nexus-property-card__title,
.nexus-course-card__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.35;
}

.nexus-property-card__meta,
.nexus-course-card__duration,
.nexus-course-card__text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--nexus-body-text-muted, #64748b);
}

.nexus-property-card__body > p:has(.nexus-btn) {
	margin-top: auto;
	padding-top: 0.5rem;
}

.nexus-course-card__badge {
	display: inline-block;
	margin-bottom: 0.5rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: color-mix(in srgb, var(--nexus-primary, #0f766e) 12%, transparent);
	color: var(--nexus-primary, #0f766e);
}

@media (max-width: 782px) {
	.nexus-property-cards-grid,
	.nexus-course-cards-grid {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
		max-width: none;
	}
}

@media (max-width: 480px) {
	.nexus-property-cards-grid,
	.nexus-course-cards-grid {
		grid-template-columns: 1fr;
	}
}
