/**
 * CC Custom Views — Learn Hub frontend styles
 *
 * Three-color content-type system (articles gray, videos blue, podcasts purple).
 * Three breakpoints: mobile (<=480px), tablet (481-1023px), desktop (>=1024px).
 *
 * Override any color by re-declaring the CSS custom property on .cc-cv or a
 * higher selector in your theme.
 */

.cc-cv {
	/* Content-type palette */
	--cc-cv-article-bg:    #F1EFE8;
	--cc-cv-article-color: #444441;
	--cc-cv-video-bg:      #E6F1FB;
	--cc-cv-video-color:   #0C447C;
	--cc-cv-podcast-bg:    #EEEDFE;
	--cc-cv-podcast-color: #3C3489;

	/* Surfaces and text */
	--cc-cv-card-bg:        #ffffff;
	--cc-cv-card-border:    rgba(0, 0, 0, 0.08);
	--cc-cv-card-border-h:  rgba(0, 0, 0, 0.16);
	--cc-cv-surface:        #f7f7f6;
	--cc-cv-text:           #1a1a1a;
	--cc-cv-text-secondary: #5f5f5b;
	--cc-cv-text-tertiary:  #999;
	--cc-cv-accent:         #1a1a1a;
	--cc-cv-accent-text:    #ffffff;

	/* Layout */
	--cc-cv-radius:    12px;
	--cc-cv-radius-sm: 8px;
	--cc-cv-radius-xs: 6px;

	box-sizing: border-box;
	color: var(--cc-cv-text);
	font-family: inherit;
	line-height: 1.5;
}

.cc-cv *,
.cc-cv *::before,
.cc-cv *::after {
	box-sizing: border-box;
}

/* ---------- Sections ---------- */

.cc-cv-section {
	margin: 0 0 2.5em;
}

.cc-cv-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 1em;
	gap: 1em;
}

.cc-cv-h1 {
	font-size: 1.75em;
	font-weight: 500;
	line-height: 1.2;
	margin: 0 0 0.35em;
}

.cc-cv-h2 {
	font-size: 1.5em;
	font-weight: 600;
	margin: 0;
	line-height: 1.25;
}

.cc-cv-eyebrow {
	font-size: 0.7em;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cc-cv-text-secondary);
	margin: 0 0 0.4em;
}

.cc-cv-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.cc-cv-eyebrow a:hover {
	color: var(--cc-cv-text);
}

.cc-cv-lead {
	font-size: 0.95em;
	color: var(--cc-cv-text-secondary);
	margin: 0;
	line-height: 1.5;
}

/* ---------- Pillars ---------- */

.cc-cv-pillars {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6em;
}

.cc-cv-pillar {
	display: block;
	background: var(--cc-cv-card-bg);
	border: 1px solid var(--cc-cv-card-border);
	border-radius: var(--cc-cv-radius);
	padding: 1em;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s;
}

.cc-cv-pillar:hover {
	border-color: var(--cc-cv-card-border-h);
}

.cc-cv-pillar-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--cc-cv-radius-sm);
	font-size: 1.3em;
	margin: 0 0 0.7em;
}

.cc-cv-pillar-label {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 0.25em;
}

.cc-cv-pillar-desc {
	font-size: 0.9em;
	color: var(--cc-cv-text-secondary);
	margin: 0;
	line-height: 1.4;
}

/* ---------- Highlights ---------- */

.cc-cv-highlights {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.6em;
}

/* Mobile (single-column highlights): use the standard horizontal card layout. */
/* Tablet and up: highlights become multi-column and the cards are too narrow */
/* for the horizontal layout — switch to stacked (thumb on top, body below).  */

@media (min-width: 481px) {
	.cc-cv-highlights .cc-cv-card {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		gap: 0.75em;
		padding: 0.75em;
	}

	.cc-cv-highlights .cc-cv-card-thumb {
		width: 100%;
		height: auto;
	}

	.cc-cv-highlights .cc-cv-card-body {
		padding: 0 0.15em 0.15em;
	}
}

/* ---------- Filter pills ---------- */

.cc-cv-filters {
	display: flex;
	gap: 0.4em;
	flex-wrap: wrap;
	margin: 0 0 1em;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.cc-cv-pill {
	font-size: 1em;
	padding: 0.5em 1.1em;
	border: 1px solid var(--cc-cv-card-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
	line-height: 1.1;
	font-weight: 500;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cc-cv-pill:hover {
	border-color: var(--cc-cv-card-border-h);
}

.cc-cv-pill.is-active {
	background: var(--cc-cv-accent);
	color: var(--cc-cv-accent-text);
	border-color: var(--cc-cv-accent);
}

/* ---------- Card ---------- */

.cc-cv-feed {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.6em;
}

.cc-cv-card {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.8em;
	background: var(--cc-cv-card-bg);
	border: 1px solid var(--cc-cv-card-border);
	border-radius: var(--cc-cv-radius);
	padding: 0.7em;
	text-decoration: none;
	color: inherit;
	align-items: start;
	transition: border-color 0.15s, transform 0.15s;
}

.cc-cv-card:hover {
	border-color: var(--cc-cv-card-border-h);
}

.cc-cv-card-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--cc-cv-radius-xs);
	overflow: hidden;
	background: var(--cc-cv-surface);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cc-cv-card-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cc-cv-card-thumb-placeholder {
	font-size: 1.6em;
	color: var(--cc-cv-text-tertiary);
}

.cc-cv-card--article .cc-cv-card-thumb {
	background: var(--cc-cv-article-bg);
}
.cc-cv-card--article .cc-cv-card-thumb-placeholder {
	color: var(--cc-cv-article-color);
}

.cc-cv-card--video .cc-cv-card-thumb {
	background: var(--cc-cv-video-bg);
}
.cc-cv-card--video .cc-cv-card-thumb-placeholder {
	color: var(--cc-cv-video-color);
}

.cc-cv-card--podcast .cc-cv-card-thumb {
	background: var(--cc-cv-podcast-bg);
}
.cc-cv-card--podcast .cc-cv-card-thumb-placeholder {
	color: var(--cc-cv-podcast-color);
}

.cc-cv-card-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9em;
	pointer-events: none;
}

.cc-cv-card-duration {
	position: absolute;
	bottom: 0.3em;
	right: 0.3em;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 0.7em;
	padding: 0.1em 0.35em;
	border-radius: 3px;
	font-weight: 500;
	line-height: 1.2;
}

.cc-cv-lock {
	position: absolute;
	top: 0.3em;
	right: 0.3em;
	background: rgba(0, 0, 0, 0.78);
	color: #fff;
	font-size: 0.65em;
	padding: 0.15em 0.45em;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	font-weight: 500;
	line-height: 1.2;
}

.cc-cv-lock i {
	font-size: 0.7em;
}

.cc-cv-card-body {
	min-width: 0;
}

.cc-cv-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font-size: 0.7em;
	font-weight: 500;
	padding: 0.15em 0.5em;
	border-radius: 999px;
	margin: 0 0 0.35em;
	line-height: 1.4;
}

.cc-cv-badge i {
	font-size: 0.8em;
}

.cc-cv-badge--article {
	background: var(--cc-cv-article-bg);
	color: var(--cc-cv-article-color);
}

.cc-cv-badge--video {
	background: var(--cc-cv-video-bg);
	color: var(--cc-cv-video-color);
}

.cc-cv-badge--podcast {
	background: var(--cc-cv-podcast-bg);
	color: var(--cc-cv-podcast-color);
}

.cc-cv-card-title {
	font-size: 1.05em;
	font-weight: 600;
	margin: 0 0 0.35em;
	line-height: 1.35;
}

.cc-cv-card-meta {
	display: flex;
	gap: 0.5em;
	align-items: center;
	flex-wrap: wrap;
	font-size: 0.75em;
	color: var(--cc-cv-text-secondary);
}

.cc-cv-card-meta-dot {
	width: 2px;
	height: 2px;
	border-radius: 50%;
	background: var(--cc-cv-text-tertiary);
}

/* ---------- Load more ---------- */

.cc-cv-load-more-wrap {
	margin-top: 1.5em;
	text-align: center;
}

.cc-cv-load-more-wrap[hidden] {
	display: none;
}

.cc-cv-load-more {
	font-size: 0.9em;
	padding: 0.6em 1.4em;
	border: 1px solid var(--cc-cv-card-border-h);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-family: inherit;
	line-height: 1;
	transition: background 0.15s;
}

.cc-cv-load-more:hover:not(:disabled) {
	background: var(--cc-cv-surface);
}

.cc-cv-load-more:disabled {
	opacity: 0.6;
	cursor: wait;
}

.cc-cv-load-meta {
	font-size: 0.75em;
	color: var(--cc-cv-text-tertiary);
	margin: 0.5em 0 0;
	text-align: center;
}

.cc-cv-empty {
	padding: 2em 1em;
	text-align: center;
	color: var(--cc-cv-text-secondary);
	font-size: 0.9em;
	background: var(--cc-cv-surface);
	border-radius: var(--cc-cv-radius);
}

/* ---------- Topics grid ---------- */

.cc-cv-topics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5em;
}

.cc-cv-topic {
	padding: 1em 0.6em;
	border: 1px solid var(--cc-cv-card-border);
	border-radius: var(--cc-cv-radius-sm);
	text-align: center;
	text-decoration: none;
	color: inherit;
	font-size: 0.95em;
	font-weight: 500;
	background: var(--cc-cv-card-bg);
	transition: border-color 0.15s;
}

.cc-cv-topic:hover {
	border-color: var(--cc-cv-card-border-h);
}

.cc-cv-topic i {
	display: block;
	font-size: 1.5em;
	margin: 0 0 0.5em;
	color: var(--cc-cv-text-secondary);
}

/* ---------- GN CTA ---------- */

.cc-cv-gn-cta {
	background: var(--cc-cv-surface);
	border-radius: var(--cc-cv-radius);
	padding: 1.25em;
	display: flex;
	flex-direction: column;
	gap: 0.8em;
}

.cc-cv-gn-cta-body {
	flex: 1;
}

.cc-cv-gn-cta-title {
	font-size: 1em;
	font-weight: 500;
	margin: 0 0 0.2em;
}

.cc-cv-gn-cta-sub {
	font-size: 0.85em;
	color: var(--cc-cv-text-secondary);
	margin: 0;
}

.cc-cv-gn-cta-button {
	font-size: 0.9em;
	padding: 0.65em 1.1em;
	border-radius: var(--cc-cv-radius-sm);
	background: var(--cc-cv-accent);
	color: var(--cc-cv-accent-text);
	text-decoration: none;
	text-align: center;
	font-weight: 500;
	align-self: stretch;
}

.cc-cv-gn-cta-button:hover {
	opacity: 0.9;
}

.cc-cv-gn-cta--member {
	text-align: center;
}

.cc-cv-gn-cta--member .cc-cv-gn-cta-title {
	margin: 0;
}

/* ---------- Topic hero ---------- */

.cc-cv-topic-hero {
	display: flex;
	align-items: flex-start;
	gap: 1em;
}

.cc-cv-topic-hero-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: var(--cc-cv-radius);
	background: var(--cc-cv-surface);
	color: var(--cc-cv-text);
	font-size: 1.5em;
	flex-shrink: 0;
}

.cc-cv-topic-hero-body {
	flex: 1;
	min-width: 0;
}

.cc-cv-topic-stats {
	font-size: 0.75em;
	color: var(--cc-cv-text-tertiary);
	margin: 0.5em 0 0;
}

/* ---------- Topic page wrapper ---------- */

.cc-cv-topic-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2em 1em;
}

/* ============================================================
   Tablet — 481px and up
   ============================================================ */
@media (min-width: 481px) {
	.cc-cv-pillars {
		grid-template-columns: repeat(4, 1fr);
		gap: 0.75em;
	}

	.cc-cv-pillar {
		padding: 1.1em;
	}

	.cc-cv-highlights {
		grid-template-columns: repeat(3, 1fr);
	}

	.cc-cv-card {
		grid-template-columns: 160px 1fr;
		gap: 1em;
		padding: 0.85em;
	}

	.cc-cv-card-title {
		font-size: 1.1em;
	}

	.cc-cv-topics {
		grid-template-columns: repeat(6, 1fr);
		gap: 0.6em;
	}

	.cc-cv-gn-cta {
		flex-direction: row;
		align-items: center;
		padding: 1.5em;
	}

	.cc-cv-gn-cta-button {
		align-self: auto;
		white-space: nowrap;
	}

	.cc-cv-h1 {
		font-size: 2em;
	}
}

/* ============================================================
   Desktop — 1024px and up
   ============================================================ */
@media (min-width: 1024px) {
	.cc-cv-h1 {
		font-size: 2.4em;
	}

	.cc-cv-h2 {
		font-size: 1.7em;
	}

	.cc-cv-pillars {
		gap: 1em;
	}

	.cc-cv-pillar {
		padding: 1.5em;
	}

	.cc-cv-pillar-icon {
		width: 52px;
		height: 52px;
		font-size: 1.5em;
		margin: 0 0 0.9em;
	}

	.cc-cv-pillar-label {
		font-size: 1.25em;
	}

	.cc-cv-pillar-desc {
		font-size: 1em;
	}

	.cc-cv-highlights {
		grid-template-columns: repeat(4, 1fr);
		gap: 1em;
	}

	.cc-cv-card {
		grid-template-columns: 220px 1fr;
		gap: 1.2em;
		padding: 1em;
	}

	.cc-cv-card-title {
		font-size: 1.2em;
	}

	.cc-cv-feed {
		gap: 0.85em;
		grid-template-columns: 1fr 1fr;
	}

	.cc-cv-pill {
		font-size: 1.05em;
		padding: 0.55em 1.25em;
	}

	.cc-cv-topics {
		gap: 0.75em;
	}

	.cc-cv-topic {
		padding: 1.25em 0.85em;
		font-size: 1.05em;
	}

	.cc-cv-topic i {
		font-size: 1.7em;
		margin: 0 0 0.55em;
	}

	.cc-cv-topic-hero-icon {
		width: 64px;
		height: 64px;
		font-size: 1.75em;
	}

	.cc-cv-section {
		margin: 0 0 3em;
	}
}
