/*==============================================================
  # Hub de Tecnologia - Portfolio de Cursos
  # Mantem consistencia com o Design System global
==============================================================*/

.courses-hero {
	position: relative;
	overflow: hidden;
	padding: 120px 0 56px;
	background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 100%);
}

[data-theme="dark"] .courses-hero {
	background: linear-gradient(180deg, rgba(59, 130, 246, 0.18) 0%, rgba(10, 14, 26, 0) 100%);
}

.courses-hero-inner {
	position: relative;
	z-index: 1;
}

.courses-hero-title {
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1.1;
	margin-bottom: var(--space-md);
}

.courses-hero-description {
	max-width: 56ch;
	color: var(--text-secondary);
	font-size: 1.0625rem;
	line-height: 1.75;
	margin: 0;
}

.courses-hero-stats {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg);
	padding: var(--space-lg);
	display: grid;
	gap: var(--space-md);
}

.courses-hero-stats .stat-item {
	display: flex;
	flex-direction: column;
	padding: var(--space-sm) 0;
	border-bottom: 1px dashed var(--border-color);
}

.courses-hero-stats .stat-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.courses-hero-stats strong {
	font-family: var(--font-display);
	color: var(--text-primary);
	font-size: 1.5rem;
	line-height: 1;
}

.courses-hero-stats span {
	margin-top: 4px;
	color: var(--text-muted);
	font-size: 0.875rem;
}

.courses-portfolio {
	background: var(--bg-body);
    padding: 130px 0 64px;
}

.portfolio-toolbar {
	margin-top: var(--space-2xl);
	margin-bottom: var(--space-lg);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	flex-wrap: wrap;
}

.portfolio-search-wrap {
	flex: 1;
	min-width: min(100%, 340px);
	position: relative;
}

.portfolio-search-wrap i {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	font-size: 0.9375rem;
}

.portfolio-search {
	width: 100%;
	height: 46px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	background: var(--bg-card);
	color: var(--text-primary);
	font-size: 0.9375rem;
	padding: 0 14px 0 40px;
	box-shadow: var(--shadow-sm);
}

.portfolio-search:focus {
	border-color: var(--color-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.portfolio-counter {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	background: var(--bg-card);
	padding: 10px 14px;
}

.portfolio-counter span {
	color: var(--text-primary);
	font-family: var(--font-display);
	font-size: 1.375rem;
	line-height: 1;
}

.portfolio-counter small {
	color: var(--text-muted);
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.portfolio-filters {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	overflow-x: auto;
	padding-top: var(--space-xs);
	padding-bottom: var(--space-lg);
    padding-left: var(--space-md);
}

.portfolio-filters::-webkit-scrollbar {
	height: 4px;
}

.portfolio-filter {
	white-space: nowrap;
	padding: 9px 14px;
	border-radius: var(--radius-full);
	border: 1px solid var(--border-color);
	background: var(--bg-card);
	color: var(--text-secondary);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.portfolio-filter:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
	transform: translateY(-1px);
}

.portfolio-filter.is-active {
	border-color: transparent;
	background: var(--gradient-primary);
	color: var(--color-white);
	box-shadow: 0 8px 20px rgba(37, 99, 235, 0.26);
}

.courses-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-lg);
}

.courses-grid .course-card {
	margin: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.courses-grid .course-content {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.courses-grid .course-subtitle {
	min-height: 44px;
}

.courses-grid .course-footer {
	margin-top: auto;
}

.portfolio-empty {
	margin-top: var(--space-2xl);
	text-align: center;
	padding: var(--space-2xl) var(--space-lg);
	border: 1px dashed var(--border-color);
	border-radius: var(--radius-xl);
	background: var(--bg-section);
}

.portfolio-empty i {
	color: var(--color-accent);
	font-size: 1.6rem;
	margin-bottom: var(--space-sm);
}

.portfolio-empty h3 {
	font-size: 1.25rem;
	margin-bottom: var(--space-xs);
}

.portfolio-empty p {
	margin: 0;
	color: var(--text-muted);
}

@media (max-width: 1199px) {
	.courses-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.courses-hero {
		padding: 100px 0 44px;
	}

	.courses-hero-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.courses-hero-stats .stat-item {
		border-bottom: none;
		border-right: 1px dashed var(--border-color);
		padding: 0 var(--space-sm) 0 0;
	}

	.courses-hero-stats .stat-item:last-child {
		border-right: none;
	}
}

@media (max-width: 767px) {
	.courses-grid {
		grid-template-columns: 1fr;
	}

	.courses-hero-stats {
		grid-template-columns: 1fr;
	}

	.courses-hero-stats .stat-item {
		border-right: none;
		border-bottom: 1px dashed var(--border-color);
		padding: var(--space-sm) 0;
	}

	.courses-hero-stats .stat-item:last-child {
		border-bottom: none;
	}
}
