/* EWB Courses — shared lightweight components used across pages.
   Heavy per-page styles live in their own files (batch 2). */

/* ---------- Section heading ---------- */
.section-heading {
	max-width: 64ch;
	margin-inline: auto;
	margin-bottom: var(--space-7);
	text-align: center;
}

.section-heading--start {
	text-align: start;
	margin-inline: 0;
}

.section-heading__title {
	margin: 0 0 var(--space-3);
}

.section-heading__lede {
	color: var(--color-text-muted);
	font-size: 1.0625rem;
	margin: 0;
}

/* ---------- Divider ---------- */
.divider {
	height: 1px;
	background: var(--color-border);
	margin-block: var(--space-7);
	border: 0;
}

.divider--accent {
	height: 3px;
	width: 60px;
	background: var(--cyan);
	border-radius: 2px;
	margin-inline: auto;
	margin-block: var(--space-4);
}

/* ---------- Course tile ---------- */
.course-tile {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	height: 100%;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-6);
	transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
	overflow: hidden;
	position: relative;
}

.course-tile::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, var(--cyan), var(--lime));
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--dur) var(--ease);
}

.course-tile:hover {
	transform: translateY(-3px);
	border-color: var(--color-border-strong);
	box-shadow: var(--shadow-2);
}

.course-tile:hover::before { transform: scaleX(1); }

.course-tile__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
}

.course-tile__code {
	font-family: var(--font-display);
	font-weight: var(--fw-black);
	font-size: var(--fs-h4);
	color: var(--white);
	margin: 0;
	line-height: 1.1;
}

.course-tile__title {
	font-size: 1.0625rem;
	font-weight: var(--fw-semibold);
	color: var(--color-text-muted);
	margin: 0;
	line-height: var(--lh-snug);
}

.course-tile__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-top: auto;
}

.course-tile__cta {
	color: var(--cyan);
	font-weight: var(--fw-semibold);
	font-size: var(--fs-small);
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	margin-top: var(--space-3);
}

/* ---------- Testimonial card ---------- */
.testimonial {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-6);
	height: 100%;
}

.testimonial__quote {
	color: var(--color-text);
	font-size: 1.0625rem;
	line-height: var(--lh-base);
	margin: 0;
	position: relative;
}

.testimonial__quote::before {
	content: "“";
	font-family: var(--font-display);
	color: var(--cyan);
	font-size: 2rem;
	line-height: 1;
	margin-inline-end: 4px;
	vertical-align: -6px;
}

.testimonial__person {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-top: auto;
}

.testimonial__avatar {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-pill);
	overflow: hidden;
	background: var(--color-bg-alt);
	flex: 0 0 48px;
}

.testimonial__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testimonial__name {
	font-weight: var(--fw-semibold);
	color: var(--white);
	font-size: var(--fs-small);
	margin: 0;
}

.testimonial__course {
	color: var(--color-text-muted);
	font-size: var(--fs-xs);
	margin: 0;
}

/* ---------- Stat block (homepage trust strip) ---------- */
.stat-block {
	display: grid;
	gap: var(--space-5);
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
	.stat-block { grid-template-columns: repeat(4, 1fr); }
}

.stat-block .stat {
	text-align: center;
	align-items: center;
	padding: var(--space-5);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}

/* ---------- FAQ accordion ---------- */
.faq {
	display: grid;
	gap: var(--space-3);
}

.faq__item {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
	transition: border-color var(--dur-fast) var(--ease);
}

.faq__item[data-state="open"] {
	border-color: var(--color-border-strong);
}

.faq__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-5);
	text-align: start;
	font-family: var(--font-display);
	font-weight: var(--fw-semibold);
	font-size: 1.0625rem;
	color: var(--white);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.faq__trigger:hover { color: var(--cyan); }

.faq__icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	position: relative;
	color: var(--cyan);
}

.faq__icon::before,
.faq__icon::after {
	content: "";
	position: absolute;
	background: currentColor;
	border-radius: 2px;
	left: 50%;
	top: 50%;
}
.faq__icon::before { width: 14px; height: 2px; transform: translate(-50%, -50%); }
.faq__icon::after  { width: 2px; height: 14px; transform: translate(-50%, -50%); transition: transform var(--dur-fast) var(--ease); }

.faq__item[data-state="open"] .faq__icon::after { transform: translate(-50%, -50%) scaleY(0); }

.faq__panel {
	padding: 0 var(--space-5) var(--space-5);
	color: var(--color-text-muted);
	max-height: 0;
	overflow: hidden;
	transition: max-height var(--dur) var(--ease), padding var(--dur) var(--ease);
}

.faq__item[data-state="open"] .faq__panel {
	max-height: 600px;
	padding: 0 var(--space-5) var(--space-5);
}

/* ---------- Marquee (logo/tech strip) ---------- */
.marquee {
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
	display: flex;
	gap: var(--space-8);
	width: max-content;
	animation: ewb-marquee 30s linear infinite;
}

.marquee__item {
	flex: 0 0 auto;
	color: var(--color-text-muted);
	font-family: var(--font-display);
	font-weight: var(--fw-bold);
	font-size: 1.125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.65;
}

@keyframes ewb-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.marquee__track { animation: none; }
}

/* ---------- Page header / breadcrumbs ---------- */
.page-header {
	margin-bottom: var(--space-7);
}

.page-header__title {
	margin: 0 0 var(--space-3);
}

.ewb-breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	padding: 0;
	margin: 0 0 var(--space-3);
	font-size: var(--fs-xs);
	color: var(--color-text-muted);
}

.ewb-breadcrumbs li + li::before {
	content: "/";
	margin-inline-end: var(--space-2);
	color: var(--color-border-strong);
}

.ewb-breadcrumbs a { color: var(--color-text-muted); }
.ewb-breadcrumbs a:hover { color: var(--cyan); }
.ewb-breadcrumbs [aria-current="page"] { color: var(--white); }

/* ---------- Search form ---------- */
.search-form {
	display: flex;
	gap: var(--space-2);
	max-width: 480px;
	margin: 0 auto var(--space-5);
}

.search-form .search-field { flex: 1; }

.search-form .search-submit {
	padding: 0.75rem 1.25rem;
	background: var(--cyan);
	color: var(--navy-deep);
	border-radius: var(--radius-md);
	font-weight: var(--fw-bold);
	border: 0;
}

/* ---------- Error 404 ---------- */
.error-404 {
	max-width: 640px;
	margin-inline: auto;
}
.error-404__title { margin-bottom: var(--space-4); }
.error-404__lede  { color: var(--color-text-muted); margin-bottom: var(--space-6); }
.error-404__cta   { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

/* ---------- Post card (blog index/search) ---------- */
.post-list {
	display: grid;
	gap: var(--space-5);
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.post-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
	.post-list { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.post-card__thumb img {
	width: 100%;
	border-radius: var(--radius-md);
}

.post-card__title {
	margin: 0;
	font-size: var(--fs-h4);
}

.post-card__title a {
	color: var(--white);
}

.post-card__title a:hover { color: var(--cyan); }

.post-card__meta {
	font-size: var(--fs-xs);
	color: var(--color-text-muted);
}

.post-card__excerpt {
	color: var(--color-text-muted);
	font-size: var(--fs-small);
}

.post-card__more {
	margin-top: auto;
	color: var(--cyan);
	font-weight: var(--fw-semibold);
	font-size: var(--fs-small);
}

/* ---------- Pagination ---------- */
.pagination,
.navigation.pagination {
	margin-top: var(--space-7);
	display: flex;
	justify-content: center;
}

.nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-weight: var(--fw-semibold);
	font-size: var(--fs-small);
}

.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
	background: var(--cyan);
	color: var(--navy-deep);
	border-color: var(--cyan);
}

/* ---------- Comments (default block) ---------- */
.comments-area {
	margin-top: var(--space-8);
	padding-top: var(--space-7);
	border-top: 1px solid var(--color-border);
}
.comments-title { margin-bottom: var(--space-5); }
.comment-list { list-style: none; padding: 0; display: grid; gap: var(--space-5); }
.comment-body { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); }
