/*
 * Featured Courses widget styles.
 * ponytail: the source markup is Tailwind; these are the exact utilities it uses,
 * hand-written and scoped to .fc-courses so nothing leaks into the rest of the site.
 * Swap for a real Tailwind build only if more of the site is ported.
 */

.fc-courses {
	--teal: #0d9488;
	--teal-light: #2dd4bf;
	--teal-dark: #0f766e;
	--navy: #10263c;
	--ink: #0f2942;
	--mist: #e5eaf0;
	--slate-100: #f1f5f9;
	--slate-500: #64748b;
	--slate-600: #475569;
	box-sizing: border-box;
}

.fc-courses *,
.fc-courses *::before,
.fc-courses *::after {
	box-sizing: border-box;
}

/* Layout ------------------------------------------------------------------ */
.fc-courses .mt-10 { margin-top: 2.5rem; }
.fc-courses .mt-5 { margin-top: 1.25rem; }
.fc-courses .pt-4 { padding-top: 1rem; }
.fc-courses .p-6 { padding: 1.5rem; }
.fc-courses .px-4 { padding-left: 1rem; padding-right: 1rem; }
.fc-courses .py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.fc-courses .px-3 { padding-left: .75rem; padding-right: .75rem; }
.fc-courses .py-1 { padding-top: .25rem; padding-bottom: .25rem; }

.fc-courses .flex { display: flex; }
.fc-courses .inline-flex { display: inline-flex; }
.fc-courses .flex-col { flex-direction: column; }
.fc-courses .flex-wrap { flex-wrap: wrap; }
.fc-courses .flex-1 { flex: 1 1 0%; }
.fc-courses .items-center { align-items: center; }
.fc-courses .justify-center { justify-content: center; }
.fc-courses .justify-between { justify-content: space-between; }
.fc-courses .gap-1 { gap: .25rem; }
.fc-courses .gap-1\.5 { gap: .375rem; }
.fc-courses .gap-2 { gap: .5rem; }
.fc-courses .gap-6 { gap: 1.5rem; }

.fc-courses .grid {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
	.fc-courses .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.fc-courses .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fc-courses .relative { position: relative; }
.fc-courses .absolute { position: absolute; }
.fc-courses .inset-0 { inset: 0; }
.fc-courses .left-4 { left: 1rem; }
.fc-courses .top-4 { top: 1rem; }
.fc-courses .right-4 { right: 1rem; }
.fc-courses .bottom-3 { bottom: .75rem; }
.fc-courses .h-1 { height: .25rem; }
.fc-courses .h-4 { height: 1rem; }
.fc-courses .w-4 { width: 1rem; }
.fc-courses .h-44 { height: 11rem; }
.fc-courses .h-full { height: 100%; }
.fc-courses .w-full { width: 100%; }
.fc-courses .overflow-hidden { overflow: hidden; }

/* Surfaces ---------------------------------------------------------------- */
.fc-courses .rounded-full { border-radius: 9999px; }
.fc-courses .rounded-2xl { border-radius: 1rem; }
.fc-courses .border { border: 1px solid transparent; }
.fc-courses .border-mist { border-color: var(--mist); }
.fc-courses .border-t { border-top: 1px solid transparent; }
.fc-courses .border-slate-100 { border-color: var(--slate-100); }
.fc-courses .bg-white { background-color: #fff; }
.fc-courses .bg-white\/90 { background-color: rgba(255, 255, 255, .9); }
.fc-courses .bg-slate-100 { background-color: var(--slate-100); }
.fc-courses .bg-teal { background-color: var(--teal); }
.fc-courses .backdrop-blur { backdrop-filter: blur(8px); }
.fc-courses .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.fc-courses .shadow-teal\/20 { box-shadow: 0 1px 3px 0 rgba(13, 148, 136, .2); }

.fc-courses .bg-gradient-to-t.from-navy\/75 {
	background-image: linear-gradient(to top, rgba(16, 38, 60, .75), rgba(16, 38, 60, .15) 50%, transparent);
}
.fc-courses .bg-gradient-to-r.from-teal-light { background-image: linear-gradient(to right, var(--teal-light), var(--teal)); }
.fc-courses .bg-gradient-to-r.from-teal { background-image: linear-gradient(to right, var(--teal), var(--teal-dark)); }
.fc-courses .bg-gradient-to-r.from-teal-dark { background-image: linear-gradient(to right, var(--teal-dark), var(--ink)); }

/* Type -------------------------------------------------------------------- */
.fc-courses .text-xs { font-size: .75rem; line-height: 1rem; }
.fc-courses .text-sm { font-size: .875rem; line-height: 1.25rem; }
.fc-courses .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.fc-courses .font-medium { font-weight: 500; }
.fc-courses .font-semibold { font-weight: 600; }
.fc-courses .font-bold { font-weight: 700; }
.fc-courses .font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.fc-courses .leading-snug { line-height: 1.375; }
.fc-courses .text-white { color: #fff; }
.fc-courses .text-white\/90 { color: rgba(255, 255, 255, .9); }
.fc-courses .text-ink { color: var(--ink); }
.fc-courses .text-teal { color: var(--teal); }
.fc-courses .text-slate-500 { color: var(--slate-500); }
.fc-courses .text-slate-600 { color: var(--slate-600); }

.fc-courses h3 { margin: 0; }
.fc-courses a { text-decoration: none; }
.fc-courses button { border: 0; cursor: pointer; font: inherit; }
.fc-courses img { display: block; max-width: 100%; }

/* Media ------------------------------------------------------------------- */
.fc-courses .relative.h-44 img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}

/* Transitions & hover ----------------------------------------------------- */
.fc-courses .transition-all { transition: all .3s; }
.fc-courses .transition-colors { transition: color .3s; }
.fc-courses .transition-shadow { transition: border-color .3s, box-shadow .3s; }

.fc-courses .group:hover .group-hover\:scale-110 { transform: scale(1.1); }
.fc-courses .group:hover .group-hover\:text-teal { color: var(--teal); }
.fc-courses .group:hover .group-hover\:gap-2 { gap: .5rem; }
.fc-courses .group:hover.hover\:border-teal\/40 { border-color: rgba(13, 148, 136, .4); }
.fc-courses .group:hover.hover\:shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); }

.fc-courses button.bg-slate-100:hover {
	background-color: rgba(13, 148, 136, .1);
	color: var(--teal);
}

/* Filter state ------------------------------------------------------------ */
.fc-courses button.is-active {
	background-color: var(--teal);
	color: #fff;
	box-shadow: 0 1px 3px 0 rgba(13, 148, 136, .2);
}

.fc-courses [data-cats].is-hidden { display: none; }

/* Clickable card ---------------------------------------------------------- */
/*
 * Stretched link: the title anchor's ::after covers the whole tile, so the
 * card is clickable without wrapping it in an <a> (which would nest the
 * other links) and without a JS click handler (which keyboard users and
 * middle-click / open-in-new-tab would miss).
 */
.fc-courses .fc-card {
	position: relative;
}

.fc-courses a.fc-card-link {
	color: inherit;
	text-decoration: none;
}

.fc-courses a.fc-card-link::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
}

.fc-courses .fc-card:has( .fc-card-link:focus-visible ) {
	outline: 2px solid var( --teal );
	outline-offset: 2px;
}

.fc-courses a.fc-card-link:focus-visible {
	outline: none;
}

.fc-courses .fc-card:hover {
	cursor: pointer;
}

/* Archive / blog listing pages -------------------------------------------- */
.fc-listing-page {
	/* The theme constrains .site-main; the inner wrapper handles width instead. */
	width: auto;
	max-width: none;
	padding: 0 0 4rem;
}

.fc-listing-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* Archive hero ------------------------------------------------------------ */
/*
 * Full-bleed strip sitting flush under the header. The clip must live on
 * <html> — on any nearer ancestor it clips the 100vw breakout back to that
 * ancestor's width.
 */
html:has( .fc-banner ) {
	overflow-x: clip;
}

.fc-banner {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin: 0 0 3.5rem 50%;
	transform: translateX( -50% );
	padding: 4rem 0 3.5rem;
	overflow: hidden;
	background-color: #0b4f57;
	box-sizing: border-box;
	isolation: isolate;
}

@media (max-width: 768px) {
	.fc-banner {
		margin-bottom: 2.5rem;
		padding: 2.5rem 0 2.25rem;
	}
}

.fc-banner-media {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	transform: scale( 1.02 );
}

/* Teal wash over the photo, deepest at the left where the text sits. */
.fc-banner-overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient( 100deg, rgba( 8, 62, 70, .96 ) 0%, rgba( 11, 92, 98, .82 ) 42%, rgba( 15, 41, 66, .58 ) 100% );
}

/* Soft light bloom in the top-right, so the card is not a flat rectangle. */
.fc-banner-glow {
	position: absolute;
	top: -30%;
	right: -10%;
	z-index: -1;
	width: 28rem;
	height: 28rem;
	border-radius: 9999px;
	background: radial-gradient( circle, rgba( 45, 212, 191, .35 ), transparent 65% );
	pointer-events: none;
}

/* Content sits on the same 1200px grid as the listing below it. */
.fc-banner-inner {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem;
	box-sizing: border-box;
}

/* Breadcrumb -------------------------------------------------------------- */
.fc-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-bottom: 1.25rem;
	font-size: .8125rem;
	font-weight: 500;
	letter-spacing: .01em;
	color: rgba( 255, 255, 255, .7 );
}

.fc-banner .fc-crumbs a {
	color: rgba( 255, 255, 255, .82 );
	text-decoration: none;
	transition: color .2s;
}

.fc-banner .fc-crumbs a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: .2em;
}

.fc-crumbs__sep {
	opacity: .45;
}

/* Title block ------------------------------------------------------------- */
.fc-banner-head {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

/* Frosted tile, so the emoji reads as a deliberate mark and not stray text. */
.fc-banner-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 4.25rem;
	height: 4.25rem;
	border: 1px solid rgba( 255, 255, 255, .28 );
	border-radius: 1.125rem;
	background: rgba( 255, 255, 255, .14 );
	backdrop-filter: blur( 10px );
	font-size: 2.125rem;
	line-height: 1;
	animation: fc-fade-in-up .9s cubic-bezier( .22, .61, .36, 1 ) both;
}

.fc-banner-headtext {
	min-width: 0;
	max-width: 46rem;
}

.fc-banner .fc-banner-title {
	margin: 0;
	color: #fff;
	font-size: clamp( 1.875rem, 4vw, 3rem );
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.02em;
	animation: fc-fade-in-up .9s cubic-bezier( .22, .61, .36, 1 ) both;
}

.fc-banner-desc {
	margin-top: .75rem;
	max-width: 42rem;
	color: rgba( 255, 255, 255, .88 );
	font-size: 1.0625rem;
	line-height: 1.6;
	animation: fc-fade-in-up .9s cubic-bezier( .22, .61, .36, 1 ) .15s both;
}

/* Count badge ------------------------------------------------------------- */
.fc-banner-count {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	margin: 1.5rem 0 0;
	padding: .375rem .875rem;
	border: 1px solid rgba( 255, 255, 255, .22 );
	border-radius: 9999px;
	background: rgba( 255, 255, 255, .12 );
	backdrop-filter: blur( 10px );
	color: #fff;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .03em;
}

.fc-banner-count__dot {
	width: .5rem;
	height: .5rem;
	border-radius: 9999px;
	background: #2dd4bf;
	box-shadow: 0 0 0 3px rgba( 45, 212, 191, .25 );
}

/* Sibling category chips -------------------------------------------------- */
.fc-banner-areas {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1.75rem;
	padding-top: 1.75rem;
	border-top: 1px solid rgba( 255, 255, 255, .16 );
}

.fc-banner .fc-banner-chip {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	padding: .4375rem 1rem;
	border: 1px solid rgba( 255, 255, 255, .28 );
	border-radius: 9999px;
	background: rgba( 255, 255, 255, .08 );
	color: rgba( 255, 255, 255, .92 );
	font-size: .8125rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	transition: transform .2s, background-color .2s, border-color .2s, color .2s;
}

.fc-banner .fc-banner-chip:hover,
.fc-banner .fc-banner-chip:focus-visible {
	transform: translateY( -1px );
	border-color: rgba( 255, 255, 255, .7 );
	background-color: rgba( 255, 255, 255, .2 );
	color: #fff;
}

.fc-banner .fc-banner-chip.is-current {
	border-color: #fff;
	background-color: #fff;
	color: #0b4f57;
	font-weight: 600;
}

/* No banner image: the same card, drawn as a teal gradient. --------------- */
.fc-banner--plain {
	background-image: linear-gradient( 135deg, #0b4f57 0%, #0d6e6e 55%, #10263c 100% );
}

@media (prefers-reduced-motion: reduce) {
	.fc-banner-icon,
	.fc-banner .fc-banner-title,
	.fc-banner-desc {
		animation: none;
	}

	.fc-banner .fc-banner-chip:hover {
		transform: none;
	}
}

@keyframes fc-fade-in-up {
	from {
		opacity: 0;
		transform: translateY( 24px );
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 640px) {
	.fc-banner-head {
		gap: .875rem;
	}

	.fc-banner-icon {
		width: 3.25rem;
		height: 3.25rem;
		border-radius: .875rem;
		font-size: 1.625rem;
	}

	.fc-banner-desc {
		font-size: 1rem;
	}
}


.fc-listing-empty {
	margin-top: 2.5rem;
	text-align: center;
	color: #64748b;
}

/* The grid already carries its own top margin from .mt-10. */
.fc-listing-page .fc-courses > .grid:first-child {
	margin-top: 2.5rem;
}

.fc-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin-top: 2.5rem;
}

.fc-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	padding: .5rem 1rem;
	border-radius: 9999px;
	background-color: #f1f5f9;
	color: #475569;
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	transition: all .3s;
}

.fc-pagination .page-numbers:hover {
	background-color: rgba( 13, 148, 136, .1 );
	color: #0d9488;
}

.fc-pagination .page-numbers.current {
	background-color: #0d9488;
	color: #fff;
	box-shadow: 0 1px 3px 0 rgba( 13, 148, 136, .2 );
}
