/**
 * Catalog Design 2 — Consolidados
 */

.hexfly-d2-catalog {
	--hexfly-d2-ink: #1f2937;
	--hexfly-d2-muted: #6b7280;
	--hexfly-d2-bg: #f5f7fa;
	--hexfly-d2-surface: #ffffff;
	--hexfly-d2-line: #e5e7eb;
	--hexfly-d2-accent: #0057d9;
	--hexfly-d2-accent-hover: #003e9c;
	--hexfly-d2-primary-rgb: 0, 87, 217;
	--hexfly-d2-secondary-rgb: 77, 163, 255;
	--hexfly-d2-text-rgb: 31, 41, 55;
	--hexfly-d2-sans: 'DM Sans', system-ui, sans-serif;
	--hexfly-d2-display: 'Outfit', system-ui, sans-serif;
	--hexfly-d2-ease-out: cubic-bezier(0.22, 1, 0.36, 1);

	padding: 3.5rem 0 4rem;
	background: var(--hexfly-d2-bg);
	color: var(--hexfly-d2-ink);
	font-family: var(--hexfly-d2-sans);
	line-height: 1.6;
}

.hexfly-d2-catalog img {
	display: block;
	max-width: 100%;
	height: auto;
}

.hexfly-d2-catalog .hexfly-d2-container {
	width: min(1160px, 92vw);
	margin-inline: auto;
}

.hexfly-d2-catalog__head {
	margin-bottom: 1.5rem;
	max-width: 48ch;
}

.hexfly-d2-catalog__head h2 {
	margin: 0 0 0.5rem;
	font-family: var(--hexfly-d2-display);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.hexfly-d2-catalog__head p {
	margin: 0;
	color: var(--hexfly-d2-muted);
}

.hexfly-d2-catalog__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.75rem;
}

.hexfly-d2-catalog__filter {
	padding: 0.45rem 0.85rem;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--hexfly-d2-muted);
	background: var(--hexfly-d2-surface);
	border: 1px solid var(--hexfly-d2-line);
	border-radius: 999px;
	cursor: pointer;
	transition:
		color 0.2s var(--hexfly-d2-ease-out),
		background 0.2s var(--hexfly-d2-ease-out),
		border-color 0.2s var(--hexfly-d2-ease-out),
		transform 0.15s var(--hexfly-d2-ease-out);
}

.hexfly-d2-catalog__filter:hover {
	color: var(--hexfly-d2-ink);
	border-color: rgba(var(--hexfly-d2-primary-rgb), 0.35);
}

.hexfly-d2-catalog__filter:active {
	transform: scale(0.98);
}

.hexfly-d2-catalog__filter.is-active {
	color: #fff;
	background: var(--hexfly-d2-accent);
	border-color: var(--hexfly-d2-accent);
}

.hexfly-d2-catalog__featured-wrap {
	margin-bottom: 1.25rem;
}

.hexfly-d2-catalog__grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.hexfly-d2-catalog__pool {
	display: none;
}

.hexfly-d2-catalog__empty {
	display: none;
	padding: 3rem 1.5rem;
	text-align: center;
	background: var(--hexfly-d2-surface);
	border: 1px dashed var(--hexfly-d2-line);
	border-radius: 12px;
}

.hexfly-d2-catalog__empty.is-visible {
	display: block;
}

.hexfly-d2-catalog__empty p {
	margin: 0 0 1rem;
	color: var(--hexfly-d2-muted);
}

.hexfly-d2-catalog__results.is-hidden {
	display: none;
}

.hexfly-d2-catalog__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.15rem;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	background: var(--hexfly-d2-surface);
	color: var(--hexfly-d2-ink);
	border: 1px solid var(--hexfly-d2-line);
	transition: border-color 0.2s var(--hexfly-d2-ease-out), color 0.2s var(--hexfly-d2-ease-out);
}

.hexfly-d2-catalog__clear:hover {
	border-color: rgba(var(--hexfly-d2-primary-rgb), 0.45);
	color: var(--hexfly-d2-accent);
}

.hexfly-d2-course {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 12px;
	background: var(--hexfly-d2-surface);
	border: 1px solid var(--hexfly-d2-line);
	overflow: hidden;
	transition:
		border-color 0.2s var(--hexfly-d2-ease-out),
		box-shadow 0.2s var(--hexfly-d2-ease-out),
		transform 0.2s var(--hexfly-d2-ease-out);
}

.hexfly-d2-course:hover {
	border-color: rgba(var(--hexfly-d2-primary-rgb), 0.35);
	box-shadow: 0 12px 40px rgba(var(--hexfly-d2-text-rgb), 0.08);
	transform: translateY(-2px);
}

.hexfly-d2-course--featured {
	display: grid;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.hexfly-d2-course--featured {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
	}
}

.hexfly-d2-course__thumb {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	min-height: 160px;
	padding: 1rem;
	overflow: hidden;
	background: var(--hexfly-d2-line);
}

.hexfly-d2-course__thumb-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hexfly-d2-course--featured .hexfly-d2-course__thumb {
	min-height: 100%;
	aspect-ratio: auto;
}

@media (min-width: 768px) {
	.hexfly-d2-course--featured .hexfly-d2-course__thumb {
		min-height: 280px;
	}
}

.hexfly-d2-course__thumb::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 35%, rgba(var(--hexfly-d2-text-rgb), 0.75) 100%);
	pointer-events: none;
}

.hexfly-d2-course__area {
	position: relative;
	z-index: 1;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

.hexfly-d2-course__play {
	position: relative;
	z-index: 1;
	color: rgba(255, 255, 255, 0.85);
	flex-shrink: 0;
}

.hexfly-d2-course__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.25rem;
	gap: 0.75rem;
}

.hexfly-d2-course--featured .hexfly-d2-course__body {
	padding: 1.5rem 1.5rem 1.5rem 1.25rem;
}

.hexfly-d2-course__meta-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.hexfly-d2-course__status {
	padding: 0.2rem 0.5rem;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 4px;
}

.hexfly-d2-course__status--open {
	color: #14532d;
	background: #dcfce7;
}

.hexfly-d2-course__status--soon {
	color: var(--hexfly-d2-accent-hover);
	background: rgba(var(--hexfly-d2-secondary-rgb), 0.2);
}

.hexfly-d2-course__level {
	font-size: 0.75rem;
	color: var(--hexfly-d2-muted);
}

.hexfly-d2-course__price {
	padding: 0.2rem 0.5rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 999px;
}

.hexfly-d2-course__price--free {
	color: #047857;
	background: #ecfdf5;
}

.hexfly-d2-course__price--paid {
	color: #92400e;
	background: #fffbeb;
}

.hexfly-d2-course__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.02em;
}

.hexfly-d2-course--featured .hexfly-d2-course__title {
	font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.hexfly-d2-course__excerpt {
	margin: 0;
	font-size: 0.9rem;
	color: var(--hexfly-d2-muted);
	line-height: 1.55;
	flex: 1;
}

.hexfly-d2-course__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8rem;
	color: var(--hexfly-d2-muted);
}

.hexfly-d2-course__facts li {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.hexfly-d2-course__facts svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.hexfly-d2-course__footer {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--hexfly-d2-line);
}

@media (min-width: 480px) {
	.hexfly-d2-course__footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.hexfly-d2-course__instructor {
	margin: 0;
	font-size: 0.8rem;
	color: var(--hexfly-d2-muted);
}

.hexfly-d2-course__instructor strong {
	color: var(--hexfly-d2-ink);
	font-weight: 600;
}

.hexfly-d2-course__cta {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1rem;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	background: var(--hexfly-d2-accent);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background 0.2s var(--hexfly-d2-ease-out),
		transform 0.15s var(--hexfly-d2-ease-out),
		opacity 0.2s var(--hexfly-d2-ease-out);
}

.hexfly-d2-course__cta:hover:not(.is-disabled) {
	background: var(--hexfly-d2-accent-hover);
	color: #fff;
}

.hexfly-d2-course__cta:active:not(.is-disabled) {
	transform: scale(0.98);
}

.hexfly-d2-course__cta.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

.hexfly-d2-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.hexfly-d2-catalog *,
	.hexfly-d2-catalog *::before,
	.hexfly-d2-catalog *::after {
		transition-duration: 0.01ms !important;
	}

	.hexfly-d2-course:hover {
		transform: none;
	}
}
