/* Shared polish for public Tutorials / Technologies catalog and tutorial detail (Tailwind-heavy pages). */

@keyframes catalogFadeInUp {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.animate-fade-in-up {
	animation: catalogFadeInUp 0.75s ease-out forwards;
	opacity: 0;
}

.delay-100 {
	animation-delay: 0.1s;
}
.delay-150 {
	animation-delay: 0.15s;
}
.delay-200 {
	animation-delay: 0.2s;
}
.delay-300 {
	animation-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
	.animate-fade-in-up {
		animation: none;
		opacity: 1;
		transform: none;
	}
}

.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.reveal,
	.reveal.is-visible {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

.catalog-line-clamp-1 {
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.catalog-line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.catalog-line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Primary CTA — subtle sheen, no gimmicky motion at rest */
.catalog-btn-primary {
	position: relative;
	overflow: hidden;
}

.catalog-btn-primary::after {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
	transition: left 0.45s ease;
	pointer-events: none;
}

.catalog-btn-primary:hover::after {
	left: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.catalog-btn-primary::after {
		display: none;
	}
}

/* Tutorial detail — HTML description from CMS */
.course-description {
	font-size: 1.0625rem;
	line-height: 1.8;
	color: #334155;
}

.course-description p {
	margin-bottom: 1rem;
}

.course-description h1,
.course-description h2,
.course-description h3,
.course-description h4 {
	margin-top: 1.35rem;
	margin-bottom: 0.65rem;
	color: #0f172a;
	font-weight: 700;
	line-height: 1.35;
}

.course-description ul,
.course-description ol {
	margin: 0.65rem 0 1rem 0;
	padding-left: 1.35rem;
}

.course-description li {
	margin-bottom: 0.45rem;
}

.course-description a {
	color: #4f46e5;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.course-description a:hover {
	color: #3730a3;
}

.course-description img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
	margin: 1rem 0;
}

.course-description blockquote {
	border-left: 3px solid #c7d2fe;
	background: #f8fafc;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	margin: 1rem 0;
}

.course-description-text {
	white-space: pre-line;
}

/* Catalog listing cards on Tutorials Index */
.catalog-course-card-media {
	position: relative;
}

.catalog-course-card-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.55) 100%);
	opacity: 0.85;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.group:hover .catalog-course-card-media::after {
	opacity: 0.72;
}

/* Compact tutorial cards (partial + home) */
.catalog-tutorial-card .home-tutorial-card-lock-pill {
	font-size: 0.5625rem;
	letter-spacing: 0.14em;
	background: rgba(15, 23, 42, 0.62);
}

/* Tutorial detail — primary actions (matches Tailwind primary/secondary brand) */
.catalog-cta-gradient {
	background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
	color: #fff !important;
	text-decoration: none !important;
}
.catalog-cta-gradient:hover {
	filter: brightness(1.05);
	color: #fff !important;
}

/* —— Technologies index — premium hero, breadcrumb, body —— */
.catalog-tech-hero {
	position: relative;
	overflow: hidden;
	--ct-ink: #f8fafc;
	--ct-ink-soft: rgba(248, 250, 252, 0.78);
	--ct-gold: #f4d58d;
	--ct-gold-mid: #d4a24a;
	--ct-line: rgba(255, 255, 255, 0.07);
	border-bottom: 1px solid var(--ct-line);
}

.catalog-tech-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	/* Match student auth / login visual panel (#05051a family) */
	background:
		radial-gradient(ellipse 90% 55% at 50% -15%, rgba(88, 28, 135, 0.45), transparent 58%),
		radial-gradient(ellipse 50% 40% at 100% 30%, rgba(37, 99, 235, 0.12), transparent 50%),
		radial-gradient(ellipse 40% 35% at 0% 85%, rgba(245, 158, 11, 0.06), transparent 45%),
		#05051a;
}

.catalog-tech-hero__mesh {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.22;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse 85% 70% at 50% 22%, #000 0%, #000 45%, transparent 78%);
}

.catalog-tech-hero__rim {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(244, 213, 141, 0.12) 0%,
		transparent 28%,
		transparent 72%,
		rgba(99, 102, 241, 0.06) 100%
	);
}

.catalog-tech-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border-radius: 9999px;
	border: 1px solid rgba(244, 213, 141, 0.28);
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
	color: rgba(248, 250, 252, 0.92);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	padding: 0.45rem 1.1rem;
}

.catalog-tech-eyebrow__dot {
	width: 6px;
	height: 6px;
	border-radius: 9999px;
	background: linear-gradient(135deg, var(--ct-gold) 0%, var(--ct-gold-mid) 100%);
	box-shadow: 0 0 12px rgba(244, 213, 141, 0.45);
}

.catalog-tech-title {
	margin-top: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.08;
	color: var(--ct-ink);
	font-feature-settings: "kern" 1, "liga" 1;
	text-shadow: 0 2px 48px rgba(0, 0, 0, 0.45);
}

@media (min-width: 768px) {
	.catalog-tech-title {
		margin-top: 1.75rem;
	}
}

.catalog-tech-title__accent {
	background: linear-gradient(135deg, #fff9e8 0%, var(--ct-gold) 42%, #c9a227 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.catalog-tech-title__rest {
	color: var(--ct-ink);
}

.catalog-tech-lead {
	margin-left: auto;
	margin-right: auto;
	margin-top: 1.35rem;
	max-width: 40rem;
	color: var(--ct-ink-soft);
	font-size: 1.0625rem;
	line-height: 1.7;
	font-weight: 400;
	letter-spacing: 0.01em;
}

@media (min-width: 640px) {
	.catalog-tech-lead {
		font-size: 1.125rem;
	}
}

.catalog-tech-bc-wrap {
	margin-top: 2.5rem;
	display: flex;
	justify-content: center;
}

.catalog-tech-bc {
	list-style: none;
	margin: 0;
	padding: 0.55rem 1.35rem;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.5rem;
	border-radius: 9999px;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow:
		0 8px 32px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.catalog-tech-bc a {
	color: rgba(248, 250, 252, 0.82);
	text-decoration: none;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.catalog-tech-bc a:hover {
	color: #fff;
	text-shadow: 0 0 20px rgba(244, 213, 141, 0.35);
}

.catalog-tech-bc__sep {
	color: rgba(244, 213, 141, 0.45);
	font-size: 0.75rem;
	font-weight: 300;
	margin: 0 0.15rem;
	user-select: none;
}

.catalog-tech-bc__current {
	color: var(--ct-gold);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

/* Compact hero — tighter vertical rhythm (catalog index pages) */
.catalog-tech-hero--compact {
	padding-top: 2.25rem;
	padding-bottom: 2.5rem;
}

@media (min-width: 640px) {
	.catalog-tech-hero--compact {
		padding-top: 2.65rem;
		padding-bottom: 2.85rem;
	}
}

@media (min-width: 1024px) {
	.catalog-tech-hero--compact {
		padding-top: 2.85rem;
		padding-bottom: 3rem;
	}
}

.catalog-tech-hero--compact .catalog-tech-eyebrow {
	padding: 0.35rem 0.95rem;
	font-size: 0.625rem;
	letter-spacing: 0.2em;
}

.catalog-tech-hero--compact .catalog-tech-title {
	margin-top: 0.65rem;
	font-size: clamp(1.55rem, 3.5vw, 2.15rem);
	line-height: 1.12;
	text-shadow: 0 2px 32px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
	.catalog-tech-hero--compact .catalog-tech-title {
		margin-top: 0.75rem;
	}
}

.catalog-tech-hero--compact .catalog-tech-lead {
	margin-top: 0.65rem;
	max-width: 34rem;
	font-size: 0.9375rem;
	line-height: 1.62;
}

@media (min-width: 640px) {
	.catalog-tech-hero--compact .catalog-tech-lead {
		font-size: 0.96875rem;
	}
}

.catalog-tech-hero--compact .catalog-tech-bc-wrap {
	margin-top: 1.15rem;
}

.catalog-tech-hero--compact .catalog-tech-bc {
	padding: 0.45rem 1.1rem;
}

/* Tutorials hero search — same language as auth-split form panel */
.catalog-hero-search-wrap {
	margin-top: 1.15rem;
	margin-left: auto;
	margin-right: auto;
	max-width: 28rem;
	width: 100%;
}

.catalog-hero-search-panel {
	background: linear-gradient(165deg, rgba(15, 23, 42, 0.72) 0%, rgba(12, 12, 28, 0.88) 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 1rem;
	padding: 0.5rem 0.65rem;
	box-shadow:
		0 4px 6px rgba(0, 0, 0, 0.2),
		0 16px 40px rgba(0, 0, 0, 0.32);
}

.catalog-hero-search-field {
	position: relative;
	display: flex;
	align-items: center;
}

.catalog-hero-search-field svg {
	position: absolute;
	left: 0.65rem;
	width: 1.125rem;
	height: 1.125rem;
	color: #a0a0c0;
	pointer-events: none;
}

.catalog-hero-search-input {
	width: 100%;
	border: none;
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	padding: 0.42rem 0.6rem 0.42rem 2.35rem;
	border-radius: 0.5rem;
	background: rgba(5, 5, 26, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #f1f5f9;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.catalog-hero-search-input::placeholder {
	color: rgba(160, 160, 192, 0.65);
}

.catalog-hero-search-input:focus {
	outline: none;
	border-color: rgba(251, 191, 36, 0.45);
	box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
	background: rgba(5, 5, 26, 0.8);
	color: #ffffff;
}

/* Content band below hero */
.catalog-tech-body {
	position: relative;
	border-top: 1px solid rgba(15, 23, 42, 0.06);
	/* Light band similar to auth form readability (off-white) */
	background: linear-gradient(180deg, #eceff3 0%, #f4f6f8 28%, #f8f9fa 55%, #ffffff 100%);
}

.catalog-tech-body::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
	pointer-events: none;
}

.catalog-tech-stack-head {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 2rem;
	max-width: 40rem;
}

@media (min-width: 640px) {
	.catalog-tech-stack-head {
		margin-bottom: 2.35rem;
	}
}

.catalog-tech-stack-kicker {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #6366f1;
	margin-bottom: 0.65rem;
}

.catalog-tech-stack-title {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.2;
	color: #0a0f1a;
	font-feature-settings: "kern" 1, "liga" 1;
}

@media (min-width: 640px) {
	.catalog-tech-stack-title {
		font-size: 1.75rem;
	}
}

@media (min-width: 768px) {
	.catalog-tech-stack-title {
		font-size: 1.9rem;
	}
}

.catalog-tech-stack-lead {
	margin-top: 0.85rem;
	font-size: 1.0625rem;
	line-height: 1.65;
	color: #475569;
	letter-spacing: 0.01em;
}
