/**
 * AI University Core — public frontend stylesheet.
 * Scoped under .aiu-app so it never leaks into the rest of the theme.
 * Override any variable from a child theme / custom CSS to reskin instantly.
 */

.aiu-app {
	--ai-primary: #5b3df6;
	--ai-primary-dark: #4527d1;
	--ai-secondary: #0f172a;
	--ai-text: #1a1a2e;
	--ai-muted: #6b7280;
	--ai-border: #e5e7eb;
	--ai-background: #ffffff;
	--ai-background-alt: #f7f7fb;
	--ai-success: #027a48;
	--ai-warning: #c2410c;
	--ai-radius: 14px;
	--ai-radius-sm: 8px;
	--ai-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
	--ai-shadow-hover: 0 4px 12px rgba(16, 24, 40, .08);
	--ai-max-width: 1200px;

	color: var(--ai-text);
	-webkit-font-smoothing: antialiased;
}

.aiu-app,
.aiu-app * {
	box-sizing: border-box;
}

.aiu-app a {
	color: inherit;
	text-decoration: none;
}

.aiu-container {
	max-width: var(--ai-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.aiu-empty-state {
	color: var(--ai-muted);
	padding: 40px 0;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* Section headings                                                    */
/* ------------------------------------------------------------------ */

.aiu-section {
	padding: 48px 0;
}

.aiu-section--alt {
	background: var(--ai-background-alt);
}

.aiu-section__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.aiu-section__title {
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0;
}

.aiu-section__link {
	font-weight: 600;
	font-size: 14px;
	color: var(--ai-primary);
	white-space: nowrap;
}

.aiu-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ai-primary);
	margin-bottom: 6px;
}

/* ------------------------------------------------------------------ */
/* Sub-navigation (in-content, works with any theme header)            */
/* ------------------------------------------------------------------ */

.aiu-subnav {
	background: var(--ai-background);
	border-bottom: 1px solid var(--ai-border);
	position: sticky;
	top: 0;
	z-index: 40;
}

.aiu-subnav__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
}

.aiu-subnav__brand {
	font-weight: 700;
	font-size: 16px;
}

.aiu-subnav__toggle {
	display: none;
	background: none;
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius-sm);
	padding: 8px 10px;
	cursor: pointer;
}

.aiu-subnav__toggle span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--ai-text);
	margin: 4px 0;
}

.aiu-subnav__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.aiu-subnav__links a {
	padding: 8px 12px;
	border-radius: var(--ai-radius-sm);
	font-size: 14px;
	font-weight: 600;
	color: var(--ai-muted);
}

.aiu-subnav__links a:hover,
.aiu-subnav__links a.is-active {
	color: var(--ai-primary);
	background: var(--ai-background-alt);
}

@media (max-width: 782px) {
	.aiu-subnav__toggle {
		display: block;
	}

	.aiu-subnav__links {
		display: none;
		flex-direction: column;
		width: 100%;
		padding-bottom: 12px;
	}

	.aiu-subnav.is-open .aiu-subnav__links {
		display: flex;
	}
}

/* ------------------------------------------------------------------ */
/* Hero                                                                 */
/* ------------------------------------------------------------------ */

.aiu-hero {
	background: linear-gradient(180deg, var(--ai-background-alt) 0%, var(--ai-background) 100%);
	padding: 72px 0;
	text-align: center;
	background-size: cover;
	background-position: center;
}

.aiu-hero__heading {
	font-size: clamp(32px, 5vw, 52px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	max-width: 780px;
	margin: 0 auto 18px;
}

.aiu-hero__description {
	font-size: 18px;
	color: var(--ai-muted);
	max-width: 620px;
	margin: 0 auto 28px;
}

.aiu-hero__actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */

.aiu-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}

.aiu-btn:hover {
	transform: translateY(-1px);
}

.aiu-btn--primary {
	background: var(--ai-primary);
	color: #fff;
}

.aiu-btn--primary:hover {
	background: var(--ai-primary-dark);
	color: #fff;
}

.aiu-btn--secondary {
	background: transparent;
	color: var(--ai-text);
	border-color: var(--ai-border);
}

/* ------------------------------------------------------------------ */
/* Grid + Cards                                                         */
/* ------------------------------------------------------------------ */

.aiu-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(3, 1fr);
}

.aiu-grid--2 { grid-template-columns: repeat(2, 1fr); }
.aiu-grid--3 { grid-template-columns: repeat(3, 1fr); }
.aiu-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
	.aiu-grid--3, .aiu-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.aiu-grid { grid-template-columns: 1fr !important; }
}

.aiu-card {
	background: var(--ai-background);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	box-shadow: var(--ai-shadow);
	transition: box-shadow .15s ease, transform .15s ease;
}

.aiu-card:hover {
	box-shadow: var(--ai-shadow-hover);
	transform: translateY(-2px);
}

.aiu-card__link {
	display: block;
	padding: 18px;
	flex: 1;
}

.aiu-card__image {
	aspect-ratio: 16 / 9;
	background: var(--ai-background-alt);
	overflow: hidden;
}

.aiu-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aiu-card__image--placeholder {
	background: linear-gradient(135deg, var(--ai-background-alt), #ececf7);
}

.aiu-card__logo-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.aiu-card__logo {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid var(--ai-border);
}

.aiu-card__title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.35;
}

.aiu-card__excerpt {
	font-size: 14px;
	color: var(--ai-muted);
	margin: 0 0 10px;
	line-height: 1.5;
}

.aiu-card__meta {
	font-size: 13px;
	color: var(--ai-muted);
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0;
}

.aiu-card__price {
	font-weight: 700;
	color: var(--ai-primary);
	margin: 4px 0 0;
}

.aiu-card__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	gap: 6px;
	z-index: 2;
}

.aiu-card__cta {
	display: block;
	text-align: center;
	padding: 12px 16px;
	border-top: 1px solid var(--ai-border);
	font-weight: 600;
	font-size: 14px;
	color: var(--ai-primary);
	background: none;
	border-left: none;
	border-right: none;
	border-bottom: none;
	width: 100%;
	cursor: pointer;
}

.aiu-card__cta:hover {
	background: var(--ai-background-alt);
}

.aiu-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef2ff;
	color: #4338ca;
}

.aiu-badge--trending { background: #fff1e6; color: var(--ai-warning); }
.aiu-badge--verified { background: #ecfdf3; color: var(--ai-success); }
.aiu-badge--featured { background: #eef2ff; color: #4338ca; }
.aiu-badge--status { position: static; display: inline-block; margin: 14px 14px 0; }
.aiu-status-live { background: #fee4e2; color: #b42318; }
.aiu-status-upcoming { background: #eef2ff; color: #4338ca; }
.aiu-status-completed { background: #f2f4f7; color: #475467; }
.aiu-status-recording_available { background: #ecfdf3; color: var(--ai-success); }

.aiu-pill {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ai-background-alt);
	border: 1px solid var(--ai-border);
	color: var(--ai-text);
}

.aiu-rating {
	color: #b54708;
	font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Single page layout                                                   */
/* ------------------------------------------------------------------ */

.aiu-single {
	padding: 40px 0 64px;
}

.aiu-single__header {
	max-width: 820px;
	margin: 0 auto 32px;
}

.aiu-single__title {
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.2;
	margin: 0 0 14px;
}

.aiu-single__meta {
	color: var(--ai-muted);
	font-size: 14px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.aiu-single__content {
	max-width: 760px;
	margin: 0 auto;
	font-size: 17px;
	line-height: 1.75;
}

.aiu-single__content p {
	margin: 0 0 20px;
}

.aiu-single__thumbnail {
	max-width: 900px;
	margin: 0 auto 32px;
	border-radius: var(--ai-radius);
	overflow: hidden;
}

.aiu-single__thumbnail img {
	width: 100%;
	display: block;
}

.aiu-facts {
	background: var(--ai-background-alt);
	border-radius: var(--ai-radius);
	padding: 20px;
	max-width: 760px;
	margin: 0 auto 32px;
}

.aiu-facts dl {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 10px 16px;
	margin: 0;
}

.aiu-facts dt {
	font-weight: 600;
	color: var(--ai-muted);
}

.aiu-facts dd {
	margin: 0;
}

.aiu-breadcrumbs {
	font-size: 13px;
	color: var(--ai-muted);
	max-width: 820px;
	margin: 0 auto 20px;
}

.aiu-breadcrumbs a {
	color: var(--ai-muted);
}

.aiu-breadcrumbs a:hover {
	color: var(--ai-primary);
}

/* ------------------------------------------------------------------ */
/* Prompt content block + copy button                                  */
/* ------------------------------------------------------------------ */

.aiu-prompt-box {
	background: var(--ai-secondary);
	color: #f5f5ff;
	border-radius: var(--ai-radius);
	padding: 22px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 15px;
	line-height: 1.6;
	max-width: 760px;
	margin: 0 auto 16px;
	white-space: pre-wrap;
}

.aiu-copy-prompt-btn {
	margin: 0 auto 32px;
	display: block;
}

.aiu-copy-feedback {
	text-align: center;
	font-size: 13px;
	color: var(--ai-success);
	margin: -20px auto 24px;
	min-height: 18px;
}

/* ------------------------------------------------------------------ */
/* Filters (base styles — extended in Phase 4)                         */
/* ------------------------------------------------------------------ */

.aiu-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.aiu-filters select,
.aiu-filters input[type="search"] {
	padding: 10px 14px;
	border-radius: var(--ai-radius-sm);
	border: 1px solid var(--ai-border);
	font-size: 14px;
	background: var(--ai-background);
}

/* ------------------------------------------------------------------ */
/* Newsletter                                                           */
/* ------------------------------------------------------------------ */

.aiu-newsletter {
	background: var(--ai-secondary);
	color: #fff;
	border-radius: var(--ai-radius);
	padding: 48px 32px;
	text-align: center;
}

.aiu-newsletter h2 {
	font-size: 26px;
	margin: 0 0 8px;
}

.aiu-newsletter p {
	color: #cbd5e1;
	margin: 0 0 22px;
}

.aiu-newsletter form {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.aiu-newsletter input[type="email"] {
	padding: 12px 16px;
	border-radius: 999px;
	border: none;
	min-width: 280px;
	font-size: 15px;
}

@media (max-width: 480px) {
	.aiu-newsletter input[type="email"] {
		min-width: 0;
		width: 100%;
	}
}

/* ------------------------------------------------------------------ */
/* Related content                                                      */
/* ------------------------------------------------------------------ */

.aiu-related {
	max-width: var(--ai-max-width);
	margin: 0 auto;
	padding: 32px 20px 0;
}

.aiu-related + .aiu-related {
	padding-top: 8px;
}

.aiu-related h2 {
	font-size: 20px;
	margin: 0 0 16px;
}
