/**
 * Tema: WordPress Site Factory - Starter Theme
 * Arquivo: assets/css/template-curso-aberto.css
 *
 * Desenvolvido por: Roger Alves
 * Data da Modificacao: 2026-05-29
 * Hora da Modificacao: 10:15
 *
 * Todos os direitos reservados.
 */

.course-hero {
	position: relative;
	background-color: #062547;
	padding: clamp(3rem, 7vw, 5rem) 0;
	color: var(--color-text-on-dark);
	overflow: hidden;
}

/* Imagem de fundo da categoria (igual ao single.php) */
.course-hero-image {
	position: absolute;
	inset: -14% 0;
	overflow: hidden;
}

.course-hero-image img {
	width: 100%;
	height: 128%;
	object-fit: cover;
	object-position: top;
	opacity: 0.24;
	filter: grayscale(1) sepia(0.12);
}

.course-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(3, 15, 29, 0.98) 0%,
		rgba(6, 37, 71, 0.74) 50%,
		rgba(6, 37, 71, 0.3) 100%
	);
}

.course-hero-inner {
	position: relative;
	z-index: 1;
}

.course-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 1.2rem;
	font-size: 0.86rem;
	color: rgba(255, 255, 255, 0.68);
}

.course-breadcrumb a {
	color: rgba(255, 255, 255, 0.72);
}

.course-breadcrumb a:hover {
	color: var(--color-secondary);
}

.course-kicker {
	display: inline-flex;
	margin-bottom: 0.9rem;
	padding: 0.25rem 0.65rem;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--color-text-on-dark);
}

.course-hero-title-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}

.course-hero--has-image .course-hero-title-row {
	grid-template-columns: minmax(0, 1fr) clamp(200px, 28vw, 320px);
}

.course-hero-title-copy {
	min-width: 0;
}

.course-hero h1 {
	max-width: 850px;
	margin: 0 0 0.75rem;
	color: var(--color-text-on-dark);
	font-size: clamp(2.2rem, 5vw, 4rem);
	line-height: 1.08;
}

/* Imagem destacada no hero — mesmo efeito que single.php */
.course-article-featured {
	justify-self: end;
	display: block;
	width: min(100%, 320px);
	padding: clamp(0.75rem, 1.2vw, 1rem);
	background: rgba(255, 255, 255, 0.60);
	border-radius: var(--radius-md);
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(0, 0, 0, 0.18);
	transform: rotate(-2deg) translateY(-10px);
	transition: transform 240ms ease, box-shadow 240ms ease;
	overflow: visible;
}

.course-article-featured img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 0;
	border: none;
	margin: 0;
	display: block;
}

.course-article-featured:hover {
	box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
	transform: rotate(0deg) translateY(-18px) scale(1.02);
}

.course-hero .post-view-count {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.2;
	color: rgba(255, 255, 255, 0.78);
}

.course-hero .post-view-count-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--radius-full);
	background: var(--color-secondary);
	box-shadow: 0 0 0 4px rgba(246, 190, 71, 0.16);
}

.course-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
	padding-top: clamp(3rem, 6vw, 4.5rem);
	padding-bottom: clamp(4rem, 7vw, 5.5rem);
}

.course-content {
	min-width: 0;
}

.course-sidebar {
	position: sticky;
	top: 105px;
	display: grid;
	gap: 1rem;
}

.course-topics,
.course-next {
	border: 1px solid rgba(13, 35, 58, 0.12);
	border-radius: var(--radius-md);
	background: var(--color-bg-light);
	box-shadow: var(--shadow-sm);
}


.course-topics {
	padding: 1.25rem;
}

.course-topics-title,
.course-next-label {
	display: inline-flex;
	margin-bottom: 1rem;
	padding: 0.35rem 0.7rem;
	border-radius: var(--radius-full);
	background: var(--color-primary);
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-text-on-dark);
}

.course-topics ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
	counter-reset: course-topic;
}

.course-topics li {
	counter-increment: course-topic;
}

.course-topics a {
	display: grid;
	grid-template-columns: 1.8rem minmax(0, 1fr);
	gap: 0.7rem;
	align-items: start;
	padding: 0.65rem;
	border-radius: var(--radius-sm);
	color: var(--color-text-secondary);
	text-decoration: none;
	transition: var(--transition-fast);
}

.course-topics a span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.8rem;
	height: 1.8rem;
	border: 1px solid rgba(13, 35, 58, 0.22);
	border-radius: var(--radius-full);
	font-size: 0.78rem;
	font-weight: 800;
	color: var(--color-primary);
}

.course-topics a strong {
	font-size: 0.92rem;
	line-height: 1.35;
}

.course-topics a:hover,
.course-topics li.is-active a {
	background: rgba(13, 35, 58, 0.06);
	color: var(--color-primary);
}

.course-topics li.is-active a span {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-text-on-dark);
}

@media (max-width: 640px) {
	.course-hero--has-image .course-hero-title-row {
		grid-template-columns: 1fr;
	}

	.course-article-featured {
		justify-self: start;
		width: min(280px, 100%);
		transform: rotate(-1.5deg) translateY(0);
	}
}

.course-next {
	margin-top: 3rem;
	padding: 1.25rem;
}

.course-next-card {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	color: var(--color-primary);
	text-decoration: none;
}

.course-next-card img {
	width: 96px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--radius-sm);
	margin: 0;
}

.course-next-card span {
	font-size: clamp(1rem, 2vw, 1.25rem);
	font-weight: 800;
	line-height: 1.25;
}

.course-next-card:hover span {
	color: var(--color-accent);
}

@media (max-width: 920px) {
	.course-layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.course-next-card {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.course-next-card img {
		width: 72px;
	}
}

/* ============================================================
   MODO ESCURO
   ============================================================ */
html[data-gpm-theme="dark"] .course-hero {
	background-color: #030f1d;
}

html[data-gpm-theme="dark"] .course-topics,
html[data-gpm-theme="dark"] .course-next {
	background: #14202f;
	border-color: rgba(253, 186, 73, 0.18);
}

html[data-gpm-theme="dark"] .course-topics-title,
html[data-gpm-theme="dark"] .course-next-label {
	background: rgba(253, 186, 73, 0.18);
	color: #fdba49;
}

html[data-gpm-theme="dark"] .course-topics a {
	color: rgba(220, 231, 242, 0.85);
}

html[data-gpm-theme="dark"] .course-topics a strong {
	color: rgba(220, 231, 242, 0.9);
}

html[data-gpm-theme="dark"] .course-topics a span {
	border-color: rgba(253, 186, 73, 0.3);
	color: #fdba49;
}

html[data-gpm-theme="dark"] .course-topics a:hover,
html[data-gpm-theme="dark"] .course-topics li.is-active a {
	background: rgba(253, 186, 73, 0.08);
	color: #ffffff;
}

html[data-gpm-theme="dark"] .course-topics li.is-active a span {
	background: rgba(253, 186, 73, 0.22);
	border-color: rgba(253, 186, 73, 0.4);
	color: #fdba49;
}

html[data-gpm-theme="dark"] .course-next-card {
	color: var(--color-text-on-dark);
}

html[data-gpm-theme="dark"] .course-next-card span {
	color: rgba(220, 231, 242, 0.9);
}

/* ── Títulos do conteúdo (mesmos espaçamentos do template-single) ── */
.course-content h2 {
	font-size: clamp(1.35rem, 3vw, 1.85rem);
	color: var(--color-primary);
	margin-top: 2.5rem;
	margin-bottom: 0.75rem;
	padding-top: 1rem;
	scroll-margin-top: 100px;
}

.course-content h3 {
	font-size: clamp(1.1rem, 2.5vw, 1.35rem);
	color: var(--color-primary);
	margin-top: 1.75rem;
	margin-bottom: 0.5rem;
}

.course-content h4 {
	font-size: 1.1rem;
	color: var(--color-primary);
	margin-top: 1.5rem;
	margin-bottom: 0.4rem;
}

.course-content p {
	margin-bottom: 1.25rem;
}

/* ── Blockquote ── */
.course-content blockquote {
	border-left: 4px solid var(--color-secondary);
	padding: 1rem 1.5rem;
	background: var(--color-bg-surface);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	margin: 1.5rem 0;
}

.course-content blockquote p {
	font-style: italic;
	color: var(--color-text-secondary);
	margin: 0 0 2.25rem !important;
}

.course-content blockquote p:last-child {
	margin-bottom: 0 !important;
}

.course-content blockquote br + br {
	display: block;
	content: "";
	margin-top: 2.25rem;
}

html[data-gpm-theme="dark"] .course-content blockquote {
	background: rgba(255, 255, 255, 0.05);
}
